Playlist Examples

Here’s a few ideas for constructing dynamic playlists in Trainspotter:

“Just added”

Have a playlist so you can easily see which tracks you’ve imported in the last , set a rule to be “IMPORT_DATE” “is in the last” “14 days”.

Mixing in Key

Create a dynamic playlist for each number on the camelot wheel by checking “match any rule” and adding two rules for each number, e.g. for 1 on the camelot wheel:

“KEY” “equals” “Abm”

“KEY” “equals” “B”

If you then set the ordering to be by “KEY” and then by “BPM” ans then you can add all the playlists to favourites slots in Traktor.

If you have your keys defined differently, e.g. 1A,1B,2A . . . then just alter the rules to fit your key format.

Multi Genre Support

If you use the genres/styles that discogs you’ll want to create genre playlists, as Traktor doesn’t yet support them and will give you hundreds of individual genre combinations under its Genre node in the browser.

So to create a genre playlist for “Tech House” just add a rule “GENRE” “contains” “Tech House”

Creating a playlist for pure “House” becomes a bit trickier if you don’t want any “Tech House” or other variants in it. You can either add additional rules in your “House” playlist so the “GENRE” “does not contain” “Tech House”, or add your “Tech House” and other house playlists to the set of playlists to exclude.

70s, 80s, 90s, 00s

If you’ve gone to the trouble of entering or tagging the release dates of your tracks then you can use dynamic playlists to generate tracks released in a particular time period, so for tracks released in the 80s you would add a rule “RELEASE_DATE” “is between” “1980-01-01″ and “1990-01-01″.

Custom Tag-based playlists

If your using Trainspotter’s custom tagging features then make a dynamic playlist for each tag that you define, e.g. if you define a tag “melodic”, then add a rule “RATING” “contains” “melodic”

More Advanced Dynamic Playlists

Here’s a few custom XQueries that I’ve found to be pretty useful, just copy/paste the queries in bold in to the “Use XQuery” box in the dynamic playlist dialog

Tracks that don’t contain a beat grid:
$entries[count (CUE_V2[@TYPE="4"]) = 0]

Tracks that do contain a beat grid:
$entries[count (CUE_V2[@TYPE="4"]) > 0]

Tracks played more than twice the average:
$entries[INFO[(@PLAYCOUNT) > avg( //ENTRY/INFO/@PLAYCOUNT ) * 2 ]]

Tracks that contain one or more loops:
$entries[CUE_V2[@TYPE="5"]]

Tracks that have less than two cuepoints:

for $e in $entries[count (CUE_V2)<2] order by $e/INFO/xs:date(@IMPORT_DATE)  ascending return $e

A playlist of possible duplicate tracks (tracks with the same filename):

let $orderedDoc := for $e in $entries order by $e/LOCATION/@FILE return $e
for $e at $i in $orderedDoc
where $e/LOCATION/@FILE = $orderedDoc[$i + 1]/LOCATION/@FILE or $e/LOCATION/@FILE = $orderedDoc[$i - 1]/LOCATION/@FILE

return $orderedDoc[$i]

A playlist of tracks where the artist has been given with and without “the” at the beginning:

let $doc:= for $e in $entries[starts-with (upper-case(@ARTIST),"THE ")] return $e
for $e in root()/*:NML/*:COLLECTION/*:ENTRY return
             if(  $doc[string-length(@ARTIST) = string-length($e/@ARTIST)+4  and
                  substring-before( upper-case(@ARTIST),upper-case( $e/@ARTIST) ) ="THE "] )
             then
                  $e
            else
                  null

A playlist of tracks with the same name but different artists:

let $orderedDoc := for $e in $entries order by $e/@TITLE return $e
for $e at $i in $orderedDoc
where ($e/@TITLE = $orderedDoc[$i + 1]/@TITLE and not($e/@ARTIST = $orderedDoc[$i + 1]/@ARTIST)) or
          ($e/@TITLE = $orderedDoc[$i - 1]/@TITLE and not($e/@ARTIST = $orderedDoc[$i - 1]/@ARTIST))
return $orderedDoc[$i]

A playlist where the title, artist or remixer contains abbreviations:

for $e in $entries[matches(@ARTIST,"\p{L}{1}\.\p{L}{1}") or
matches(INFO/@REMIXER,"\p{L}{1}\.\p{L}{1}") or matches(@TITLE,"\p{L}{1}\.\p{L}{1}") ]
return $e

Tracks with different remixes:

let $orderedDoc := for $e in $entries[exists(INFO/@REMIXER) and
string-length(INFO/@REMIXER)>0] order by $e/@ARTIST, $e/@TITLE return $e

for $e at $i in $orderedDoc
where ( $e/@ARTIST = $orderedDoc[$i + 1]/@ARTIST or
$e/@ARTIST = $orderedDoc[$i - 1]/@ARTIST) and
($e/@TITLE = $orderedDoc[$i + 1]/@TITLE or $e/@TITLE = $orderedDoc[$i - 1]/@TITLE)

return $orderedDoc[$i]

If you want to know more about XQuery have a look here.