View Single Post
Old 5th May 2009   #82
seancostello
ValhallaDSP
 
seancostello's Avatar
 
Join Date: Feb 2009
Location: Pacific NW
Posts: 1,536

Quote:
Originally Posted by Warp69 View Post
Would you consider a 32 steps interpolation good enough for high-end reverbs?

I currently use 256 steps - the high quality interpolators in Eventides uses 128 steps.
I just posted about Lexicon interpolation in the Lexicon Bestiary thread, and this prompted me to look at some old Blackfin code of mine from July 2006. I figured this thread would be the better place for the DSP geek stuff.

The code implemented cubic interpolation, for control rate modulation of delay lines, in a VisualAudio feature that was never implemented. I used a 32-bit signal for the modulation, and had the modulation width as an argument to my function. From the maximum modulation width, I calculated the shift and scale amount for the cubic interpolation. What is weird is that the amount of bits in the fractional signal would vary depending on what I set the modulation width at. I am kind of impressed with myself for figuring that out (I haven't touched fixed point DSP in years, and was looking at the code thinking, "I wrote THAT?"), but in retrospect, it would have made more sense to assign a fixed number of bits to the fractional part of the interpolation, and work from there.

Having the modulation width as an argument may have also been a way of dealing with memory access issues on some of the ADI parts. I had an idea back then about using a precalculated modulation width to tell the DSP how much memory should be brought into cache, or how large of a DMA should be started, such that the interpolation could be performed on the memory on the chip (cache for the Blackfin, internal memory for the SHARC). I don't think that this ever got implemented, but it would certainly make sense for small amounts of modulation, where you are not randomly jumping around large distances on a sample-by-sample basis.

IIRC, Dattorro mentioned the idea of using 256 steps for his allpass interpolation, as this helped avoid issues when the allpass coefficient got too close to +-1.0. It is interesting to consider how many steps are considered good enough. If your numeric system is based around 16 bit fixed point, it seems like the number of steps in your interpolation will be determined by what your modulation width needs are. For microtonal modulation such as in reverbs and choruses, you will probably want to have 6 to 8 bits of precision for the integer part of your delay modulation, with the rest assigned to the fractional part. For pitch shifting...wow, I don't know. Double precision, maybe?

My instinct is that, if it is good enough for Eventide, then go for it. I think that most of the Eventide boxes nowadays are based around Freescale 56K processors, so the modulation signal would have 24 bits in single precision. 128 steps for interpolation yields 128K of addressable integer delay locations, which sounds like a lot, but is probably necessary for some of the pitch shifting operations with large windows. The interpolation coefficients are probably updated at the control rate, since it is a control rate operation. I don't know what the Eventide control rate is.

Most of my recent code has been floating point, and I haven't used fixed point for the interpolation, but I may try this out again. I would need to write fixed point modulators, otherwise there would still be a float to int cast, which is probably where most of the cost of my interpolation lies.

Sean
seancostello is offline   Reply With Quote