A DJ who does not exist
At the top of the file that decides what the Radio Index DJ does it says: no ML, pure deterministic logic. And that is the part nobody should notice.
by Nicola Sabaini 3 min read Project: Radio Index
Radio Index broadcasts without stopping, and between one track and the next a DJ who is not there speaks. It picks what to play, when to talk, when to keep quiet.
At the top of the file that makes those decisions, in the comment I wrote to remind myself what it is, there is a line that contradicts half of what you would expect: no ML, no learning libraries, pure deterministic logic.
All of its intelligence lives in a few floating point numbers and a queue sixteen long. Cost is negligible.
What it looks at, given that it does not learn
It looks at the context a real DJ needs, all in one place: what time it is and what listening slot that implies, how many people are connected right now, how much energy the last tracks had, how long since a voice was heard, whether the audience is growing or falling.
Out of that comes an intention, not an action: reinforce the transition, drop in a sting, or stay quiet. Another piece of the program carries it out.
None of those decisions needs a model. They need someone to have decided, once, what counts.
Synchronisation happens in the schedule
This is the principle everything else is built on, and it cost three rewrites.
Tracks are picked and ordered so that genre, tempo and key match before going on air. For every block of three or four tracks the program tries all the possible orders and keeps the one that locks best. Then, at the transition, the tempo is pulled the way it was pulled on a turntable: at most six per cent in the club blocks, three and a half elsewhere. No digital stretching of the length, which is the thing you hear immediately and which ruins the track.
A system trying to fix everything live would have twenty milliseconds to solve a problem the schedule solves the day before, calmly, trying every route.
Same tracks, same result
There is no real random number in the mix. Where a choice between equivalent options would be needed there is a signature computed over the content, which always gives the same answer for the same inputs.
It sounds like an obsession and it is the only way around the oldest problem: at three in the morning a transition sounds wrong, and the next morning you have to be able to make it happen again. A radio you cannot reproduce is a radio you cannot fix.
The two lessons I paid for
The first is about volume. I had put automatic gain control on the final sound, the way it is done. It sounded worse: the tracks had already been brought to the same level one by one, and compressing them again all together flattened them. Now the final stage passes the audio through untouched while a single track is playing, and steps in only on overlaps that go over the ceiling.
The second is about beats. Roughly one fast track in ten was measured at half speed: hardstyle read as 75 beats per minute instead of 150. Those were exactly the tracks meant to push, and they ended up next to something slow as if they belonged there. The correction is applied when tracks are loaded, without touching the files.
What the listener hears
None of this. A radio: the sting at the top of the hour, the news or the weather, the music blocks, the segment on the half hour. From TuneIn, from Alexa, from the car, or from the stream address dropped into any player.
Something like this has not succeeded when somebody says «it sounds real». It has succeeded when nobody says anything, because they were doing something else.
The DJ does not exist. The work it would have done all exists, it was just done earlier.