Can you give us some more examples for the Expressions which are possible ?
Lol okay...

I'll split this into two sections:
STANDARD QUERIES WITHOUT USING MATH FILTER
All tracks
Query Filter: #
Filter Type: All
Random selection of n tracks
Query Filter: #
Filter Type: Random
Num Tunes: As many as you want (refresh tracklist with F4 key at any time).
Played in last month (30 means days)
Query Filter: lastplayedage<30
Played in last hour
Query Filter: lastplayedage<1.0/24
(also experiment with dateaddedage and filemodifiedage)
Almagamate music genres together, along with other conditions:
Example 1:
Query Filter: (Genre='Spacesynth' | Genre~'Electro' | Genre~'Techno') & rating>=3
Example 2:
Query Filter: (Genre~'Swing' | Genre~'Ragtime' | Genre~'Bebop' | Genre~'Jazz') & Year>20000208
(The year (date) format is YYYYMMDD by the way)
Any hidden remixes? Here the Artist is different to the original artist, and original artist isn't blank:
Example 1:
OrigArtist!=Artist & OrigArtist!=''
(Those quotes are 2 single apostrophes, not a 'double' quotation mark)
Example 2 (extension of above to find even more remixes):
(OrigArtist!=Artist & OrigArtist!='') | (Artist!=Author & Author!='')
Find various blank fields, but only if they've been added within the past month
(rating<0 | Album='' | Artist='' | SongTitle='') & dateaddedage<30
Select tunes which have been played more than once every 20 days on average
PlayCounter/dateaddedage > 1.0/20
Select tunes which have been played less than once every 100 days on average and is rated higher than 3 star
PlayCounter/dateaddedage < 1.0/100 & rating>3
USING THE MATH FILTER
This is where the real power of MegaDJ shows. You can have anything in the Query field along with the Math filter for further filtering. For the tests below, the query is set to "#" (all tracks), and the Filter Type is (usually) set to "Random" (with say 100 tunes).
Random selection of 100 random tracks with bias towards your old tunes
Query Filter: #
Math Filter: filemodifiedage
Filter Type: Random
Num Tunes: 100
Strength of bias is proportional to filemodifiedage value (time elapsed since timestamp). Use "1/filemodifiedage" for bias towards your new tunes instead.
Random selection of 100 random tracks with bias towards your high rated tunes
Query Filter: #
Math Filter: rating
Filter Type: Random
Num Tunes: 100
Strength of bias is proportional to rating value. Use Math Filter: "2^rating", to slope the bias even further towards the higher rated tunes. In Filter Type=Random mode, the math filter is a *weighting* relative to the rest of the scores (so if we put rating/50000, they would still all have equal weight and therefore, there would be no real difference in the actual results of the playlist!).
The nice thing is that if you only have a say a few 5 star tunes, the 'weighted roulette wheel' system will automatically be less likely to pick them (despite the high rating), on account of how rare they are.
Random selection of 100 random tracks with bias towards your most frequently played tunes
Query Filter: #
Math Filter: PlayCounter/dateaddedage
Filter Type: Random
Num Tunes: 100
PlayCounter/dateaddedage was one we had in the Query Filter. Now it's in the PlayCounter/dateaddedage, it means we can select random tracks with bias towards more frequently played tunes (rather than a hard cut-off point as was set before).
The 3 above queries used PlayCounter, dateaddedage, filemodifiedage and rating. Also experiment with Date, BPM, Length, PlayCount and others for more possibilities.
Scan through all tracks. 5 star tracks have 100% chance of being added, 4 star - 80%, 3 star - 60%, 2 star - 40%, 1 star - 20%, 0 star/bomb - 0%
Query Filter: #
Math Filter: rating/5
Filter Type: All
The Math Filter works slightly differently now that the Filter Type is set to All. This time, the "rating/5" bit will calculate the *probability* that each tune will be added to the list (rather than it being a weight as before).
Mix of unheard/unrated tracks along with good ones
Query Filter: #
Math Filter: if(rating<0, 8, 2^rating)
Filter Type: Random
The Math Filter supports most math functions, and also allows the use of an If/Else statement. Here, the filter is saying, query all tracks, but randomly pick 200 with certain biases...
The "rating<0" bit means 'unrated' basically, so it receives a weighting of 8. Otherwise (i.e. if rating >=0), calculate 2^rating, and that will be the weighting instead (2,4,8,16,32 depending on whether it's 1,2,3,4 or 5 star).
This allows a nice selection between highly rated tracks, and also those you haven't rated or heard much.
You can use 3^rating or rating^2 or whatever else you think is best.
Random selection where tracks published closer to the year 2000 get priority
Query Filter: #
Math Filter: 1 / 1.2^(abs(Year-20000000)/10000)
Filter Type: Random
You can go crazy with all the math symbols if you know what you're doing. We have to divide by 10000, because MM stores the Year 2000 as 20000000 (YYYYMMDD)
Latest version of MegaDJ (version 1.0 beta 2) is available with some bug fixes. I don't expect too many bugs, but we'll see (famous last words).