Mixer 1.8 Preview: Modifiers
So far, we’ve introduced rules which can restrict which songs show up in a mix by applying user customized rules which can depend on the seed songs, or on the contents of the playlist being created.
Sometimes, though, you don’t want to be so draconian - you might just want to emphasize a certain kind of song, or make some songs show up less often. To do that, you can use a new kind of rule, called a modifier.
Modifiers look a lot like constraints, except instead of providing hard limits, they provide gentle (or not so gentle) nudges. Let’s suppose you want to have songs which you’ve rated 4 or higher show up more often in mixes. Here’s one way you might do that with modifiers:
<modifier weight=”2″>rating >= 4</modifier>
(In a real XML file, >= would be written >= )
The weight provides a “nudge” value. You can think of it as expressing how often a matching song should show up, relative to a non matching one. In this case, songs rated four or higher would be twice as likely to show up with the modifier, as without.
You can decrease a song by using a fractional modifier:
<modifier weight=”.5″>rating = 2</modifier>
In this case, songs rated 2 should be half as likely to show up.
Just like constraints, you can do comparisons with seeds songs in your modifiers. One of the new methods available is version 1.8 is called overlap. This returns the number of words that two phrases have in common, ignoring words like the and a. Here’s a modifer which says if a given song’s genre has at least one word in common with the seed genre, then it should be weighted more heavily - this is a looser version of our genre locking:
<modifier weight=”2″>overlap(seed genre, genre) != 0</modifier>
Ok, that’s it for our brief overview of constraints and modifiers. If you look in the installation folder, you can see the source code for several examples which you can use to try out your own rules. As a reminder, the file is called recipes.xml.
If you’d like to ask questions, or share your ideas, you can talk to us on our forums. We’ll showcase more examples in future posts. Have fun!
April 11th, 2007 at 5:21 pm
do you think you can release a beta of this with all so far mentioned for say a week for us to try it out? def worth all the $
April 13th, 2007 at 11:16 pm
[…] Da ich grade auf das Blog hinter dem vor einiger Zeit von mir vorgestellten MusicIp Mixer gestoßen bin, möchte ich es hier kurz erwähnen. Besonders die Hintergrundinformationen zu den Features der kommenden Version 1.8 sind sehr interessant.So ist zum Beispiel ein zusätzliches Bewertungssystem geplant, welches bestimmte Songs häufiger oder weniger häufig in einem Mix erscheinen lässt. […]