A voice for the machine
- Memo
- #008
- Date
- 10 November 2026
- From
- Viljami
The UNC 64 had a beeper. One bit, on or off, the kind of sound a machine makes when it has no sound chip. It was enough for a snake eating and a ship firing.
Then I wanted music in the room. Something quiet that turns up now and then while you work, the way it does in Minecraft, and goes away again before you notice it started.
I could have written that music in any program and dropped the files into the game. It felt wrong. Everything else in the room comes out of the machine on the desk. So the music does too: the UNC got a sound chip, and the room's music is played on it.
The AUNT
It's called the AUNT. A-UN-T, the audio unit. Every UNC has an uncle, and now it has an aunt.
I took the two sound chips I love and kept the best of each. From the Commodore 64's SID: three voices that are all the same, each with a pitch, a waveform and an envelope, and one filter they can be sent through. From the Game Boy: a fifth waveform that you draw yourself, 32 steps round.
It's mono. It sits in sixty-four bytes of address space nothing was using, so every program written before it runs exactly as it did. It's in every UNC from the first day, next to the beeper.
And then I had a chip and no idea how to write for it.
Reading Rob Hubbard's homework
If you grew up near a C64, you know Rob Hubbard even if you don't know his name. Commando, Monty on the Run, Delta, Thing on a Spring. Three voices, and it sounds like a band.
I didn't want to copy his tunes. I wanted to know how they were made. So I wrote a small 6502 that runs a C64 tune's own player routine, the actual code that shipped with the game, and writes down everything it tells the sound chip, fifty times a second. Then I read the numbers.
Some of what's in them:
- There is no chord voice. One voice is the bass, one is nothing but percussion, one is the tune. The harmony is in the bass line.
- Every note is let go just before the next one, so each gets its own attack. Six frames on, two off.
- The lead never holds still. Its pulse width runs back and forth the whole time, ten times faster than I had guessed.
- A drum is three things in under a tenth of a second: a pulse, a burst of noise, the pulse again an octave away.
- The bass has a single frame of noise in each note, like a pick on a string.
I went on to the C64's other composers, then the NES (Mega Man, Mario, Castlevania), then the demo scene. Over a hundred tunes in the end. The NES does it differently: two voices carry the tune in thirds, and the instrument is a volume shape drawn by hand. The demo scene's filter never stands still.
The first tune on the cassette is called ROB'S YOUR UNCLE. The manner is his. The notes are mine.
Correct is not good
My first tunes followed every rule I could find. A chord a bar, a melody that repeats, a note of the chord on the beat. A script checked them and they all passed.
They weren't any good. I could hear it, and no rule would tell me why.
What worked was slower: write one, listen, keep it or throw it away. I threw away about twenty. One was too plainly Mega Man. One was, I realised on the third listen, the Imperial March. Three stayed.
A voice of its own
The ones that stayed had a problem too. They sounded like a C64, or like a NES. Nice, and borrowed.
So what can the AUNT do that neither of those can? One thing. The C64's chip has no wave table. The Game Boy's is coarse, and you can't safely touch it while it plays. The AUNT's can be redrawn fifty times a second while a note sounds.
That means a note can change what it's made of as it goes. Strike it with every harmonic at once, then let the high ones die first, the way a plucked string does. Then push the whole thing past the edges of the table, so it's nearly square at the moment it's struck and turns back into itself as it fades.
That's instrument 1 now. A plucked string that could only come from this machine. It leads two of the four tunes on the tape.

The tracker
The chip needed a program to show it off, so there's a cassette: MUSIC TRACKER. Three columns of notes scrolling up the screen, one for each voice, four tunes on the tape.
For a while those tunes were made on my side of the screen, by a script that could do things the tracker couldn't. That bothered me, so I made a rule: whatever is on the cassette has to be playable by the tracker, and makeable in it.
The rule cost a lot and was worth it. The tracker had to learn the string, and slides, and a dozen smaller things. Then it had to become a real editor. You can write notes with the bottom row of the keyboard as a piano, change the order of the patterns, and open an instrument and watch its waveform and its envelope drawn in block characters while you change them. Then you save the whole thing to tape.
It all fits in a UNC 16, in 14K, with about four percent of each frame to spare.
The room plays the same chip
The six pieces you hear in the room are played on the AUNT as well. I cheated once: they use two chips, one for each ear, so six voices and some stereo. The machine on the desk has one.
My favourite of them, the one with drums, I set again for one chip and three voices. It's the fourth tune the cassette needed, and the second on it. Same piece, half the players.
Hear it
The tracker is on the Portal, running on the real emulator. Press RETURN and turn the sound up. T is the next tune. Press ? for the rest of the keys.
Then stop it and change a note.
Viljami