Loading images...

Queuing Theory and radio playlists

by Richard Elen on 12 Jun, 2010

in Broadcasting, Science & Technology

SAM Broadcaster's Playlist Rules section

Here’s an inter­est­ing ques­tion. Well, it’s inter­est­ing to me, and maybe some­one who knows about Queu­ing The­o­ry can help me solve it.

Imag­ine you cre­ate a radio sta­tion playlist by select­ing a num­ber of albums (that meet a par­tic­u­lar theme, say) and give you the total run­ning time you want, and then you ran­dom­ize the order of all the tracks on all the albums. A Rule set­ting in your play­out sys­tem does­n’t let it play the same artist more fre­quent­ly than once an hour (ie the “Min­i­mum Artist Sep­a­ra­tion” is 60 min­utes). If the sys­tem’s about to play a track that would break that rule, it moves it down the playlist until it does­n’t break the rule, recog­nis­ing future appear­ances 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 for­mu­la that will let you know for a giv­en total run­ning time of playlist (giv­en an aver­age num­ber of tracks on an album, of aver­age run­ning time, and assum­ing each album is by one artist to keep it sim­ple) how many dif­fer­ent artists you will need to give you a high prob­a­bil­i­ty of the Rule nev­er fail­ing?

That’s the ques­tion: here’s the back­ground.

If you decide to run a suit­ably licensed Inter­net Radio sta­tion, some­thing you run into fair­ly quick­ly is a set of claus­es in the Dig­i­tal Mil­len­ni­um Copy­right Act (DMCA), which define how often you can play pieces of music by the same artist and from the same album. In addi­tion to appear­ing in the DMCA, and thus in the terms of the licens­ing arrange­ment with Sound Exchange in the USA, you’ll find sim­i­lar claus­es in the Phono­graph­ic Per­for­mance Lim­it­ed (PPL) Web­cast­ing licence in the UK.

Here’s how Live365 puts the require­ment in their rules for broad­cast­ers:

In any three-hour peri­od:

  • you should not inten­tion­al­ly pro­gram more than three songs (and not more than two songs in a row) from the same record­ing;
  • you should not inten­tion­al­ly pro­gram more than four songs (and not more than three songs in a row) from the same record­ing artist or anthology/box set.

As far as I know, there are no play­out sys­tems out there that actu­al­ly allow you to put these rules in and then makes sure you don’t break them. What we need is a set of check box­es:

Album sep­a­ra­tion: Max­i­mum X songs from same album per Y hours. Max in a row: Z
Artist sep­a­ra­tion: Max­i­mum A songs from same artist per B hours. Max in a row: C

Nobody cur­rent­ly does this. Why not? Any licensed inter­net sta­tion needs to fol­low rules of this type. Cur­rent­ly SAM Broad­cast­er comes clos­est, with the Playlist Rules dia­log shown at the top of the page.

It’s more com­mon to have some­thing more sim­ple. MegaSeg is a very nice Mac­in­tosh-based play­out sys­tem – the one I use – and get­ting bet­ter all the time, but apart from its lack of offi­cial FLAC sup­port (in com­mon with SAM – but luck­i­ly with Megaseg there’s a workaround in the form of the Xiph Quick­time plu­g­ins), one of its few cur­rent fail­ings (due to be addressed in the next release) is that the only set­ting that you can use to help meet the DMCA require­ments is “Artist Sep­a­ra­tion”. So you can define the min­i­mum length of time between plays of the same artist, and that’s it. Set­ting this val­ue to 60 min­utes will stop you break­ing the sec­ond DMCA require­ment, at least, although it’s a lit­tle crude: you have to rely on the fact that most albums are by one artist and man­u­al­ly select mate­r­i­al accord­ing­ly to meet the album rep­e­ti­tion rule.

Once you start try­ing to build playlists that don’t play an artist more than once an hour, you quick­ly dis­cov­er that you need more artists than you thought. Hope­ful­ly it’s pos­si­ble to build a for­mu­la to help you know how many artists you need, and about how many tracks by each.

Any ideas?

{ 1 comment… read it below or add one }

Richard Elen June 22, 2010 at 13:05

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

Previous post:

Next post: