MegaDJ v2.59 [MM3+4] 2012: Better compatibility + time fix

Post a reply

Visual Confirmation

To prevent automated access and spam, you are required to confirm that you are human. Please place a check mark next to all images of monkeys or apes. If you cannot see any images, please contact the Board Administrator.

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: MegaDJ v2.59 [MM3+4] 2012: Better compatibility + time fix

Re: MegaDJ v2.59 [MM3+4] 2012: Better compatibility + time f

Post by lumper5 » Tue Jan 01, 2013 4:46 pm

Perhaps I missed the following while browsing this topic, but I did not see it covered. How to filter MegaDJ in MM 4.x so that only music type is selected. I've tried a query filer of MediaType=music but that only returns an empty list. I've tried variations on Type='Music" &tc, but nothing seems to work. I want to filter MegaDJ to exclude AudioBooks, Classical Music, Podcasts and other media types and only select Music. Suggestions?

Re: MegaDJ v2.59 [MM3+4] 2012: Better compatibility + time f

Post by twinbee » Thu Feb 16, 2012 3:48 pm

A couple of new releases brings us to 2.59.

There were some time issues relating to local/global time, so that's been sorted. Also, I think the latest MM changed the main scripts path to the standard users path (rather than the "Program Files" path), so this release takes that into account.

Download in the usual way (or upgrade straight from MM).

http://www.skytopia.com/software/megadj/

Re: MegaDJ v2.57 [MM3+4] 2012: WinXP/7/Vista, better random

Post by twinbee » Sun Jan 01, 2012 8:19 pm

Forgot to say before that 2.57 is out. This fixed the bug in 2.56 where a DLL is needed that the user may not have, thus causing MegaDJ not to load at all.

Download and install instructions for MegaDJ v2.57 from here as usual:
http://www.skytopia.com/software/megadj/

Happy new year all! :D

Re: MegaDJ v2.56 [MM3+4] Xmas-2011: WinXP/7/Vista, better ra

Post by twinbee » Sun Jan 01, 2012 8:14 pm

Based on a specifed MM Playlist, or a specific file directory,
Play X number of tracks by any AlbumArtist
lather, rinse, repeat

As you probably know, MegaDJ can handle the file path as a field, so something like this is possible:
SongPath~'blah' && AlbumArtist~'blah'

However, I'm guessing after the first batch is played through, you want the SongPath to automatically change? As Anthony said, 'fraid that's not possible currently. You would need to set the nodes up yourself. Maybe MagicNodes can offer what you want...

Re: MegaDJ v2.56 [MM3+4] Xmas-2011: WinXP/7/Vista, better ra

Post by AnthonyM1229 » Sat Dec 31, 2011 10:40 am

@Rollerphant:

What have you tried so far for the query? I'm thinking so far that this may be impossible, unless you first set up child nodes for each AlbumArtist, which could easily be a laborious process. Even if you can automate that part with something like MagicNodes, I don't know if MegaDJ would be able to interact with those nodes. But, my thinking is, if you can have MegaDJ nodes for each AlbumArtist, then you can create a master node that rotates X number of tracks from each of those AlbumArtist nodes.

Perhaps twinbee may have other ideas, however. I hope you're able to figure this out! If I think of anything else too, I'll let you know.

Re: MegaDJ v2.56 [MM3+4] Xmas-2011: WinXP/7/Vista, better ra

Post by Rollerphant » Wed Dec 28, 2011 5:33 pm

Trying to figure out how to do something that seems like it should be real simple.

Based on a specifed MM Playlist, or a specific file directory,
Play X number of tracks by any AlbumArtist
lather, rinse, repeat

I've tried to write the query, but keep getting stuck. Any help wuold be appreciated.

Thanks for the script!

Re: MegaDJ v2.56 [MM3+4] Xmas-2011: WinXP/7/Vista, better ra

Post by twinbee » Fri Dec 23, 2011 4:24 pm

MegaDJ v2.56 is now available.

For people who have more than 30000 tracks, MegaDJ now includes ALL the tracks in your collection when picking random tracks. Many thanks to Anthony for picking up this rather serious bug. The more you had before, the worse it was.

MegaDJ is now a smaller download, and the speed is up to twice as fast for many random playlists.

See MegaDJ homepage to download in the usual way:
http://www.skytopia.com/software/megadj/

Re: MegaDJ v2.55 [MM3+4] (2011-12-02): Now Win7/Vista compat

Post by twinbee » Fri Dec 09, 2011 6:45 am

I'll actually get 37-39 queued most of the time? Because those last few excluded were dupes?

Yep, that's right.

That check for dupes doesn't seem slow to me, and it works well.

True, but checking for song ID is different than checking for album. I seem to recall album being much harder/slower, but I can't say for sure.

I'd be curious to take a look at the C/C++ code..., and see if I can understand any of it.

Haha, talk about being plunged into the deep end ;) Okay, what I might do before sending the code to you is port MegaDJ over to Visual Studio, as it will be much easier for you to set up. Also I've found the Microsoft compiler to run around twice as fast as the Dev-C++/mingw compiler, so I wanted to port it over to Visual Studio anyway at some point.

Re: MegaDJ v2.55 [MM3+4] (2011-12-02): Now Win7/Vista compat

Post by AnthonyM1229 » Thu Dec 08, 2011 12:52 pm

How does the current "No Dupes" function work? It seems like it removes the second or greater occurrences of a song with the same ID, right? Is this why, when I specify a node to queue, say 40 songs, I'll actually get 37-39 queued most of the time? Because those last few excluded were dupes? That check for dupes doesn't seem slow to me, and it works well.

Anyway, if "No Dupes" seems to work as simply as I think, then, would it be possible to add an option for checking for dupe albums? Albums have an ID value too, correct?

I'd be curious to take a look at the C/C++ code..., and see if I can understand any of it. Maybe some next project I do will be to learn the basics of C/C++, because currently, I know nothing of it :P

Re: MegaDJ v2.55 [MM3+4] (2011-12-02): Now Win7/Vista compat

Post by twinbee » Wed Dec 07, 2011 5:33 am

What's that quote, something like "the generation of random numbers is too important be left to chance" - haha :)

This one unfortunately is going to be a pig to test for. Unless you have good experience with random numbers, I have a feeling that maybe what you're seeing is what one would actually see with 'true' randomness anyway. It would be a coincidence if there weren't any coincidences and all that jazz, (and maybe you know of the birthday paradox: "if you get 20 people in a room there's a 50/50 chance that two of them will share the same birthday).

In any case, I'm semi-interested in adding a "no album-dupes" feature, though would worry this would impact on search speed.

You're also right that the main functionality is contained in the exe file. If you want to look further into this, I'd happily give this source code to you, though would ask you use it for your purposes and not spread it for now (not that you would, though actually, I have thought about opening up MegaDJ completely). Only if you're interested of course (you were brave enough to tackle the vbs file which is a bit messy to be honest, and I'm afraid the C/C++ source code for the exe is perhaps more convoluted ;) ). C/C++ is trickier to program as well generally, and it'd be a bit awkward to setup (I used Dev-C++, maybe Visual Studio's compiler has better random number generation).

Re: MegaDJ v2.55 [MM3+4] (2011-12-02): Now Win7/Vista compat

Post by AnthonyM1229 » Mon Dec 05, 2011 2:06 pm

Cool, there's an update to MegaDJ :) I'll be happy to either install it and include my changes, or incorporate your changes to my current install. Either way, I'm in no rush to do anything, since I've been busy with other projects and such, so it might be a while before I get around to this.

I've been meaning to ask something... is there any way to control frequency of artists and/or albums? In my more specialized nodes (ones that query less than 1500 tracks), I'll fairly often see one or two (occasionally more) artists have four or more songs in my generated set of 20-30 tracks. Even worse, when that happens, the tracks tend to come from one album. It's like the algorithm is not completely random, haha. I mean, even in the relatively small subset of my library that these nodes query, there should be over 50 albums to choose from--so, getting these dupes is weird. I've looked previously in the code to see if I can find how the current implementation of "No Dupes" works so I could try to add "No Dupe Albums" or something like that, but all I could see and figure out in the code was how to enable or disable "No Dupes"...perhaps only the exe file does most of the work here?

Re: MegaDJ v2.55 [MM3+4] (2011-12-02): Now Win7/Vista compat

Post by twinbee » Mon Dec 05, 2011 7:22 am

The workaround for now is to refresh (F4) the two nodes which make up the rotation playlist. Make sure you have Easy_DJ and TOP_NE_PAS_EFFACER set up as random.

Re: MegaDJ v2.55 [MM3+4] (2011-12-02): Now Win7/Vista compat

Post by Mars74 » Sun Dec 04, 2011 5:31 am

Salut Twinbee,

Mega DJ is really amazing ... However, there's one thing I can't do :
I have as a query filter : 'rotate(Easy_DJ,TOP_NE_PAS_EFFACER)' ... this works OK & returns correct result (100 tracks required)... But tracks are always the same, & I can't use any Random mode here.
More generally, how can I setup MegaDJ so that it extracts a random subset of a MM Playlis ?

Thanks in advance for answer.

Re: MegaDJ v2.55 [MM3] - (2011-12-02) (MM4/Win7/Vista compat

Post by twinbee » Fri Dec 02, 2011 2:23 pm

MegaDJ v2.55 is out now, and should work for portable/non-portable/MM4/Win7/Vista and general UAC goodness. The MegaDJ nodes may move around, so for this release I suggest people only upgrade if they need to (despite a couple of new minor features).

If you must go ahead and you are confident with Windows and moving files around, then nodes can usually be found in the "Mediamonkey/Scripts/Auto/MegaDJ" folder. These would then be moved to the "Settings path" location you can see if you select "About MegaDJ" from the dropdown menu. Nodes will look like numbered files such as "1", "2", "3" etc. and don't forget to move the "megadj.ini" file to the new location too.

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

AnthonyM1229, thanks muchly for providing that example for MonkeyEargasms. Regarding my new settings path code, it wasn't just that chunk of code I changed - there are bits throughout the new v2.55 MegaDJ.vbs which are different. I suggest maybe you keep with what works for you, and ignore this release (apart from testing it if you really want to). If you must go ahead, then strMMpath is called settingsPath mostly now, but strMMpath is used for a couple of things which it used to do. I've also added some control focusing stuff (look for "ActiveControl"), again only if you'd like that minor improvement :) There has been a mass find/replace on a certain string extension to prevent a part of the path being duplicated (sorry I can't be more specific, but I think you'd figure it out to be honest). I've also added a helpful print of the file 'locations' in the MegaDJ help menu (look for "MegaDJ Script path" and "MegaDJ Settings path"). There may be other changes I've made too which would only be found through comparing the files side by side (or using diff or something). I'm only saying all this because I imagine it would be easier for you to add my relatively small changes to work with your current MegaDJ.vbs file, rather than add your own hard-coded scheduling changes to this new release. Forks are fun ;)

@MonkeyEargasms, let me know if you need any more help, and I'll study it too.

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Post by AnthonyM1229 » Wed Nov 30, 2011 3:51 pm

@MonkeyEargasms

Have you tried looking at the example presets? Try them out, and also use the "?" help button, as it provides more info about each example. That aside, I took a try at coming up with a query for you:

Code: Select all
LastPlayedAge > 2 & (Year >= 20090000 & Year <= 20110000 | Dateadded > 40847) & (Genre = "House" | Genre = "Electronic" | Genre = "DnB") & (mood ~ "energetic" | mood ~ "uplifting" | mood ~ "happy")
& ((occasion ~ "whatever1" | occasion ~ "whatever2" | occasion ~ "whatever3") | (Tempo = "medium" |Tempo = "medium fast"| Tempo = "fast") | rating > 3.5)


I used the literal values you provided, so, you'll probably have to substitute real values, especially for the occasions, haha. For the year values, they must be 8 digits...I had trouble with that myself starting out. Now, the Dateadded value may look strange too. MM stores that value as a number of days since December 30, 1899, I believe. 40847 should resolve to October 31, 2011, meaning the query should pick up songs added on November 1 or later. If you want only songs added after November 30, then change 40847 to 40877, and that should do it.

I haven't even tried your more complex requirements, haha...your basic ones were complex enough :lol: It looks like you'll have to use a rotate node for those, though.

Top