INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Handling playlists  (Read 5309 times)

src666

  • Recent member
  • *
  • Posts: 22
Handling playlists
« on: May 01, 2007, 11:42:02 am »

First off, is there any way to figure out which Playlist you are in from the CurPlayList object? I may be missing something, but it seems to be a missing feature.

Also, there seems to be a LOT of functionality surrounding playlists/schemes that is hidden from the API. Specifically, it seems like navigating the music library in a rational manner (skipping through artists/albums, etc) will involve a TON of overhead. Right now, it looks like I would have to get the next file, check the artist/album/etc against the current file, then rinse/repeat until I find the first non-matching item. That's a whole heck of a lot of round-trips through the object model.

Is there no built-in functionality for "Next artist", "Next Album", "Next Genre", etc.? Couldn't that be exposed through the object model?

Or am I missing something obvious?
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Handling playlists
« Reply #1 on: May 01, 2007, 11:48:36 am »

src666,

Well I missed it for certain. Maybe there's a smarter way to do this but this is how I implemented looking for a file with a specific Key:

Code: [Select]
        private int findFile( int intKey )
        {
            int intCur;
            int intMax;
            IMJFilesAutomation files;
            IMJFileAutomation file;

            files = (IMJFilesAutomation) gridSongs.Tag;
            intMax = files.GetNumberFiles ();

            for (intCur = 0; intCur < intMax ; intCur++ )
            {
                file = files.GetFile(intCur);

                if ( file.GetKey() == intKey )
                {
                    return intCur;
                }
            }

            return -1;
        }

Paul.
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Handling playlists
« Reply #2 on: May 01, 2007, 11:57:08 am »

src666: The CurPlaylistAutomation covers "Playing Now", not any playlist.

j

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #3 on: May 01, 2007, 12:59:20 pm »

src666: The CurPlaylistAutomation covers "Playing Now", not any playlist.

j



Thanks for responding. OK, so how do I go from "Playing Now" to the next playlist in the system? Absent that, I didn't see any way to get an index into the playlists from the zone information.

That was poorly stated - here's the question: How does my program know which playlist a Zone is currently on, and from there go to either the preceding or following playlist? Same question for Schemes.
Logged

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #4 on: May 01, 2007, 01:23:02 pm »

OK, and just to clarify things so I don't keep pecking away at the details.

I'm designing a zone based music navigation system that is similar to other devices I use (my Phatnoise Phatbox, in particular). This is going to be an interface between MC and Russound RNet products (yes, I know about the CAV6.6 project - not what I really want).

I want to be able to switch between major modes (Artist, Artist/Album, Genre, Playlist). I want to be able to quickly scan within these modes. This will include first-letter alphabetical scanning (A, B, C, etc.) as well as skipping by artist, artist/album, genre, playlist. This is going to be my primary interface to my collection of 10,000+ audio files, so solid navigation is critical.

Just as an added kicker, I'm going to try to add voice navigation (text-to-speech feedback messages), but that's just gravy.

I've got the basics - I can play, skip individual songs, display messages, etc. However, the playlist navigation features exposed by the API seem to be, sorry to say, rudimentary. Given the navigation capabilities of the base software, there appears to be a lot of functionality that isn't exposed yet.

The major issues right now are the inability to figure out which playlist/scheme the zone is currently using, and the need to navigate through the playlists on a strict file-by-file basis.

Please note, this is just constructive criticism - obviously the API is a work in progress. I'm just hoping that there is some more progress to expose the capabilities of the base system, cause otherwise I'm stuck rewriting a lot of what it already does. That would turn MC into not much more than a music database with multiple zone playback (from my app's perspective). At that point, I could almost do just as well with multiple instances of WinAmp.

Also, please be aware that I never touched MC until last weekend, and might be missing a LOT about it - I'm very aware of my own ignorance. But that also means I have no "brand loyalty" and am generally going to call it as I see it.
Logged

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #5 on: May 01, 2007, 04:28:59 pm »

A couple more questions regarding schemes and playlists.

First off, there seem to be a lot of "Get" calls, and not many "Set" calls. For instance, I don't see how you are supposed to tell a zone to play a given playlist, and I don't see ANY interface to do anything other than enumerate Schemes.

I just went back and reviewed the wiki, and I don't see ANY way to:

1. Tell a zone to play from a playlist
2. Tell a zone to play from a scheme
3. Get any indication what the current playlist or scheme is
4. Reorder a playlist other than shuffle - is there no sorting?
5. Search a playlist without walking through every item.

Is walking through the playlist files by index really the only way to access the files?

It would appear that in order to play something, you have to clear the CurPlayList, then individually add the files from whatever playlist or scheme you have chosen. Is this correct?

It really looks like the API is designed for applications that are inward looking - i.e. things that display what is going on in MC, not things that actually control MC or change it's behavior. Access to the underlying song data is very suboptimal, since anything beyond the current/next/previous song requires walking the list.

I'm assuming that you are open to enhancement requests, so here are a few concrete items:

1. Search - give us a way to search the MC database, unfiltered and filtered by current playlist/arbitrary playlist/scheme. This is HUGE.

2. Playback control - Point a zone at a playlist/scheme, and use that as the current playlist. Give us some way to know what a zone is doing beyond the current file (what playlist/scheme, is it in Synchronized mode, etc.).

3. Sorting - a way to reorder the current playlist that isn't random (artist, album, etc.). Since the indexes won't change during a sort (I hope), we would need a better way to walk the list since the sort will probably put the files out of order. Oh, and make sure that you can still walk the list without affecting current playback (i.e. GetNext() won't work).

At the moment, it looks like I'm just going to have to scan the MC database and manage all the data in my app, using MC as nothing more than a playback app.
Logged

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #6 on: May 07, 2007, 09:51:23 pm »

No response at all? Not even "Good Ideas", "Bad Ideas" or even "Go away you bother me"?

I'm really on the verge of having to just read the MC data into my own database and handle all the music management from there. Considering that MC already has 90% of the features I would like to use, but only exposes a bare minimum, this isn't a happy-making thought. Again, I may be missing something in my reading/understanding of the API, and if so would LOVE to know about it.

I would love to get some feedback on these issues. Thanks!
Logged

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #7 on: May 17, 2007, 10:54:25 pm »

I guess you must be pretty busy, but these questions are halfway through their 3rd week on the board. If you want to blow them off, just say "we're not interested in these issues" and I will move on. Otherwise, I would still like some feedback, or pointers if I'm missing something in the existing API.
Logged

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #8 on: May 31, 2007, 09:21:21 pm »

In 15 hours it will have been a month since I last got some feedback on this. I'm not trying to be obnoxious (i.e. not bumping the thread every other day), but I could really use some info. Are these issues ones that you see as something that you can/should/will address, or is this a dead horse? Again, is there some capability in the API that I am either missing or is not yet documented? Am I barking up the wrong tree by hoping to use MC for this project?

Not asking for the moon here, just some feedback.
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Handling playlists
« Reply #9 on: June 01, 2007, 08:19:14 am »

I can't speak for JRiver, but from what I can tell, this area of the API is slowly "under construction".  In the not-so-distant past, there really hadn't been too many calls for this type of thing and so I think there was a just-the-basics API.

Now that more and more of us are trying to do things like this, I suspect we'll start to get more goodies.  But things tend to go in fits and starts.  There's not any one person devoted to developer issues.
Logged

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #10 on: June 01, 2007, 06:05:19 pm »

I can't speak for JRiver, but from what I can tell, this area of the API is slowly "under construction".  In the not-so-distant past, there really hadn't been too many calls for this type of thing and so I think there was a just-the-basics API.

Now that more and more of us are trying to do things like this, I suspect we'll start to get more goodies.  But things tend to go in fits and starts.  There's not any one person devoted to developer issues.

I understand, and it was pretty obvious that the API is "still in development". What irks me is that they haven't responded in any way. I would think that someone could have stopped by and said _something_, even if it's "this isn't a priority for us at this time". All I want right now is some communication.

Frankly, if they can't manage that, I can't see much reason to continue with them in any capacity (customer or developer).
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Handling playlists
« Reply #11 on: June 02, 2007, 11:46:44 am »

It's important to remember that even though we bought the software, it's user supported (via these forums).  MC is not the only product to work that way (Slim Devices Squeezebox, for example).  There's no pretention to "factory support" whatsoever.  WYSIWYG.

As a developer, I'd sure like to have better access and more detailed API, but we keep plugging along because we like and use the product.

That said, I do think they're missing the boat a little by not making better documentation.  More plugins equals a more vibrant community and more sales.
Logged

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #12 on: June 02, 2007, 06:38:47 pm »

It's important to remember that even though we bought the software, it's user supported (via these forums).

I'd buy this argument if they didn't respond to other people's requests/issues on a semi-regular basis. There's a difference between "user supported" and "ignoring people you don't want to deal with".
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Handling playlists
« Reply #13 on: June 03, 2007, 02:54:24 am »

I understand and sympathize, but trust me, it's not just you.  Browsing this forum ought to verify it for you.
Logged

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #14 on: June 13, 2007, 08:16:54 pm »

Well, just got back from TechEd, and another week and a half has passed without any input/feedback from the MC. Time to look for another platform.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Handling playlists
« Reply #15 on: June 13, 2007, 08:20:32 pm »

There is a DevZone page here with a lot of information.  If it isn't there, we may not be able to answer your question.  There are other independent developers who've read your posts and perhaps not known the answer.

You did get an answer to your question from a JRiver developer above:

src666: The CurPlaylistAutomation covers "Playing Now", not any playlist.
Logged

src666

  • Recent member
  • *
  • Posts: 22
Re: Handling playlists
« Reply #16 on: June 14, 2007, 03:56:12 pm »

There is a DevZone page here with a lot of information.  If it isn't there, we may not be able to answer your question.  There are other independent developers who've read your posts and perhaps not known the answer.

You did get an answer to your question from a JRiver developer above:


This is the kind of response that infuriates me. If you had bothered to read my next several posts after that, you will find LOTS of substantive questions that never got addressed. I've looked all over for answers, and nothing had the info I needed. Which is why I continued to post here in hopes that someone with an answer would chime in.

And frankly, that first post they made wasn't at all helpful in regards to the original issue (i.e. how do I find out what playlist is actually playing).

If they don't want to focus on their developer community at the moment, or if their developer focus is more on the UI side currently (as it appears from recent releases), then fine. But the fact is that there have been more than a few developer interactions with others in the past month and a half, and I've been pretty polite about this - at the very least, they could have just said "we aren't working on this area" and as I mentioned several times I would have at least _known_ something. As it is, I've just been flat out ignored. In my book, that's the wrong answer.

Found another product. Moving on.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Handling playlists
« Reply #17 on: June 14, 2007, 04:10:52 pm »

Bye.   :'(
Logged
Pages: [1]   Go Up