A filter delays what passes through it. Move the cutoff fast and that delay changes while the note is sounding, which is a pitch shift, not a tuning problem.
You write a bass line. One note, a short filter envelope, zero attack, a quick decay.
It sounds great, and it is flat. Not wobbly, not detuned in the way a drifting oscillator is detuned. Flat for a moment, at the start, and then fine.
Somebody asked this on a forum in exactly the right words: "Why do my synth go a few cents out of tune, when using a really short LPF filterenvelope?" They went and measured it: a C2 saw, root at about 65 Hz, shifted down to about 63 Hz with a short envelope, around 50 cents lower than the same saw unfiltered. And they noticed it only happened on low notes.
They were not imagining it, their synth is not broken, and the fix is not to retune the oscillator.
The one sentence version
A filter does not only change how loud each frequency is. It also delays each frequency, by a different amount.
For a lowpass, the delay at the note's frequency is small when the cutoff is far above the note, and it grows as the cutoff comes down towards the note.
Now move the cutoff while the note is playing. The delay is changing while the sound is passing through. A signal whose delay is increasing arrives slower than it left, so you hear it lower. A signal whose delay is decreasing arrives faster than it left, so you hear it higher.
That is the whole thing, and it is the same arithmetic as the Doppler effect. The siren does not change pitch, the distance does.
The forum thread got there on its own. One reply put it well: "Phase shift it self is not much of a problem, what is perceivable is change in phase shift, which is equivalent to so called group delay". The same reply added that the pull grows with the speed of the change, which is why fast envelopes show it, and another compared it to Doppler.
A precision for the engineers: what moves the pitch of a single frequency is the change in its phase delay. Group delay, the word you will meet on forums, is a close cousin, and around the cutoff the two give nearly the same answer. I will say "delay" from here on.
What the thread does not give is the numbers: how far it goes, why only low notes, what the slope does, and which fix does not just move the problem somewhere else. That part is worth measuring, because it tells you which knob to move.
How much, measured
The relationship is simple enough to state: the pitch ratio you hear is one minus the rate of change of the delay at the note's frequency. If that delay grows by 10 ms over one second, you are flat by about 17 cents for that second.
Reference case: a note at C2, 65.4 Hz, a 24 dB per octave lowpass with no resonant peak, the cutoff falling from 2 kHz to 20 Hz in one second at a steady rate in octaves.
- The arithmetic above predicts 55.7 cents flat at the worst moment, which is the moment the cutoff passes the note.
- A time domain simulation of the same filter, measuring the pitch of the output directly, gives 58.3 cents.
Under three cents apart, and the same order as the 50 cents in the forum thread, which is a good sign that the mechanism is the whole explanation and not a part of it. Both numbers come from my own test filter at 96 kHz, not from a plugin, and the cents below are not a specification of anything you can buy.
Three things decide the size of it, and each one is close to a clean factor of two.
Register: one octave down doubles the pull
| Note | Worst deviation, 1 s sweep |
|---|---|
| C1, 32.7 Hz | 125.8 cents flat |
| C2, 65.4 Hz | 58.3 cents flat |
| C3, 130.8 Hz | 28.2 cents flat |
| C4, 261.6 Hz | 13.9 cents flat |
| C5, 523.3 Hz | 6.9 cents flat |
| C6, 1046.5 Hz | 3.4 cents flat |
Here is why. As the cutoff passes the note, the filter turns the note's phase by the same amount, at the same speed, whatever the note. That makes the shift roughly fixed in hertz, about 2 Hz in this example, the same two hertz as the forum's 65 to 63. Two hertz is 58 cents of a 65 Hz note and 7 cents of a 523 Hz note. This is why the complaint is always about a bass and almost never about a lead. (Past about a semitone the real filter pulls a little more than the simple rule says, which is why C1 is slightly more than double C2.)
Slope: twice the poles, twice the pull
Two identical sections in series apply their delay twice, so a 24 dB per octave lowpass built that way pulls twice as far as a single 12 dB per octave section: 58.3 cents against 28.4 in the reference case. A 6 dB per octave filter barely does it at all.
Sweep time: half the time, twice the pull
| Sweep, 2 kHz to 20 Hz | Worst deviation at C2 |
|---|---|
| 4 s | 13.9 cents |
| 2 s | 28.3 cents |
| 1 s | 58.3 cents |
| 0.5 s | 124.2 cents |
| 0.25 s | 292.3 cents |
It is the rate of change that bends the pitch, not the distance travelled. The same sweep, taken twice as fast, bends about twice as hard, and a little more once you pass a semitone. At a quarter of a second you are close to three semitones, which is no longer a detuned note but a swoop. This is exactly why the question is always phrased with the words "really short".
And resonance multiplies all of it, because resonance makes the delay around the cutoff taller. At C2 with the same one second sweep, no resonant peak gives 58 cents, a Q of 1 gives 84 and a Q of 1.5 about 130. Push the resonance further and there is no longer a single pitch to measure: the delay changes so fast that you do not hear a note that is flat, you hear a note that is smeared. At that point the effect has stopped being a tuning problem and become a sound, which is a reasonable thing to want.
This is also why a filter bloop sounds like a pluck
Look at the numbers again and notice that they describe something musicians have been using on purpose for decades.
A fast envelope on a resonant lowpass, low on the keyboard, bends the pitch down and back during the first fraction of a second. That is a plucked attack. The reason acid basses and classic filter bloops feel like a physical gesture is partly this: the note really does move, and your ear reads a pitch that falls and settles as something being struck and released.
So the question is not how to eliminate it. It is whether you asked for it.
How to fix it without retuning anything
The instinct is to tune the oscillator up a little. Resist it. The pull only exists while the cutoff is moving, so a static retune makes the attack correct and the sustained part of the note wrong. You have moved the error, not removed it.
Compensation can work if it moves with the cutoff: if your synth lets you send the filter envelope to the oscillator pitch as well, a small upward amount cancels the pull while it happens. It is a real fix, just a fiddly one to set by ear, and it has to be redone whenever you change the envelope or play in another register.
Five things that work on the cause:
- Give the envelope a few milliseconds of attack, or lengthen the decay slightly. You are reducing the rate of change, which is the only quantity that matters. Going from a half second sweep to a one second sweep takes 124 cents down to 58.
- Do not sweep as far down. The pull peaks when the cutoff passes the note. Stopping the cutoff an octave above the fundamental keeps the note out of that moment.
- Use a gentler slope for the fast part of the move. Half the poles, half the pull, and on an attack transient you often cannot hear the difference in the filtering itself.
- Move the fast movement up in register. The same envelope on a part an octave higher costs half as much.
- Separate the gesture from the tone. If you want a very fast filter attack and a stable pitch, do the fast part gently and the deep part slowly, with two shapes, instead of asking one envelope to do both.
And if you are tracking a part that has to sit tight with a tuned bass, bounce it and look at the first 200 ms. Ten cents you cannot hear on its own becomes audible against a sustained note that is correct.
What this means in Filter Blender
Two things, and they are not marketing.
The first is that slope is not a knob in Filter Blender. Each of the twelve models has its own slope, 12, 18 or 24 dB per octave, and you change how steep the filter is by blending between models rather than by setting a number. The Init preset has a 4-pole ladder, a 2-pole state variable and a diode ladder at about 18 dB per octave, one on each corner. The twelve models and their characters are in the launch article and the manual.
I measured what that does to this article's problem, on the Init preset itself, with resonance and drive at zero and the same one second sweep on a C2. The 4-pole ladder corner pulls the note about 40 cents flat, the diode ladder corner about 30, the 2-pole state variable corner about 20, and the dot in the centre about 24. Same note, same envelope: moving the dot from the 4-pole corner to the 2-pole corner halves the pull. If you have an envelope doing something fast and low and it feels unstable, try the same move closer to the gentler corner before you touch the envelope.
The second is a separate phenomenon that gets confused with this one. At medium resonance, the resonant peak of a lowpass sits below the cutoff frequency, and the dot on the curve marks cutoff, not the peak. That is a question in our FAQ, and it has nothing to do with pitch pull: one is about where the emphasis is in the spectrum, the other is about the note moving in time. If the sound seems to be in the wrong place and nothing is moving, it is the first one. If it only happens while the cutoff travels, it is this article.
Frequently asked questions
Can a filter change the pitch of a sound?
A filter at a fixed setting cannot. A filter whose cutoff is moving can, because the delay it applies to the sound is changing while the sound passes through it, and a changing delay is a frequency shift. The effect lasts only as long as the movement.
Why does my synth go out of tune when I use a filter envelope?
Because the envelope moves the cutoff fast enough for the delay the filter applies to the note to change quickly. The faster the envelope and the lower the note, the flatter it goes during the movement, and the worst moment is when the cutoff passes the note. It is not oscillator drift and it does not need retuning.
What is group delay in a filter?
The time a filter holds back the energy around a given frequency. Its cousin, phase delay, is how far it holds back a single frequency, and that is the one that sets the pitch of a note. Near the cutoff the two are close. Both grow as the cutoff approaches the frequency, and with the filter's slope and resonance. A constant delay is inaudible on its own. A changing one is a pitch shift.
How many cents can this be?
With a 24 dB per octave lowpass and no resonant peak, a cutoff falling from 2 kHz to 20 Hz in one second pulled a 65 Hz note about 58 cents flat as it passed, and about 7 cents at 523 Hz. Twice as fast, the low note went past a semitone. Resonance multiplies it further.
Does it happen on highpass and bandpass filters too?
Yes. Any filter with a steep transition delays the frequencies near its corner, whatever its shape. The effect is largest when the moving corner passes close to the note.
Should I get rid of it?
Only if you did not ask for it. The same mechanism is a large part of why a fast, resonant filter envelope on a low note feels like a plucked string. Knowing which knob causes it means you can keep it where it flatters the part and remove it where it fights a tuned bass.
Sources
- Gearspace forum, "Why does the sound go out of tune, when using filterenvelope?", August and September 2013, for the question, the 50 cents measurement and the phase shift explanation.
- The cents figures in the first part come from an analytic calculation of the filter's phase response and from a time domain simulation of the same filter at 96 kHz, both run while writing this article. They describe my own test filter, a textbook state-variable lowpass, not any particular plugin.
- The Filter Blender figures come from its own filter engine, version 1.0.2, Init preset, measured on a sine.
Joy to use, joy to hear.
Ben, UB DSP