Filter Question

 

K.K.Trawinski wrote:

I found this strange thing that seems to go against everything I know about waves. If I take a very low saw osc and filter it with a bandpass filter to try to get out a harmonic then all I get is this clicky thing that clicks at the fundemental frequency. Why is this?.

I've once made a picture of a saw wave using only sines on a computer so I know for sure that the harmonics should be there all the time and not with a pulsating amplitude... That's why I'm lost here. Is it an effect of the filter?. (like phaseshifting).

Ico Doornekamp wrote:

Somebody correct me if I'm wrong, but I'll try to explain what I know of it...

What you are hearing (the clicks) are not the harmonics of the signal, but the transient response of the filter to the steep slope of the saw/square wave, which have a much larger amplitude then the harmonics... The harmonics are there, you are right, but when the fundamentel freqency is that low, the amplitude of the harmonics are really really really small. I'm not enough of a mathematician to know the exact amplitude of the harmonics (though I still have the college books on the shelf, somewhere), but they decrease exponentionally I believe...

If you try the same thing with the first or second harmonic, you can here your theory is right; the harmonics are loud enough to be noticed then.

David Peck wrote:

From the way you describe the effect, it sounds normal to me. What you are hearing is the result of the fact that filters do not have infinitely steep slopes. When you use a 24dB per octave filter, and you tune it to the harmonic you want to isolate (let's say the harmonic is 800 Hz), you will still hear some of the other harmonics, but at decreasing levels the further away they are from the 800 Hz harmonic. Any harmonic at 1600 Hz or 400 Hz (one octave higher and lower) will be 24dB quieter, etc. Note that an 18dB/oct filter or a 12dB/oct filter will pass even more harmonics. You would have to have a theoretically perfect filter with an infinitely steep slope to completely remove all harmonics other than the one at the center tuning.

To better isolate a harmonic using a band pass filter, try cranking up the resonance. That will boost the harmonic at the center tuning relative to the other harmonics. (Or just use an additional hard sync'd sine wave osc tuned to the harmonic frequency, and forget about the filter).

Rob Hordijk wrote:

First an example of a phenomenon that suffers from a similar type of confusing behaviour. Imagine a heavy book that hangs by a thread on the ceiling. There is a similar a thread attached to the undeside of the book. If one slowly starts to pull on the thread under the book while gradually increasing pull, the thread between the ceiling and the book will eventually break. But with a sudden very short and forceful pull its the tread under the book that will break instead. Your question reminds me of the question: why, with a sudden heavy pull, does the thread break under the book instead of in between the book and the ceiling.

The effect you noticed has nothing to do with the sawtooth, instead its the way synthesizer filters interact with a sawtooth waveform. A not uncommon but uncomplete and oversimplified view of a filter is as a sort of frequency dependent mixer, where specific frequencybands are simply attenuated like when mixing sliders are not fully opened. Maybe it has been the graphic equalizer that has made this way of imagining a filter popular.

But a filter is in fact much more complicated. To understand the working of 12 and 24 pole filters one must first realize that the frequencybands are not attenuated, but in fact are shifted in phase/time a little, whereafter the phase shifted frequencybands are combined with the original signal by taking their average value.

If a frequencycomponent, e.g. a sinewave overtone, is shifted only a few degrees, the mean value of the original sine and the slightly shifted sine is almost equal to the original sine, only slightly attenuated and shifted exactly half of the phase shift of the phase shifted original. When drawing this on paper the phase shifted sine is just a bit to the right of the original sine, almost overlapping the original. The average result can now easily be imagined as a sinewave exactly in between these two sines. But if the phase shift is 180 degrees the drawing will show to complementary sinewaves and their average will be a signal with zero amplitude, or in fact they will have cancelled out each other.

A single pole 6dB lowpass filter will shift the input from almost zero degrees for very low frequencies to almost 180 degrees for very high frequencies before taking the average. When plotting the curve of 'phase shift set to frequency' it will not be a straight line, instead it will start almost horizontally at low frequencies, gradually increasing the slope and then decreasing the slope and stop almost horizontally again at very high frequencies. This curve accounts for the 'knee' at the 'cutoff frequency' in the filter curve. The cutoff frequency is not a sharp corner in the curve but the point where attenuation has reached -3 dB. Up to this point the curve has been almost straight but just under unity gain, after the smooth bend at cutoff the curve will an almost straight line decreasing with about 6 dB for each frequency doubling.

Up to now this would suggest that everything is smooth, and when taking the example of the book again would predict the thread to break between the book and the ceiling.

But in synthesizer filters provisions have been made to generate a peak at the cutoff point in a way that the frequency at that point is not decreased by -3 dB but increases by maybe tens of dB's when the peak is very strong. To get this behaviour feedback is used. For this we need a feedback signal that has been shifted by 360 degrees if at the cutoff frequency, to boost the peak and build up a resonance accounting for the increase in signal level at this point. For a simple single pole the frequency at the cutoff point is shifted 90 degrees, so we need either a cascade of two poles and a signal inverter which, for sake of simplicity, can be regarded as a 180 degree phase shifter for every single sinewave component, or we need a four pole cascade.

And now comes the subtle part, when a filter has a feedback path and a reasonable amount of feedback is applied, the filter also behaves like a resonant body or object. When talking about resonant bodies we generally speak in terms of feeding energy into a body and how the energy is stored, transformed and released from the body during the time the resonance takes place. E.g. if a drum is hit a great amount of energy is transferred into the 'resonant body' (in this case simply the drum) in a very short time. The energy will circulate in the 'body' and gradually be released to the surroundings until all initial energy has left the resonant body (and everything is silent again).

Synthesizer filters not only behave like simple 6 dB single poles do, but also as resonant bodies. A sawtooth wave slowly rises (or falls) but then almost infinitely quick falls back. This point, where a sudden, dramatic change is present is generally called a transient (compare it to the short and firm pull on the thread). Ideal transients have the property of posessing almost infinite energy during an almost infinitely short amount of time. Like a real heavy drumhit, so to speak. When a transient of the sawtooth hits the filter the filter will start to 'ring', it can be imagined as the energy of the transient 'wobbling' the output signal when the transient races 'little circles' through the feedbackloop in the filter until getting gradually smeared away. So, what you hear in your case is not only the filtering effect of the filter but the so called 'impulse response' of the filter added on top of the filtering effect. If you want to filter a high harmonic the pure sinewave of that harmonic will be present, but of a relatively very low level compared to the effect of the impulse response. The higher the Q/emphasis/resonance (three common terms for the same thing) of a filter the stronger the filter will react to transients.

Funny consequence is that as filters not only subtract from the input, but through their resonance add to it as well, the name subtractive synthesis is not totally correct. Waveshaping synthesis would maybe be a more correct term, as this in essence means to reshape a waveform into another waveform by either frequency selective attenuation or amplification by means of pure filtering and resonating, or either applying a non-linear transferfunction for the level (AM/RM or distortion) or the phase disposition (PM/FM).

K.K.Trawinski wrote:

Thank you all for your reply!.

I've included a patch with the experiment. It's just a very slow saw osc with 8 24dB/oct bandpass filters in series. Had to boost the signal a lot to hear anything. J

Robs story is exactly the kind of thing I wanted to hear so thanks again. Now I THINK I understand it. Let me try to explain it to you (and of course to me J

Filters do their job by gradualy phaseshifting a part of the spectrum. The further away you are from the startpoint of the shifting the more the frequencies will be cut off. Resonance is a feedback circuit that feeds back a 360 degrees shifted version of the signal back to the inputs.

Then there is the illusive impulse thing. I don't understand yet why it exists. I'm trying very hard to imagine what a phase shifting device would do if a lot of frequencies would be present at the same time at its inputs. The best I can think of is that the trancient would get smeared out over time. But if I understand the 'book-on-a-string' thing correctly then trancients make the filter work differently. What I'm thinking about is where the frequency components in the resulting 'clicks' come from. Is it because of the massive bandwidth (energy) of the trancient is overloading the filters circuits a little and thus resonating it a bit (so does the filter generate tones itself) or is it that the filter reacts wildly to the trancient by changing the amplitude and i'm hearing an AM result . (or is it both? in a way that the ringing adds up to exactly that kind of amplitude boost)

I ask this because i made a recording of the clicks and they looked like little grains ie. there was a nice fade in (shaped like the second half of a cosine) and likewise there was a fadeout. What i expected to see was some sort of logarithmic peak thing or something wilder than those little neat grains of sound.