Lesson plan

Build a synthesizer lesson plan

From a phase accumulator to a four-voice MIDI synth: wavetables, ADSR, a fixed-point filter and effects on an Uno.

3 chapters, 7 lessons, about 7 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • An oscillator, an envelope and a filter: everything one note needs.
  • Four voices at once, and the MIDI that tells them what to play.
  • Effects and presets, then an instrument of your own.

Materials for the whole unit

  • Arduino Uno R3 x 2
  • Capacitor x 2
  • Full-size breadboard
  • Keypad, 4x4
  • Piezo speaker
  • Potentiometer x 2
  • Resistor x 2

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 3 h 20 min

One voice

An oscillator, an envelope and a filter: everything one note needs.

LessonTimeWhat students do
OscillatorsMake a pitch from a counter and a table: a 16-bit phase accumulator stepped 15,625 times a second, four wavetables, and PWM to turn numbers into a voltage.80 min
  1. Two boxes and a wire
  2. The phase accumulator
  3. Hear it
  4. A higher note
  5. Wavetables
  6. Eight bits, honestly
EnvelopesShape every note with ADSR: attack, decay, sustain and release, a state machine stepped 977 times a second inside the audio interrupt.65 min
  1. Attack, decay, sustain
  2. Release
  3. A pluck
  4. A slow attack
  5. Release from where it is
FiltersSweep a sawtooth from bright to dull with a one-pole low-pass in 8.8 fixed point, its cutoff on a knob, and measure what it takes away.55 min
  1. A cutoff on a knob
  2. Turn it down
  3. Measure the change
  4. Why 8.8 fixed point

Materials

  • Arduino Uno R3 x 2
  • Capacitor x 2
  • Full-size breadboard
  • Keypad, 4x4
  • Piezo speaker
  • Potentiometer x 2
  • Resistor x 2

Check for understanding

Each student finishes "Filters" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Why 8.8 fixed point".

Chapter 2. About 2 h

Many notes

Four voices at once, and the MIDI that tells them what to play.

LessonTimeWhat students do
PolyphonyPlay chords with four voices: each new note takes a free voice, a fifth steals the oldest, and the interrupt's share of the CPU is measured.65 min
  1. Two notes at once
  2. A chord
  3. Steal a voice
  4. The CPU budget
  5. Headroom
MIDI inRead the wire between the two boards: status and data bytes at 31250 baud, note on, note off, velocity and channel, shown in hex as they arrive.55 min
  1. Three bytes a note
  2. Note off
  3. Channels
  4. The real wire

Materials

  • Arduino Uno R3 x 2
  • Capacitor x 2
  • Full-size breadboard
  • Keypad, 4x4
  • Piezo speaker
  • Potentiometer x 2
  • Resistor x 2

Check for understanding

Each student finishes "MIDI in" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "The real wire".

Chapter 3. About 1 h 50 min

Play it

Effects and presets, then an instrument of your own.

LessonTimeWhat students do
EffectsAdd vibrato with a 5.5 Hz LFO on every voice's pitch, crush the bits to hear quantization, and load presets that set the whole patch.55 min
  1. Vibrato
  2. Bitcrush
  3. Presets
  4. What an echo would cost
Project: a playable synthPlay it: load a pluck, play a chord across voices, sweep the filter by hand, and share a patch of your own.55 min
  1. A pluck
  2. A chord across voices
  3. Sweep the filter
  4. Share a patch

Materials

  • Arduino Uno R3 x 2
  • Capacitor x 2
  • Full-size breadboard
  • Keypad, 4x4
  • Piezo speaker
  • Potentiometer x 2
  • Resistor x 2

Check for understanding

Each student finishes "Project: a playable synth" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Share a patch".

Your class

Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.