Articles/Part 1 of 2 →
EN/TW

Sub Sound! Turning Pitch into an Octave: The Theory

Cover

How Does the Brain Hear Pitch?

Play the 12th fret on the third string of a bass and we call the pitch A2 (110Hz). But the string isn't only vibrating at 110Hz — it's also vibrating at 220, 330, 440Hz and so on. These integer multiples are called harmonics. The lowest one, 110Hz, is usually called the fundamental, and the whole row of frequencies is the harmonic series.

Real instruments aren't perfect, though. Material, gauge and tension all push the harmonics slightly away from exact integer multiples; this deviation is called inharmonicity. Add the pluck itself, the string hitting the frets, body resonance, even hum picked up by the pickups, and plenty of frequencies that don't belong to the note get mixed in. So an A2 is really a whole cluster of frequencies stacked together — it's just that most of the energy sits on the harmonic series.

So how does the brain read all of this? Let's do a thought experiment. Imagine a perfect frequency controller:

  • Experiment one: play A2 but remove the 110Hz fundamental completely. What's left is 220, 330, 440Hz… and the spacing is still 110, so the brain fills the missing fundamental back in by itself. You still hear A2, just with a thinner tone. This is called the missing fundamental.

  • Experiment two: play A2 again, but this time remove the odd harmonics — 110, 330, 550Hz and so on. What's left is 220, 440, 660Hz… the spacing becomes 220, so it sounds like A3: the pitch jumps up an octave. Flip it around: if you add a layer of 55, 165, 275Hz underneath A2, the spacing becomes 55, and it sounds like A1.

So judging pitch isn't just about "the lowest frequency" — it's also about the spacing between harmonics. Going up an octave means removing a layer of harmonics so the spacing gets wider; going down an octave means adding a layer underneath so the spacing gets narrower.

Spectra of the A2 harmonic series and three variations
(Placeholder) Harmonic spacing determines pitch

When Pitch Becomes Material

The standard reference pitch we use today, A4 = 440Hz, only gradually became an international consensus during the 20th century, and was made a formal standard, ISO 16, in 1975. Depending on performance practice, though, the tuning reference may sit somewhere other than 440Hz — 432, 442 or 443Hz, for example. Some people describe 443Hz as sounding "brighter" than 432Hz.

Once there's a reference pitch, how are the other pitches defined? Today the most common convention is to divide the octave into 12 equal parts: twelve-tone equal temperament (12-TET). Its strength is convenience; its weakness is that most intervals are slightly off from their most consonant ratios. The purest fifth, for example, is 3:2, and the 12-TET fifth is only about 2 cents off — but the major third is about 14 cents sharp.

Of course, this is all theory. In practice, it's hard for an instrument to produce a specific frequency precisely and consistently, whether in how it's built or how it's played. Wood changes its resonance and intonation with the weather; a player's fingering and touch also nudge the pitch slightly. And thoughtful artists use both the "perfect" and the "imperfect" sides of modern theory as part of their musical identity.

A period-instrument ensemble playing Baroque music
Figure 1: Following the pitch conventions of the era, period ensembles playing Baroque music often tune A to around 415Hz
Henrik Linder with True Temperament curved frets
Figure 2: Henrik Linder uses curved frets to make every note more in tune
A quarter-tone scale
Figure 3: Cutting more notes into the octave

Capturing Pitch

Pitch isn't something that exists in a single instant — it's the "result" of a stretch of time. As mentioned earlier, the brain judges pitch by the spacing between harmonics. On the time axis, that's how often the waveform repeats: its period. To know the period, you have to wait at least one full cycle; to be sure it's actually repeating, you usually have to wait two or more.

Take a common sample rate of 48kHz: 48,000 points recorded per second, each one just an amplitude value at that instant, with no pitch information in it. A2 (110Hz) repeats every 9.1ms, so it takes about 436 samples to complete one cycle; observing two cycles takes nearly 900 samples. Converted to time, roughly:

  • A4 (440Hz): about 4.5ms (218 samples)
  • A3 (220Hz): about 9.1ms (436 samples)
  • A2 (110Hz): about 18.2ms (873 samples)
  • E1 (41.2Hz): about 48.5ms (2,330 samples)

The lower the frequency, the longer it takes — and two cycles is the ideal case. In reality, pluck noise and shifted harmonics mean a tool needs even more time before it can make a call. Within this physical limit, many different tracking methods have been developed.

Comparing the duration of two cycles of A4 and E1
(Placeholder) The lower the note, the longer the wait

Moving Pitch

Common effects like the octaver, pitch shifter and harmonizer all take a signal x, turn it into a target signal y, and mix the two. Note that what's captured isn't just the fundamental, but the whole harmonic series. Multiply A2's 110, 220, 330Hz… by ½ and you get 55, 110, 165Hz… — the ratios between them stay the same, just an octave lower. The main difference between the three tools is how this algorithm decides:

  • Octaver: the ratio is fixed at ½ (or ¼), then mixed with the dry signal.
  • Pitch Shifter: you set a fixed ratio yourself, e.g. every note down 5 semitones.
  • Harmonizer: the ratio changes with the note you play.

If you've played a harmony pedal like the Meris Hedra, you'll have noticed it has Key and Scale knobs. That's because the same note plays a different role in different keys. In C major, C is the tonic and gets a major third, E (a major third is about ×1.26); in B♭ major it becomes the second degree and gets a minor third, E♭ (a minor third is about ×1.19). Only by setting this in advance can the effect instantly decide which interval ratio to apply to each note.

So the differences between effects of the same kind can be broken down further:

  1. How the current note is identified (Tracking): some aim to follow every note instantly, others spend a little more time confirming before they output. With fast phrases or chords, these design differences also affect how it feels to play.
  2. How it's turned into the target pitch (Pitch Shifting): beyond the pitch itself, different algorithms decide how to handle transients, phase and the spectral envelope — and that's where different brands build their own character.

Tracking

Analog circuits:

  • Comparator + Frequency Division: detection and generation happen together, but only integer-ratio intervals are possible. The circuit doesn't judge pitch at all; it only checks whether the voltage crosses a reference line and shapes the result into a square wave. A flip-flop then divides the frequency by an integer: outputting once every two switches gives ÷2, an octave down; ÷4 gives two octaves down. Every instant is handled by the same rule, so there's almost no pitch-detection latency.

  • Adaptive Peak Detection: measures the interval between two peaks and derives the frequency from it. The problem is that harmonics and noise create several small peaks within one cycle, so the circuit uses a capacitor to remember the last peak as a threshold; only peaks high enough count as a new cycle, which avoids those small bumps. The cost is that as a note decays, its peaks keep getting lower, so the tail is easily missed and tracking becomes choppy.

  • Phase-Locked Loop: an internal oscillator keeps adjusting its own frequency to "lock" onto the input. Once locked it's very stable, but locking takes time, and whenever the signal changes it has to chase it again.

Original waveform, square wave, divide-by-two and divide-by-four waveforms
(Placeholder) The comparator shapes the waveform into a square wave, then a flip-flop divides it

Digital circuits:

  • Zero-Crossing: computationally cheap, but easily thrown off by extra crossings created by high harmonics and noise.

  • Autocorrelation: highly accurate, and the common approach in today's tuners and pitch correction. It compares the waveform with a "delayed copy of itself"; the delay where they match best is the period. But it's prone to octave errors.

  • Frequency Domain (FFT, HPS, Cepstrum): the most complete information. It breaks the sound into a spectrum and infers the fundamental from how the harmonics are arranged. But frequency resolution depends on the length of the analysis window; lower notes need longer windows, and latency grows with them.

All of these methods are fundamentally balancing time, stability and accuracy. A good algorithm can improve the result, but it can't fully remove the physical fact that low-frequency signals are slow.

Pitch Shifting

Once the period is known (or, for some methods, without needing to know it at all), the next step is producing a signal at the target pitch.

Analog approaches:

  • Frequency Division: this is the second half of the comparator above. The output is a brand-new square wave, not a scaled version of the original, so the original harmonic structure isn't preserved — which is where the thick, slightly synth-like sound of analog octavers comes from.

  • Full-Wave Rectification: the classic octave-up method, with no pitch estimation needed. It flips the negative half of the waveform to the positive side; for a roughly symmetrical periodic waveform this strongly produces a component at twice the frequency, so it sounds an octave up. Real instrument waveforms aren't perfectly symmetrical, so other harmonics usually remain, giving the obvious distorted tone of octave fuzz.

Original waveform and the waveform after full-wave rectification
(Placeholder) Full-wave rectification doubles the frequency

Digital approaches:

  • Delay-Line / Granular: shifts by any ratio, with no tracking needed. The sound is stored in a buffer and read back at a different speed: read faster and the pitch goes up, read slower and it goes down. But sooner or later the read position catches up with or runs out of the buffer, so read positions have to be constantly rearranged or overlapped. The seams tend to warble or glitch — the source of that "wobbly" sound of early pitch shifters.

  • Pitch-Synchronous Overlap-Add: the tone closest to the original. Using the tracked period positions, it cuts the waveform into pieces and overlaps them back together at new spacing, preserving the original formants. But it depends heavily on accurate period positions, and only handles monophonic signals.

  • Phase Vocoder: can shift chords too. It uses the FFT to split the sound into a series of short-time spectra, adjusts frequency positions and phase evolution, then rebuilds the signal. But it needs to accumulate a stretch of audio before it can analyze, so attacks tend to get smeared; and the whole harmonic series moves along with the formants, so the tone changes too.

  • Synthesis: uses the tracked period timing to directly drive a new waveform (square, sine, triangle…). The tone is entirely up to you and has nothing to do with the original harmonic series.

Detection decides "how fast and how accurate"; conversion decides "what it sounds like." Each side has its trade-offs, and together they form the personality of each effect. So when designing this kind of effect, the most important thing is to think through the use case first.