1. Learn
    2. Synthesis and sampling
    3. Oscillator waveforms

    Oscillator waveforms: sine, saw, square and triangle

    An oscillator is the part of a synth that makes the tone, a wave that repeats at the pitch of the note. Its waveform sets the starting colour: a sine is a single pure frequency, a triangle adds a few soft odd harmonics, a square adds more of them, and a saw has every harmonic, so it's the brightest.

    What it makes
    A repeating wave at the pitch of the note you play
    The basic shapes
    Sine, triangle, square and saw, plus pulse waves on many synths
    What sets the tone
    Which harmonics the wave contains and how loud each one is
    The usual mistake
    Comparing waves by ear without matching their levels first
    SYN·1Synth lab
    EnvelopeADSRThe noteFilter envelope
    ENV0%
    OUT−∞
    One cycle, while it sustains
    SpectrumCutoffFilter env peak
    One bar, with nothing above it

    Right now

    This note reaches full volume after 5.0 ms and takes 173 ms to fade once you let go. A sine wave has only the fundamental, so the filter has almost nothing to work on. 1 harmonic is within 40 dB of the loudest.
    5.0Rise ms
    173Tail ms
    1Harmonics
    Keyboard
    Pulse width50%
    Attack5.0 ms
    Decay300 ms
    Sustain100%
    Release150 ms
    Cutoff12 kHz
    Resonance0%
    Filter envOff
    Filter decay300 ms
    Gate80%

    Follow the steps. Each one sets the controls for you and tells you what to listen for.

    Step 1 of 9
    Start with a sinePress Play riff, or hold a key. This is a sine wave, and the spectrum shows a single bar: the fundamental of the A at 220 Hz, with nothing above it. The oscilloscope shows the smoothest shape a wave can have.
    Train your earsThe lab plays the riff with hidden settings and you say what you hear. The controls are covered, and every round is level matched so loudness never gives the answer away.

    Every note here is made in your browser by the lab's own oscillator, filter and envelopes.

    What is an oscillator?

    An oscillator is the part of a synth that makes sound in the first place. It produces a wave that repeats the same shape over and over, and the number of times it repeats each second, its frequency, sets the pitch. Play the A below middle C and the oscillator repeats its shape 220 times a second. Play the next A up and it repeats 440 times, an octave higher.

    Everything else in a synth works on what the oscillator makes. The filter turns parts of it down and the envelope shapes its volume over time. A filter can only remove what's already in the sound, or boost a narrow band of it, so the waveform you pick is the raw material for everything that follows.

    The shape of that repeating wave is its waveform. Analogue synths make it with a circuit and soft synths calculate it, but almost all of them start from the same small set of shapes: sine, triangle, square and saw. Once you know what those four sound like, the oscillator section of nearly any synth you open will make sense.

    Reading the lab

    The lab is a small synth with one oscillator. The buttons at the top choose its waveform, and you can play it from the keyboard on the screen, from your computer keyboard (the row from A to ; plays the white notes) or with Play riff, which loops a two-bar line in A minor at 120 BPM.

    For this page, the screens to watch are the oscilloscope and the spectrum. The oscilloscope shows one cycle of the wave, the shape a speaker cone traces 220 times a second for the A the lab draws. The spectrum next to it shows the same note as a row of bars, one for each harmonic, with low frequencies on the left. When you play, both screens switch to the live sound.

    The big screen at the top is the amp envelope, which the ADSR envelopes lesson covers. Here it's set to a plain shape with full sustain, so the waveform is the only thing changing from step to step. The lab also turns each waveform to a different level so they all sound about equally loud, for a reason explained further down. The Right now panel counts how many harmonics are within 40 dB of the loudest one, measured from a note rendered through the same oscillator you hear.

    The four basic waveforms

    Each shape below has a different set of harmonics, the extra frequencies at whole-number multiples of the note. The fundamental is the note itself and counts as the first harmonic. The harmonics above it give each waveform its sound.

    Sine

    A sine wave is the smoothest shape a wave can have, and it's the only waveform with just one frequency in it. Its spectrum is a single bar, the fundamental, and nothing else. It sounds pure and round, close to a tuning fork or a soft whistle.

    That makes it a plain sound on its own and an ideal one for jobs where you want pitch without any extra tone. Sub bass is the main one, because a sine fills the bottom octave without adding harmonics that clash with the kick and the bass part above it. A kick drum in the style of the Roland TR-808 is close to a sine too, with a small drop in pitch at the start of each hit.

    Triangle

    A triangle wave climbs and falls in straight lines. It has only odd harmonics (the 3rd, 5th, 7th and so on), and they fade fast, because each one's level is 1 over the square of its number. The 3rd harmonic is a ninth of the height of the fundamental, about 19 dB down, and the 5th is a twenty-fifth, 28 dB down. On the lab's spectrum you'll count only a handful of bars.

    It sounds like a sine with a little edge, soft and a touch hollow. Triangles suit gentle leads and flute-like tones, and they make a round bass on full-range speakers. On a phone, whose speaker gives out very little below about 200 Hz, a triangle bass mostly disappears because its harmonics are so quiet. A square or a filtered saw puts far more level into the harmonics a phone can play, so you still hear the bass line.

    Square

    A square wave jumps between two levels and spends exactly half of each cycle at each one. Like the triangle it has only odd harmonics, but these fall away far more slowly, at 1 over their number: the 3rd is a third of the fundamental (9.5 dB down) and the 5th a fifth (14 dB down). So there's plenty of brightness with every second harmonic missing, and you hear that as a hollow, reedy tone. The low register of a clarinet is the usual comparison, since its sound is also strongest in the odd harmonics.

    Squares make good hollow basses and leads. They're also the sound of a lot of video game music: the sound chips in the Nintendo Entertainment System and the original Game Boy each have two pulse channels, and a square is one of the shapes they can play.

    Saw

    A saw wave (short for sawtooth) ramps steadily one way, then drops straight back, like the teeth of a saw. It has every harmonic, odd and even, each at 1 over its number. The 2nd is half the height of the fundamental, 6 dB down; the 3rd is 9.5 dB down and the 10th is 20 dB down. An A at 220 Hz has 100 harmonics up to 22 kHz, and on the lab's spectrum the bars run all the way across.

    That makes the saw the brightest and buzziest of the four, and the best starting point for subtractive synthesis, because a filter can carve almost any tone out of it. Strings, brass, pads and most basses and leads on analogue-style synths begin as saws. Some synths draw it rising and some falling, but on its own you can't hear which, since both have the same harmonics at the same levels.

    Why the shapes sound different

    Every one of these waves can be built by adding sine waves together, one per harmonic. The fundamental sets the pitch, and the harmonics above it at 2, 3, 4 or more times its frequency set the tone. Change which harmonics are there, or how loud each one is, and the shape on the oscilloscope and the sound change at the same moment, because they're the same thing seen two ways. The harmonics lesson builds a saw and a square up one harmonic at a time if you'd like to watch it happen.

    Harmonics of the four basic waveforms, in dB below the fundamental
    WaveformHarmonicsLevel of harmonic n2nd3rd5thSounds
    SineFundamental onlynone above itnonenonenonePure, round
    TriangleOdd only1/n²none−19.1 dB−28.0 dBSoft, a little hollow
    SquareOdd only1/nnone−9.5 dB−14.0 dBHollow, reedy
    SawAll1/n−6.0 dB−9.5 dB−14.0 dBBright, buzzy

    The square and the saw have the same level for each harmonic they share. What separates them is that the square is missing every even one, and that alone takes you from buzzy to hollow.

    Pulse waves and pulse width

    A square is one member of a bigger family. A pulse wave also jumps between two levels, but it doesn't have to spend equal time at each, and the share of each cycle it spends at the top is called its pulse width, or duty cycle. A square is a pulse wave at 50%.

    Narrow the pulse and harmonics drop out in a regular pattern. At 25% every 4th harmonic is missing, at 20% every 5th and at 10% every 10th. The narrower it gets the thinner and more nasal it sounds, until at a few percent it's a reedy buzz. A 75% pulse sounds the same as a 25% one, because it's the same wave turned upside down, which is why the figure stops at 50%.

    The top line is two cycles of a pulse wave added up from 64 harmonics, and the bars below it are the first 24 of them. The sound you hear is built from the same numbers. At 50% it's a square, with every even harmonic missing. At 25% every 4th harmonic drops out, and at 20% every 5th; the narrower the pulse, the thinner it sounds.

    Moving the pulse width slowly with an LFO is called pulse width modulation, or PWM. As the width moves, the missing harmonics move with it, and you hear a shimmer a bit like a chorus effect, which is why PWM turns up on so many analogue string and pad sounds. The Roland Juno-106, for one, has a PWM control on its single oscillator. The pulse channels in the NES sound chip are limited to widths of 12.5%, 25%, 50% and 75%, and switching between them is a big part of the sound of 8-bit game music. The lab above has a Pulse button and a Pulse width knob for hearing the same thing on the riff, and the figure plays it for you as one held note.

    How the waveform changes what the filter does

    The classic synth layout is subtractive: you start with a wave full of harmonics and use a low-pass filter to turn the top of it down. The waveform decides what the filter has to work with. Set the cutoff to 700 Hz on a saw and the first three harmonics of the 220 Hz note come through, while the ones above get quieter the higher they are. The lab counts 59 harmonics within 40 dB of the loudest before the filter and 9 after it, and on the oscilloscope the sharp drop in the wave softens into a slope.

    Put a square through the same filter and it still sounds hollow, because the even harmonics were never there for the filter to keep. Put a sine through it and nothing changes, since its only frequency is below the cutoff and there's nothing above it to turn down. That's why subtractive synths start from saws and squares. If you want the filter to move over the length of each note, the filter envelopes lesson picks up from here.

    Same peak, different loudness

    Give all four waves the same peak level and they still won't sound equally loud, because they spend different amounts of time near that peak. A square sits at full level for its whole cycle. A sine only touches the peak twice per cycle, and saws and triangles spend most of their time well below it.

    Measured as an average (RMS) at the same peak, a square is at 0 dB, a sine at −3.0 dB, and a saw and a triangle both at −4.8 dB. A square is about 5 dB louder than a saw with the same peak, which is plenty to make it win a side-by-side comparison for the wrong reason. This lab balances the levels for you; in your own synth, switching waveform can change the level by several decibels, so turn the louder one down before you decide which you like.

    Which waveform for which sound

    These are starting points. The filter, the envelope and what else is in the track will move you on from them.

    Starting waveforms for common synth sounds
    SoundStart withReason
    Sub bassSinePitch with no harmonics to crowd the kick or the bass part above it
    Bass for small speakersFiltered saw or squareLoud harmonics above the fundamental let the note come through where there's no low end
    Full, bright bassSawEvery harmonic is there for the filter to shape
    Hollow bass or leadSquareOdd harmonics only
    Pads and stringsSaw, often several slightly detunedDetuned copies drift against each other and sound wide and moving
    BrassSawA filter envelope that opens quickly on each note gives the bite
    Flute-like leadTriangle or sineFew harmonics, with a little noise mixed in for breath
    ChiptunePulse at 12.5%, 25% or 50%The widths the NES and Game Boy chips use

    Beyond the basic four

    A noise oscillator makes a random signal with energy spread across every frequency instead of a repeating wave, so it has no pitch. It's used for hi-hats, snares, breath on a flute patch and the whoosh of a riser. The noise colours lesson covers white, pink and brown noise.

    A sub oscillator follows the main oscillator one or two octaves below it, usually with a square or sine. The Juno-106 has a square sub an octave down, mixed in with its own slider.

    Stacking several copies of one waveform and detuning them slightly is called unison. Roland's JP-8000 made a name for its Super Saw, which stacks seven detuned saws, and that sound runs through trance records from the late 1990s on. The unison and detune lesson covers how far to push it.

    A wavetable oscillator stores a set of single-cycle shapes and can sweep between them while a note plays, which is what Serum and Vital are built around. FM works differently: one wave wobbles the pitch of another so fast that new harmonics appear. The Yamaha DX7 is the best-known FM synth. Both get their own lessons, on wavetable synthesis and FM synthesis, and subtractive vs FM vs wavetable puts the three side by side.

    Analogue and digital oscillators

    An analogue oscillator is a circuit, and its pitch drifts a little as it warms up and as the voltage feeding it wobbles. A lot of players like that small movement, and many soft synths have a drift or analogue control that copies it. The Juno-106 used digitally controlled oscillators, called DCOs, which keep the analogue circuit but hold its pitch steady.

    A digital oscillator has its own problem to solve. A perfect saw or square jumps from one level to another in no time at all, which needs harmonics going up forever, and digital audio can't hold anything above half its sample rate. Harmonics that should be higher fold back down as aliasing, which sounds like stray, out-of-tune tones and is most obvious on high notes. Good soft synths use band-limited oscillators that only make harmonics up to that limit. The aliasing and oversampling lesson lets you hear what happens when they don't.

    The other setting worth knowing is phase, the point in its cycle where the wave starts when you press a key. Turn on phase reset (some synths label it Retrig) and every note starts at the same point, so each bass note hits exactly like the last, while a free-running oscillator starts each note wherever the wave happened to be. That sounds looser, and it suits pads.

    How to choose a waveform, step by step

    1. Decide how bright the finished sound should beDark sounds can start from any wave. Bright ones need a saw or a square, because a filter can't add what isn't there.
    2. Open the filter and keep the envelope plainA fast attack, full sustain and the cutoff all the way up let you hear the raw wave.
    3. Play in the range the part will useA triangle that sounds thin in the middle of the keyboard can be just right two octaves lower.
    4. Match the levels as you switchTurn each wave to the same loudness so a square doesn't win for being 5 dB louder.
    5. Bring in the filterIf the sound turns hollow when you wanted it full, swap the square for a saw.
    6. Check it against the trackA saw that sounds huge on its own can bury a vocal, and a triangle that seemed too plain can sit in a busy mix with no EQ at all.

    Common waveform mistakes

    Expecting the filter to brighten a dull wave

    A low-pass filter only takes away. If a sine or triangle sounds too plain, change the waveform, or add saturation, which creates new harmonics from the ones you have.

    Using a saw for the sub

    A saw's harmonics pile up in the low mids right where the kick and the rest of the bass live. Give the lowest octave its own sine, or a heavily filtered triangle, and let a second layer above it carry the harmonics.

    Comparing waves at different levels

    A louder sound usually seems better, and switching from a saw to a square can add 5 dB at the same peak. Match levels before you judge.

    Narrow pulses that vanish in the mix

    A pulse at 5% carries far less energy than a square with the same peak, so it can sound fine solo and disappear once the drums come in. Widen it, or turn it up and check it in context.

    Free-running oscillators on bass

    If some bass notes punch and others feel soft, the oscillator is probably starting at a different point in its cycle each time. Turn on phase reset so every note starts the same way.

    Training your ears to hear waveforms

    The quiz under the lab plays the riff with a hidden waveform and asks whether it's a sine, a triangle, a square or a saw. The filter is open and every round is level matched, so loudness can't give the answer away. Eight rounds take a couple of minutes, and your best score is saved in your browser.

    The two pairs that are hardest to tell apart are sine against triangle and square against saw. With the first, listen for the slight edge the triangle's 3rd harmonic adds. With the second, listen for fullness: the saw has the even harmonics, and once you notice the square's hollowness you'll start hearing it in records. To make it harder, close the filter to 700 Hz in the lab and try the same pairs by hand; the square and saw stay different, while the sine and triangle become almost the same sound.

    Questions people ask

    What's the difference between an oscillator and a waveform?

    The oscillator is the part of the synth that makes the sound, and the waveform is the shape of the wave it makes. Most oscillators can switch between several waveforms, usually with a button or a knob labelled Wave or Shape.

    Which waveform is best for bass?

    A saw if you want a full, bright bass that you can darken with a filter, a square for a hollower one and a sine for sub bass. Plenty of basses are two layers: a sine for the low end and a filtered saw or square above it for the part you hear on small speakers.

    Why does a saw wave sound so bright?

    It has every harmonic, and they fall away slowly. The 10th harmonic is only 20 dB below the fundamental, so on an A at 220 Hz there is still clear energy at 2.2 kHz and well beyond.

    Is a square wave the same as a pulse wave?

    A square is one kind of pulse wave, the one that spends exactly half of each cycle up and half down. Other pulse widths, like 25% or 10%, have different harmonics and sound thinner. A synth's Pulse Width or PW knob moves between them.

    What is a sub oscillator?

    An extra oscillator that follows the main one an octave or two lower, usually with a square or sine wave. It adds weight under a bass or lead without you having to program a second layer.

    Do analogue oscillators sound better than digital ones?

    A good digital oscillator makes the same shapes cleanly, so the choice of waveform and filter settings changes a sound far more than whether the oscillator is a circuit or code. Analogue oscillators drift slightly in pitch and that movement is part of what people like about them; many soft synths add a drift control to copy it.

    Keep going

    Zac Dobos

    Zac runs Sounds Like You, which makes sample packs, preset packs and the Murmur granular synth plug-in. The lessons in Learn are free, and every one has a working version of the effect in it.