Bug 3037 - MusicMagic API Playlist Generation Flawed in 6.2.1
: MusicMagic API Playlist Generation Flawed in 6.2.1
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: MusicIP
: 6.2.1
: PC Linux (other)
: P2 enhancement with 1 vote (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-20 20:41 UTC by Bradley Feldman
Modified: 2011-03-16 04:39 UTC (History)
0 users

See Also:
Category: ---


Attachments
Demonstrative playlists from Slimserver 6.2.2 and Predixis MusicMagicMixer v1.5 (4.35 KB, text/plain)
2006-02-20 21:14 UTC, Bradley Feldman
Details
6.2 bug fix (1.64 KB, patch)
2006-02-21 19:53 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bradley Feldman 2006-02-20 20:41:12 UTC
MusicMagic API integration in 6.2.1 appears to be broken with regard to Playlist generation.

I am using Slimserver 6.2.1 on Gentoo Linux with MusicMagicMixer Version 1.5

When telling Slimserver to generate a playlist via a "seed song" either via the Squeezebox (by holding the Play button) or on web interface skin the Fishbone skin, by clicking the MM icon next to the song, a playlist is generated, but it does not resemble in ANY WAY, the playlist that would be generated within the Predixis MusicMagicMixer application using the same seed song and, approximately, the same Mix settings.  BTW, the overall Predixis Mixer settings and the Slimserver Musicmagic settings seem to have diverged over the last version of each product.  Could this be the issue?

In any case, the playlist generated by the MusicMagicMixer contains the artist/music variety, style, depth and breadth that what one would expect, whereas the playlist generated through Slimserver ALWAYS contains several tracks from the same artist from the same album and ALWAYS contains only music within the same genre.  The playlist generated by MusicMagicMixer is diverse (no artist/album repeated) yet follows the Variety, Style, Genre and Mix Style and Mix length parameters I have set.  

Note: I have set similar parameters within Slimserver (to approximate those in MusicMagicMixer), but during Playlist generation, they seem to be ignored except for the parameter length of the playlist.

I can work around the flaw by using MusicMagicMixer UI, generating playlists there, then using the Right-Click of the MusicMagicMixer play button to send the playlist to a Slimserver Player (listed by mac address). That works, but I can't operate it through the Squeezebox or web interface.

I originally bought an unlimited license for MusicMagic because it worked fine with past Slimserver versions.  I think that perhaps during the 6.0, 6.1, or 6.2 releases the integration broke.

Can you guys please see that you can reproduce these results and kindly fix this bug.   MusicMagic combined with Slimserver is what makes slimserver so great -- that an incredible playlist can be generated on the fly from my full library of music on Slimserver.  MusicMagic is truly magic -- But please, keep the magic working from within Slimserver!
Comment 1 KDF 2006-02-20 20:45:58 UTC
please try the 6.2.2 nightly build as instructed on the main page.
Comment 2 KDF 2006-02-20 20:58:01 UTC
also, turn on d_musicmagic, and record the log when you try the mix.  Slimserver sends a url, musicmagic returns a list.
we'll need to see that, for us to track your "flaw"
  

Comment 3 Bradley Feldman 2006-02-20 21:14:11 UTC
Created attachment 1149 [details]
Demonstrative playlists from Slimserver 6.2.2 and Predixis MusicMagicMixer v1.5
Comment 4 Bradley Feldman 2006-02-20 21:15:34 UTC
I downloaded and installed latest 6.2.2 build - 6245 per Deane Freeman.

I switch on d_musicmagic, and generated a playlist via slimserver using a seed song.  I then did the same via the MusicMagicMixer V1.5 GUI using same settings and same seed song.

The results (a huge divergence in playlists) is attached.   The attachment demonstrates/confirms the behavior I described in the first set of comments for this bug.
Comment 5 KDF 2006-02-20 22:37:02 UTC
2006-02-21 00:08:50.4322 Musicmagic: request http://localhost:10002/api/mix?song%3D%2Fraid%2Faudio%2FMatisyahu%2FLive%20At%20Stubb's%2FMatisyahu%20-%20King%20Without%20A%20Crown.flac&
variety=0&style=10&sizetype=tracks&size=12

the responding track count is 12, so that par would seem correct.  Is 12 a match to your setting for track count?

I assume that the song is also a match to what you have requested.  The returned playlist does start with that song.  This is in line for what slimserver expects.  The rest is as delivered by Musicmagic itself.  Slimserver ONLY generates the above request and waits for MMM to provide a playlist.  If you are seeing different playlists, that should be expected.  Each request with same params should return a slightly different playlist. 

I suggest you contact Predixis on this issue.
Comment 6 KDF 2006-02-20 22:57:29 UTC
and just for completeness...
Are your musicmagic settings in slimserver matching this:

variety: 0
style: 10
type: track
count: 12

If not, then please check the player settings->plugins to make sure you don't have any per-player settings there, as these would override the global server settings.

There are some aspects of the MusicMagic API that are not used by slimserver.  One example is the setting for preventing duplicates.  
Comment 7 Bradley Feldman 2006-02-21 06:02:01 UTC
Parameters are identical in both systems.

I did some more digging around and used the MusicMagic API call found in the Slimserver log to make the same call to the MusicMagic API through a standard browser.  I got the same results.  Then I did a Google search for the Musicmagic API and got the full parameter set.  Altering the parameters still produces the same, incorrect results.  

Thus the problem does indeed originate from the MusicMagic API and not within Slimserver.  So I have posted a message in their developer forums describing the problem.  Here is a reference to that message:

http://forums.predixis.com/index.php?showtopic=1599

I have also emailed support@predixis.com.



Comment 8 Bradley Feldman 2006-02-21 07:15:41 UTC
Nope,  I was wrong!  The PROBLEM IS ON THE SLIMSERVER SIDE! I figured it out (with the help of whicken at Predixis), and it requires a CHANGE ON SLIMSERVER :

Slimserver needs to pass additional parameters to the MusicMagic API v1.5 in order for it to produce the correct playlist.  There are three parameters that Slimserver does not know about (that it needs to know about):

1)  &mixgenre=0

This parameter will allow the MusicMagic API to create a playlist that varies across musical genres (preferred default setting).  Setting mixgenre=1 will keep the playlist items' genres the same as the seed item.

2,3) &rejectSize=###  and  &rejectType=tracks

These two parameters in combination prevent duplicates in the playlist generated by the MusicMagic API.
For example: when generating a playlist of 12 tracks, set &rejectsize=12 and &rejectType=tracks.

Thus, sending the following URL from a browser to the MusicMagic API:
http://fanning:10002/api/mix?song%3D%2Fraid%2Faudio%2FMatisyahu%2FLive%20At%20Stubb's%2FMatisyahu%20-%20King%20Without%20A%20Crown.flac&variety=0&style=20&sizetype=tracks&size=12&mixgenre=0&rejectSize=12&rejectType=tracks

...Produces the following playlist:

/raid/audio/Matisyahu/Live At Stubb's/Matisyahu - King Without A Crown.flac
/raid/audio/Jonatha Brooke/Steady Pull/Jonatha Brooke - How Deep Is Your Love .flac
/raid/audio/Kenny Wayne Shepherd/Trouble Is/Kenny Wayne Shepherd - Blue On Black.flac
/raid/audio/Compilations/Jazziz/The Key Players Vol. 4/Chick Corea Elektric Band - Check Blast.flac
/raid/audio/Jonny Lang/Long Time Coming/Jonny Lang - To Love Again.flac
/raid/audio/Natalie Merchant/Live In Concert/Natalie Merchant - Gun Shy.flac
/raid/audio/No Doubt/The Singles 1992-2003/No Doubt - Bathwater.flac
/raid/audio/Compilations/Stone Free - A Tribute To Jimi Hendrix/Body Count - Hey Joe.flac
/raid/audio/Dave Matthews Band/Listener Supported/Dave Matthews Band - Stay (Wasting Time).flac
/raid/audio/Pearl Jam/Vs/Pearl Jam - Rearviewmirror.flac
/raid/audio/Compilations/Lilith Fair - A Celebration Of Women In Music/Disc 2/Tracy Bonham - The One.flac
/raid/audio/Candlebox/Candlebox/Candlebox - Far Behind.flac

--------------------

As you can see, this solves the problem as the playlist is representative of the playlist generated by the MusicMagicMixer GUI.

All in all, this should be a relatively easy change to implement in Slimserver and, at your option, can produce additional configurable parameters in the MusicMagic settings screen within the Slimserver Settings pages.

*Bradley






Comment 9 KDF 2006-02-21 09:18:43 UTC
thanks.  I'll work on a change.  The use of all caps is not required (no yelling please)
Comment 10 KDF 2006-02-21 11:19:45 UTC
These will be added as new features.  Thus, they will be targetted for 6.5 builds.  As these are new api elements, this qualifies as a new feature and thus not something for 6.2.2 builds.
Comment 11 Bradley Feldman 2006-02-21 12:19:02 UTC
Ummm, You may want to rethink the timing of these changes, as it is a bug on the _Slimserver_ side.  Moreover, it's been an existing bug for TWO releases of Slimserver (6.2.0 and 6.2.1).  Just because I'm the only one who got fed up with the problem and decided to see if I could track it down myself, doesn't mean it is a NEW bug.  It's quite old, just not reported.  You folks released 6.2.0 on October 24, 2005. These MusicMagic API parameters were added to MusicMagicMixer version 1.1.6, which was released on September 22, 2005.  A month before 6.2.0.

It shouldn't be a user community problem that folks controlling features in Slimserver felt it important to add a feature to "Server Setting to restrict Mixes to a given filters" in 6.2.0 but _failed_ to properly regression test the MusicMagic Integration.  From what I see, the bug is four months old at this point.

Pretty please, see if you can find it in your hearts to fix it asap (i.e., in 6.2.2 builds) -- even if it's just a bandaid (fixed, non UI settings).  6.5 is a long time coming IMHO, and who knows what quirks that release will bring -- which may take an even higher priority to fixing this now.

*Bradley
Comment 12 KDF 2006-02-21 19:52:01 UTC
added new params as server and player prefs for 6.5 builds as of svn change 6333. This is ONLY for 6.5 builds.
Comment 13 KDF 2006-02-21 19:53:51 UTC
Created attachment 1150 [details]
6.2 bug fix

smaller, minimal patch for 6.2.2.  This simply adds the default values for each of the 3 new params to allow the mixes to work better with less risk of problems due to the interraction of new prefs settings. waiting for review on this one
Comment 14 Bradley Feldman 2006-02-21 20:22:45 UTC
Thank you!

*Bradley
Comment 15 KDF 2006-02-21 22:23:31 UTC
reduced patch committed to 6.2.2 builds as of change 6336.  These will hard code the new params, mixgenre=0, rejecttype and rejectsize are matched to the chosen mixsize and mixtype.  This should give better mixes for now.  please download the next nightly build.