DSPRelated.com
Forums

Interpolated Constant-Q Equalizer

Started by Unknown November 20, 2007
robert bristow-johnson wrote:
> On Dec 9, 10:28 am, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> > wrote: >> robert bristow-johnson wrote: >>> On Dec 8, 1:06 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> >>> wrote: >>>> Well, that's pretty easy - bypass the filtering if all set to 0dB! >>> for 31 staggered BPFs in parallel? it doesn't seem easy to me. >>> for 31 peaking EQs in series, that's easy. and we know that these 31 >>> sections can be remapped to parallel (with the denominator >>> coefficients unchanged) by partial fraction expansion (maybe the >>> Heaviside trick, but i dunno how to program a machine to do that auto- >>> magically, but with no coincident poles it might not be too hard). >>> anyway, is this what you mean by "pretty easy"? >> No, I mean *really* easy! >> >> if (all_filters == 0) >> output_codec = input_codec; > > so you mean a switch. > > how closely to exactly 0 dB does each slider have to get for it to be > considered 0? > > so if even one slider is off (possibly due to mismarking) by a > millismidgen, then you get the big ripply effect because your test > above fails? > > does this switch go "click" when it actually *does* kick in? then > touch a slider by just a teeny bit, and does it go click again? > > to avoid the clicks, does your switch fade in and fade out when > engaged or disengaged? that's simple? > > > needless to say, i do not like switches like that. that's why i > didn't like the harris & Brooking paper regarding EQ. switches > attached to continuous controls suck. > > r b-j
I see - I'm thinking program controlled from a PC interface where there is a big fat button marked "Flatten". You're thinking of physical sliders. In that latter case you make a good point. -- Dirk http://www.transcendence.me.uk/ - Transcendence UK Remote Viewing classes in London
On Dec 10, 12:07 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com>
wrote:
> > I see - I'm thinking program controlled from a PC interface where there > is a big fat button marked "Flatten". You're thinking of physical > sliders. In that latter case you make a good point.
so, if you hit the "Flatten" button, do you get a click? or do the virtual sliders on the screen slide gracefully to their 0 dB position? i'm not sure it changes the issue all that much. r b-j
robert bristow-johnson wrote:
> On Dec 10, 12:07 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> > wrote: >> I see - I'm thinking program controlled from a PC interface where there >> is a big fat button marked "Flatten". You're thinking of physical >> sliders. In that latter case you make a good point. > > so, if you hit the "Flatten" button, do you get a click? or do the > virtual sliders on the screen slide gracefully to their 0 dB > position? i'm not sure it changes the issue all that much. > > r b-j
I would assume that one could 'fade in' the new signal. It would result in a pause in the sound, but that's a feature - not a bug! -- Dirk http://www.transcendence.me.uk/ - Transcendence UK Remote Viewing classes in London
On Dec 10, 2:20 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com>
wrote:
> robert bristow-johnson wrote: > > On Dec 10, 12:07 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> > > wrote: > >> I see - I'm thinking program controlled from a PC interface where there > >> is a big fat button marked "Flatten". You're thinking of physical > >> sliders. In that latter case you make a good point. > > > so, if you hit the "Flatten" button, do you get a click? or do the > > virtual sliders on the screen slide gracefully to their 0 dB > > position? i'm not sure it changes the issue all that much. > > > I would assume that one could 'fade in' the new signal. It would result > in a pause in the sound, but that's a feature - not a bug!
i would put "feature" in quotes (and i guess i *did*). the whole mechanism of fading in the new (and unfiltered) signal after hitting the "Flatten" button, hardly seems simpler than a decent and automated method of doing partial fraction expansion on a large transfer function where none of the poles are "repeated" or lying on top of others. i hadn't written it, and sorta hoped someone else would, but a automagical method to break apart a bunch of biquads in series to a bunch in parallel seems consistent and simple. and then when you want a flat 0 dB, just move the faders to 0 dB. and it would be flat. r b-j
robert bristow-johnson wrote:
> On Dec 10, 2:20 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> > wrote: >> robert bristow-johnson wrote: >>> On Dec 10, 12:07 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> >>> wrote: >>>> I see - I'm thinking program controlled from a PC interface where there >>>> is a big fat button marked "Flatten". You're thinking of physical >>>> sliders. In that latter case you make a good point. >>> so, if you hit the "Flatten" button, do you get a click? or do the >>> virtual sliders on the screen slide gracefully to their 0 dB >>> position? i'm not sure it changes the issue all that much. >> >> I would assume that one could 'fade in' the new signal. It would result >> in a pause in the sound, but that's a feature - not a bug! > > i would put "feature" in quotes (and i guess i *did*). > > the whole mechanism of fading in the new (and unfiltered) signal after > hitting the "Flatten" button, hardly seems simpler than a decent and > automated method of doing partial fraction expansion on a large > transfer function where none of the poles are "repeated" or lying on > top of others. i hadn't written it, and sorta hoped someone else > would, but a automagical method to break apart a bunch of biquads in > series to a bunch in parallel seems consistent and simple. and then > when you want a flat 0 dB, just move the faders to 0 dB. and it would > be flat. > > r b-j
Well, if you find a way to do it let me know because I am trying to create a low noise third octave graphics equalizer. Hence my other question to the NG about the overhead in doing 64 bit v 32 bit float on SHARC. I could code it and measure it but was hoping somebody could give me a rough estimate so I could know whether it's worth the effort. -- Dirk http://www.transcendence.me.uk/ - Transcendence UK Remote Viewing classes in London
On Dec 10, 4:43 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com>
wrote:
> robert bristow-johnson wrote: > > On Dec 10, 2:20 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> > > wrote: > >> robert bristow-johnson wrote: > >>> On Dec 10, 12:07 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> > >>> wrote: > >>>> I see - I'm thinking program controlled from a PC interface where there > >>>> is a big fat button marked "Flatten". You're thinking of physical > >>>> sliders. In that latter case you make a good point. > >>> so, if you hit the "Flatten" button, do you get a click? or do the > >>> virtual sliders on the screen slide gracefully to their 0 dB > >>> position? i'm not sure it changes the issue all that much. > > >> I would assume that one could 'fade in' the new signal. It would result > >> in a pause in the sound, but that's a feature - not a bug! > > > i would put "feature" in quotes (and i guess i *did*). > > > the whole mechanism of fading in the new (and unfiltered) signal after > > hitting the "Flatten" button, hardly seems simpler than a decent and > > automated method of doing partial fraction expansion on a large > > transfer function where none of the poles are "repeated" or lying on > > top of others. i hadn't written it, and sorta hoped someone else > > would, but a automagical method to break apart a bunch of biquads in > > series to a bunch in parallel seems consistent and simple. and then > > when you want a flat 0 dB, just move the faders to 0 dB. and it would > > be flat. > > Well, if you find a way to do it let me know because I am trying to > create a low noise third octave graphics equalizer.
well, what it is that i'm trying to do without doing too much unpaid work is first model the graphic EQ as a set of cascaded peaking EQs with equal bandwidth (in log frequency) and that are equally spaced in log frequency. and this is where i think "my" definition of BW actually works well. consider creating a piecewise linear function (with breakpoints equally spaced in "x") out of a bunch of weighted triangular functions, you know, like if we want to represent what linear interpolation does instead of sinc() based interpolation: { 1 - |x| |x|<1 tri(x) = { { 0 otherwise f(x) = SUM{ w[n] * tri((x - n*B)/B) } n ____/\_______________ * w[0] _____/\______________ * w[1] ______/\_____________ * w[2] _______/\____________ * w[3] ________/\___________ * w[4] _________/\__________ * w[5] __________/\_________ * w[6] ___________/\________ * w[7] ____________/\_______ * w[8] _____________/\______ * w[9] the height of these unit triangular functions is 1 and the width, B, is the distance between the "half-way up" points add all those weighted triangular functions up and you'll get something that goes through w[0], w[1], w[2], etc., and is a straight line in between each of those points and no overlap. now the (equal) spacing between each of these adjacent unit triangular functions is equal to their width, B. if the width was wider, there would be overlap and the sum would *not* go through those points w[0], w[1], etc. so, with a bunch of peaking EQs, and looking at it in log frequency (measured in, say, octaves) and log gain (measured in, say, dB), what you have are smoother versions of the triangle basis functions that *do* overlap a little, but, if you define the bandwidth, BW, so that it is the spacing in octaves between the bandedges that are at the midpoint dB gain (dBgain/2) as i did in the cookbook, i would think that would be the optimal definition since the bell-shaped (a.k.a. "bandaxall") functions agree with the triangular at the peak and the bandedges and, i would think, are pretty close to where they approach the 0 dB floor. now, what i would recommend doing is to first factor out the mean or average dB gain from all of the sliders (whether they be mechanical or virtual sliders on your PC) into an overall gain factor that you will apply separately. now some of your EQ bands are boost bands and others are cut bands (and the dBs of boost/cut that they add to is 0 dB if you define "cut" as negative boost dBs). this way, whether all of your sliders are set to 0 dB, or if you moved them *all* to 12 dB or some other level, you overall gain would be perfectly flat. what remains, then, for low noise, is to transform that set of cascaded biquads into another equivalent set of parallel biquads (actually the parallel filters would have no 2nd-order term in the numerator). none of the poles are coincident upon each other, so i would think that someone could code up what we do in the so-called "Heaviside Partial Fraction Expansion" that would run in the host processor (that reads the position of the sliders and computes the coefficients for the filters). implement these Direct Form 1 where there need be only one common input state, and then with double precision accumulators for all of the sections, and then add up the double-precision section outputs in double precision before rounding (or noise-shaping) the output to a smaller word width.
> Hence my other > question to the NG about the overhead in doing 64 bit v 32 bit float on > SHARC. I could code it and measure it but was hoping somebody could give > me a rough estimate so I could know whether it's worth the effort.
i would do it in 32 bit, but try to hang on to the 40-bit values that you are accumulating to. perhaps you want to do it with the fixed-point 80-bit accumulator. r b-j
robert bristow-johnson wrote:

> ... (a.k.a. "bandaxall") ...
Should that be "Baxendall" or is that something else? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Dec 10, 9:13 pm, Jerry Avins <j...@ieee.org> wrote:
> robert bristow-johnson wrote: > > ... (a.k.a. "bandaxall") ... > > Should that be "Baxendall" or is that something else? >
no, you're virtually correct, Jerry: http://www.schmarder.com/radios/tech/tone.htm but it's amazing how many google hits you get with "bandaxall" and get references to guitar amp tone controls. anyway, i misused the term. i first heard it in reference to the standard *shelving* filters, not peaking EQ, but i swapped it in my memory for lack of a fresh reference. r b-j

robert bristow-johnson wrote:


> well, what it is that i'm trying to do without doing too much unpaid > work is first model the graphic EQ as a set of cascaded peaking EQs > with equal bandwidth (in log frequency) and that are equally spaced in > log frequency.
[...] I prefer the different approach. The graphic EQ is just the way to represent the desired frequency response. The task is to approximate this response with whatever hardware you got. So it is down to design of the IIR filter to the arbitrary response. There are all sorts of shamanistic optimization methods to do that; works quite well indeed. It turns out that it is absolutely unnecessary to have 30 biquad sections; somewhat 7-8 sections will do quite well for pretty much any practical case. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Vladimir Vassilevsky wrote:
> > > robert bristow-johnson wrote: > > >> well, what it is that i'm trying to do without doing too much unpaid >> work is first model the graphic EQ as a set of cascaded peaking EQs >> with equal bandwidth (in log frequency) and that are equally spaced in >> log frequency. > > [...] > > I prefer the different approach. The graphic EQ is just the way to > represent the desired frequency response. The task is to approximate > this response with whatever hardware you got. So it is down to design of > the IIR filter to the arbitrary response. There are all sorts of > shamanistic optimization methods to do that; works quite well indeed. > It turns out that it is absolutely unnecessary to have 30 biquad > sections; somewhat 7-8 sections will do quite well for pretty much any > practical case.
Except where the "practical case" is a graphics equaliser in the home or studio. -- Dirk http://www.transcendence.me.uk/ - Transcendence UK Remote Viewing classes in London