![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: Multirate Filtering | |
David McClain Member |
![]() ![]() ![]()
Attached is a zip containing a single sound and a very useful document, courtesy of Robert Bristow-Johnson, in whose honor one of our Kyma windows is named. I originally invented this sound for the special purpose of filtering the FFT real and imaginary components as they go flying by inside an FFT process. But I give it to you in raw tweakable form because it can produce some fun sounds on its own too... This is essentially a polyphase version of a 2-pole 2-zero IIR filter. You can adjust the downsampling ratio with the ?NFFT parameter in the lead script. The filter coefficients A1,A2,B0,B1,B2 are brought out to the VCS for you to play with. Be careful though, some combinations of values cause runaway oscillations... This filter plays the transfer function: H(z') = (B0+B1/z'+B2/z'^2)/(1+A1/z'+A2/z'^2) where z' = z^NFFT. In other words, it is an IIR filter on every NFFT'th sample, and every sample at the SignalProcessor sample rate undergoes the same filtering. But because we are downsampling, we effectively compute NFFT of these filters in parallel, each one offset in time by 1 sample period. Hence, the name PolyPhase IIR. {Actually, for my needs I use NFFT/2 everywhere I state NFFT in the above description, and that's what I actually provided to you here... So to get NFFT downsampling, you have to state 2*NFFT in the lead script...} In conjunction with the Bristow-Johnson Cookbook you can design nearly any kind of filter with these 5 coefficients. So once again, Kyma shows its prowess in being able to conquer nearly any signal processing or effects processing task. Kudos to SSI! - DM [I should point out that the delay lines are the Kyma equivalent of Fortran arrays. When you need to apply an operation to every element of a fixed length set of numbers, do it on every output from a delay line and send the results back... The number of samples in the delay line determines the number of elements in the equivalent array. This is strikingly reminiscent of the computers from the 1950's that used Mercury delay-line tanks as their only memory. All operations were done on circulating delay lines of bits...] [ I have just found that the 56309's tend to overflow on strong signals. You should probably cut all the gain blocks A0-B2 by 2, set the mixer gain at 0.2, and then use a post gain of 10 to recover the original amplitudes. ] [This message has been edited by David McClain (edited 11 July 2001).] IP: Logged | |
David McClain Member |
![]() ![]() ![]()
As supplied it has a script on the front that computes the coefficients for a band-reject filter that operates around 2 KHz. The difference between this filter and the polyphase decimated filter is in the length of the delay lines (1 sample here, NFFT/2 samples in the polyphase filter). Also, since the feedback Sounds require at least 12 samples, you can't use them in a normal IIR filter. Instead, you have to use a MemoryWriter Sound and a FunctionGenerator in order to get a 1-sample feedback delay. But otherwise, all the coefficients behave the same way, and you compute them similarly. The only difference in the equations is the effective sample rate, as commented and supplied in the leading script. - DM IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.