Background and descriptionMy ambition with MegaDJ was to create the ultimate search/query jukebox for Mediamonkey (after getting somewhat envious of Winamp's 'Query Builder'). The result has matured to version 2, and is probably more powerful than Winamp's equivalent ), as well as being an almost complete replacement for the standard AutoPlaylist search in MediaMonkey.

It is easy to use and can be used for both very simple and complex queries including specific searches and random DJ-style playlists. Many aspects of MegaDJ work like search engines, such as the way you would look for phrases (using quotes), or omitting results from the search using minus (e.g.: -myword).

If you already have version 1, please remove the old MegaDJ files, and then install this version. For everyone else, just double click the install file. If the program fails to show up, then reboot mediamonkey. On success, you will see the red icon in the tree menu:

This new version 2 improves over version 1 (old thread) in many areas, particularly in ease of use (Google style querying, interactive documentation, and plenty of advanced presets), sorting of multiple fields, use of string fields in math filter, and node manipulation. For more information, examples, and to download, visit the MegaDJ homepage. (The examples on that page are helpful, but the program comes with many more in-built interactive examples and documentation).

As before, this program only *reads* and never writes to your Mediamonkey music database, so there are no worries about data loss or corruption.

MegaDJ is fully functional except for a 5 node limit with the option to upgrade for a donation of your choice. It has been tested with MediaMonkey v3.0.4 and higher, along with many different skins.

Acknowledgements and thanks:

Special thanks go to Triponi and Stan9980 for beta testing/feature suggestions; Warp for the brilliant Function Parser; and everyone who contributed to the Mediamonkey wiki documentation (MoDementia, Jiri, Steegy, Bex...). All this helped make MDJ 2.0 possible.

------------------------- UPDATES ----------------------------Later versions of MegaDJ v2 install nicely over other v2 (simply close/reboot MM after install is complete). However, if upgrading from v1, please remove v1 first before upgrading to v2.

v2.3b: Christmas release! You can now rotate (interleave/alternate) MegaDJ playlists. The new "Node Autorefresh" feature allows a node to refresh its tracks without ever needing to press F4. Also, an 'Unlock after' tune setting has been added so that a tune can't be repeated until after x new tunes have played. Finally, a potential node order bug has been fixed, and the user interface has been tidied up (options disabled/enabled better). Finally, I added a trailing space on to each node name. This is visually the same, but seems to solve a node ordering bug that may be present in MM.

v2.23b: A few sync bugs fixed since 2.2

v2.2b: MegaDJ now supports syncing with devices such as the iPod. Also, an important database opening error (1005) has been fixed along with potential script clashing issues. The former will enable better compatibility with Auto-Organize etc.

v2.01b: MegaDJ should uninstall properly now if requested, but if not, simply close mediamonkey, reopen, and then try the uninstall again.

Last edited by twinbee on Thu Feb 16, 2012 3:46 pm, edited 47 times in total.

MegaDJ v2 - Lightning fast and easy to use search to replace the standard AutoPlaylist. Features include random jukebox style playlists, along with syncing, weighting options, and logic complete querying.

Weird about the crash thing, as I haven't experienced that. In any case, I'll fix the uninstall properly ASAP. In the meantime, uninstalling manually is pretty simple: Remove the megadj folder and megadj.vbs file from here:

C:\Program Files\MediaMonkey\Scripts\Auto

(or wherever Mediamonkey is installed)Those are the only two things you need to remove.

---------------------------- EDITv2.01b: MegaDJ should uninstall properly now if requested, but if not, simply close mediamonkey, reopen, and then try the uninstall again.

MegaDJ v2 - Lightning fast and easy to use search to replace the standard AutoPlaylist. Features include random jukebox style playlists, along with syncing, weighting options, and logic complete querying.

What is the rating out of? Does a 5 star rating come through as the integer '5' or the backend value of '100'?

Also, I see this in the example of getting stuff around the '2000' year1 / 1.2^(abs(Year-20000000)/10000)

I don't quite understand how it works.

Would this get it around the '1980' year?1 / 1.2^(abs(Year-19800000)/10000)

It's kind of hard to guess what score the 'math function' part is returning. It makes it hard to sculpt advanced queries involving lots of factors - because one of the factors might return some huge number compared to another factor and throw it out of wack.

Would be awesome if clicking on track would show the integer score obtained from the 'math filter'.

Would this get it around the '1980' year?1 / 1.2^(abs(Year-19800000)/10000)

Yes. The format is YYYYMMDD. So it would calculate 2008 0000 minus 1980 0000 (we'll skip the month and day for clarity), which turns out to be 28 0000. The abs (absolute, where negative numbers turn into positive, but positive stay the same), means abs(28 0000) = 28 0000 still. Then we divide by 10000 to make 28.

Then we calculate 1.2^28, so that bigger year gaps mean bigger values. And finally inverse that with "1/" to get reverse order. It's a complicated example, but breaking it down helps. Actually, you may not really need the 1.2^, but it helps the distribution a bit (and otherwise you might get a divide by zero error).

Glad you're finding MDJ useful. Let me know if you'd like me to forumlate a query for you, and I'll do my best.

Off topic slightly, Console calc is one of the best calcs I've seen for the PC, since values update in realtime, and you can assign values to letters/variables (like year=1980).

Thanks for the suggestion too, I'll consider that for a later release.

MegaDJ v2 - Lightning fast and easy to use search to replace the standard AutoPlaylist. Features include random jukebox style playlists, along with syncing, weighting options, and logic complete querying.

If you mean duplicate tracks, then click advanced mode, and then on "remove dupes". If you mean installing over the old MegaDJ, then all versions of MegaDJ v2 should safely install over each other. For the upgrade from MDJ v1 to v2, make sure to remove the previous version first (megadj file+folder from the scripts/auto folder).

MegaDJ v2 - Lightning fast and easy to use search to replace the standard AutoPlaylist. Features include random jukebox style playlists, along with syncing, weighting options, and logic complete querying.

That translates to:Play The Beatles 70 percent as often as it would usually be played (i.e. less often than average). However, if the album is Revolver, or Rubber Soul, play that 3 times as often than normal (ultimately, it actually turns out as about 2, since the 0.7 would be applicable too and thus counteract it slightly (3 * 0.7 = 2.1)).

The ones just mean that if the IF statement fails, then to set to the weighting as one (instead of 0.7 or 3). That will then apply for the rest of the tracks in your collection. Always try to have a 1 as the last value in the IF statement (after the 2nd comma), since the math is easier to figure out that way.

By the way, if the above doesn't work as expected, try using the tilde symbol (~) instead of =. This will help if the Artist or Album contains the keyword, instead of being exactly equal to it.

Both this one and the first example do pretty much the same thing - I'll explain this one too if you like - it's basically a nested IF statement.

MegaDJ v2 - Lightning fast and easy to use search to replace the standard AutoPlaylist. Features include random jukebox style playlists, along with syncing, weighting options, and logic complete querying.

Yep, just select advanced mode, select the "Order" radio button as the Math filter type. You could then enter 100 in the "num. tunes" field too.

Finally, enter this in the Math Filter section:filemodifiedage < 1/24.0

That would be for one hour. The / symbol means divide obviously. Either of the below would mean 12 hours:

filemodifiedage < 12/24.0or the equivalent....filemodifiedage < 0.5

Using fractional/decimal numbers like these means you can go down to the minute if you like

------------EDIT----------------A simpler way is to simply put "lastplayedage<0.5" (or other number) in the Query Filter, and "LastTimePlayed REV" in the Sort Filter. However, this way, you can't select the number of tunes.

MegaDJ v2 - Lightning fast and easy to use search to replace the standard AutoPlaylist. Features include random jukebox style playlists, along with syncing, weighting options, and logic complete querying.