|
I just cut+pasted from my source code. What the allpass is doing is (in 'C') is:
float diff1[48];
float input;
float output;
float k=0.725;
diff1[0] = input + k * diff1[47];
output = -k * diff1[0] + diff1[47];
Where diff1 is a simple delay line. Somewhere else is located essentially this:
for(c=47;c!=0;c--)
diff1[c]=diff1[c-1];
This would be inefficient. You just don't do a delay line by copying all of the data one spot over in memory. That is about as (in)efficient as convolution. It just demonstrates how it works.
If 'k' is set to zero, you get a simple delay line. If it's set at 1 or higher, you get an oscillator. Practically, values between 0.25 and 0.75 or maybe 0.85 are useful.
In practice you would do the delay by decrementing an address (in 'C' they call it a pointer, in a real language it's an address) every sample, if you're doing a sample-at-a-time algorithm. Some reverbs (the TC M5000, the K-T DN780, the Alesis units, and probably a lot more) do the sample shifting in hardware by messing with the address sent to memory.
For hardware archeologists, the K-T DN780 is actually a pretty good 'by the book' example of an older reverb-specific processor using no custom IC's (except for a couple of bipolar PROM's), and the service manual is available for examination of the DSP hardware. If you're looking, IC29-34, IC36, and IC38 on the DSP board form the address 'mangler'. IC36 and IC38 make up a 16-bit counter, the remainder of those chips are a 16-bit adder. If you're not a hardware geek, then don't worry about this. If you are a hardware geek either you already knew how it was done, or you do now.
-Dale
|