📖 What Pearson does
Chapter 14 is the boss fight. It walks you through building the Dogbotophone MK1 — a “massive electronic orchestra complete with multiple voices, drums, and self-patching sequencers that compose on the fly”. The build has 15 numbered steps:
- An audio-rate oscillator. A 4093-based square-wave VCO.
- A sequencer clock. A 4040 binary counter, dividing the VCO into three square waves at three octaves of frequency. These drive the three sequencers.
- A 4017 overtone synth. An overtone synth that can chirp out melodies that can’t play out of tune.
- A 16-step sequencer for the overtone synth. Walks through 16 steps driven by the 4040’s three octaves of binary.
- A 4017 undertone synth. Plays undertones — frequencies below the audible range.
- A 16-step sequencer for the undertone synth. Like step 4.
- A 16-step sequencer for drums. Triggers the drum voices.
- A tunable square wave. A 4046-based square wave VCO, played manually.
- Twin-T voice 1. A harmonic drum voice, tunable from kick to tom to woodblock.
- Twin-T voice 2. A second harmonic drum voice.
- A cymbal (XOR voice). An inharmonic cymbal built from a 40106 (six oscillators) + a 4070 (four XOR gates) + a diode VCA.
- Diode AND-gate sequencer reset. A logic gate that resets the drum sequencer.
- An optocoupler-controlled sequencer. (Optional.) Uses an optocoupler to trigger the sequencer.
- (Optional) Active high-pass and low-pass filters. Sends voices through filters.
- An op-amp mixer. Mixes all six voices.
The chapter concludes: “If you’ve made it this far, congratulations! Your room is likely a mess of wires, but you’ve done it.”
🎓 Background: the Dogbotophone vs. our device
The Dogbotophone MK1 is the closest analog to our project in the entire book. It has:
- Multiple oscillators (analog) ↔ multiple AMY voices (digital).
- Three 16-step sequencers (hardware) ↔ our chain of patterns (software).
- Two sequenced melodic voices (overtone + undertone synths) ↔ our melodic slots.
- Three drum voices (Twin-T + cymbal) ↔ our drum slots.
- A tunable square wave (the 4046) ↔ our tweak Tone + Knob A.
- A mixer ↔ AMY’s built-in voice allocator.
- Active filters ↔ our tweak Filter mode + punch-in FILTER_SWEEP.
- Optocouplers ↔ no analog.
Our firmware does almost all of what the Dogbotophone does, with much less soldering.
🔧 Try it on the device
The complete Dogbotophone experience, in our firmware, can be built up over a few minutes:
Step 1: three sequencers.
Create three patterns, each with a different “instrument”:
> pattern_clear 1
> step_set 1 1 9 60
> step_set 1 5 9 64
> step_set 1 9 9 67
> step_set 1 13 9 72
> pattern_clear 2
> step_set 2 1 10 67
> step_set 2 5 10 71
> step_set 2 9 10 74
> step_set 2 13 10 79
> pattern_clear 3
> step_set 3 1 11 60
> step_set 3 5 11 65
> step_set 3 9 11 67
> step_set 3 13 11 72
Three patterns, each with its own slot (9, 10, 11), each with its own melodic content. Now chain them:
> chain_clear
> chain_append 1
> chain_append 2
> chain_append 3
> bpm 120
> play
You hear three patterns play in sequence. That is the three sequencers of the Dogbotophone, in software.
Step 2: the overtone synth.
The overtone synth plays melodies that “can’t play out of tune” —
they are harmonics of a fundamental. In our firmware, you can
approximate this by recording a harmonic-rich sample (e.g. a
square wave) and using slot_play on a melodic slot.
Step 3: the drum voices.
Record three drum samples (kick, snare, hat) into slots 1, 2, 3. Write a pattern that triggers them on different beats:
> pattern_clear 4
> step_set 4 1 1 1
> step_set 4 3 3 1
> step_set 4 5 2 1
> step_set 4 7 3 1
> step_set 4 9 1 1
> step_set 4 11 3 1
> step_set 4 13 2 1
> step_set 4 15 3 1
This is the Bossa Nova example from Pearson’s chapter 12 — but applied to our project.
Step 4: the mixer.
AMY automatically mixes all six voices (3 melodic patterns + 1 drum pattern). You don’t have to wire a mixer.
Step 5: the active filters.
Add tweak-filter values to your melodic steps:
> edit
> tweak_filter_set 1 1 50 100
> tweak_filter_set 2 5 100 50
> tweak_filter_set 3 9 200 0
> write_off
When the patterns run, the filter sweeps each step differently. That is Pearson’s “active high-pass and low-pass filters on individual voices”.
🛠 Code reference
- The pattern step data with filter values —
main/sequencer/pattern.h,pattern_step_t. Thefilter_cutoffandfilter_resonancefields. - The tweak filter UI —
main/ui/knobs.c. Maps ADC readings to step-level filter values. - The mixer —
components/amy/src/amy.c. AMY’s voice allocator mixes up to N concurrent events into the output buffer.
🚫 What we can’t simulate
- The undertone synth. Frequencies below the audible range. Our firmware doesn’t generate them.
- The XOR cymbal. The XOR-based inharmonic cymbal is a beautiful analog circuit. We can’t synthesize that timbre without a custom wavetable.
- Optocoupler-controlled sequencing. An optocoupler is an electrically-isolated analog component. We have no analog of electrical isolation.