Auto-DJ scripts

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

Moderators: Peke, Gurus

jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Auto-DJ scripts

Post by jiri »

Starting from MediaMonkey 3.0 alpha 4 there will be support for custom Auto-DJ scripts, i.e. developers will be able to create their own engine for track selection. You can read more about it in http://www.mediamonkey.com/wiki/index.p ... DJ_scripts

Jiri
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

Wow, nice suprise.

Look forward to seeing alpha4!
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

This looks like it could be useful, but more so if "GenerateTrack" actually returned a list of tracks to be added. Is this possible?
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.
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

The idea is that the function would always return one track and in case in has more results to return, it would 'cache' them (i.e. store in some variable internally) and return when its called the next time. Is it ok?

Jiri
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Oh yeah, that would work! :)
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.
psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova »

So, let me get this straight....

Suppose I have set-up my MM3 to automatically maintain 10 following tracks in the now playing list and I choose to play the last song...
Will GenerateTrack be called sequentially 10 times???

Another question, is there a way for the script to know how many tracks will be maintained it the now playing list?

Finally, a question I should have asked a long time ago; is there a way to know whether a volume is online (e.g. a USB disk is plugged and activated)? Is it possible to add an event that will inform of such changes (when a volume goes online or offline??)
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

jiri wrote:The idea is that the function would always return one track and in case in has more results to return, it would 'cache' them (i.e. store in some variable internally) and return when its called the next time. Is it ok?

Jiri
I personally would fint it a bit a waste of time since ive got all the next X songs i need. Why not enqueue them at one?

Is it to complicate to use internally a SDB playlist?

Regards,
Red
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I'd have thought SDBSongList would be better than a playlist. I'd like to turn my AutoAlbumDJ script into a script of this type, but can't if it will only add one track at a time.
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.
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

My point was, that if user configures MM to always maintain the next 3 tracks in NP window, then MM should handle this somehow. If MM asks a script to return tracks in a list, it can easily return different number, like 10 and it isn't clear what MM should do then - forget about the next 7 tracks? remember them and use the next time?

I still don't see the problem with the current implementation - the script can very easily remember unused tracks and return them the next time. It's about some 2 lines of code while giving the script maximum flexibility, don't you agree?

Jiri
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

ok now i see your point, it means that if 5 songs are to stay enqueued and the user is on the last track then the script will call enqueuetracks 5 times.

Yes this would work aswell :)
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Yeah, this makes sense! :)
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.
psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova »

So, is there a way for the script to know how many tracks will be maintained it the now playing list?
I think this is important...
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

What I meant was that MM will call that method enough times to get as many tracks as necessary. In case the script has >1 track to be returned, it can easily store it in a list a return these tracks later.

Jiri
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

i have some ideas i'd like to present for the future version of MM3, should i PM it to you or rather post it somewhere?

Thx,
Red
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

E-mail it to me.

Jiri
Post Reply