Dynamic playlists in MusikCube

On Windows, my music player of choice is musikCube. It’s fast, clean, elegant, and powerful. Oh, and it has an embedded SQL engine underlying its song library.

musikCube in action

It has conventional playlists, but it also has dynamic playlists based on queries of the underlying SQL database. For example, this query gives the Top 10 Most Played songs:

 timesplayed > 0  ORDER BY timesplayed DESC  LIMIT 10

And this gives 50 songs with a rating of 4 stars or better in random order:

 rating > 3 ORDER BY random() LIMIT 50

Once created, a dynamic playlist is only a mouseclick away.

The documentation is incomplete, but the database schema is easy to look up by saving a copy of the library and opening it up with a tool like sqliteman:

musikCube database schema

I wanted to subdivide my music into playlists, and then find any song not on a custom playlist. A query similar to this did the trick:

songid NOT IN (
  SELECT songid
  FROM std_playlist_song
  WHERE std_playlist_id IN (
    SELECT std_playlist_id
    FROM std_playlist
    WHERE std_playlist_name IN ('Gnarly', 'Radical', 'Tubular')
))

It finds every song not added to the Gnarly, Radical, or Tubular static playlist. Using this, I finally got my music library sorted and organized.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.