k y m a • t w e a k y — the kyma collective || view the current website || February 2015 Archive

/ WebHome / Sounds / Share.SlidingFilterDiscussion


Share Section



All Sections


Login / Register 
Change password
Forgot password?

Symbolic Sound

Kyma Forum
Eighth Nerve

TWiki Links

The attached sound contains both mono and stereo implementations. Both feature a white noise input block for the sake of demoing. You should remove this noise source for normal use.

I have been wanting to play with this idea for some time, and now I finally did. The idea is to feed the sound to both a lowpass filter and a highpass filter. The output comes directly from the lowpass filter. The highpass filter is used to monitor the sound levels and control the filter cutoff frequencies.

For any specified Threshold in dB, the highpass filter attempts to open up or close down far enough to make the average sound level coming through the highpass filter equal to that Threshold. For pure noise input, as long as your threshold is above the actual noise level, the highpass filter will open fully, setting the cutoff frequency to very low values, and pinching off the output sound. The highpass opens up (lower cutoff frequencies) in an attempt to riase its average output level toward the suggested threshold level.

When the music starts, there will be much more average amplitude coming through the highpass filter, and so it will slide its cutoff (and that of the lowpass filter with it) toward higher frequencies so that the amount of sound coming through the highpass filter will lessen and again be near that threshold setting.

In order to accomplish this, the average sound level coming through the highpass filter is compared to the threshold you set on the VCF. The difference in dB is integrated, and the output of that integrator is fed to a control block that establishes the cutoff frequency.

If everything is properly balanced in the control loop, then the integrator will stabilize at some level. Since it is a bipolar output ranging from -1 to +1, we use the expression ((Integrator + 1) * 67.5) to allow the cutoff frequencies to range from 0 nn to 135 nn (= 20 kHz).

There is some amount of startup delay in this integrator, and so we insert a lookahead delay block in the Lowpass filter sections so that the filter will have opened up by the time the sound makes its way to the output via the lowpass filters.

The integrator has a scale factor KI that acts like a spring loading on a trapdoor. Low values of KI make the spring rather loose, and high values make it very snappy. This "spring" is fighting against the integrator output driving the highpass filter toward higher cutoff frequencies. If your Threshold value is too much higher than what noise level actually exists, then you will hear considerable "noise modulation" on the output signal when music plays. There will be a chattering sound. This happens because the highpass filter has to eat into the high-end of your music to gain the requested threshold sound levels, and as that high portion of the spectrum varies, so too will the cutoff frequency in the sliding filters.

If you set the Threshold too low, then no matter how high the filter cutoff goes, the highpass filter will never be able to reduce its input to that low level, and so the filter hangs at the highest cutoff frequencies (lowpass is wide open, and highpass is pinched to nothing).

The trick to proper setup is to make the Threshold very near and slightly higher than the actual noise level in the signal. For example, if the noise level is actually -50 dB, then a good setting for threshold is -49 to -50 dB. Going lower makes the filters inoperable (wide open all the time). Going too much higher makes the sound very choppy (noise modulation).

A reasonable KI gain for the integrator "spring" is somewhere beteen 0.5 an 20. KI will interact with the time constant used for amplitude level sensing. The two of them determine the rate of the noise modulation chopping.

Very noisy input levels, e.g., noise at -30 dB or higher, will certainly degrade the quality of the output, but this sliding filter actually can improve the recording even then. Most of the time, my noise level in the studio here is around -50 dB and lower. And it is actually a combination of 1/F noise, 60 Hz bleed through, and some amount of white noise at the higher frequencies. This sliding filter noise gate works mainly on that high frequency white noise "hiss".

Interestingly, while experimenting with this sound, I tried varying the Threshold level by lowering it as the cutoff frequency moved higher. White noise levels coming through the highpass filter ought to drop off at about -6 dB/octave as the cutoff frequency is raised. But this does not happen with the output of the Amplitude Followers. This block provides an average of the absolute values of their input and this is not the same as a power measurement. So I ended up backing off on the frequency varying threshold for the time being. The system seems to work well just using the measured broadband noise amplitude for the threshold setting.

-- DavidMcClain - 26 Dec 2005

© 2003-2014 by the contributing authors. / You are TWikiGuest