Self-study guide
🔊 The Science of Sound
A hands-on manual for the two sound tools in the Science Lab — Synth Lab and Image Synth. It explains what sound is, how the knobs shape it, and just enough music theory to make what you build sound good. Press the ▶ Hear it buttons as you read — the sound is made live in your browser.
Part 1 — the science of sound
What is sound?
Sound is a vibration travelling through the air. When something wobbles back and forth — a speaker cone, a guitar string, your vocal cords — it squeezes and stretches the air around it. Those little pressure changes ripple outward and your eardrum feels them as sound.
If we draw the air pressure over time, the simplest possible sound — a pure tone — is a smooth sine wave:
Air pressure going up and down over time. One full up-and-down is a cycle. Two things about this wave decide what we hear: how fast it wiggles (pitch) and how tall it is (loudness).
Pitch & frequency
Frequency is how many cycles happen each second, measured in hertz (Hz). Fast wiggling = high pitch; slow wiggling = low pitch. The note A that orchestras tune to is 440 Hz — the air wobbles 440 times a second.
The magic number for music is ×2. Double the frequency and you get the same note, one octave higher — 220 Hz, 440 Hz, 880 Hz all sound like "A". Our ears hear ratios, not differences, which is why pitch is really a multiplying ladder, not an adding one.
Low note — few cycles.
One octave up — twice as many cycles in the same time.
Loudness & amplitude
The amplitude is how tall the wave is — how big the pressure changes are. A taller wave pushes the air harder, so it sounds louder. Amplitude doesn't change the pitch at all; a quiet A and a loud A are the same note.
Same pitch, two amplitudes: the taller wave is louder.
Waveforms & timbre
A sine wave sounds pure and a bit flute-like. But most instruments make more interesting shapes. The shape of one cycle is the waveform, and it decides the timbre — the "colour" of the sound that lets you tell a violin from a trumpet even on the same note. The four classic synth waveforms:
Sine — pure, smooth, mellow. Only the fundamental, no extra harmonics.
Triangle — soft and hollow, like a gentle flute. A few quiet harmonics.
Sawtooth — bright and buzzy, rich and brassy. Every harmonic, strong.
Square — hollow and woody, a bit like a clarinet or old video games.
Learn more — what's inside each waveform
Every one of these shapes is secretly a stack of pure sine waves (the harmonics), and the recipe is what your ear hears as timbre:
- Sine — just the fundamental, nothing else. The one truly “pure” tone.
- Triangle — only the odd harmonics (1×, 3×, 5×…), and they fade very fast (as 1/n²), so it's soft and hollow — close to a sine but a touch richer.
- Sawtooth — every harmonic (1×, 2×, 3×…), fading gently as 1/n. All those strong harmonics are why it's the brightest, buzziest wave.
- Square — only the odd harmonics, fading as 1/n. Bright like a saw but hollow (no even harmonics) — that woody, clarinet-ish colour.
This is exactly why the filter changes the tone: turning down the highs peels off the upper harmonics, so a bright saw slowly melts into a mellow, sine-like sound.
Harmonics & the spectrum
Here's the beautiful secret: every one of those waveforms is really a stack of sine waves added together. The lowest one is the fundamental (it sets the pitch), and above it sit quieter sines at 2×, 3×, 4×… the frequency — the harmonics. Different recipes of harmonics make different timbres.
A spectrum graph shows the recipe: a bar for each harmonic, as tall as it is loud. A sine is a single bar; a sawtooth is a whole staircase.
Sine — one bar. Just the fundamental.
Sawtooth — every harmonic, fading as they go up. That's why it's so bright.
Learn more — the harmonic series, and why spectrum peaks have width
The harmonic series. The harmonics sit at whole-number multiples of the fundamental — f, 2f, 3f, 4f… A note at 100 Hz has harmonics at 200, 300, 400 Hz, and so on. The fundamental fixes the pitch; the pattern of harmonic strengths fixes the timbre. It's the same series a bugle or a plucked string rings with — nature's built-in chord.
Why isn't each peak a razor-thin line? To work out frequencies, the spectrum has to look at a chunk of time at once — and there's a catch: a long, steady tone gives a sharp, narrow peak, while a short or changing snippet gives a broad, fuzzy peak with little ripples beside it. You can't be perfectly precise about when a sound happens and exactly what frequency it is at the same time — the time–frequency trade-off (the same idea as the uncertainty principle). Freeze a long held note and the peaks are crisp; freeze a quick stab of the same note and they smear — the spectrum is really showing how long the tone lasted.
Envelopes (ADSR)
A real note isn't the same loudness the whole time — it starts, holds, and fades. The envelope shapes that loudness over time. The classic controls are A D S R:
Attack — how long to fade in when the note starts. Decay — the drop down to the sustain level. Sustain — the level it holds while the key is down. Release — how long it fades out after you let go.
Short attack + short release = a sharp pluck (like a harp). Long attack + long release = a slow, breathy pad (like strings swelling in). Same note — totally different feel.
Filters
A filter turns some harmonics up or down — it's a tone control. Instead of showing loudness over time (like the envelope), a filter's graph shows loudness across frequency: which pitches get through and which get cut.
Low-pass — lets lows through, cuts the highs above the cutoff. Makes a sound warmer / darker.
High-pass — the opposite: cuts the lows, keeps the highs. Makes a sound thin / tinny.
Band-pass — keeps only a band around the cutoff. Nasal, like a voice through a phone.
Two knobs: Cutoff is where the filter starts working (slide it down to get darker), and Resonance adds a bump right at the cutoff — a little whistle that makes sweeps sing.
Learn more — the slope, and what Resonance really does
How steep is the cut? These are 2-pole filters, so past the cutoff the sound drops by about 12 dB every octave — double (or halve) the frequency and it's ~12 dB quieter again, so two octaves is ~24 dB down. Right at the cutoff it's about −3 dB. That's a gentler slope than the famous 24 dB/octave filter in many hardware synths.
Resonance does two different jobs, depending on the filter:
- Low-pass / High-pass — Resonance makes a peak right at the cutoff. Low = a flat, clean corner; high = a resonant whistle at the cutoff (that “waaah” when you sweep it).
- Band-pass — the Cutoff slider is the centre of the band, and Resonance sets how narrow it is: the width is roughly centre ÷ Resonance. Low = a wide band (about an octave); high = a thin sliver that can pick out a single harmonic.
Watch it on the spectrum: the orange dashed line marks the cutoff (the centre, for band-pass). Turn Resonance up and sweep, and you'll see the peak ride along the line — or the band tighten around it.
The filter envelope
You've met two shapes now: the envelope shapes loudness over time, and the filter shapes tone across frequency. The filter envelope is what happens when you point an envelope at the filter's cutoff — so the tone brightens and darkens on its own every time a note plays. Start with the cutoff low (dark) and the sweep snaps it wide open on the attack, then it settles back down over the decay: the classic subtractive-synth “wow”.
The line is the cutoff over time. It jumps up on the Attack, falls to the Sustain level over the Decay, and slides back to the resting cutoff when you let go. The Amount knob sets how far it moves (and which direction — up or down).
It's a separate envelope from the one on loudness, so a note can fade in slowly while the filter snaps open fast — or the other way around. In Synth Lab and Image Synth this is the Filter Env row: Amount is how big the sweep is (0 = off), and Attack / Decay / Sustain shape it just like the loudness envelope. Turn the filter Cutoff down and the Resonance up first, so there's somewhere for the sweep to travel.
The LFO (wobble)
An LFO (low-frequency oscillator) is a wave so slow you don't hear it as a pitch — instead it's used to wiggle another control automatically, a few times a second.
The slow dashed wave is the LFO. Point it at pitch and you get vibrato (the note wavers up and down); point it at the filter and you get that classic wah / wobble. Rate = how fast, Depth = how much.
Effects: drive, delay, reverb
Everything so far shaped a single note's tone. Effects are the last stage — they treat the whole sound after it's made, the way a guitarist's pedals or a studio's mixing desk do. Synth Lab has three, chained in this order: Drive → Delay → Reverb. Each is off until you turn it up, so you add just as much as you want.
Drive — distortion. It bends the wave (the straight line becomes an S) so the peaks flatten, which adds harmonics: clean warmth turns to gritty fuzz as you push it.
Delay — echo. It repeats the sound after a set Time; Feedback feeds each echo back in so they repeat and fade, and Mix is how loud the echoes are.
Reverb — space. Hundreds of tiny echoes blur into a smooth tail, like a sound in a room or a big hall. Size sets how long the tail rings; Mix how wet it is.
Delay and reverb are both echoes — the difference is spacing. A delay is a few separate repeats you can count; a reverb is so many, so close together, that they smear into one wash. Drive is different again: it doesn't add time, it re-shapes the wave itself.
Stereo & panning
You have two ears, so sound can come from the left, the right, or anywhere between. Panning places a sound in that space. Spreading different parts left and right makes a mix feel wide and alive instead of squished into the middle.
Pitch & time
Here's a puzzle: speed a recording up and it also gets higher — a sped-up voice sounds like a chipmunk. That's because playing the samples faster squeezes every wave-cycle closer together, so the pitch rises and the sound gets shorter. On a tape or a record, pitch and length are the same knob — you can't change one without the other. This is called varispeed.
The same sound, pitched up an octave. Faster (tape) packs the cycles tighter and ends sooner. Pitch-shift packs the cycles tighter but keeps the original length.
To raise the pitch without changing the length — the way autotune or a music app on a phone does it — you need pitch-shifting (its twin is time-stretching: change the length, keep the pitch). The usual trick is granular: chop the sound into tiny overlapping grains and re-lay them to fill the length you want, with each grain sped up to raise the pitch. A big grain size sounds smooth on long notes but smears sharp hits; small grains sound rougher and more echoey. There's no perfect setting — every music app makes this same trade-off.
Part 2 — a little music theory
Making it sound musical
Beat, tempo, and measures
Music has a steady pulse — the beat. Tempo is how fast the beats go, in BPM (beats per minute): 120 BPM is two beats a second. Beats are grouped into measures (or "bars") — usually 4 beats each. If you split each beat into 4, one measure has 16 steps — exactly the grid in Synth Lab's step sequencer.
One measure = 4 beats = 16 steps. The tall marks are the beats you'd tap your foot to.
Notes, scales, and why pentatonic sounds good
Between one note and the same note an octave up, we usually pick out 12 evenly-spaced steps (the piano's white and black keys). A scale is a chosen handful of those steps that sound good together. The major scale (7 notes) is the familiar do-re-mi. The pentatonic scale (5 notes) leaves out the two notes most likely to clash — which is why almost anything you play on it sounds nice. That's exactly why both tools default to pentatonic: you can't really hit a wrong note.
Harmony, chords, and intervals
Play two or more notes at the same time and you get harmony. The distance between two notes is an interval, and simple frequency ratios sound sweet:
- Octave (ratio 2:1) — the "same note, higher" we met earlier.
- Fifth (about 3:2) — open and strong; the backbone of rock power-chords.
- Major chord — three notes together (root + a "third" + a fifth) — bright and happy.
Part 3 — the tools
Guide: Synth Lab
Synth Lab is a subtractive synthesizer: you start with a rich waveform and subtract from it with a filter, then shape it with an envelope.
The signal path
Oscillator (pick a waveform + detune) → Filter (tone) → Envelope (loudness over time) → LFO (optional wobble) → your speakers. Every section on the page is one step of that chain — and the oscilloscope and spectrum show you the result as you turn knobs.
Play it
- Click the on-screen keys or use your computer keyboard (A W S E D …). Hold latches a note so you can explore sliders while it rings.
- The number keys 1 2 3 play the drums — Kick, Hat, Clap — so you can finger-drum without a controller.
- Source switches between the oscillator, a recorded sample, and a steady tone generator.
- Freeze holds a picture of the wave so you can study its shape and harmonics.
Build a song
- The Step Sequencer is one measure of 16 steps; the melody rows use a pentatonic scale and play the exact sound you designed. Add Kick / Hat / Clap for a beat, set the Tempo, add a little Swing for groove.
- Multi-track layers up to four recorded loops; give each a volume and pan, then Save mix to a stereo WAV.
Use a MIDI controller (optional)
Plug a USB MIDI keyboard (like an Akai MPK mini) into a laptop with Chrome or Edge and it just plays — everything below is a bonus, and Synth Lab works exactly the same without one.
- Keys play the synth, with velocity (harder = louder) and the sustain pedal.
- Knobs — the controller's knob numbers depend on its setup, so you teach the app which is which: click 🎛 Learn (it appears next to the MIDI light when a controller is plugged in), click an on-screen dial like Cutoff, then move a knob on the controller — now that knob turns that dial live.
- Pads — in Learn mode, click a Pad → target (Kick / Hat / Clap to finger-drum, Preset / Teacher to switch sounds, or ⏺ Record to start and stop a Multi-track take without reaching for the mouse), then hit a pad to link it. Pads you don't link just play notes.
- Joystick / wheel — bends the pitch up and down; the mod axis can be Learned to any dial (try Cutoff or LFO Depth) for expressive sweeps.
- Clear removes all links; they're remembered on that computer between sessions.
Guide: Image Synth
Image Synth plays a picture as sound. It reads the grid like a graph of sound — an inverse spectrogram:
- Left → right = time. A playhead sweeps across; the left edge plays first.
- Up = higher pitch. Each row is a note (snapped to a scale so it stays musical).
- Brighter = louder. Every lit row plays its note at once, so it's really a big stack of sine waves — additive synthesis, the flip side of Synth Lab's subtractive one.
- Colour = stereo. Red → left ear, green → right.
Try
- Paint a diagonal line to hear a slide; scatter dots for a little melody of beeps.
- Load a picture (or drag one in) — a bold logo or big letters make great shapes; Rotate it to hear it a different way.
- The same Oscillator / Filter / Envelope / LFO controls from the science above shape every row — so everything you learned here applies directly.