[music-dsp] allpass fine tuning of sweeping comb filter (karplus strong etc)

Andreas Sumerauer ansum at online.de
Fri Nov 25 08:30:31 EST 2005


I know of two options that are well proven and computationally affordable:

(1) use a 4 or 6 point lagrange interpolating filter. These don't
produce the strong high frequency attenuation that the linear
interpolator has. Longer FIRs than the suggested length don't make much
sense IMO since (a) You can not use them with very short feed back
delays (the minimum possible delay length is half of the FIR filter
size) and (b) with lower comb filter frequencies you are fine anyway
with a shorter filter because here the side effects of the interpolator
are not so obvious (this is because (a) the LP effect of the
interpolator will be masked by the loop filter that will be there anyway
in most cases and (b) the signal just does not pass so often through the 
interpolator).

(2) You can as well keep using the allpass filter (that is my preferred
method) Now here is the secret: To get rid of the artifacts just don't
touch the PB wheel! (hehe, just kidding)

> ... however, when I sweep the cutoff frequency (recomputing the
> allpass coefficient every sample) I get some nasty stuff being
> injected into the delay line...

The FIR filter solution does not have the artifacts because here You
update all state variables at once when moving to another delay length.
What makes the allpass sound nasty is in fact the recursive part of the
term whose value had been calculated for the old comb filter frequency
but does not fit anymore when switching to a new frequency.

The trick is that You update the internal state variables of the filter
before You switch to a new filter frequency. When this is done You can
(almost) safely apply the pitch bending.

This is put into practise by using a second filter that runs silently in
parallel when a pitch change is due. After it has 'warmed up' and has
reached a stable state You simply switch from the old interpolating
filter to the new one. The time required for this is dependent on the
dacay time of the impulse answer of the interpolator. (that's just a few
samples)

A detailled description of the method with useful tips for the 
implementation can be found here:

http://www.acoustics.hut.fi/~vpv/publications/icassp98-trel.pdf


Finally a short comparison of the IIR vs. FIR approaches:

Drawbacks:
(1) The method introduces an additional delay: True, but that is what
You get with the FIR solution as well.
(2) Computational overhead: True, but (a) that is what You get with the
FIR solution as well and (b) You only need the second filter during 
transition time when a pitch bend is applied.
(3) There are still some artifacts left: true, but I can't hear them :-)

Advantages:
(1) Even with this method You can still achieve comb filter frequencies
of as high as 1.5/samplerate before the filter gets unstable. (No human
can hear this but all the dogs in the neighbourhood will be exited!)
(2) the allpass has unity gain across the entire spectrum.

regards

Andreas




Ross Bencina schrieb:
> Hi Peoples
> 
> I've implemented the first-order allpass tuning method for Karplus 
> Strong described by Jaffe and Smith in their CMJ article (and probably 
> well known in the PM literature I guess). It works as intended, however, 
> when I sweep the cutoff frequency (recomputing the allpass coefficient 
> every sample) I get some nasty stuff being injected into the delay 
> line... I think this is a well known problem with the allpass tuning 
> method.
> 
> My question: what are the common options for implementing an accurately 
> tuned comb filter which can be swept dynamically? Can I reduce the 
> negative effects of the allpass somehow?
> 
> Previously I was using linear interpolation for sub-sample delays but in 
> the resonant comb filter case this causes frequency dependent damping.
> 
> Any and all suggestions gratefully accepted...
> 
> Best wishes
> 
> Ross.
> -- 
> dupswapdrop -- the music-dsp mailing list and website: subscription 
> info, FAQ, source code archive, list archive, book reviews, dsp links 
> http://shoko.calarts.edu/musicdsp 
> http://ceait.calarts.edu/mailman/listinfo/music-dsp
> 




More information about the music-dsp mailing list