Thread Closed  Topic Closed
  Kyma Forum
  Kyma Support
  7-Band EQ

Post New Topic  
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   7-Band EQ
David McClain
Member
posted 04 February 2001 18:44         Edit/Delete Message   Reply w/Quote
Hi,

I have been playing around with the 7-band EQ Sound in your library. From some simple experiments with my spectrum analyser and your comments in the documentation, it appears that this is actually a 99-tap FIR filter. This begs the question...

I have found in my own work that a FIR filter becomes effective for frequencies where the filter length is 3 or more wavelengths long. This implies that your EQ would be effective for frequencies of 1.5 KHz or higher, with a sample rate of 48 KHz.

I see that it is quite ineffective for frequencies at 500 Hz and below, but the signal paths do indeed sum to the original when all gain settings are equal. It isn't too bad at 1 KHz and above.

This seems a bit short for an audio FIR filter. Do you have plans to introduce a longer one, say maybe 256 taps, or 512 taps? Or better yet, allow us to design our own FIR filters?

Thanks,

- DM


IP: Logged

SSC
Administrator
posted 05 February 2001 08:44         Edit/Delete Message   Reply w/Quote
David,
One thing you could play around with is the example called 10 taps (also 30 taps and 40 taps) in Kyma Sound Library/Effects/Delays. It's a single delay template with a Script for making multiple taps.

IP: Logged

gelauffc
Member
posted 06 February 2001 04:48         Edit/Delete Message   Reply w/Quote
I did try the EQ once, but I never think this would be a FIR type of filter. David from your background you have a better knowledge of FIR filters, but I think an EQ can have 2 purposes:
1) correct freq. transfer (in a scientific way, ex. hearing loss) Use a FIR filter as big as needed for you needed freq. demand.
2) adjust freq. color(typically done on mixing desk in our creative process when creating a mix or music). Thinking of sound coloring and efficiency I would prefer an IIR approach. I like to refer to the following AES paper: "A versatile Parametric Filter Using an Imbedded All-Pass Sub-Filter to Independently Adjust Bandwidth, Center Frequency, and Boost or Cut" presented at the 95th convention 1993 October 7-10 in NY by Fred Harris and Eric Brooking. I gives you a description of how to make/design a nice EQ. Moto implementation isues are still open here.

IP: Logged

David McClain
Member
posted 06 February 2001 05:10         Edit/Delete Message   Reply w/Quote
Well, thanks for the reference! I will be sure to look it up.

The reason I stated that I thought the 7-Band filter was FIR was because of 2 results obtained by my spectral analysis.

1. The phase response when all filters are set to the same attenuation is exactly flat from nearly DC all the way up to nearly Nyquist. FIR filters are the only filters I know of that can do this.

2. By paralleling a simple delay with the 7-band EQ, I could adjust the number of samples delay needed to remove comb filtering artifacts. This number is exactly between 49 and 50 samples of delay, i.e., 49.5 samples. This is precisely the number needed for a 99-tap FIR filter.

Why 99 taps? Because using an odd order filter is the only way to avoid nulling out the Nyquist frequency for an FIR filter. With an even number of taps, the alternating sum of tap weights obtained at exactly Nyquist would be exactly zero for a symmetric filter.

Why symmetry? Because without symmetry one has phase shifts induced in the transfer function and point (1) above showed there are none.

And why do we care about Nyquist? Well, we don't really, except in the 16 KHz hi-pass section. But in order to equalize the delay through the composition of all the band-pass sections we have to have the same number of taps in each section.

So my belief, purely educated speculation on my part, is that SSC has developed a number of stock 99-tap filters that represent these octave bandpass sections. They simply sum them according to the attenuation desired in each section.

A simple summing of sections, however, can impart serious artifacts in the resulting transfer function due to abrupt discontinuities. No doubt SSC has "windowed" each section, very likely with a Kaiser window, judging from the level of sidebands observed. And this windowing serves to prevent serious artifacts (filter bleeding) due to gain discontinuities.

Also, the processor load does not seem to depend on the nulling of filter channels (no prizes for using only one channel of the seven), so I suspect that at 1 ms intervals they simply sum a bunch of stock filters multiplied by their respective channel gains, to produce a composite filter.

And finally, why shouldn't we have 99 taps? Because at sample rates like 44.1 KHz and 48 KHz, this number of taps works well only for frequencies above 1.5 KHz or so. We actually need a longer FIR filter if we want to affect the most musical tones in a strong manner.

The first version of this multiband compressor that I built used IIR bandpass filters created by low-pass followed by hi-pass filters, and I had to hand-tweak the band edges to minimize phase ripple (coloration of the sound). The processor load was just about the same as this current version.

When I discovered a Kyma library sound using the 7-band EQ, one channel at a time, I was intruigued. So this particular multiband compressor is not entirely my own invention. I stood on the shoulders of SSC! I like it because it does not add coloration to the sound, but simply subtracts or enhances what is already there.

Whew!

- DM

IP: Logged

David McClain
Member
posted 06 February 2001 05:19         Edit/Delete Message   Reply w/Quote
There is one other consideration for choosing a particular filter implementation for creative EQ.

FIR filters, especially long, symmetric, FIR filters have a "non-causal" output that effectively preceeds the main sound with low level ripple.

IIR filters do not have this characteristic, but they do have the mathematical property of never shutting off. But the output of an IIR happens when the input happens, not before.

A number of audiophile friends rave about this point all the time. I personally think that with short filters, like a 99 tap FIR, the precursors of 49.5 samples are so short at 48 KHz (1 ms) that it is completely unnoticeable. They might well become objectionable with filters of length 256 or longer.

So if you really object to acuasal behavior, then you have no choice but to accept some phase coloration of the sound.

- DM

IP: Logged

David McClain
Member
posted 06 February 2001 05:31         Edit/Delete Message   Reply w/Quote
BTW -- I rather enjoy playing around with IIR filters. They are like a new toy for me. I have a background of nearly 20 years of RF signal analysis used for gathering intelligence data. We wouldn't dare use anything but FIR filters for this, because the added phase distortion would remove much of the important information.

So having a chance to play with IIR's is a real treat for me.

- DM

IP: Logged

David McClain
Member
posted 06 February 2001 05:48         Edit/Delete Message   Reply w/Quote
Wow, that paper is so old the AES doesn't even go back that far on their online repository. I'll have to initiate a library search...

- DM

IP: Logged

David McClain
Member
posted 06 February 2001 06:10         Edit/Delete Message   Reply w/Quote
Well Gelauffc, thanks for the hint anyway! I just tried a number of variations on paralleling a low-order all-pass filter with the original signal, in-phase and out, and I see a whole bunch of really neato possibilities here, including resonant LPF's, parametric notch/boost, and some others, all depending on the amount of feedback, Q, and input level applied to the all-pass. I'm going to have to go off and do some theory on this one...

Thanks a bunch!

- DM

IP: Logged

oivindi
Member
posted 06 February 2001 07:35         Edit/Delete Message   Reply w/Quote
Hi David,

Thanks for all your valuable input to the forum!

(btw, a small tip: You can edit your posts after they´ve been sent, which means you don´t have to add a new post for additional, eh, additions etc. This would probably make things a bit more "overviewable"

best,
/Ĝivind/

IP: Logged

gelauffc
Member
posted 10 February 2001 05:22         Edit/Delete Message   Reply w/Quote
Hi David,

I can see you have a lot of free time on your hands. Which is good!

Did you got the paper already? I find the older papers most of the time better to read to become familiar with the subject. It starts with the basics most of the time.

I wrote about the IIR filter, because this would be my approach. Not neccesarely will it be the best for every application. A good example is a multiband compressor, where we would like to have linear phase response. But again here, it is what the user(of a sound) would like to achieve. I can emagine that with an IIR approach this could sound interesting to.
When we start talking about the HIFI freaks, I always refere to the TUBE amp. Why does is sounds so good? The non-linearity I think!

But when we look at (computational) complexity I think IIR is much cheaper then long FIR filters. Or one has to make a subband filter approach like in MPEG audio compression (my work!).
You refer to your multiband compressor, which I did not have a chance to look at, being as complex with IIR as with the 7-band EQ sound. I can only explain this because in assembler you can make the FIR approach very efficient. But when you use IIR's seperately in Kyma these are pre-compiled parts of code which are placed on a execution list which make it very in-efficient. I thought of making a kyma patch with a multiband compressor myself, maybe I will.

I think a convolution block (or FIR of any size) should be a must for the Kyma! Also at another subject this is requested for.

As I find IIR filters also very interesting, please keep me informed about things you tried and papers/books.

Christiaan Gelauff

IP: Logged

David McClain
Member
posted 10 February 2001 07:04         Edit/Delete Message   Reply w/Quote
In retrospect, the addition of (or rather subtraction of) an IIR all-pass from the original signal is obviously a bandpass. Even more, subtracting an all-pass from a LPF gives a shelving filter. I would assume the same for HPF shelving.

I have found a way to increase FIR performance at extremes of frequencies, whether trying to LPF say 50 Hz with 48 KHz sample rate, or conversely, BPF with seriously narrow transition bands. I have never seen anyone do this in print, but perhaps I need to search back more than 30 years or so. Anyway, I have a technique that allows phase-flat FIR filtering with significantly fewer taps than normally required at these extremes. For example a 50 Hz FIR at 48 KHz would normally require around 3000 taps, but I can do it in around 300.

And yes, I expect that the tube freaks like the addition of a little 2nd harmonic distortion. We can do this too, quite easily on the Kyma. In fact, we can model just about any distortion you want!

- DM

IP: Logged

David McClain
Member
posted 15 February 2001 04:15         Edit/Delete Message   Reply w/Quote
Well, well, well... It seems I re-invented a technique first described in 1983 by Ronald
Crochiere and Lawrence Rabiner in their book entitled "Multirate Digital
Signal Processing", Prentice-Hall.

At least I can be consoled that I re-invented it correctly...

Any ideas on how to make Kyma do this sort of thing? It requires decimation, filtering at a lower sample rate, and image-rejection filtering to get back up to the original sample rate.

- DM

IP: Logged

gelauffc
Member
posted 03 March 2001 06:56         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by David McClain:

Crochiere and Lawrence Rabiner in their book entitled "Multirate Digital
Signal Processing", Prentice-Hall.

Any ideas on how to make Kyma do this sort of thing? It requires decimation, filtering at a lower sample rate, and image-rejection filtering to get back up to the original sample rate.
- DM


Dear David I do know the book, but I find it hardreading material.

Your last question brings up a thing: I already suggested once to Kurt that the system should have some more flexability concerning different control rates. Now we have audio rate (ex. 48kHz) and control rate (1kHz). Why this limitation I asked. "A future thing still?".It would be more difficult for a user, that is certain.

B.t.w. where does this 1kHz come from? My lucky guess: It has to do with MIDI+processor load. Midi is a serial interface that runs at 31250 bits/sec. One byte is transfered in 10 bits => 3125 bytes/sec. A note on message (also most other messages) takes up 3 bytes => a maximum of 1042 midi-messages/sec. The control rate!?? Also consider all the expressions one can type in the blue boxes (tan cos sin etc.) these must be calculated using series evaluation. We don't want to do this at audio rate.

I also made a suggestion about linking control and audio rate (currently it is not linked I think). Example SampleRate=48000 Hz divide by 32=> ControlRate 1500 Hz. This will allow Kurt/us to make very efficient rate converters using simple IIR or FIR down/upsampling filters. Also the sample and hold (=currently) methode can still be applied by making all the possible conversion available as kyma sounds. One problem arrises: when will it be audio and when control? (Simple solution: S/H when the rate of the audio output is to low)

Back to your question: of how to do this in Kyma right now?
It is not that obvious I think! One can simulate multi-rate filters in audio rate, but what is the point then? Or one can use the ControlRate as the lower samplerate, which is quiet low. One should make bands of 500 Hz of the original audio and use the audio to control converter sound. The "smooth" and "swarm..." are 1ste order and 2nd order filters respectively in the controlrate domain! I do not see an emidiate application for it, but...just some thoughts.

And then "image-rejection": I told you already I was doing stuff in AudioCompression. If we look at MPEG1-layerI/II (not to confuse with layerIII also known as .MP3) it uses a 32 band subband filter with aliasing cancelation. I can say I do understand the working of this filter which is very nice and all, but totally useless in musical terms. For coding audio this works fine, but for any other application it is a pain in the ass. Only very small changes in the subband domain will result in loss of aliasing cancelation and therefore the end result will be very ugly. Unless that is the purpose! Making it ugly can be done more easy.

So far my knowledge and feeling of this subject.

Christiaan

IP: Logged

David McClain
Member
posted 03 March 2001 22:29         Edit/Delete Message   Reply w/Quote
I had the impression that most of the transcendental functions were computed by means of lookup tables, and not by means of series expansions. If you look in the program folder there is a subfolder containing a bunch of these as precomputed 4096 pt wavetables.

- DM

IP: Logged

gelauffc
Member
posted 06 March 2001 03:01         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by David McClain:
...computed by means of lookup tables, and not by means of series expansions ... precomputed 4096 pt wavetables.
- DM

Hi David,

Only SSC can tell us the real answere. But having a table of 4096 pt for sine, cosine or tangent is very coarse! If we would use this for calculating filter coefficient in a 2nd order LPF we would get a resolution of 22 Hz for the cutoff! Think of the lower frequencies (22,44,66,88,...) this would be very coarse!
I not sure how to prove this. SSC help us in our everlasting search for the answeres!

Christiaan


IP: Logged

SSC
Administrator
posted 06 March 2001 09:44         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by gelauffc:
SSC help us in our everlasting search for the answeres!

We could, but then we would spoil all the fun you seem to be having in analyzing and speculating! But, as a hint, Christiaan, you are overlooking something...something that is a very commonly used technique in computer music and digital signal processing.

IP: Logged

David McClain
Member
posted 06 March 2001 13:13         Edit/Delete Message   Reply w/Quote
BTW, in order to correct a mistake stated previously, the EQ filters appear to be 101 tap FIR filters, not 99 tap FIR's.

- DM

IP: Logged

David McClain
Member
posted 06 March 2001 13:16         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by SSC:
We could, but then we would spoil all the fun you seem to be having in analyzing and speculating! But, as a hint, Christiaan, you are overlooking something...something that is a very commonly used technique in computer music and digital signal processing.

...could they be referring to interpolation? It seems they like to do a lot of this, e.g., delays, oscillator wavetables, etc.

- DM


IP: Logged

gelauffc
Member
posted 09 March 2001 09:30         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by SSC:
... spoil all the fun you seem to be having in analyzing and speculating ... you are overlooking something...something that is a very commonly used technique in computer music and digital signal processing.

aaahhhh,

David, I think simple linear interpolation will not give us the answere, but maybe a small sinc function can give enough accuracy. Or in another way?
For sine and Cosine:
SSC does it have anything to do with the following: sin(a+b)=sin(a)*cos(b)+ cos(a)*sin(b)?

One day ..... I will take a plane and come to make a coredump of Kurt his brain.



IP: Logged

SSC
Administrator
posted 09 March 2001 19:58         Edit/Delete Message   Reply w/Quote
Don't be so certain that Kurt is the one writing this...

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Open Topic | Archive/Move | Delete Topic
Post New Topic  

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c