Applying Filters
IIR filters
In Waveform mode, you can apply LPF (low pass filter) and HPF (high pass filter) to the waveform.
These filters are bi-quadratic filters and use the filter coefficients published
at https://webaudio.github.io/Audio-EQ-Cookbook. The filter coefficients are adjusted to maintain a maximum
gain of 0 dB in the passband and -3 dB at the cutoff frequency. The order is defined as 2nd order when
one bi-quadratic filter is used, and n times 2 when n filters are used in series.
The higher the order, the greater the filter effect. With a Butterworth filter,
it is usually -12dB per octave in the second order, -24dB in the fourth order....
But in this application filter, the degree of attenuation is less than a multiple of -12dB from
the 4th order onward.
To apply the filter, first tap the FiltOff button on the
right side of the Waveform button.The button display will then change to FiltOn ,
and the HPF and LPF setting sliders will appear at the bottom and the order setting button appears at the
upper right edge of the analysis screen. The green part of the slider indicate the frequency band to pass through and the gray part indicate the frequency band to block.
When both HPF and LPF are set, the passband is the frequency where both slider part are green.
The cursor indicating the current location on the spectrogram also shows only the passband.
During acoustic playback, the sound is played back with the waveform after filter processing. In the FFT screen, the black line indicates before processing
and the red line indicates after processing.
The filter effect is reflected in acoustic playback only in Waveform mode.
The figure shows a recording of a small bird's twitter, with the HPF set to 3 kHz and the LPF set to 8 kHz
so that the twitter sound remains. The order is 6th order. When played back with this condition the ambient
low-frequency noise is reduced and birdsong is heard more clearly. Pressing the Counter button also counts the frequency.
FFT filters
Setting the filter order below 2nd order changes the filter to an FFT filter.
The frequency spectrum is first obtained by FFT, and then the spectra of the bands to be blocked by LPF and HPF
is set to zero, and the entire spectra is inverted Fourier transformed back to a waveform.
The advantage of this method is that there is no phase change like an IIR filter, so there is no distortion of the waveform.
However, it takes more computation time than the IIR filter above. And, an IIR filter would be better suited to
imitate a biological filter (eg. lung sounds). When playing back sound, the filtered waveform is played back as in the case of IIR
filtering. However, the FFT screen does not show the red line indicating the effect of the filter.