MusicMagicDJ Script

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

phreaq
Posts: 4
Joined: Tue Jul 24, 2007 11:51 am

Post by phreaq »

done ;)
phreaq
Has anyone seen my brain today (^_^)
www.phreaq.net
phreaq
Posts: 4
Joined: Tue Jul 24, 2007 11:51 am

Post by phreaq »

is there a way to restrict the mixes to a specific genre, like within musicip?
phreaq
Has anyone seen my brain today (^_^)
www.phreaq.net
ElGringo
Posts: 6
Joined: Sat Oct 21, 2006 2:04 pm
Location: Val-David, Qc, Canada

Changes to the Script

Post by ElGringo »

Hi Daniel,

I did a couple of modifications to the script recently :

1. Changes to the way min. rating works
2. Added the possibility to restrict genres

Summary of the functionality, with the modifications i did :

When the system receives a list of songs from MusicIP
1. it checks if the song selected is not already in the now playing
2. Checks if the album is not already in the now playing
3. Checks if the artist is not already in the now playing
(*) 4. Checks if the rating of the song is over the min. rating defined in the options
If not, the song can still be selected if, with this song, the average rating of the whole playlist is over the min. rating defined in the options
(*) 5. Checks if the genre of the selected song is restricted by the defined options
(*) 6. If none of the songs received from musicip passes the above filter, the system tries to find a random unplayed song in your database, that's over the min.rating, and that does not have a restricted genre
(*) 7. if the system cannot find a random unplayed song, it chooses random song, that does not have a restricted genre.


Do you want me to send you the script first, so you can revise it first ?

Thanks,
ElGringo
dressen
Posts: 13
Joined: Tue Feb 13, 2007 3:09 am
Location: Seattle, WA

MM3

Post by dressen »

Has anyone else successfully used this script in MM3?

I was able to get it to work, but only after making a small fix to the isArtistInNowPlaying function.

It appears that SDBArtist.ID always returns 0 in MM3. I'm not sure if this is a bug or by design. To fix, I had to comment out the following check in isArtistInNowPlaying:

Code: Select all

		//MM3 patch - Artist.ID is null, only use Artist.Name
//		if(item.Artist.ID == songArtistID)
//		{
//			TRACE("  REJECT: artistID already in now playing.");
//			return(true);
//		}
This check was erroneously always true since it was always comparing 0 to 0. It now only checks the ArtistName.
DanielWebb
Posts: 32
Joined: Thu Sep 28, 2006 5:17 am

Post by DanielWebb »

I've not tried mm3 yet, thanks for working that one out. Maybe the songArtist.ID field has changed names ? It's a better test than the string comparison I think.
Regards

Daniel Webb
www.planetgriff.com
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

There is no longer Song.Artist because in MM3 there are multiple artists therefore a single object cannot be returned. This has yet to be addressed by the developers.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Theli93
Posts: 4
Joined: Tue Feb 26, 2008 12:25 am
Location: Valley of The Meadows
Contact:

Post by Theli93 »

I've got it working for me... at the moment.

I implemented dressen's code note (dated 12/15/07) and it seemed to take care of the issues I was having.

I'm also using the headless version of MusicIP Server as noted by turls (dated 12/12/06)

Information about using the headless version may be found here: http://www.musicip.com/mixer/server.jsp
and some additiional instruction here: http://spicefly.com/content/view/35/32/

I hope this helps a few folks.

I'd really like to see this script continue development as it is a great compliment to Media Monkey!

Thanks.
turls
Posts: 22
Joined: Fri Sep 08, 2006 3:25 am

Post by turls »

Great Post, Theli93.

Unfortunately, after going through everything, trying version 1.71 of MusicIP Mixer and going back to 1.81b, trying everything in the great links at Spicefly, I'm still stuck a year later.

I haven't had this working in a year, checking back at the log.

I haven't been too worried about it because I've been using the last.fm plugin, but I wanted to mess with this some more and it still doesn't work.

The only thing this plugin shows is an error 500 in the log and it just pulls up a random song (worked fine until a year ago like I said). And when I pull up the web page for the headless server, I still have 0 songs in my cache, even though if I pull up the GUI version, everything seems to be there.

I have a ton of songs so I don't really want to reset the cache and start over, but that may be the next step.

I'm still using 2.5x by the way, but I don't think that makes any difference where I am.
raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Great script!

Post by raybeau528 »

Daniel,

This is exactly what I've been looking for! I like the fact that it always returns a song that's in my database. The scrobbler with last.fm often returns great songs but just as often I don't have the song so a random song is selected.

I've been puzzled by one thing though...the methodology behind the rating logic. At first I thought it wasn't working correctly but by setting different ratings and reading through many log files I do now believe it's working as designed. Can you give your thoughts as to why you use the average rating of the playlist rather than just selecting a song if its rating is >= to the setting in options?

I observed it getting into a state where it would never accept a song even if its rating was 5 and the options rating was 4. The playlist consisted of many song that were selected by random whose rating was unknown or less than that set in options. The average of the playlist was low enough that a rating of 5 couldn't pull it up to 4 and therefore the song was rejected and another random song selected. If the new song's rating was less than that in options it would then bring the average down even lower!

Again, great script and implementation!

Ray
DanielWebb
Posts: 32
Joined: Thu Sep 28, 2006 5:17 am

Post by DanielWebb »

Sorry for the delay replying, my forum notification emails seem to have stopped coming and it's just luck I happen to be back here.

Anyways, I noticed that MM3 is out so I installed it on a clean pc and tried this script - At first it wouldn't work, it just looped round and round the randomChooseUnplayedTrack function, never choosing anything. (I didn't have the MusicIP Server working).

That was a problem with my loop in randomChooseTrack() using continue and skipping the index--; it.Next(); incrementers. (Note to self: don't use stuff you don't understand).

dressen - Thanks for that. That's the only change I can find to make it MM3 compatible.

Theli93 - I'm actually back to using the MusicIP application rather than the headless. Either one work the same for me, It should really make no difference as long as you have the API service started. It's a shame you can't get the script running. You could always post a bit of the musicmagicdj log. Even better if "log extra debug information" is checked.

raybeau528 - The rating logic was added by ElGringo (See his post on Thu Dec 06, 2007 3:41 am). I have my "Min Avg Rating" set to "Any" so It's never been a problem. However I've modified ChooseTrack() to ignore the rating requirement if we haven't got any more tracks to choose from.

I've uploaded a new version with a few fixes. See the head post for download details.

Thanks for all your enthusiasm and input. This script still rocks our workplace for hours on end, providing a fascinating insight into our music collection. One thing We've noticed is that it doesn't take any notice of fashion, marketing or the 'coolness' of bands which is really refreshing. Who else would follow Eels with Busted ?

I've even ported it to Windows Media Center (sic) so it can rock my home too.

Keep on rocking, you magicDJ you.
Regards

Daniel Webb
www.planetgriff.com
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

DanielWebb wrote:I've even ported it to Windows Media Center (sic) so it can rock my home too.
Where is it? Sounds interesting! :)
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
DanielWebb
Posts: 32
Joined: Thu Sep 28, 2006 5:17 am

Post by DanielWebb »

Big_Berny wrote:
DanielWebb wrote:I've even ported it to Windows Media Center (sic) so it can rock my home too.
Where is it? Sounds interesting! :)
It's in Kent.:wink:

Oh, you mean the MCE plugin ? Download it here. No installer I'm afraid.

I think any discussions of the MCE plugin should take place over at the green button forum in this post
Regards

Daniel Webb
www.planetgriff.com
Rojer
Posts: 65
Joined: Tue Aug 22, 2006 5:06 am

Improving mix relevance

Post by Rojer »

Hi from France,

I want to thank you first for this great script : MM being the best player/organizer available and MMM the best mixer, joining them was a must !

I have been using MM along with MMM GUI for a few years now and am quite satisfied with the mix relevancy. However this is not yet the case with the script. I thought I might add my humble input

When MMM makes a mix from a base song, there are always songs that "drift" more than others from the base song, style-wise. This is what the "variety" setting in MMM seems to be about. But the overall mix is usually solid and when you a song that drifts too far hits the queue, the damage is minimal, since the next one should get the mix pertinence back on track.

The script changes the base song at every song played, thus increasing dramatically the drift. It is quite easy to go from a Haydn vocal drama to a brutal RATM shock in less than 12 tracks ! This looks far less than acceptable to me. Or do I do something wrong ?

I believe that changing the base song for every track was not the right choice. what would be wrong with queuing the complete server output ? The base song would change every 10-20 tracks this way, reducing dramatically the drift. Sorry if I state the obvious, I am quite new to this.

As for average ratings, there seems to be a logical explanation to the less than satisfying results too : most songs in the database have unknown ratings. As t seems that those are included in the calculation, this results in the inevitable failure: "rating too low, no other choice"... I would suggest that only the known ratings are included in the average calculation.

Note that excluding ratings BELOW a customizable threshold would satisfy most users by itself but would still facilitate maintaining an average rating for the mix, as the first base song is less likely to be unrated. This is from my own experience of course.

Limiting the genre seems tricky, a some databases have much more than a dozen or too and I have seldomly seen any relevancy in this. I still would like to avoid metal tunes when the base song was classical music... As the MMM server does no restriction on the genre but is very likely to return several songs from the same genre as the base song, would it be a good idea to optionally favor those ?

Anyway, the script is great and is very desirable for MMM/MM users, as running the predixis GUI is not convenient for everyday operation. Setting the headless server is a must and works like a charm.

BTW, I am on Vista and MM3, which works fine for me.

Thanks again.

Rojer
DanielWebb
Posts: 32
Joined: Thu Sep 28, 2006 5:17 am

Post by DanielWebb »

Rojer,

Thanks for the input. I think you're right. The tracks do drift faster than they would if the complete MM mix was queued.

I personally like the fact that this plugin only adds one track at a time, and only when the currently playing track is the last one.

I don't use the average rating stuff, so can't really comment. It was added because another user coded it in.

The great thing about these scripts is that you can edit them yourself to suit your requirements. I'd encourage you to modify the script to make it better for you. If you release the changes then everyone wins.
Regards

Daniel Webb
www.planetgriff.com
Theli93
Posts: 4
Joined: Tue Feb 26, 2008 12:25 am
Location: Valley of The Meadows
Contact:

Post by Theli93 »

DanielWebb wrote: Theli93 - It's a shame you can't get the script running. You could always post a bit of the musicmagicdj log. Even better if "log extra debug information" is checked.

I've uploaded a new version with a few fixes. See the head post for download details.
Hi Daniel,

I think it was actually turls that still hadn't gotten it working for him, but I don't see anything from him since your post. So...

I've just updated to your new script... so far so good.

The only thing I noticed was that the version number needs to be updated in the MusicMagicDJ control panel. It still shows v1.8.

I kept thinking something had gone wrong with the install, until I looked at the script itself and it showed your update in the comments.

Thanks again for your work! It really is appreciated.
Post Reply