Help Multiplexius become a real-world plushie!

We only have until September 26.

Video clips
Chip music
Chipophone
Hardware projects

The chipophone

The Chipophone is a homemade 8-bit synthesizer, especially suited for live chiptune playing. It has been built inside an old electronic organ.

All the original tone-generating parts have been disconnected, and the keys, pedals, knobs and switches rerouted to a microcontroller which transforms them into MIDI signals. Those are then parsed by a second microcontroller, which acts as a synthesizer.

You can find more information about how the organ was modified on the making of page.

Presentation video

The synthesizer

The synthesizer is implemented on an ATmega88, an 8-bit microcontroller with 1 kB of RAM and 8.5 kB of ROM. It receives MIDI data at a jumper-configurable baud rate and produces a 12-bit mono line out signal. What follows is a brief architectural overview.

Waveform generators

Interrupts are generated at 38 kHz. For each interrupt, a sample is generated. It is the sum of the outputs of eight waveform generators (oscillators). Each waveform generator can be configured to generate a pulse wave (with some given duty cycle), a 4-bit triangle wave or white noise. The output can then be ring modulated with a global modulation oscillator (currently not used). Finally, the output is multiplied with a volume factor.

The waveform generation uses approximately 85% of the available CPU time. The remaining time is used by the rest of the software, which is responsible for modifying the parameters (waveform, frequency, duty cycle, volume) of the waveform generators in realtime.

Channels

For each of the eight waveform generators, there is a matching high-level structure, called a channel. Each channel keeps the state necessary for executing an instrument macro, such as instruction pointer, instrument volume, glissando rate, current glissando offset and vibrato phase. It does not keep track of the current pitch, though, but instead holds a reference to the part that has allocated it, known as the owner, and the index to the current key in that part. From this information, the pitch can be deduced.

The channels are updated at 100 Hz.

Parts

There are three parts in the synthesizer: Upper manual, lower manual and pedal. Each part keeps track of a large array with one entry for each physical key. This array contains status about the keys, such as whether they are held, whether they are heard (and at what volume), and to which channel they have been routed.

When a part learns that one of its keys has been pressed, it allocates a channel, becoming its owner, and sets up the channel to reference the matching array slot. The array slot also gets a reference back to the channel.

In arpeggio mode, the part also starts a timer. If a new key is pressed before this timer expires, it will join the previous one in an arpeggio. In this case, no new channel is allocated. Instead, the array slot for the second key is set up to reference the same channel that was used before. Meanwhile, every channel has an arpeggio timer, telling it when to switch notes. Everytime this timer expires, the channel will follow its owner reference, scan through the array of the part (starting at the current index and going towards lower pitches), and look for the next slot that references the same channel.

In other words, arpeggios are not stored as lists in RAM, but in a distributed fashion where each key is tagged with the channel number corresponding to the arpeggio in which it occurs.

Stealing channels

It is sometimes not possible to allocate a channel, as all eight of them are already in use. On a traditional synthesizer, this is where the least recently used channel, or perhaps the one with the lowest volume, is cut (silenced) and "stolen". The chipophone has the benefit of arpeggios, so it'll use some heuristics to determine which two channels are the least important, and simply join their arpeggios (or single notes) into one big arpeggio. This way, no notes are ever dropped, but the downside is that arpeggios may occasionally be introduced even when no part is in arpeggio mode.

Sequencer

There is also a step sequencer with eight steps, and up to eight note events (pressed or released) and one drum event per step. The implementation is straight-forward. The lower manual and the drum kit can be used to record the loop, and it can be replayed either at the part of the lower manual or at the part of the pedals. If it is replayed at the part of the lower manual, actual events on the lower manual will temporarily mute the loop, apart from the drums.

Controls

The knobs and switches have been assigned MIDI continuous controller numbers. Parameters will be routed to the corresponding part according to the MIDI channel number. When the channel update routine is executed, it will in turn configure e.g. the waveform and duty cycle of the corresponding waveform generator according to the settings stored in the part which owns it.

Posted Wednesday 21-Jul-2010 21:42

Discuss this page

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Primis
Nick Sargente
Thu 22-Jul-2010 05:23
The effect on a standard organ known as a Leslie created by a spinning motor creates a Doppler effect, the effect can be heard in acid rock songs such as the Pink Floyd song "On the Run". does your organ have one of these? It's a real neat feature, on a second note, would you ever be willing to release the schematics/Rom of that midi board? I'm thinking of making a chipophone myself.
-Primis

206 more comments hidden. Click to show all.

Anonymous
Fri 29-Apr-2022 15:16
Have you considered to rewrite the chipophone and thus get new features on a more powerful, yet cheap processor like the STM32F103 (Blue Pill boards) ?
Anonymous
Thu 17-Aug-2023 20:13
Finns det möjlighet att köra "chipophone" som mjukvara under windows? Tänkte om man kopplar in ett midi-keyboard och får (nästan) samma funktionalitet?

/Zeta
Anonymous
Wed 8-Nov-2023 01:04
hello
sheerjoypiano
Julia Scherer
Mon 14-Jul-2025 19:35
Greetings, Friends!

I'm a pianist/piano teacher who's been obsessed with the Chipophone since I first heard about it but haven't had time to build one yet. I thought about it again when my son released his Retro Pixel Camera (RPC) app, which records 8-bit photos and videos in real time. They can be shared instantly. So easy, and so cool!

While recording a quick RPC demo video of a student improvising video game tunes, it hit me: It would be sooooooo cool to record chiptunes using RPC!

Linus doesn't have time to record an RPC chiptune video, but he gave me permission to post a request here.

Who wants to give it a try? I'll give the first 5 responders a promo code to download Retro Pixel Camera (iOS or Android) and share your super-cool creations!