[music-dsp] allpass fine tuning of sweeping
rbencina at iprimus.com.au
Wed Nov 30 08:00:41 EST 2005
Looks like my formulas were fine but there was a bug somewhere else (as
The only thing I'm left wondering is what a reasonable crossfade time would
be between delay taps? I'm using 200 samples at the moment and I'm getting
ring-modulation type stuff when I slowly ramp the delay time.. I guess
there's no avoiding that.
Thanks to all..
----- Original Message -----
From: "Ross Bencina" <rbencina at iprimus.com.au>
To: "music-dsp" <music-dsp at ceait.calarts.edu>
Sent: Wednesday, November 30, 2005 12:54 AM
Subject: Re: [music-dsp] allpass fine tuning of sweeping
> Thanks to everyone who helped out. I'm currently experimenting with
> crossfaded allpass filters, with a small warm-up period before I begin the
> crossfade, plus initializing the previous sample to a linearly
> interpolated value.
> However I'm still having serious problems with DC garbage (or something)
> getting injected into my delay line while doing heavy delay time
> modulation, even with no input signal. So I'm guessing that I have a bug.
> Can anyone confirm that the following code snippets are correct?
> // first order allpass:
> float result = c_ * input + x0_ - c_ * y0_;
> x0_ = input ;
> y0_ = result;
> // frequency warped computation of allpass coefficient
> // full version (works for high frequencies)
> // (eqn. 16, p486 The Muisc Machine (Jaffe and Smith Extensions of
> Karplus-Strong Algorithm)
> // (p771, JAES 45, 10, 1997 Dattorro Effect design part 2)
> double delaySamplesFloat = delaySeconds * sampleRate;
> double epsilon = 0.4 (?); // avoid instability cause by c_ getting too
> close to 1
> unsigned long delaySamplesInt = delaySamplesFloat - epsilon; // rounds
> towards zero
> double fractionalDelaySamples = delaySamplesFloat - delaySamplesInt;
> double w_2 = 2. * M_PI * ((sampleRate / delaySamplesFloat) / sampleRate) *
> .5; // half normalized radian frequency
> c_ = sin( w_2 * (1. - fractionalDelaySamples) ) / sin( w_2 * (1. +
> fractionalDelaySamples) );
> I had better luck with the approximation:
> c_ = ( 1. - fractionalDelaySamples ) / ( 1. + fractionalDelaySamples );
> So I'm guessing my other formula might have an error in it..
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
More information about the music-dsp