Kyma Forum
  Kyma Sound Exchange
  Oxford EQ's

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

next newest topic | next oldest topic
Author Topic:   Oxford EQ's
David McClain
Member
posted 11 May 2003 02:00         Edit/Delete Message   Reply w/Quote
Not just yet... but I did some investigating that you all might find interesting. Apparently the Sony Oxford console has the finest available EQ's. You can read about them on this page
http://www.sonyplugins.com/

This is a digital console, and as such, they have to use essentially the same kind of IIR filtering that we have provided. There are a few twists however... (...if only I could be wealthy enough to afford such a console!)

Our Peaking EQ filters are based on a generic 2-pole Microsound that you have all received in other posts of mine. The microsound is named DirectIIR. The only difference between the numerous different kinds of filters is the set of coefficients handed to DirectIIR, and that's what my Kyma prototypes provide. A peaking EQ filter is a 2-pole/2-zero filter just like nearly everything else, except for multipole Butterworth filters. But any multi-pole multi-zero filter can be created as a cascade of 2-pole sections, and 1-pole filters can also be created with this same DirectIIR microsound, simply by providing coefficients for a2 and b2 of zero.

Okay, I did some investigating with Mathematica on my peaking EQ filters. These are all constant Q filters with the proviso that you measure the bandwidth at the half-db-gain points, not at 3 dB down from the peak. (for one thing a peaking filter that provides only 1 dB of peaking wouldn't have a -3 dB point). So for a filter with a Q of 2 and a dB gain of 5 dB, the bandwidth corresponding to the Q is measured at the 2.5 dB gain points on the skirts of the peak. If you follow this rule, then the effective Q = Fc/HalfGainBandwidth is essentially equal to the requested Q, regardless of the requested peak gain or attenuation. (These filters can also be used to notch out spectrum!)

So that corresponds to the EQ Type 1 of the Oxford console Bandpass EQ filters. Type 3 and Type 4 allow the gain to be adjusted and the Q of the filter is correspondingly varied to keep a constant psychoacoustic effect. We can do this too! All we have to do is agree on a nominal Q at some gain setting, and then compute Q adjustments based on gain variations around this nominal reference setting.

I find from Mathematica that the Q needs to be adjusted along essentially straight lines as the gain of the filters is varied. The slope of those lines depends on how you want the Q to vary with gain.

[ummm... sorry, I worded that poorly. What I actually did was plot for each filter Q, how the area under the dB gain vs. log frequency varied as the gain is increased. These lines are essentially straight lines. However, the spacing between Q's for constant area are more like quadratic functions of gain. Sheesh!, Dave!]

In the Oxford Type 4 Bandpass EQ, the Q is varied in such a manner as to present a constant area under the dB gain curve in log-frequency space. This is very easy to do -- again using simple straight line Q variations with respect to requested gain.

So if anyone is interested in obtaining these Sony Oxford style EQ filters let me know. Some of you audio pros out there know better than I do exactly how you would like the Q to vary with gain.

Cheers,

- DM

[PS: They mention in the Oxford writeup that they can even compute filters with peak frequencies outside the frequency range from DC to Nyquist. Now, if any of you own an Oxford, can you tell me if they are upsampling into the EQ filters? We can do this too, if we run at 88.2 KHz or 96 KHz sample rates, but we don't have multirate capabilities in the Capy at this time.]

[Nope! I just reread that section. They use some more sophistication in generating filter coefficients. Most likely they have lookup tables stored in ROM based on computer model fits to more perfect EQ curves.

The few defined filter types that we have already provided to work againt the DirectIIR microsound -- peaking EQ, low/high shelf, bandpass, bandreject, low pass, high pass, and all-pass -- barely tap the capabilities of DirectIIR.

If you examine pole/zero diagrams in the complex Z-plane, all of these filters have identical pole placements, and only their zeros differ among them. So there are infinitely many other possible coefficients, many of which will produce garbage, but others will produce interesting effects. This is probably what the Sony Oxford engineers took advantage of. ]


[This message has been edited by David McClain (edited 11 May 2003).]

[This message has been edited by David McClain (edited 11 May 2003).]

IP: Logged

capy66n320user
Member
posted 11 May 2003 10:14         Edit/Delete Message   Reply w/Quote
Hi David,

I would be interested in obtaining these Sony Oxford style EQ filters. Will you post them on the Kyma Forum - Sound Exchange?

Thanks in advance!

IP: Logged

tenhus
Member
posted 14 May 2003 12:28         Edit/Delete Message   Reply w/Quote
David,
I'm glad you're taking interest in high end digital EQ's. Analog style Filters (of all sorts) is a problem area for both Csound and Kyma (and the VST world too for that matter). The only truly convincing digital EQ’s I’ve heard are the Massenburg EQ’s for TC electronics M-6000, Euphonix system 5 and Sony Oxford.
I don’t know anything about how they work, but I don’t think any of them use up sampling since, the DSP load changes in the usual manner when going 96KHz.
All of them are also pretty DSP hungry. You essentially loose half of your TC 6000 when engaging a mastering EQ.

What’s interesting is that basically none of these EQ’s are completely transparent. Meaning that all of them add, ever so slightly a bit of their own character to the sound.

A good test for a digital EQ is to try adding high freq material without it sounding crap. With most digital EQ’s nothing will happen over 15k. However with an analog EQ you get a sense of added “air”.
Could you possibly “fake” the added air by introducing a very small amount of even harmonic high freq noise to the input signal? Basically to give the filters something to “work with”?

Again, I think this is a very important topic because it touches the core of what sounds good or not, and how can we get to the next level. This goes not only for EQ’s but also for all the analog synth style filters (low pass, res, etc.), even analog oscillators for that matter (interpolating anti aliasing)

regards,

Tobias

IP: Logged

dlmorley
Member
posted 30 May 2003 15:20         Edit/Delete Message   Reply w/Quote
The Oxford EQ idea sounds fantastic
Any progress?
Thanks
David

IP: Logged

David McClain
Member
posted 04 June 2003 05:37         Edit/Delete Message   Reply w/Quote
Hi Guys, and thanks for your input. I'm not sure if I'm the one to be doing this work, especially for the high-end air... But I do know how to design filters, good and bad...

What I figured out about the Oxford EQ's at the high end is that they simply used a computer optimization to move the poles and zeros about so that they could get enhanced response at the high end, without having to upsample the audio. We can do that too, and it amounts to using an interpolation in a lookup table as you change the Q of the filters.

But any filter except for purely symmetric FIR filters will add a bit of its own "color" to the audio, by way of the phase shifts induced at various frequencies. Only symmetric FIR filters are phase flat. All others bend the sound to varying degrees.

The simple 2-pole IIR filters that I have previously provided were derived by means of a bilinear transform applied to conventional analog filter designs. But that's only one way to generate digital filters. In general we have 4 adjustable parameters (5 if you include filter gain) for any 2-pole section. As long as you keep the poles inside the unit circle of the Z-plane then you get a stable filter. Some sound better than others, but there are an infinite number (practically speaking...) of possibilities.

My Microsound DirectIIR is capable of handling any collection of these 5 parameters. Being fixed-point fractional processors, the Motorola DSP's impose some practical limits; those being that you need intermediate gains to be reasonable values. Too much gain inside an intermediate stage of a multi-section filter will cause digital clipping from overflow. Too little gain throws away valuable signal-to-noise ratio. So the actual design space is just a little smaller than infinity, but still quite large.

Presently, I have a number of nonlinear optimization programs that can take an amplitude response and possibly a phase response and find one or more sets of IIR coefficients that closely match those responses. But it is a bit of a black art to design the "best" sounding filters.

So what it all comes down to is someone's expert opinion of what sounds good. I certainly am not that expert... but if you tell me what you want, then I can produce the filter that creates that scene. I don't have access to the Oxford console. But if I did, then I could replicate what they are doing. But aside from the hyper-frequency responses they brag about, everything else looks pretty straightforward, and the IIR filters I have already shared do essentially these same things. The only extra twist beyond what I have already provided is some form of Q interpolation as a function of filter gain. That creates the type-3 and type-4 peaking filters of the Oxford console.

The shelving filters of the Oxford are similarly the same as the 2-pole shelvers I have previous provided. The trick in getting the transition dip and peak is simply to use a Q higher than 0.707 (= sqrt(2)). The higher that Q is, the more peaked the response is below and above the transition frequency.

So, aside from the fancy high-frequency responses claimed by Oxford, we already have everything they do...

But I'm open to suggestions and requests...

- DM

IP: Logged

David McClain
Member
posted 07 June 2003 00:07         Edit/Delete Message   Reply w/Quote
Ahh... I just accidentally ran across this...
http://66.70.243.164/software_downloads/UADManual.pdf

In there a section talks about the Oxford filters. They are more interesting than I originally suspected. They claim to use Lattice Filters, and offer Butterworth, Bessel (RC-networks), and Elliptic filters. Very interesting!

Butterworth filters are known as maximally-flat filters. Derivatives of all orders tend toward zero at DC for the lowpass variety.

Bessel filters are the familiar RC-networks. No direct analog in digital domain, but by means of various transforms, e.g., bilinear, we can develop digital approximations. Bessel filters have the lowest rolloffs of the three mentioned here.

Elliptic filters are much more elaborate designs, frequently used in high-end CD players for D/A playback. These can be designed with very tight transition bands.

The lattice filtering mentioned normally applies to FIR sections as found in LPCM filterbanks. But they claim a "smooth analog-like sound", so I need to investigate further.

At any rate, there is more than meets the eye here! Any DSP pro's out there that would care to share their insights?

- DM

[but I ought to point out... ALL digital filters rely on the placement of poles and zeros in the Z-plane. My DirectIIR microsound can accommodate up to 8 pairs of complex poles and zeros in any one instance. The Class Protos that I have provided so far use only two (2nd order sections), and you can cascade DirectIIR sections for even more. So there are no inherent limitations in the Kyma designs; it's merely a matter of intelligently distributing these poles and zeros. ]

[This message has been edited by David McClain (edited 07 June 2003).]

IP: Logged

David McClain
Member
posted 07 June 2003 01:16         Edit/Delete Message   Reply w/Quote

2-polefilters.kym

 
Hi Guys,

Attached is a Sound file containing a whole bunch of filter prototypes and classes. My studio is in a transition state at the moment and so I cannot edit these files for you, but described below is a procedure for taking, e.g., the "Biquad Peaking Filter Prototype" and turning it into a Cambridge Type-III Peaking EQ Filter. [the proto is not really a biquad filter -- that's a leftover from much earlier work, and the name was never properly changed. However, it calls on DirectIIR microsound to implement a direct IIR filter of arbitrary type].

In that Biquad Peaking Filter Prototype, just edit the lines that say

alpha := fc normSin / (2 * ?Q)

to

alpha := fc normSin / (2 * ?Q * ?GainDb abs / 15)

This makes a Cambridge Type III filter where the filter peaking Q increases with absolute gain setting (cut or boost). The ?Q parameter now speaks to the Q of the filter when the absolute value of the cut or boost is 15 dB. As the gain setting drops toward zero, the filter Q diminishes as well, becoming a broader response at lower gain settings.

Change the 15 factor there to some other number as you wish. This is only one way to alter the filter Q with gain setting. There are any number of other ways.

- DM

[...for example, perhaps linearly grading the Q is not appropriate, perhaps it should be graded as the square of the gain? In that case change the line to read

alpha := fc normSin / (2 * ?Q * (?GainDb / 15) squared)

I have tested these prototypes in my spectrum analyzer and they show very nice looking graded Q filters at various gain settings....

Using powers of the gain that are greater than unity produce greater broadening of the filter response as the gain is lowered. Similarly, powers less than 1 produce less broadening. ]

[This message has been edited by David McClain (edited 07 June 2003).]

IP: Logged

capy66n320user
Member
posted 07 June 2003 14:01         Edit/Delete Message   Reply w/Quote
Hi David,

Thanks for your latest sound file!

For what its worth, I found out through the grapevine that the McDSP team was instrumental in the development of the Sony Oxford EQ, which is the software that became the Oxford plug in.
http://www.mcdsp.com/products/index.html

IP: Logged

David McClain
Member
posted 10 June 2003 02:26         Edit/Delete Message   Reply w/Quote
Very interesting... I looked these guys up and found that they have an impressive duo running the technical aspects of their company. They appear to have access to a wide range of vintage gear to model.

But the fact remains that we all compute digital filters in essentially the same way. So there is no reason, in principle, that we can't emulate anything that anyone else can. It all hinges on an artful selection of poles and zeros in the Z-domain.

[Thinking about a comment I made earlier about Bessel filters not having any direct digital analogy, that isn't strictly true. In fact, the filter prototypes I have provided so far are essentially bilinear transformations of analog Bessel filters. At least for the 2-zero/2-pole prototypes I have provided.

The Kyma filters are Butterworth designs, which are a bit more sophisticated. Still, if you want the kind of resonance peaks and dips exhibited by familiar EQ filters, you need to use these Bessel prototypes. The Butterworth filters are maximally flat and exhibit no resonance peaks.]

- DM

IP: Logged

pete
Member
posted 10 June 2003 05:41         Edit/Delete Message   Reply w/Quote
Hi David

As you know I have no real knowledge of filters analogue or digital but I did find a way to make a digital filter by thinking about what analogue filters do. The RCL filter that I made in "Pete's DSP modules" is an IIR but that's technically all I know about it, but it does ring in a very analogue-ish way which is what you seem to be talking about here. The formula I used is written as remarks at the top of the DSP code which you should have a copy of. Could you tell me what type of filter (Butter,Bessel, etc) it is, and what its pitfalls are. I know that the highest center frequency it can reach is 1/6 of the sample rate and that as the center frequency approaches the sample rate the frequency calculation is not spot on. I could work on some get rounds to sort out these problems but if the filter itself is no good it would be pointless.

Thanks Pete.

IP: Logged

capy66n320user
Member
posted 10 June 2003 19:00         Edit/Delete Message   Reply w/Quote
Hi David,

The software application QEDesign-2000 does IIR filter design with pole/zero output in the Z plane for a Bessel analog filter prototype and generates highly optimized assembly language for the Motorola DSP56002.

QEDesign Digital Filter Design System: http://www.i-t.com/engsw/mmtm/qedesign.htm

QEDesign Capabilities: http://www.i-t.com/engsw/mmtm/qedcapab.htm

QEDesign Platforms and Functionality: http://www.i-t.com/engsw/mmtm/qedcomp.htm

IP: Logged

David McClain
Member
posted 23 June 2003 00:01         Edit/Delete Message   Reply w/Quote
Hi guys!

Wow! Thanks for those filter design references!!

I also have a number of programs that I have written for generating unique equalization curves. But more often than not, I end up just using readily available EQ filters. I frequently don't know what filter I need until I make a peaking filter to sweep up and down in frequency until I isolate sounds that I need to suppress. At other times, all I know is a frequency and a bandwidth for a needed response, but no phase information. So once again, I'll construct those from conventionally available EQ filters. (See my posting in Tips and Techniques about the Violin and Cello).

Pete, I took a look at your formulas at the top of microsound RCL. I assume that your DSP code properly implements these equations. So given your equations, you do indeed have an IIR filter, with one zero and two poles. The transfer function appears to be

H(z) = R*(1-1/z) / (1 + (RC + LC - 1)/z - RC/z^2)

Now, as to whether or not this is a Bessel, Butterworth, or other filter... It all depends on the placement of poles and zeros, and the transform from the complex frequency plane to the Z-domain.

Butterworth filters are known as "maximally flat" filters because the frequency derivatives of all higher orders are zero together at either DC or Nyquist frequency, depending on whether they are low-pass or high-pass in nature. This character essentially specifies the location of all poles to specific locations in the Z-plane.

Bessel filters are "maximally smooth" filters and offer the gentlest roll-off among filters. But here you have many choices for the location of poles and zeros. Your filters may have some Bessel character at certain values for R, L, and C.

What is certain, however, is that the imbalance of poles and zeros will demonstrate peculiarities, and you may have run into these with the difficulties you describe. For example, having only one zero, that zero is required to lie along the real-axis of the Z-plane. Your two poles may or may not lie on the real axis. When they do not, they will necessarily be complex conjugates of each other (assuming R, L, and C are real numbers). The location of the zero will produce a depression in the filter response for frequencies near DC or Nyquist frequency.

[Your filter has its zero at DC on the unit circle, so it is necessarily a high-pass response, with possible resonance peaks.]

The poles will produce a resonance at frequencies near the angular location of these poles, and the strength of that resonance depends on how close to the unit circle those poles lie. If those poles ever cross to the outside of the unit circle in the Z-plane then you end up with unstable filters. Once excited the unstable filters will run away and saturate. When the poles are exactly spot on the unit circle, you have an oscillator at that resonant frequency.

When designing digital filters by means of some transformation of analog circuits, there are many choices here. A Bilinear transformation is often used, but need not be the only one. Bilinear transforms have the property of mapping the imaginary frequency axis to the Z-plane unit circle. Regions to the left of the imaginary frequency axis map to the interior of the Z-domain unit circle. It is well established in analog systems theory that for stable systems all poles must lie to the negative side of the imaginary frequency axis, and this proviso translates into the need to contain all poles in the Z-domain inside the unit circle.

I have seen a number of articles talk about variations on the Bilinear transform to produce logarithmic frequency response instead of the nearly linear frequency response around DC given by a Bilinear transform. This is often helpful in designing psychoacoustic filters since the ear responds to pitch in a Bark scale which is approximately logarithmic above some base pitch.

So to answer your specific questions, I can't provide any specific affirmations. Your filters may or may not correspond to some of the named better known filters. I do know that it cannot produce Butterworth response, but it might at times produce Bessel responses.

Cheers,

- DM

[This message has been edited by David McClain (edited 23 June 2003).]

IP: Logged

pete
Member
posted 24 June 2003 13:28         Edit/Delete Message   Reply w/Quote
Hi David
So my assumption that the center frequency is simply 1/(2*Pi*SQRT(LC)) and that R has no effect on that frequency is wrong. This formula does seem to work in practice for most settings but it does go out a bit as we approach the sample rate. So maybe that is where it falls over ?

Pete

[This message has been edited by pete (edited 24 June 2003).]

IP: Logged

David McClain
Member
posted 24 June 2003 15:04         Edit/Delete Message   Reply w/Quote
Hi Pete,

Unless I really goofed when I interpreted your equations, I get the following for the location of the resonance:

Zp = -(1 - L*C - R*C +/- Sqrt[4*R*C + (R*C + L*C - 1)^2])/(2*R*C)

Assuming you have no inductance in your model, so L = 0, then we get,

Zp = 1 and Zp = -1/(R*C)

Now these values for Zp must be interpreted as complex numbers designating the locations of the poles in the complex Z-domain. The frequency corresponding to these pole locations has to be obtained by computing the log of the pole value, and the imaginary part of that log is Pi*F/Fn where Fn is the Nyquist frequency.

Interestingly, when you have no inductance (L=0) one of your poles exactly cancels the zero of the transfer function, leaving you with resonance at the Nyquist frequency. [... so... have I misinterpreted your equations? I'd better go back and double check my scrawlings..]

Later...

- DM

[... ahh! I see from your note above that you consider this a tuned LC tank circuit with some dissipating resistance. You have the correct formula for an analog tank circuit, but unfortunately, this will be only approximately correct nearest DC frequencies. The moment you moved to the digital domain, you gave up any hope of ever achieving infinite frequency. Nyquist frequency comes roaring in like a brick wall on you, and the analog formula becomes increasingly inaccurate as you approach this high frequency limit.

I should go back and examine your model equations, but I believe they were a nodal circuit analysis taken from the analog domain and then implicitly turned into a first order forward finite difference system of equations (as a result of your "this" and "last" variable designations).

I'd have to think a bit about what that kind of mapping corresponds to in the transformation from the complex frequency domain to the complex Z-domain. It might end up being a biliear transformation... but then it might not?

At any rate, you can get away with this kind of thing as long as the Nyquist frequency (i.e., sample rate) is sufficiently high enough compared to your operating frequencies, so that it may as well be at infinity. In that case a series expansion of the logarithm of the above pole locations, truncated to first order, should give you something close to your assumed resonance frequency. I'll have to double check your equations and try that expansion on the pole locations to see if we agree.

But the bottom line is that you claim it works well enough for lower frequencies, and that's really all that counts here. Isn't it?]

[This message has been edited by David McClain (edited 24 June 2003).]

IP: Logged

David McClain
Member
posted 25 June 2003 00:43         Edit/Delete Message   Reply w/Quote
One of the difficulties you will encounter when you have an imbalance between the number of poles and zeros of the transfer function, is that the gain of your filters will vary with frequency.

Ken Steiglitz of Princeton gives a wonderful introduction to this concept in his little paperback, "A Digital Signal Processing Primer", Addison-Wesley. This book is a text used for students of electronic music, and as such it does not get too deep into theory.

Ken points out that by planting a zero at both DC at at Nyquist frequency on the unit circle, you can control the gain of a simple resonator (a 2-pole structure like yours) so that it has nearly constant gain regardless of resonant frequency.

In effect, that little trick exchanges your first order derivatives on the incoming signal into a balanced computation. Your derivatives are all forward finite-differences. His uses a central difference.

The resulting transfer function has the form

H(z) = G*(1-1/z^2)/(1 - a1/z - a2/z^2)

where filter gain is G, and coefficients a1 and a2 control the placement of poles. That denominator containing a1 and a2 represents the "resonator". The numerator is merely a cascade of a simple lowpass and highpass filter with the resonator. Both numerator and denominator now have 2 roots so the roots of the numerator (the zeros of the transfer function) are the same in number as the roots of the denominator (the poles of the transfer function).

By choosing a2 = -rho^2, and a1 = 2*rho*Cos[theta] you plant the poles at location (rho, +/-theta) in polar coordinates. Keeping rho less than unity makes a stable filter here, and the frequency of the resonance is given directly by theta = 2*Pi*F/Fs, for sample rate Fs.

You could work backwards from this simple "reson" filter to equivalent R, C, and L in your model circuit. In your case, R*C = a2, and (1 - R*C - L*C) = a1. Hence rho = Sqrt[R*C], and Cos[theta] = (1 - R*C - L*C)/(2*Sqrt[R*C]).

From these expressions, your scaled values of R and C must be such that their product is less than unity. (You have an implicit scale factor of 1/Fs in your equations, even if you didn't realize it.) Since in the analog world the product R*C has the dimensions of time, this needs to be divided by Fs to get to time squared form so that the square root produces time or inverse frequency. Hence, what I mean to say is that the quantity (R*C/Fs) needs to be less than unity for a stable system.

It seems interesting to me that R carries such an important role in your filter.

Now going back to the analog world, the presence of dissipative resistance in the tank circuit will limit the height of the resonance response. It lowers the Q factor of the reactive components. This also has a 2nd order effect on the exact frequency of resonance, displacing it slightly to lower frequencies. But this is not the effect you observe in diminishing accuracy of the simple expression as you approach the Nyquist frequency. That detuning is purely a consequence of the fact that you have a finite sample rate. The analog model only represents digital truth with infinite sample rates.

- DM

[I just took another look at your equations and found that I goofed by a factor of C in the numerator of the transfer function, but aside from that simple scaling error, nothing changes about the character of your system.

H(z) = R*C*(1-1/z)/(1 - (1 - R*C - L*C)/z - R*C/z^2)

However, in looking at your equations, I find an unusual choice of working units. It appears that your R is really inverse-resistance, and your C is inverse-capacitance, and your L is inverse inductance?? That's okay too. Just unusual.

May I ask... did you have a studio application that needed the specification of these three kinds of resistance/reactance? Is this related to the tuning of a tape deck? Apart from system modeling, I almost never work directly in these fundamental elements, heading instead to a more direct specification of desired resonant frequency and Q as you would get with Ken Steiglitz's modified "reson" filters described above.]

[This message has been edited by David McClain (edited 25 June 2003).]

IP: Logged

pete
Member
posted 25 June 2003 07:57         Edit/Delete Message   Reply w/Quote
Hi David
Sorry, I had forgotten that Rfactor is the reciprocal of resistance and henrys and farads both get multiplied by the sample rate and there reciprocals end up as Lfactor and Cfactor. This bit is done in the class editor. If I had not used the reciprocals I would have had to use divides in the DSP code (the reciprocals are calculated in non real time as hot parameters).

The reason I choose to do it this way was because I knew of no other way and not some desire to fulfill a particular application. I had no idea how to make a filter in the digital domain. I could see how to make a comb filter with a delay line and that by stringing lots of different comb filters together I could make the teeth fall in such a way that something like a hi pass or lo pass could be made. But Im afraid that Z-domain and poles etc are a bit over my head, but you describing my filter (one which I know how it works in my language) in these terms helps me start to get to grips with it.

But just because I don't have the knowledge to design digital filters as it should be designed doesn't mean that I can't adjust the knowledge I do have to design something.

This filter comes from an idea I had years ago which was to make my computer generate a sine wave without using a look up table or using the slow SIN() instruction. This was done by thinking about a perfect capacitor and inductor in parallel, and how they would oscillate forever if there where no losses.

This is how it went in BASIC.

10 volts = 100 ; amps = 0 ; Ffactor = 0.1
20 amps = amps+(volts*Ffactor)
30 volts = volts-(amps*Ffactor)
40 rem DRAW IT ON THE SCREEN
50 goto 20

This worked quite well, so all I did was added R and an input using the same principle and got the RCL filter .

I noticed that there had been a lot of discussion on the forum about how the filters in kyma don't ring in the same way as the filters on an analogue synth but the RCL was in effect slicing up time into 44100 bits per second that the results should not be that different from there analogue counter part unless you use frequencies close to the sample rate.

In practice it seems that it does have a sound similar to the filters you get on an analogue synth. If you put white noise into it and make R high enough that it's just below oscillation, it give that finger on the rim of a glass sound. If you back off a little more it gives that whooshing waves sound (When the frequency is moved) and a little more and you get that cheering crowd sound. But what makes it rely nice is that even when you go into oscillation and clipping (say put a sine wave on the input and tune the filter to the sane frequency) the clipping removes some of the energy at each cycle and gives a pleasing distortion not a raspy one or a cutting out of the main signal. I don't think the standard filters have the same effect when put into these extreme states.

Anyway another reason I choose to do it this way was that it required only few instruction, but the main reason was that it was the only way I know how.

Pete.

[This message has been edited by pete (edited 25 June 2003).]

IP: Logged

David McClain
Member
posted 26 June 2003 01:24         Edit/Delete Message   Reply w/Quote
Hi Pete,

Very interesting! You have a fertile mind. Your description of using delay lines to make filters corresponds generally to what are called FIR filters, unless you use feedback on one or more of the delay elements. Feedback creates IIR filters, which have poles. FIR filters have no poles, only zeros.

[by way of more direct explanation... zeros introduce attenuation of the signal at specific frequencies, poles provide resonance gain]

Well, your work by analogy is a very good way to do things. But as you have seen, the conversion to the digital domain has shortcomings when you approach the Nyquist frequency. By using special programs to move the poles and zeros about by trial and error, we can create IIR filters that have extended response like the Oxford EQ's. Moving the poles about gives us a chance to counteract the effects of the nearby digital limit at Nyquist frequency.

- DM

[The filters in Kyma are different from what you might expect coming from a subtractive synth. They are conventional Butterworth LPF and HPF filters in which you can feed some of the output signal back to the input. The result is difficult to describe in terms of what we know of simpler filters. Resonance is induced as a result of the feedback, but not necessarily where you might expect it. My understanding is that the original Moog filters also used this technique, but not with Butterworth sections. They had simpler filter sections than that. ]

[This message has been edited by David McClain (edited 26 June 2003).]

IP: Logged

capy66n320user
Member
posted 20 July 2003 16:35         Edit/Delete Message   Reply w/Quote

oxford-eq.zip

 
Hi,

Here is an archive containing impulse response files for the Sony Oxford EQ obtained from
http://www.echochamber.ch/

[This message has been edited by capy66n320user (edited 20 July 2003).]

[This message has been edited by capy66n320user (edited 20 July 2003).]

IP: Logged

David McClain
Member
posted 23 July 2003 21:23         Edit/Delete Message   Reply w/Quote
Hey neat! Thanks for that!

Only trouble is... impulse response files for EQ and other filters is a tough way to go. The duration is typically so short that it is very difficult to get any accurate frequency information. But I'll have a look at them.

When doing filters, I typically cross correlate white noise input against the filter output. The Fourier Transform of that correlation is the frequency response of the system. Since filters generally don't have time varying behavior, this works great and gives you as much detail as you can stand.

I just finished a whirlwind analysis of room measurements using chirp signals for excitation. I have it mostly worked out now, but there are still a few edges that need some cleaning...

When doing impulse responses with chirps, you have to convert the source chirp and the recorded response into analytic signals, using a Hilbert transform. Then you simply cross correlate them (same as convolving with the inverse chirp). The real part of that cross correlation signal is the room response itself.

I used a linear frequency chirp programmed into Kyma for the source waveform, and my chirps span from 20 Hz to 20 KHz over the duration of 0.25 sec. I need to do a bit more thinking about the optimum chirp rate. But this worked fine for a start.

I notice that most of the impulse files I have around here from other authors have a 4-band structure in the spectrum, almost like they went through a 4 band compressor, with increasing compression ratios as you go lower in frequency. Fine spectral structure is almost completely missing. The impulse responses I get don't have any of those banding artifacts.

The "edges" remaining to be worked out have mostly to do with the lack of very low frequency response caused by attenuation from the Hilbert filtering conversion from real signals to complex analytic signals. But everything above about 100 Hz looks pretty good. [I don't worry too much about the similar loss of very high frequencies up around 20 KHz.]

There is also a very strong response in the region of 9 KHz for my room here, and I can't see any mathematical flaw that might have caused this. The sample rate was 44.1 KHz. I made sure to turn everything to neutral or bypass here as far as sound modification gear is concerned. Perhaps my speaker system peaks out around 9 KHz? If it is the speaker, then I need to find a way to neutralize its effects in the impulse response.

The advantage of using white noise into an EQ filter is that you get to bypass the speaker and mic completely. The only things that can color the sound are the EQ and very minor effects due to the A/D and D/A processing, and of course, any deviation from noise whiteness.

Interesting... I just realized that this probably also needs to be done with complex analytic signals too!? I normally just use real cross correlation. So I have to think about that a bit.

- DM

[Actually... now that I just did it again... what I normally do with filters is just record say 10 sec of white noise through the filter, then take the average of a bunhc of spectra of the output. The hope being that white noise will average to zero mean in each frequency bin. In some sense this is equivalent to the cross correlation technique. I need to sit down and reason it out, just how it is equivalent...

But I mention this, because perhaps I can do the same thing with those impulse files. Theoretically, the impulse response carries all the information about the filter.]

[Now this is interesting... I just took a look at some of those impulse files. They are very short, typically 22 samples or so. The fact that they appear to be typical impulse files without precursors indicates that the Oxford EQ's are indeed IIR filters, as you might expect.

Furthermore, sending white noise through them, and averaging doesn't give any real increase in the information content provided over that of just doing a short FFT on the impulse response itself.

Since so few of the initial output samples are nonzero of any significant amplitude, I could probably derive the actual filter coefficients, assuming some number of poles and zeros, directly from the relative values of these output samples.

I have probably forgotten more about FFT's, signal analysis, and so on than most people ever learn. But I do find myself re-deriving the results from time to time, just to be rigorously correct. It appears I have more to do here again...]

[BTW.. I just finished studying the second pass on a book entitled "The Fractional Fourier Transform" by Ozaktas, Zalevsky, and Kutay. This is an excellent book and I highly recommend it for anyone with a mathematical bent. It is very illuminating about FT's in the abstract and shows repeatedly how they are but a single example of an entire family of related integral transforms, known as Cohen's class of quadratic phase linear operators. Using fractional FT's allows you to do some fancy filtering in one pass that just isn't possible with simple time domain and frequency domain techniques. Chirps are of fundamental importance to the entire field, as FT's of all orders are simply equivalent to chirp multiplication followed by chirp convolution, followed again by chirp multiplication and scaling. This book assumes a certain familiarity with the quantum harmonic oscillator problem. Highly recommended! ]

[This message has been edited by David McClain (edited 23 July 2003).]

IP: Logged

David McClain
Member
posted 25 July 2003 04:16         Edit/Delete Message   Reply w/Quote
Now this is interesting...

I just proved to myself, both analytically, and empirically, that there is no need to convert signals to analytic form before deconvolving the chirp used to measure impulse responses. The results are the same with the original signals.

Also interesting is the 10 KHz brightness in the measurements. I just found that a Hann windowed (or any other window for that matter) applied to the source chirp signal produces this peaked response around the mid-frequency of the chirp. That is what appears to be showing up in the room response recordings.

The source chirp is a constant amplitude signal as frequency varies. But the recorded response shows clearly the effects of windowing -- or averaging -- over some number of adjacent samples.

If I divide the spectrum of the deconvolved room response by the windowed spectrum of the source chirp, limited to a maximum amplification of 30 dB, then I get a more reasonable looking room response.

This is very puzzling...

- DM

IP: Logged

David McClain
Member
posted 26 July 2003 12:00         Edit/Delete Message   Reply w/Quote
I found it!!

I have an Earthworks M30 Omni mic that I was using for these measurements. It has an acoustic coupler made of teflon that slips over the end of the mic with an o-ring seal. I use this when making measurements of headphones.

I had that acoustic coupler on the end of the mic when I made the room recordings. When I take that coupler off the mic and make my recordings, I get a nice flat response, with a gentle taper toward the highest frequencies up around 16 KHz and higher. When the coupler is afixed to the end of the mic, I get a strongly peaked response in the vicinity of 10 KHz, tapering strongly off to both lower and higher frequencies.

So that acoustic coupler has a strong influence on the recorded material. It measures about 6.3 mm inner diameter, by about that same depth. So it presents a small cylinder at the input port of the mic. I am surprised that this small device could cause a strong resonance around 10 KHz.

The coupler presents a quarter wave resonator to the mic, closed at the mic end. So the characteristic frequencies ought to be around those with wavelengths 4 times longer than these dimensions, or about 12 KHz. I guess that's close enough to 10 KHz, given the broad peak of the response, errors in estimating the peak frequency, and errors guaging the size of the tube.

So I guess the mystery is resolved. It is a mathematical accident that this just so happens to mimmick the shape of a windowed chirp spectrum.

In order to resolve whether or not some form of windowing was occuring in the system, I reran the tests with a stretched chirp waveform running from DC-20 KHz over 1.5 seconds instead of the 0.25 seconds for the first tests. The results continued to show the 10 KHz peaked response. And since the waveform was slowed so much, I would not have expected the same kind of smoothing results, if that was occuring.

Turns out that acoustic coupler is the culprit... a quarter wave resonator planted on the front of the mic, with a resonance around 10-12 KHz.

Interesting!

- DM

IP: Logged

capy66n320user
Member
posted 14 January 2004 13:36         Edit/Delete Message   Reply w/Quote
Hi,

With regard to the previously mentioned Sony Oxford EQ impulse response files, Prosoniq has
developed Rayverb VST:
http://www.osxaudio.com/index.php?story=773&maddi=118eed997a1afd7adeaa5cad45672623

Using inverse raytracing for audio, Rayverb looks at a sampled room impulse response and adapts a
general room model to reproduce a particular sonic space in real time.

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

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