Page 1 of 16

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

Posted: Wed Oct 29, 2008 6:37 pm
by twinbee
Turbocharged! And now much easier to use.[/WinXP/7/Vista, better randomsize]

Download from here - (homepage)

Mediamonkey or later

Background and description
My 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.

Love to hear any comments and bug reports!

MegaDJ homepage and download

------------------------- 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.

For history v2.35 and later, please see the (homepage).

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.

Re: Launch of MegaDJ v2!

Posted: Thu Oct 30, 2008 9:05 am
by raybeau528
This is a really powerful extension to MM!

Re: Launch of MegaDJ v2!

Posted: Thu Oct 30, 2008 5:58 pm
by sakurakessho
I cannot get this thing to uninstall.

Uninstall issue is resolved according to the script developer.

Re: Launch of MegaDJ v2!

Posted: Thu Oct 30, 2008 6:14 pm
by twinbee
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.

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

Re: Launch of MegaDJ v2!

Posted: Mon Nov 03, 2008 6:36 am
by BigMatty
Good job, thanks for this!

Questions -

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' year
1 / 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'.

Thanks again for the hard work :) Very useful.

Re: Launch of MegaDJ v2!

Posted: Mon Nov 03, 2008 11:47 am
by twinbee
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.

Re: Launch of MegaDJ v2!

Posted: Tue Nov 04, 2008 6:31 am
by stan9980
Great work twinbee :D


Re: Launch of MegaDJ v2!

Posted: Sat Nov 08, 2008 5:07 am
by mazzo
It fails to install in Vista. On my PC, anyway.

Re: Launch of MegaDJ v2!

Posted: Sat Nov 08, 2008 11:27 am
by mazzo
Ah. It installs in Vista when running MM as administrator.

Re: Launch of MegaDJ v2!

Posted: Mon Nov 10, 2008 11:31 am
by mazzo
How do you avoid dublettes?

Re: Launch of MegaDJ v2!

Posted: Mon Nov 10, 2008 2:07 pm
by twinbee
Hi mazzo,

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).

Re: Launch of MegaDJ v2!

Posted: Tue Nov 11, 2008 1:38 pm
by mazzo
How do I do this?

I don't want to let The Beatles play too often, let's say 7,10. But for the Beatles albums Revolver and Rubber Soul I want high priority, say 2,1.

How will a math string look like in this case?

Re: Launch of MegaDJ v2!

Posted: Tue Nov 11, 2008 4:52 pm
by twinbee
There's a couple of ways of going about this. Perhaps the simplest way is the following:

Code: Select all

if(Artist = "The Beatles", 0.7, 1) *
if(Album = "Revolver" | Album = "Rubber Soul", 3, 1)
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.

The other way of doing pretty much the same thing is the following:

Code: Select all

if(Album="Revolver" | Album="Rubber Soul",2,  if(Artist = "The Beatles",0.7, 1)  )
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.

Re: Launch of MegaDJ v2

Posted: Sat Nov 15, 2008 5:40 pm
by Kevinowpb
Can I do a query to list all songs modified (edit of tags, capitalizations, etc... probably using the timestamp field)... by HOURS? instead of days?

I edit my data on a daily basis, as I have 30k songs and most are tagged, but still a work in progress.

I'd like a Playlist based on the last 100 modified within 24 hours or 12 hours... counting down.. to maybe even 1 hour.

Is that possible?

Re: Launch of MegaDJ v2

Posted: Sat Nov 15, 2008 8:28 pm
by twinbee
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.0
or the equivalent....
filemodifiedage < 0.5

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

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.