Part of How The Heck?, a series of interactive explanations of everyday technology designed primarily for curious, non-technical readers.
If you like these, you can follow the author, buy him a coffee, or suggest what comes next.
✨200,000+ views📊60+ bespoke visualizations📝60+ TL;DRs🤎35+ coffee donations
Synthesizers are responsible for some of the most iconic sounds in music.
Robert Moog's synthesizers in the 1960s proved that synthesis was a serious tool for musicians, and by the end of the decade, bands like The Beatles and The Doors were experimenting with them. Wendy Carlos, the American composer who went on to compose soundtracks for films like A Clockwork Orange and The Shining, recorded a collection of pieces by Johann Sebastian Bach using a Moog synthesizer. This recording, Switched-On Bach, was released in 1968 and played a key role in popularizing the synthesizer, reaching number 10 on the Billboard 200 chart.
About a decade later, in 1978, the Prophet-5 synthesizer was released. It was one of the first affordable polyphonic synthesizers, meaning you could play up to five notes at once instead of just one. Suddenly, synthesizers could play chords and harmonies. The 1980s saw an explosion of synth-driven music. Synthesizers like the Minimoog, the Roland TB-303, and the Yamaha DX7 shaped entire genres of music, from synthpop to acid house to cheesy power ballads.
Synthesizers have remained a staple of modern music. From iconic video game soundtracks to Hans Zimmer's scores, from Radiohead to the Stranger Things theme. We hear more synthesized music than we even realize.
So how do they actually work?
Sine Of The Times
TL;DR
Sound is vibration, and sine waves are the simplest building block for describing that vibration.
I had a teacher in high school, Mr. Watts, who shaped my love of math and science. He had a way of always tying whatever we were learning to practical applications, like using card games to learn about expected value or pointing to a ferris wheel to explain the unit circle. Perhaps my favorite example of tying a simple mathematical concept to a real-world application is how sine waves underpin every sound we hear.
A sine wave is the simplest possible oscillation pattern. You can think of it as tracing the height of a point on a circle as it rotates.
Sound is fundamentally a vibration of air pressure, and vibrations are mathematically represented as sine waves, so it's no surprise that sine waves are the building block of music. The interesting part is how different sine waves work together to create the complex sounds we know and love.
It's not just one sine wave
TL;DR
A vibrating string is a combination of many harmonics, not just one simple wave. Each instrument has its own unique recipe of how those harmonics combine to create the sound.
If you think about a guitar string, it's tempting to think of the whole string vibrating as a single vibration. But that's not quite right.
A guitar string is fixed at both ends: the nut and the bridge. Physics dictates that any vibration that keeps the endpoints still is allowed. The simplest allowed shape is a single arc bowing across the full length of the string. But two smaller arcs that each fit exactly into half the string are also allowed, as are three fitting into a third, four into a quarter, and so on. Each of these vibration patterns is a harmonic.
What does the standing wave equation look like?
A single harmonic on a fixed string can be written as:
where is the position along the string, is time, is the amplitude of the nth harmonic, is the length of the string, is the harmonic number, and is the angular frequency.
In plain terms: any sine wave that starts and ends at zero is allowed.
Here's what that looks like for the first few harmonics:
The surprising insight is that the string is doing all of these vibrations at once. The actual waveform of the string is the sum of all of these harmonics, each contributing its own amplitude and phase to the overall waveform.
This is a consequence of a theorem proven by Joseph Fourier in the early 1800s: any periodic waveform can be decomposed into a sum of sine waves at different frequencies, amplitudes, and phases. For another application of this theorem, you can check out an earlier piece from this series about Shazam.
The interactive visual below demonstrates the principle in action. You can adjust the amplitudes of the individual harmonics to see how the combined waveform changes:
As a physical representation of the principle, the GIF below shows my guitar strings as captured by my smartphone's rolling shutter. The wavy shape isn't the string physically bent; it's the string's vibration over time, each row of pixels captured at a slightly different moment. It's an artifact of how the camera works which makes the oscillation visible.

Not pictured: how silly I looked getting my phone into my guitar.
The same principle applies to all instruments. A piano string struck by a hammer, a clarinet reed buzzing against a mouthpiece, and a violin string drawn by a bow all operate similarly: each is a physical object vibrating with a set of harmonics using slightly different recipes based on the instrument's shape and material.
Let's listen
TL;DR
A synthesizer starts with an oscillator: a controllable source of repeating waves.
Knowing that a musical note is essentially a repeating wave described by a unique recipe of harmonics, we can start to understand how synthesizers work.
The oscillator, responsible for generating the repeating waveform, is the core building block of a synthesizer. In analog synthesizers, this is a physical electronic circuit producing fluctuating voltages. In digital ones, it's a mathematical calculation happening millions of times per second. Either way, the goal is the same: produce a controllable repeating wave.
The interactive below is similar to the earlier one, but this time we can listen to it. Try adjusting the amplitudes of the individual harmonics to see and hear how the note changes, or try one of the presets to approximate a real instrument:
Although this technique can approximate real instruments, in practice most software will generally use sampled waveforms instead. A sampled waveform is a recording of a real instrument playing a note, digitized into a sequence of discrete values. Some hybrid approaches combine sampling and additive synthesis to create a more realistic sound.
The true strength of synthesizers isn't in approximating real instruments, but rather in creating new sounds that are impossible to achieve with real instruments.
For the musically curious: why chords sound good
TL;DR
Consonant notes often sound pleasing because their harmonic series line up at shared frequencies.
You may be wondering how adding harmonics is different from playing a chord since, after all, both involve multiple frequencies sounding at once.
Harmonics, also called overtones in music, are integer multiples of a single fundamental frequency. When you play an A at 440 Hz, the harmonics at 880 Hz, 1320 Hz, and beyond are all present simultaneously. Your ear recognizes the integer relationship between them and fuses them into a single perceived pitch rather than hearing them as separate notes.
A chord, on the other hand, is multiple different fundamental frequencies playing simultaneously, each with their own harmonic series. Your ear hears them as separate notes rather than one fused sound.
Here's the cool part: the reason certain chords sound pleasing is that their fundamentals share many of the same overtones. A C and a G sound good together because their harmonic series overlap. C's third harmonic and G's second harmonic land at nearly the same frequency, around 784 Hz, reinforcing each other rather than clashing. The simpler the ratio between two notes, the more overtones they share, and the more consonant they sound. It's an open question whether this preference is a cultural artifact or a fundamental property of the human auditory system.
This is also why tuning is complicated. A perfect fifth has a frequency ratio of exactly 3:2, so G should be exactly 1.5 times the frequency of C. But if you stack twelve perfect fifths on top of each other, cycling through all twelve notes and back to C, you end up at a frequency 1.4% higher than where you started. This is called the Pythagorean comma, and it's why Western music settled on equal temperament: a system that spreads that 1.4% error evenly across all twelve notes.
A few relatively simple concepts like sine waves and additive synthesis underpin the entire foundation of music.
Common waveforms
TL;DR
Common oscillator shapes like sine, sawtooth, square, and triangle are shortcuts for different harmonic recipes.
We've learned that oscillators work by adding sine waves together in custom ways. There are also a few common predefined waveforms that are good starting points.
- Sine: just the fundamental with no harmonics.
- Sawtooth: contains all harmonics falling off naturally at . It's the richest of the four and the most useful starting point for synthesis.
- Square: contains only odd harmonics, giving it that hollow, woody quality. This is the same odd-harmonic recipe as the clarinet preset from earlier.
- Triangle: similar to square, but the harmonics fall off much faster, making it softer and more flute-like.
These presets unlock a powerful workflow. Rather than building complexity from sine waves up, you start with a complex waveform and carve it down. This approach is called subtractive synthesis, and it's how most classic analog synthesizers work: start with something harmonically rich, then use a filter to sculpt away what you don't need.
Sculpting the sound using filters
TL;DR
Filters shape raw waveforms by reducing or emphasizing parts of the frequency spectrum.
Oscillators help us generate waveforms to play notes. They generate the raw material, but they can't shape it dynamically. That's where filters come in.
The most common filter is the low-pass filter, which lets through lower frequencies and tapers off everything above it. Sweeping the cutoff frequency dynamically gives us a degree of expressiveness that we can't achieve with static waveforms alone.
Most filters also have a resonance control, which boosts frequencies around the cutoff point. This gives us a squelchy sound typical of acid house music.
You can use the interactive below to experiment with the common waveforms and filters. Try to craft a sound that you like:
Envelopes
TL;DR
Envelopes shape how a note changes over time: how it starts, settles, sustains, and disappears.
Another parameter we can use to shape the sound is time. By modifying the volume of a note as it plays, we can create an envelope that shapes the sound over time.
The standard envelope shape is the ADSR envelope, which is a four-stage envelope that controls the attack, decay, sustain, and release of a note.
- Attack: how long it takes for the sound to reach full volume after a key is pressed. A fast attack hits immediately; a slow attack fades in gradually.
- Decay: how long it takes to fall from that peak down to the sustain level.
- Sustain: the volume level the note holds at while the key is held down. Unlike the other three, sustain is a level rather than a time.
- Release: how long it takes the sound to fade to silence after the key is lifted.
The interactive below shows an ADSR envelope in action, with a few helpful presets to get you started:
Putting It All Together
TL;DR
A basic synth combines oscillator, filter, envelope, and keyboard controls into one playable instrument.
To close this piece out, here's a playground that combines all of the concepts we've learned. You can play notes, adjust the waveform, filter, and envelope, and listen to the result. It's a functional synthesizer that runs in your browser, courtesy of the underappreciated Web Audio API.
On real instruments
TL;DR
Synthesizers reveal how musical sound works, but acoustic instruments remain beautifully specific and hard to replicate.
I took a Physics Of Music course in college, which is where I learned about the Fourier Theorem and harmonics. I really love acoustic instruments, and funnily I don't think I came to fully appreciate them until after I learned about synthesizers.
Acoustic instruments, like my guitar, all have their own idiosyncratic recipe of harmonics, in addition to natural fluctuations like how the wood resonates or how the strings buzz against the fretboard. This was a big "aha" moment for me; my specific guitar played by my specific hands produced a unique recipe of harmonics that I could never replicate on another guitar. Even a synthesizer, with all of its technological precision, couldn't replicate it perfectly.
To me, this sits at a satisfying nexus of music and mathematics. We learned why we love the traditional instruments we've been playing for centuries, and then we learned how to reverse engineer sound and make entirely new art forms. I think that's a pretty cool thing.
