On 23.07.2012, at 10:52, Oli Larkin wrote:

> Can anyone here advise me how I can precisely compensate for pitch dependant 
> detuning when my damping filter is active in a tuned comb filter? I'm trying 
> to implement a damping control that doesn't alter the fundamental frequency 
> of the comb filter. I'm not concerned with modelling the exact behaviour of a 
> string - I just want to have precisely tuned resonances with adjustable 
> damping. So far I have implemented tuning compensation by adding an offset to 
> the comb frequency, however I have just worked out an approximate 
> fudge-factor which is scaled based on the value of the damping control and 
> the fundamental frequency. I have thought about using a linear phase FIR as 
> the damping filter, but I think it would be too CPU heavy and hard to 
> modulate the damping.
> 
> At the moment I use basic linear interpolation for the comb filter with a 1P 
> LPF in the feedback loop.
> 
> Here is the code for the filter:
> 
> lpfOutM1 = lpfOutM1 + clip(lpfcoeff, 0., 1.) * (input - lpfOutM1);
> 
> So my problem is how to mathematically calculate the phase delay of this LPF 
> at the comb filter's fundamental, in order to adjust the delay length 
> accordingly.

hi oli
calculating the phase response of a one-pole filter is fortunately quite easy.
look here e.g.
http://www.dsprelated.com/dspbooks/filters/One_Pole.html

from this you can get the phase delay (should be somewhere on the JOS site, 
too, if you're unsure how to) and tune your comb filter correctly. as the 
one-pole is non-linear, your partials are slightly out of tune - i'm not 
entirely sure, how this will effect the pitch perception though.

hth,
volker.


--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Reply via email to