Queuing Theory and radio playlists
Here’s an interesting question. Well, it’s interesting to me, and maybe someone who knows about Queuing Theory can help me solve it.
Imagine you create a radio station playlist by selecting a number of albums (that meet a particular theme, say) and give you the total running time you want, and then you randomize the order of all the tracks on all the albums. A Rule setting in your playout system doesn’t let it play the same artist more frequently than once an hour (ie the “Minimum Artist Separation” is 60 minutes). If the system’s about to play a track that would break that rule, it moves it down the playlist until it doesn’t break the rule, recognising future appearances of the same artist (or it removes it an puts it back in the pool). If it can’t move the artist far enough away, it gives up and tell you that it can’t do it.
Is there a formula that will let you know for a given total running time of playlist (given an average number of tracks on an album, of average running time, and assuming each album is by one artist to keep it simple) how many different artists you will need to give you a high probability of the Rule never failing?
That’s the question: here’s the background.
If you decide to run a suitably licensed Internet Radio station, something you run into fairly quickly is a set of clauses in the Digital Millennium Copyright Act (DMCA), which define how often you can play pieces of music by the same artist and from the same album. In addition to appearing in the DMCA, and thus in the terms of the licensing arrangement with Sound Exchange in the USA, you’ll find similar clauses in the Phonographic Performance Limited (PPL) Webcasting licence in the UK.
Here’s how Live365 puts the requirement in their rules for broadcasters:
In any three-hour period:
- you should not intentionally program more than three songs (and not more than two songs in a row) from the same recording;
- you should not intentionally program more than four songs (and not more than three songs in a row) from the same recording artist or anthology/box set.
As far as I know, there are no playout systems out there that actually allow you to put these rules in and then makes sure you don’t break them. What we need is a set of check boxes:
Album separation: Maximum X songs from same album per Y hours. Max in a row: Z
Artist separation: Maximum A songs from same artist per B hours. Max in a row: C
Nobody currently does this. Why not? Any licensed internet station needs to follow rules of this type. Currently SAM Broadcaster comes closest, with the Playlist Rules dialog shown at the top of the page.
It’s more common to have something more simple. MegaSeg is a very nice Macintosh-based playout system – the one I use – and getting better all the time, but apart from its lack of official FLAC support (in common with SAM – but luckily with Megaseg there’s a workaround in the form of the Xiph Quicktime plugins), one of its few current failings (due to be addressed in the next release) is that the only setting that you can use to help meet the DMCA requirements is “Artist Separation”. So you can define the minimum length of time between plays of the same artist, and that’s it. Setting this value to 60 minutes will stop you breaking the second DMCA requirement, at least, although it’s a little crude: you have to rely on the fact that most albums are by one artist and manually select material accordingly to meet the album repetition rule.
Once you start trying to build playlists that don’t play an artist more than once an hour, you quickly discover that you need more artists than you thought. Hopefully it’s possible to build a formula to help you know how many artists you need, and about how many tracks by each.
Any ideas?
1 comment
And we have an answer. In fact a more complete one than I expected.
This approach is based on information kindly provided by a respondent to my query on this topic in the Spacial Audio forums (“Cygnus X‑1” in fact, a forum admin). The terminology assumes you’re using SAM Broadcaster (Spacial’s Windows-based radio automation/DJ system that I own but don’t use as it doesn’t support FLAC files), but the theory is general and can be applied to any playout system.
Bear in mind that if you implement the DMCA requirements in the simplest way, you have to make sure that neither a track from the same artist nor album is played more frequently than once an hour. In terms of SAM’s Playlist Rotation Rules, this means an “artist repetition” and an “album repetition” of 60 minutes (ie at least 60 minutes must pass before another track from the same album, or by the same artist, can be played).
If you build playlists by choosing a theme and then adding entire albums that embody that theme, then play out all the tracks from those albums at random (which is I think what most of us do most of the time), then in general, a rough estimate for a good mix is:
(artist repetition rule in minutes) / (average track length in minutes) = number of artists
floor( ln( (album repetition rule in minutes) / (average tracks on an album) ) * number of artists ) = number of albums
Notice that the length of the programme does not appear in this formula. However, this does give you the minimum size of the album “pool” you need to create a playlist that will meet DMCA rules.
For those with a mathematical bent: the floor function is a special kind of “rounding” function: floor(x) represents the greatest integer less than or equal to x. So if x = 4.9, then floor(x) = 4, for example. You always round down. And here you can find a calculator to evaluate natural logarithms, ie ln(x).
Example
Assume that the average number of tracks on an album is 12, and the average track length is 4 minutes:
Given that the artist repetition rule is 60 minutes and album repetition rule is 60 minutes:
60 / 4 = 15 artists
floor( ln ( 60 / 12 ) * 15 ) = floor( ln ( 5 ) * 15 ) = 24 albums
(ln (5) = 1.6094379124341; ln(5) * 15 = 24.141568…; so the floor value is 24.)
This is therefore the minimum number of albums and artists you can have in a DMCA-compliant playlist, given the average number of tracks on an album and the average track length specified above. You can have a longer playlist, of course (but not a shorter one), and as long as the artist:album ratio (with these average values) remains 15:24 (or about 1.6 albums per artist), you won’t run out of music.
But don’t forget that if your average number of tracks per album and/or their length is different, the ratio will differ too, so work out the ratio for the kind of music you’re playing.
Leave a Comment