Mixer 1.8 Preview: Constraints
One frequently requested feature for MusicIP Mixer has been the ability to have more control over how playlists are created. The simplest option when creating a mix is to control which songs are considered candidates for inclusion in the mix. To review, there are several options already in the mixer for this:
1. Filters - You can create a filter with any conditions expressible in the mixer. Select a filter to restrict yourself to songs matching those conditions (like songs added in the last 30 days, or songs which you’ve rated more than 3 stars). Or, you can right-click on the Mix button to apply a specific filter when you create a mix.
2. Exclusions - Exclusions take a heavier handed approach. You can create them just like filters, using any conditions supported by the mixer, but these will apply to all your mixes, regardless of any other settings. This is typically used for “blacklisting” certain songs (songs rated 1 star, spoken word songs, podcasts, whatever you don’t want to end up in a mix).
3. Genres - You can use the “Restrict mix to selected genre” option to make sure only songs matching the seed genre are included. This option is a little bit different than numbers 1 and 2, because it depends on the seed song, and isn’t just a blanket rule.
As of version 1.8, we’ve added a new feature called constraints. Constraints effectively extend the concept of exclusions to conditions which can depend on anything about the seed songs, or indeed, on a variety of other choices. Currently, the process for creating constraints requires just a little bit of XML knowledge. Rules for creating mixes live in the file recipes.xml which sits where your copy of MusicIP Mixer is installed. The outermost tag is called recipes, and inside that tag are nested recipe tags. Each recipe is a set of rules which you can apply to mixes. Once you have some recipes defined, you can select the active recipe from the Mix options panel in your preferences.
The advantage of storing these as XML is that they are easier to share - as you’ll see over time, some of the rules can get a little tricky. Let’s dig right into things and make a simple constraint. In this case, we’ll make sure that all songs in the mix are within 5 years of the seed’s original release date.
(If you don’t have many years, you might want to consider using the new feature of the Fix Tags command, to add years to your tracks.)
A basic recipe looks like this:
<recipe name=”Example Recipe”>
<constraint>expression</constraint>
</recipe>
In this case, only songs which match the expression will be included in your mixes whenever the Example Recipe is active. Version 1.8 of the mixer adds several new functions which are particularly useful for writing constraints. Here’s how to express our example year lock:
abs(seed year - year) < 6
Note that we’ve prefixed the year keyword with the word seed, meaning we are referring to a seed song, and comparing it with all other songs in the mix. In this case, we are saying that the difference between the seed year, and the year of any song in the mix can be no more than 5. abs is a function which takes the absolute value of an expression (it makes negative numbers positive), and just makes the expression easier to write.
There’s a gotcha hiding in this rule - if your seed song has no year, then the expression seed year will evaluate to zero. This means only songs with a year between -5 and 5 will be considered in your mixes (in practice, only other songs without years would match that). This is probably overkill. What’s you’d like to say is apply this rule only if the seed song actually has a year specified. Constraints let you express these conditional expressions with an extra cond attribute. In this case, the condition is:
seed year != 0
Since we are dealing with XML, we’ll need to use XML syntax to express the whole thing, which ends up looking like this:
<recipe name=”Era Lock”>
<constraint cond=”seed year != 0″>abs(seed year - year) < 6 </constraint>
</recipe>
Next up, we’ll explore some extra corners of the constraint system and introduce a few new features.
April 9th, 2007 at 6:26 pm
Hi I left a message on your Music IP fourms about making it so you can make 1 playlist based off %s of other gernes or playlists so it can equal 1 playlist based on certain peremeters or conditions. Can you make such a feature in next version and mabie set a standard that you can use to define what or how much a % is mabie based on how much music is in the list or ect. Anyways I hope you can consider this new addition
April 9th, 2007 at 7:14 pm
We’re going to have a new post each day this week showing more stuff in version 1.8 - you might want to tune in tomorrow!
September 2nd, 2007 at 8:32 am
[…] I forgot to mention that you get all those features for free!. For those considering going for the registered version, jump in!The new power search features, moods, etc are really cool. The best way to learn about those new features is the musicIP blog and some user blogs. […]
September 28th, 2007 at 2:05 pm
[…] Every great chef needs a great set of tools to help create the perfect set of recipes. Now that Mixer 1.8 has been out a bit, with the new recipes feature for customizing playlists to your own taste, I’d like to show you one of the tools we use internally to help tweak our own recipes. In order to use this feature, you will need to be comfortable creating and editing recipes. […]
November 22nd, 2007 at 12:26 am
[…] I forgot to mention that you get all those features for free!. For those considering going for the registered version, jump in!The new power search features, moods, etc are really cool. The best way to learn about those new features is the musicIP blog and some user blogs. […]