3
$\begingroup$

I'm writing a software analogue synth. I have been using the Overlap-add method to cheaply implement a low-pass filter using FFT.

My low-pass filter has had a constant impulse response; a constant cutoff frequency. Now I'd like to make it possible to vary the cut-off frequency while a note is playing (this is a common feature of analogue synths).

I believe this is impossible while still using the circular convolution theorem trick (that let's us use FFT to implement FIR-filters).

  • Am I right in thinking so?
  • If so, is there some other trick I can use to efficiently implement a band-pass filter whose cut-off frequency varies ("sweeps")?
$\endgroup$
1
$\begingroup$

The problem here is not the application of the FFT for filtering but the fact that you want to model a linear time-variant system using methods for linear time-invariant (LTI) systems.

If you used the linear convolution instead of the circular convolution + overlap-add you would still face the problem that you have to divide the audio signal into blocks of data during which the impulse response is constant.

One solution is to make the data blocks sufficiently short so that the impulse response can be considered quasi-invariant during one data block. For example, if your audio sample rate is 44.100 Hz and your FFT length is 1024 every impulse response change needs to be approximated by 43 discrete steps per second.

$\endgroup$
  • $\begingroup$ Regarding your first sentence: Good point! If not using FFT, I could just iterate N times per input sample, where N is the length of the (varying) impulse response of the filter? I suppose changing the filter 43 times per seconds will be fast enough to be inaudible, so that is actually an answer to my question. I wonder if this is how coommercial synth packages do it? $\endgroup$ – avl_sweden Jun 5 '17 at 13:33
  • $\begingroup$ It's the most obvious way, I guess but I don't know how it sounds. I bet there are other ways to do it, but maybe just for some classes of filters. I suggest you look for "implementation of discrete linear time-invariant systems". $\endgroup$ – Deve Jun 5 '17 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.