Re: [Audacity-nyquist] eq-band and "width"
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Roger D. <rb...@cs...> - 2010-10-25 02:54:09
|
On 10/24/10 10:22 PM, James Shatto wrote: > What I'd really like to do is sort of a spline adjustment to EQ across > the board maxing out at the high end at a specific dB level. And > close to 0dB on the low end. Could that be done per frequency? I'm > trying to compensate for the HF loss due to fake fur. And I've grown > tired of entering 15 numbers for every adjustment. Plus I'd like a > few more bands for a smoother adjustment. Hopefully with some control > over how linear or dipped / curved the adjustment will be. How would you specify the spline? There's a file in nyquist/lib/grapheq.lsp that implements NBAND-RANGE: |nband-rang/e//(input/, /gains/, /lowf/, /highf/)| A graphical equalizer applied to /input/ (a |SOUND|). The gain controls and number of bands is given by /gains/, an ARRAY of |SOUND|s (in other words, a Nyquist multichannel |SOUND|). Any sound in the array may be replaced by a |FLONUM|. The bands are geometrically equally spaced from the lowest frequency /lowf/ to the highest frequency /highf/ (both are |FLONUM|s). I think you could generate an array of gains according to some parametric description. > For my current setup I'm needing near 2dB to 4dB on the high end. As > much as 6dB on previous contraptions. So far results are promising > for the restoration of certain percussion instruments and certain > wildlife. Plus the spoken word seems to need a bit of high end for > clarity. My lisp is a little weak, having only used it before to do a > bunch of notch filters to counter sox's noise reduction that seems to > omit the 1000Hz multiples from it's filter. > > Ultimately I'd like the actually measure the mics response in said > configuration and base compensation off of that information. But for > now, just trying to keep it simple and mostly automated. I don't > really care if it takes a day for an hours audio, as long as it's good > audio. One well-known problem with EQ is that it introduces lots of frequency-dependent phase shift. Esp. for percussion, you might be better off with a simple low-order parametric filter that just boosts the highs a bit rather than a big multi-band EQ. The latter will let you model the overall amplitude response in detail, but the phase response will be erratic. > Thanks for the clarification on width. That helps a bit. > > - James > > > On 10/24/10, Roger Dannenberg<rb...@cs...> wrote: >> On 10/24/10 2:50 PM, James Shatto wrote: >>> eq-band(signal, hz, gain, width) >>> >>> I'm trying to write an EQ routine for audacity and I'm having trouble >>> understanding the width parameter. I had thought that High Hz - Low >>> Hz over 2 is what should be width. But my routine doesn't work that >>> way when it uses that on the larger Hz values. But over 4 does seem >>> to work. I'd like to sort out why so I don't have any gap or overlap >>> in the EQ bands. >> I guess you know there will always be overlap. These are not "brick >> wall" filters. >>> When it does the EQ for the higher bands ~18kHz, it >>> basically nulls out the audio if /2 is used. >>> >>> 20000 - 16000 = 4000 >>> 4000/2 = 2000 = width? >>> or >>> 4000/4 = 1000 = width? >>> or >>> Some other factor I seem to not quite get yet. To be used like >>> (eq-band s 18000 2.0 2000) >>> >>> Per the documentation: >>> --- and width (a FLONUM) is the half-gain width in octaves --- >>> >>> Could someone give me a human-esque interpretation of that phrase. Am >>> I supposed to make it a factor of the gain that I'm applying or >>> something? If so, what does that do to the gain value? >> The gain is measured in dB. The width is measured in octaves, e.g. if >> the width is 2, the range of frequencies affected by the filter is from >> hz/2 (an octave below) to hz*2 (an octave above). At these points (hz/2 >> and hz*2), the filter gain will be gain/2, measured in dB. >> >> To compute width, the octaves between f1 and f2, where f2> f1, use >> log2(f2 / f1). log2(x) is not built-in, but log2(x) = log(x) / log(2.0). >> To hz, get the frequency in the middle, use hz = f1 * power(2.0, width / >> 2.0). >> >> I wrote a little program to send a sine sweep through a filter and plot >> the peak amplitude of the output as a function of frequency (works in >> the Nyquist IDE, and since the output is a sound, I guess you run >> something similar to this in Audacity: >> >> function test() >> begin >> ;; probe is a sinusoidal sweep at 1Hz/s >> with probe = hzosc(pwl(0, 0, 1000, 1000, 1000, 0)), >> ;; filt is a filtered probe >> filt = eq-band(probe, 200, -6.0, 2.0), >> ;; out is the rms of the input scaled to get peak >> out = rms(filt, 10) * sqrt(2.0) >> return out >> end >> >> exec s-plot(test(), 1000, 1000) >>> Also, is there any sort of debugging tutorial, even if I have to use >>> emacs or something. Even though my routine is fairly simple, I hate >>> having no ability to peak at the values (after applied arithmetic) >>> before they get used. >> Maybe someone has a better answer for Audacity-nyquist, but I use the >> Nyquist IDE. -Roger >>> Thanks, >>> - James >> ------------------------------------------------------------------------------ >> Nokia and AT&T present the 2010 Calling All Innovators-North America contest >> Create new apps& games for the Nokia N8 for consumers in U.S. and Canada >> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing >> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store >> http://p.sf.net/sfu/nokia-dev2dev >> _______________________________________________ >> Audacity-nyquist mailing list >> Aud...@li... >> https://lists.sourceforge.net/lists/listinfo/audacity-nyquist >> > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps& games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Audacity-nyquist mailing list > Aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-nyquist > |