Yesterday I showed some new data which the mixer makes available through power words. However, there’s even more data buried inside the newest version of the mixer. To use that, you’ll need to understand how to use recipes - you might want to review our earlier posts introducing recipes or the official documentation if you are planning on using this feature. In a nutshell, recipes are special rules which modify how the mixer creates playlists - so you can customize the algorithms until they are just right for you.
The good news is that even if you don’t feel comfortable making your own recipes, you can still use recipes created by other people - since the description is basic XML, you can simply use your favorite text editor to copy and paste recipes which other people have created, and then choose those recipes from the preferences menu.
Up to now, the only rules available for recipes were constraints and modifiers. Version 1.9 introduces new rules which use the extra data available through MusicDNS (some of these are simply convenience wrappers around constraints or modifiers you could write yourself using the new power words). The following summary shows the most common options. Note that all rules share the following attributes:
cond="expr" - This indicates a conditional rule. The value of the expression will determine whether the rule is to be applied to a given mix.
weight="expr" - This indicates a modifier weight. The higher the number, the more likely a song is to show up in a mix (2 would mean roughly twice as likely). Numbers less than one make songs less likely to show up in a mix (.5 means roughly half as likely).
All attributes are optional - each rule has default values for general use.
Era
The era rule lets you incorporate information about when a song was first released. The full syntax looks like this:
<era cond="expr" type="type" mode="mode" range="expr" end="bool" weight="expr"/>
The type attribute controls the primary meaning of this rule. If the value is lock, this is a constraint. If the value is bend, it will bring matching songs closer. If the value is contemporaries, it will bring matching artists closer (this is the default).
The mode attribute controls which year data is used. It may be mip (use only MusicIP years), mip-local (use MusicIP years if present, or local years otherwise - this is the default), local-mip (use local years if present, or MusicIP years otherwise) or local (only use years from your own metadata).
The range attribute controls how large a range of years is considered to match - the default is plus or minus 5 years, but you can choose any range you like. The range may even be an expression.
The end attribute is used when comparing artist eras. If true, then the full release range for an artist is used - otherwise, only the initial date is used. The default is to only use the initial year for each artist.
Location
The geo rule lets you incorporate information about where a song is most popular, based on the anonymous data collected through the mixer and MusicDNS. For instance, if a certain artist is big in Germany, then you can associate songs by that artist with songs by other artists which are big in Germany. The full syntax looks like this:
<geo cond="expr" type="type" weight="expr"/>
If you want to use this as a constraint, set type="lock". Otherwise, it will work as a modifier, and you can override the default weight if you choose.
Genre
The genre rule lets you incorporate information about more detailed genres, like Heavy Metal, Disco, or Funk. This does not depend on your own tags, but on how other people around the world have tagged their songs. Using this rule, you can associate artists based on similar genre tags. The full syntax looks like this:
<genre cond="expr" type="type" weight="expr"/>
If you want to use this as a constraint, set type="lock". Otherwise, it will work as a modifier, and you can override the default weight if you choose.
Popularity
The popularity rule lets you incorporate information about how popular a song is - do you want just the hits, or do you want to reach deeper into an artist’s catalog? The full syntax looks like this:
<popularity cond="expr" type="type" weight="expr"/>
The type attribute may have one of the five following options:
- hits - only match the most popular songs (the default),
- mainstream - prefer more popular songs,
- mixed - blend popular and less popular songs,
- offbeat - prefer less popular songs,
- fringe - only match less popular songs.
Social Contexts
The social rule lets you incorporate information about how artists relate to each other in various social contexts. The full syntax looks like this:
<social cond="expr" source="source" type="type" weight="expr"/>
If you want to use this as a constraint, set type="lock". Otherwise, set type="bend", and it will work as a modifier, and you can override the default weight if you choose. (The default for this rule is to lock.)
The source attribute indicates the general type of data you want to include, and may be any combination of the following values:
- A - album relationships (artists who appear in collections together)
- C - commonly confused artists (casual listeners commonly mistake these artists)
- P - playlist relationships (hand made playlists may include these artists)
- W - working relationships (artists who have played in bands together)
The default value is all four: ACPW.
Example
A quick example may help clarify how to use these new rules. Here we will make a recipe to focus on popular music, which has similar genres and eras.
<recipe name="example">
<popularity type="mixed"/>
<genre weight="3"/>
<era weight="2"/>
</recipe>
This will combine both popular and less popular tracks. Songs which are tagged with similar genres to the seed tracks will be roughly three times more likely to show up than songs with non-matching genres. Songs which were released within five years of the seed tracks will be roughly twice as likely to show up. (So songs with matching genre and era will be six times as likely to be included in the mix.)
As you can see, with this powerful new set of rules, the mixer combines the best of the social context with the best acoustic algorithms to provide unprecedented flexibility in create your own personal playlists - when you want it, how you want it.
Tomorrow we’ll wrap up this first set of previews with a quick review of some smaller changes which can still prove remarkably useful.