Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: James Shatto <wwwshadow7@gm...>  20101024 18:51:03

eqband(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. 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 (eqband s 18000 2.0 2000) Per the documentation:  and width (a FLONUM) is the halfgain width in octaves  Could someone give me a humanesque 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? 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. Thanks,  James 
From: Roger Dannenberg <rbd@cs...>  20101025 01:26:19

On 10/24/10 2:50 PM, James Shatto wrote: > eqband(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 > (eqband s 18000 2.0 2000) > > Per the documentation: >  and width (a FLONUM) is the halfgain width in octaves  > > Could someone give me a humanesque 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 builtin, 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 = eqband(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 splot(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 Audacitynyquist, but I use the Nyquist IDE. Roger > Thanks, >  James 
From: James Shatto <wwwshadow7@gm...>  20101025 02:22:07

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. 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. Thanks for the clarification on width. That helps a bit.  James On 10/24/10, Roger Dannenberg <rbd@...> wrote: > > On 10/24/10 2:50 PM, James Shatto wrote: >> eqband(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 >> (eqband s 18000 2.0 2000) >> >> Per the documentation: >>  and width (a FLONUM) is the halfgain width in octaves  >> >> Could someone give me a humanesque 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 builtin, 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 = eqband(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 splot(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 Audacitynyquist, but I use the > Nyquist IDE. Roger >> Thanks, >>  James > >  > Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev > _______________________________________________ > Audacitynyquist mailing list > Audacitynyquist@... > https://lists.sourceforge.net/lists/listinfo/audacitynyquist > 
From: Roger Dannenberg <rbd@cs...>  20101025 02:54:09
Attachments:
Message as HTML

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 NBANDRANGE: nbandrang/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 SOUNDs (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 FLONUMs). 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 wellknown problem with EQ is that it introduces lots of frequencydependent phase shift. Esp. for percussion, you might be better off with a simple loworder parametric filter that just boosts the highs a bit rather than a big multiband 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<rbd@...> wrote: >> On 10/24/10 2:50 PM, James Shatto wrote: >>> eqband(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 >>> (eqband s 18000 2.0 2000) >>> >>> Per the documentation: >>>  and width (a FLONUM) is the halfgain width in octaves  >>> >>> Could someone give me a humanesque 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 builtin, 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 = eqband(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 splot(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 Audacitynyquist, but I use the >> Nyquist IDE. Roger >>> Thanks, >>>  James >>  >> Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev >> _______________________________________________ >> Audacitynyquist mailing list >> Audacitynyquist@... >> https://lists.sourceforge.net/lists/listinfo/audacitynyquist >> >  > Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev > _______________________________________________ > Audacitynyquist mailing list > Audacitynyquist@... > https://lists.sourceforge.net/lists/listinfo/audacitynyquist > 
From: James Shatto <wwwshadow7@gm...>  20101025 09:49:42

> How would you specify the spline? linearly it would be (current frequency)/(max frequency)*(dB adjustment) = (dB adjustment) my current math is more like (current gain for frequency) = (previous gain for frequency) * 0.75 (over 20ish bands, going from highest to lowest). Which works pretty good using audacities 15 band mutiband eq and a value closer to 0.60. But I'm wanting something less step ladder and needing only one or two values (with defaults) on the effects initiation. Not that I know if nyquist supports it, but some sort of sin / cos arc averaged with the linear model to determine the depth of the arc. Based on the bottom right quadrant of a circle from lowest Hz to highest Hz. Or something like that. Perhaps some averaging to 2 line + 1 arc / 3 or 1 arc + 2 line / 3 type slider to tweak it. It's just the implementation of actually doing the eq that seems problematic right now. At a minimum the math for x^2+y^2=r^2 seems to be implemented. Where r is the max frequency, x is the current frequency and y the unknown would be scaled to the gain adjustment ((y/max frequency)*dB). But it's not that math that's got me stumped. It's how to use the result to affect the eq with the least issues.  James 
From: Roger Dannenberg <rbd@cs...>  20101025 11:57:35

On 10/25/10 5:49 AM, James Shatto wrote: >> How would you specify the spline? > linearly it would be (current frequency)/(max frequency)*(dB > adjustment) = (dB adjustment) > > my current math is more like (current gain for frequency) = (previous > gain for frequency) * 0.75 (over 20ish bands, going from highest to > lowest). > > Which works pretty good using audacities 15 band mutiband eq and a > value closer to 0.60. But I'm wanting something less step ladder and > needing only one or two values (with defaults) on the effects > initiation. > > Not that I know if nyquist supports it, but some sort of sin / cos arc > averaged with the linear model to determine the depth of the arc. > Based on the bottom right quadrant of a circle from lowest Hz to > highest Hz. Or something like that. Perhaps some averaging to 2 line > + 1 arc / 3 or 1 arc + 2 line / 3 type slider to tweak it. It's just > the implementation of actually doing the eq that seems problematic > right now. At a minimum the math for x^2+y^2=r^2 seems to be > implemented. Where r is the max frequency, x is the current frequency > and y the unknown would be scaled to the gain adjustment ((y/max > frequency)*dB). But it's not that math that's got me stumped. It's > how to use the result to affect the eq with the least issues. > >  James > OK, you could try the NBANDRANGE function. Here, I believe frequency bands are geometrically spaced rather than linear, but you can compute an array of gains. If you tell me whether you are using Lisp or SAL, I think I can send a small example that computes a set of gains for NBANDRANGE. (I still think for a few dB, you are better off with only a few bands, but if you like the sound, that's the ultimate test.) Roger 
From: James Shatto <wwwshadow7@gm...>  20101025 16:40:15

Based on the band being frequency/width to frequency*width, that really simplified what I was trying to do. For 22ish bands the width would be 1.2ish. Which places the 22nd band up past sampling rates of 48kHz, so I don't know if that will be problematic for samples at or less than 48kHz. Most of my samples are in the 192kHz / 96kHz realm, so not a problem for me (at the moment). I'll probably want to expand it later to allow a variable width and therefor variable bands. And I'm still not entirely sure if it does exactly what I want. But it does seem to work. And with most of the desired effect. In some respects better than expected, but I've still got to run the results through the ringer. i.e. downsample the long way to maximize clarity. http://home.earthlink.net/~shadow_7/FauxFurEQ.ny Feel free to set me straight if my logic is based on misunderstanding. It wouldn't be the first time.  James On 10/25/10, Roger Dannenberg <rbd@...> wrote: > On 10/25/10 5:49 AM, James Shatto wrote: >>> How would you specify the spline? >> linearly it would be (current frequency)/(max frequency)*(dB >> adjustment) = (dB adjustment) >> >> my current math is more like (current gain for frequency) = (previous >> gain for frequency) * 0.75 (over 20ish bands, going from highest to >> lowest). >> >> Which works pretty good using audacities 15 band mutiband eq and a >> value closer to 0.60. But I'm wanting something less step ladder and >> needing only one or two values (with defaults) on the effects >> initiation. >> >> Not that I know if nyquist supports it, but some sort of sin / cos arc >> averaged with the linear model to determine the depth of the arc. >> Based on the bottom right quadrant of a circle from lowest Hz to >> highest Hz. Or something like that. Perhaps some averaging to 2 line >> + 1 arc / 3 or 1 arc + 2 line / 3 type slider to tweak it. It's just >> the implementation of actually doing the eq that seems problematic >> right now. At a minimum the math for x^2+y^2=r^2 seems to be >> implemented. Where r is the max frequency, x is the current frequency >> and y the unknown would be scaled to the gain adjustment ((y/max >> frequency)*dB). But it's not that math that's got me stumped. It's >> how to use the result to affect the eq with the least issues. >> >>  James >> > OK, you could try the NBANDRANGE function. Here, I believe frequency > bands are geometrically spaced rather than linear, but you can compute > an array of gains. If you tell me whether you are using Lisp or SAL, I > think I can send a small example that computes a set of gains for > NBANDRANGE. > > (I still think for a few dB, you are better off with only a few bands, > but if you like the sound, that's the ultimate test.) > > Roger > > >  > Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev > _______________________________________________ > Audacitynyquist mailing list > Audacitynyquist@... > https://lists.sourceforge.net/lists/listinfo/audacitynyquist > 
From: Stevethefiddle <stevethefiddle@gm...>  20101025 18:18:19

If you are running this in Audacity, have you considered using "Draw Curves" in the Equalizer effect? (available in Audacity 1.3.x). Custom curves may be saved and reused when you need them.  View this message in context: http://audacity.238276.n2.nabble.com/eqbandandwidthtp5668375p5671802.html Sent from the audacitynyquist mailing list archive at Nabble.com. 
From: Roger Dannenberg <rbd@cs...>  20101025 18:36:04

On 10/25/10 12:40 PM, James Shatto wrote: > Based on the band being frequency/width to frequency*width, that > really simplified what I was trying to do. For 22ish bands the width > would be 1.2ish. Which places the 22nd band up past sampling rates > of 48kHz, so I don't know if that will be problematic for samples at > or less than 48kHz. Most of my samples are in the 192kHz / 96kHz > realm, so not a problem for me (at the moment). > > I'll probably want to expand it later to allow a variable width and > therefor variable bands. And I'm still not entirely sure if it does > exactly what I want. But it does seem to work. And with most of the > desired effect. In some respects better than expected, but I've still > got to run the results through the ringer. i.e. downsample the long > way to maximize clarity. > > http://home.earthlink.net/~shadow_7/FauxFurEQ.ny I took a look here: it looks like your width parameter is 1.2, but bands go from freq/1.2 to freq*1.2. Your bandwidth is 1.44, but you need to specify this in octaves. A ratio of 1.44 is 0.526069 octaves, so the width parameter to eqband should be 0.526069. That's if you want the filter response to be gain/2 at freq/1.2 and freq*1.2. You could increase or decrease width to get more or less overlap. There's no need to write out equations for each band  you could use a loop to simplify the code (or maybe that would "complexify" it by adding control constructs and data structures). The nbandrange function uses a loopsandarray approach to do something similar. Roger > Feel free to set me straight if my logic is based on misunderstanding. > It wouldn't be the first time. > >  James > > > On 10/25/10, Roger Dannenberg<rbd@...> wrote: >> On 10/25/10 5:49 AM, James Shatto wrote: >>>> How would you specify the spline? >>> linearly it would be (current frequency)/(max frequency)*(dB >>> adjustment) = (dB adjustment) >>> >>> my current math is more like (current gain for frequency) = (previous >>> gain for frequency) * 0.75 (over 20ish bands, going from highest to >>> lowest). >>> >>> Which works pretty good using audacities 15 band mutiband eq and a >>> value closer to 0.60. But I'm wanting something less step ladder and >>> needing only one or two values (with defaults) on the effects >>> initiation. >>> >>> Not that I know if nyquist supports it, but some sort of sin / cos arc >>> averaged with the linear model to determine the depth of the arc. >>> Based on the bottom right quadrant of a circle from lowest Hz to >>> highest Hz. Or something like that. Perhaps some averaging to 2 line >>> + 1 arc / 3 or 1 arc + 2 line / 3 type slider to tweak it. It's just >>> the implementation of actually doing the eq that seems problematic >>> right now. At a minimum the math for x^2+y^2=r^2 seems to be >>> implemented. Where r is the max frequency, x is the current frequency >>> and y the unknown would be scaled to the gain adjustment ((y/max >>> frequency)*dB). But it's not that math that's got me stumped. It's >>> how to use the result to affect the eq with the least issues. >>> >>>  James >>> >> OK, you could try the NBANDRANGE function. Here, I believe frequency >> bands are geometrically spaced rather than linear, but you can compute >> an array of gains. If you tell me whether you are using Lisp or SAL, I >> think I can send a small example that computes a set of gains for >> NBANDRANGE. >> >> (I still think for a few dB, you are better off with only a few bands, >> but if you like the sound, that's the ultimate test.) >> >> Roger 
From: James Shatto <wwwshadow7@gm...>  20101025 19:55:53

I guess I'm not understanding this version of octaves. Simple physic has a string cut in half is an octave up, doubled in length is an octave down. My interpretation translated to Hz is Hz/2 = down an octave and Hz*2 = up an octave. I'm using 1.2 for pseudo octaves for more bands. What would be the formula for width in this case? (sqrt (mult 1.2 1.2)) ? Isn't that 1.2? Or is it more complex? Ultimately I'll use a loop, just keeping it simple to get the jist of it for now. aka SemiHuman readable. On 10/25/10, Roger Dannenberg <rbd@...> wrote: > On 10/25/10 12:40 PM, James Shatto wrote: >> Based on the band being frequency/width to frequency*width, that >> really simplified what I was trying to do. For 22ish bands the width >> would be 1.2ish. Which places the 22nd band up past sampling rates >> of 48kHz, so I don't know if that will be problematic for samples at >> or less than 48kHz. Most of my samples are in the 192kHz / 96kHz >> realm, so not a problem for me (at the moment). >> >> I'll probably want to expand it later to allow a variable width and >> therefor variable bands. And I'm still not entirely sure if it does >> exactly what I want. But it does seem to work. And with most of the >> desired effect. In some respects better than expected, but I've still >> got to run the results through the ringer. i.e. downsample the long >> way to maximize clarity. >> >> http://home.earthlink.net/~shadow_7/FauxFurEQ.ny > I took a look here: it looks like your width parameter is 1.2, but bands > go from freq/1.2 to freq*1.2. Your bandwidth is 1.44, but you need to > specify this in octaves. A ratio of 1.44 is 0.526069 octaves, so the > width parameter to eqband should be 0.526069. That's if you want the > filter response to be gain/2 at freq/1.2 and freq*1.2. You could > increase or decrease width to get more or less overlap. > > There's no need to write out equations for each band  you could use a > loop to simplify the code (or maybe that would "complexify" it by adding > control constructs and data structures). The nbandrange function uses a > loopsandarray approach to do something similar. > > Roger >> Feel free to set me straight if my logic is based on misunderstanding. >> It wouldn't be the first time. >> >>  James >> >> >> On 10/25/10, Roger Dannenberg<rbd@...> wrote: >>> On 10/25/10 5:49 AM, James Shatto wrote: >>>>> How would you specify the spline? >>>> linearly it would be (current frequency)/(max frequency)*(dB >>>> adjustment) = (dB adjustment) >>>> >>>> my current math is more like (current gain for frequency) = (previous >>>> gain for frequency) * 0.75 (over 20ish bands, going from highest to >>>> lowest). >>>> >>>> Which works pretty good using audacities 15 band mutiband eq and a >>>> value closer to 0.60. But I'm wanting something less step ladder and >>>> needing only one or two values (with defaults) on the effects >>>> initiation. >>>> >>>> Not that I know if nyquist supports it, but some sort of sin / cos arc >>>> averaged with the linear model to determine the depth of the arc. >>>> Based on the bottom right quadrant of a circle from lowest Hz to >>>> highest Hz. Or something like that. Perhaps some averaging to 2 line >>>> + 1 arc / 3 or 1 arc + 2 line / 3 type slider to tweak it. It's just >>>> the implementation of actually doing the eq that seems problematic >>>> right now. At a minimum the math for x^2+y^2=r^2 seems to be >>>> implemented. Where r is the max frequency, x is the current frequency >>>> and y the unknown would be scaled to the gain adjustment ((y/max >>>> frequency)*dB). But it's not that math that's got me stumped. It's >>>> how to use the result to affect the eq with the least issues. >>>> >>>>  James >>>> >>> OK, you could try the NBANDRANGE function. Here, I believe frequency >>> bands are geometrically spaced rather than linear, but you can compute >>> an array of gains. If you tell me whether you are using Lisp or SAL, I >>> think I can send a small example that computes a set of gains for >>> NBANDRANGE. >>> >>> (I still think for a few dB, you are better off with only a few bands, >>> but if you like the sound, that's the ultimate test.) >>> >>> Roger > >  > Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev > _______________________________________________ > Audacitynyquist mailing list > Audacitynyquist@... > https://lists.sourceforge.net/lists/listinfo/audacitynyquist > 
From: Roger Dannenberg <rbd@cs...>  20101025 20:16:54

Maybe this will help. Suppose instead of 1.2, you use 8. That is, Hz/8 for the low frequency, and Hz*8 for the high frequency. (I'm using a really big number, 8, even though it is not a practical value.) A factor of 8 is 3 octaves (2*2*2). So that's 3 octaves down and 3 octaves up. The width is therefore 3+3=6. It is not 8; it is not sqrt(8) or sqrt(8*8). 6 is logbase2(8*8). I had some more math in a previous message, and maybe the text below will make more sense now. Roger On 10/25/10 3:55 PM, James Shatto wrote: > I guess I'm not understanding this version of octaves. Simple physic > has a string cut in half is an octave up, doubled in length is an > octave down. My interpretation translated to Hz is Hz/2 = down an > octave and Hz*2 = up an octave. I'm using 1.2 for pseudo octaves for > more bands. What would be the formula for width in this case? (sqrt > (mult 1.2 1.2)) ? Isn't that 1.2? Or is it more complex? > > Ultimately I'll use a loop, just keeping it simple to get the jist of > it for now. aka SemiHuman readable. > > > On 10/25/10, Roger Dannenberg<rbd@...> wrote: >> On 10/25/10 12:40 PM, James Shatto wrote: >>> Based on the band being frequency/width to frequency*width, that >>> really simplified what I was trying to do. For 22ish bands the width >>> would be 1.2ish. Which places the 22nd band up past sampling rates >>> of 48kHz, so I don't know if that will be problematic for samples at >>> or less than 48kHz. Most of my samples are in the 192kHz / 96kHz >>> realm, so not a problem for me (at the moment). >>> >>> I'll probably want to expand it later to allow a variable width and >>> therefor variable bands. And I'm still not entirely sure if it does >>> exactly what I want. But it does seem to work. And with most of the >>> desired effect. In some respects better than expected, but I've still >>> got to run the results through the ringer. i.e. downsample the long >>> way to maximize clarity. >>> >>> http://home.earthlink.net/~shadow_7/FauxFurEQ.ny >> I took a look here: it looks like your width parameter is 1.2, but bands >> go from freq/1.2 to freq*1.2. Your bandwidth is 1.44, but you need to >> specify this in octaves. A ratio of 1.44 is 0.526069 octaves, so the >> width parameter to eqband should be 0.526069. That's if you want the >> filter response to be gain/2 at freq/1.2 and freq*1.2. You could >> increase or decrease width to get more or less overlap. >> >> There's no need to write out equations for each band  you could use a >> loop to simplify the code (or maybe that would "complexify" it by adding >> control constructs and data structures). The nbandrange function uses a >> loopsandarray approach to do something similar. >> >> Roger >>> Feel free to set me straight if my logic is based on misunderstanding. >>> It wouldn't be the first time. >>> >>>  James >>> >>> >>> On 10/25/10, Roger Dannenberg<rbd@...> wrote: >>>> On 10/25/10 5:49 AM, James Shatto wrote: >>>>>> How would you specify the spline? >>>>> linearly it would be (current frequency)/(max frequency)*(dB >>>>> adjustment) = (dB adjustment) >>>>> >>>>> my current math is more like (current gain for frequency) = (previous >>>>> gain for frequency) * 0.75 (over 20ish bands, going from highest to >>>>> lowest). >>>>> >>>>> Which works pretty good using audacities 15 band mutiband eq and a >>>>> value closer to 0.60. But I'm wanting something less step ladder and >>>>> needing only one or two values (with defaults) on the effects >>>>> initiation. >>>>> >>>>> Not that I know if nyquist supports it, but some sort of sin / cos arc >>>>> averaged with the linear model to determine the depth of the arc. >>>>> Based on the bottom right quadrant of a circle from lowest Hz to >>>>> highest Hz. Or something like that. Perhaps some averaging to 2 line >>>>> + 1 arc / 3 or 1 arc + 2 line / 3 type slider to tweak it. It's just >>>>> the implementation of actually doing the eq that seems problematic >>>>> right now. At a minimum the math for x^2+y^2=r^2 seems to be >>>>> implemented. Where r is the max frequency, x is the current frequency >>>>> and y the unknown would be scaled to the gain adjustment ((y/max >>>>> frequency)*dB). But it's not that math that's got me stumped. It's >>>>> how to use the result to affect the eq with the least issues. >>>>> >>>>>  James >>>>> >>>> OK, you could try the NBANDRANGE function. Here, I believe frequency >>>> bands are geometrically spaced rather than linear, but you can compute >>>> an array of gains. If you tell me whether you are using Lisp or SAL, I >>>> think I can send a small example that computes a set of gains for >>>> NBANDRANGE. >>>> >>>> (I still think for a few dB, you are better off with only a few bands, >>>> but if you like the sound, that's the ultimate test.) >>>> >>>> Roger >>  >> Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev >> _______________________________________________ >> Audacitynyquist mailing list >> Audacitynyquist@... >> https://lists.sourceforge.net/lists/listinfo/audacitynyquist >> >  > Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev > _______________________________________________ > Audacitynyquist mailing list > Audacitynyquist@... > https://lists.sourceforge.net/lists/listinfo/audacitynyquist > 
From: James Shatto <wwwshadow7@gm...>  20101026 02:13:37

Thanks. I just didn't have a clue of how you came up with 0.5..... So logbase2(1.2*1.2) returns that value. I can't quite find a logbase2 equivalent in code for nyquist 1.37, that is supposedly what audacity's nyquist is based on. But the pdf version I downloaded isn't that searchable given the "log"ical word used everywhere and stuff. At least the taskbar calculator app has that function. What a difference a day makes. With the correct width(or at least close enough), so far so good. Lots of old captures to rerender to get the full feel for it. But nice to have that little bit of high end sheen that makes it sound like less of a recording, and more like being there. Without all the oddness. Now what to do about all those crickets (and small kids) that were otherwise tamed by the HF loss from faux fur.  James On 10/25/10, Roger Dannenberg <rbd@...> wrote: > Maybe this will help. Suppose instead of 1.2, you use 8. That is, Hz/8 > for the low frequency, and Hz*8 for the high frequency. (I'm using a > really big number, 8, even though it is not a practical value.) A factor > of 8 is 3 octaves (2*2*2). So that's 3 octaves down and 3 octaves up. > The width is therefore 3+3=6. It is not 8; it is not sqrt(8) or > sqrt(8*8). 6 is logbase2(8*8). I had some more math in a previous > message, and maybe the text below will make more sense now. Roger > > On 10/25/10 3:55 PM, James Shatto wrote: >> I guess I'm not understanding this version of octaves. Simple physic >> has a string cut in half is an octave up, doubled in length is an >> octave down. My interpretation translated to Hz is Hz/2 = down an >> octave and Hz*2 = up an octave. I'm using 1.2 for pseudo octaves for >> more bands. What would be the formula for width in this case? (sqrt >> (mult 1.2 1.2)) ? Isn't that 1.2? Or is it more complex? >> >> Ultimately I'll use a loop, just keeping it simple to get the jist of >> it for now. aka SemiHuman readable. >> >> >> On 10/25/10, Roger Dannenberg<rbd@...> wrote: >>> On 10/25/10 12:40 PM, James Shatto wrote: >>>> Based on the band being frequency/width to frequency*width, that >>>> really simplified what I was trying to do. For 22ish bands the width >>>> would be 1.2ish. Which places the 22nd band up past sampling rates >>>> of 48kHz, so I don't know if that will be problematic for samples at >>>> or less than 48kHz. Most of my samples are in the 192kHz / 96kHz >>>> realm, so not a problem for me (at the moment). >>>> >>>> I'll probably want to expand it later to allow a variable width and >>>> therefor variable bands. And I'm still not entirely sure if it does >>>> exactly what I want. But it does seem to work. And with most of the >>>> desired effect. In some respects better than expected, but I've still >>>> got to run the results through the ringer. i.e. downsample the long >>>> way to maximize clarity. >>>> >>>> http://home.earthlink.net/~shadow_7/FauxFurEQ.ny >>> I took a look here: it looks like your width parameter is 1.2, but bands >>> go from freq/1.2 to freq*1.2. Your bandwidth is 1.44, but you need to >>> specify this in octaves. A ratio of 1.44 is 0.526069 octaves, so the >>> width parameter to eqband should be 0.526069. That's if you want the >>> filter response to be gain/2 at freq/1.2 and freq*1.2. You could >>> increase or decrease width to get more or less overlap. >>> >>> There's no need to write out equations for each band  you could use a >>> loop to simplify the code (or maybe that would "complexify" it by adding >>> control constructs and data structures). The nbandrange function uses a >>> loopsandarray approach to do something similar. >>> >>> Roger >>>> Feel free to set me straight if my logic is based on misunderstanding. >>>> It wouldn't be the first time. >>>> >>>>  James >>>> >>>> >>>> On 10/25/10, Roger Dannenberg<rbd@...> wrote: >>>>> On 10/25/10 5:49 AM, James Shatto wrote: >>>>>>> How would you specify the spline? >>>>>> linearly it would be (current frequency)/(max frequency)*(dB >>>>>> adjustment) = (dB adjustment) >>>>>> >>>>>> my current math is more like (current gain for frequency) = (previous >>>>>> gain for frequency) * 0.75 (over 20ish bands, going from highest to >>>>>> lowest). >>>>>> >>>>>> Which works pretty good using audacities 15 band mutiband eq and a >>>>>> value closer to 0.60. But I'm wanting something less step ladder and >>>>>> needing only one or two values (with defaults) on the effects >>>>>> initiation. >>>>>> >>>>>> Not that I know if nyquist supports it, but some sort of sin / cos arc >>>>>> averaged with the linear model to determine the depth of the arc. >>>>>> Based on the bottom right quadrant of a circle from lowest Hz to >>>>>> highest Hz. Or something like that. Perhaps some averaging to 2 line >>>>>> + 1 arc / 3 or 1 arc + 2 line / 3 type slider to tweak it. It's just >>>>>> the implementation of actually doing the eq that seems problematic >>>>>> right now. At a minimum the math for x^2+y^2=r^2 seems to be >>>>>> implemented. Where r is the max frequency, x is the current frequency >>>>>> and y the unknown would be scaled to the gain adjustment ((y/max >>>>>> frequency)*dB). But it's not that math that's got me stumped. It's >>>>>> how to use the result to affect the eq with the least issues. >>>>>> >>>>>>  James >>>>>> >>>>> OK, you could try the NBANDRANGE function. Here, I believe frequency >>>>> bands are geometrically spaced rather than linear, but you can compute >>>>> an array of gains. If you tell me whether you are using Lisp or SAL, I >>>>> think I can send a small example that computes a set of gains for >>>>> NBANDRANGE. >>>>> >>>>> (I still think for a few dB, you are better off with only a few bands, >>>>> but if you like the sound, that's the ultimate test.) >>>>> >>>>> Roger >>>  >>> Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev >>> _______________________________________________ >>> Audacitynyquist mailing list >>> Audacitynyquist@... >>> https://lists.sourceforge.net/lists/listinfo/audacitynyquist >>> >>  >> Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev >> _______________________________________________ >> Audacitynyquist mailing list >> Audacitynyquist@... >> https://lists.sourceforge.net/lists/listinfo/audacitynyquist >> > >  > Nokia and AT&T present the 2010 Calling All InnovatorsNorth 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/nokiadev2dev > _______________________________________________ > Audacitynyquist mailing list > Audacitynyquist@... > https://lists.sourceforge.net/lists/listinfo/audacitynyquist > 
From: edgar <edgarrft@we...>  20101026 07:51:25

> So logbase2(1.2*1.2) returns that value. I can't quite find a > logbase2 equivalent in code for nyquist 1.37, that is supposedly > what audacity's nyquist is based on. Audacity 1.3.xbeta is based on Nyquist 3.03, the Audacity 1.2.x code has not been updated since 2005 or similar. http://www.audacityforum.de/download/edgar/nyquist/nyquistdoc/nyquist.htm logbase2(1.2*1.2) using the XLISP logbasee function: math: log2(n) = ln(n)/ln(2) = log(n)/log(2) Nyquist/XLISP: (defun logbase2 (number) (/ (log (float number)) (log 2.0))) (logbase2 (* 1.2 1.2)) => 0.526069 Hope that helps...  edgat  The author of this email does not necessarily endorse the following advertisements, which are the sole responsibility of the advertiser: 
From: James Shatto <wwwshadow7@gm...>  20101028 21:41:29

I changed to nbandrange. Unfortunately it doesn't look like my version of audacity ships with that function. And not available in my distro either. So I had to download the nyquist sources and quite literally cut and paste it's definition into my routine. Copying grapheq.lsp straight to /usr/share/audacity/nyquist/ wasn't enough it seems. Once past that hurdle, it seems to be exactly what I needed / wanted. It would be nice to probably use nyquist directly and batch script the EQ step. The plugin is mainly to ID what values seem best suited. Somewhere near 3dB and 80% for each lower band of EQ gain. For my current project. So, any tips for file I/O howto / example with nyquist directly. To be executed from a bash prompt. And of course thanks for all your insights to help me figure this one out.  James On 10/24/10, Roger Dannenberg <rbd@...> wrote: > There's a file in nyquist/lib/grapheq.lsp that implements NBANDRANGE: > > nbandrang/e//(input/, /gains/, /lowf/, /highf/) 
From: Roger Dannenberg <rbd@cs...>  20101102 14:33:13

On 10/28/10 5:41 PM, James Shatto wrote: > I changed to nbandrange. Unfortunately it doesn't look like my > version of audacity ships with that function. And not available in my > distro either. So I had to download the nyquist sources and quite > literally cut and paste it's definition into my routine. Copying > grapheq.lsp straight to /usr/share/audacity/nyquist/ wasn't enough it > seems. Once past that hurdle, it seems to be exactly what I needed / > wanted. It would be nice to probably use nyquist directly and batch > script the EQ step. The plugin is mainly to ID what values seem best > suited. Somewhere near 3dB and 80% for each lower band of EQ gain. > For my current project. > > So, any tips for file I/O howto / example with nyquist directly. To > be executed from a bash prompt. And of course thanks for all your > insights to help me figure this one out. You can run nyquist from the command line, although for linux you'll have to download sources and build your own (there might be some packages available for some distros  I'm not sure). Also, there are some build problems for 64bit architectures I am working on (Nyquist has some dependencies on 32 bit addresses and must be compiled as a 32bit application, although this is not a problem for Intel/AMD architectures since even 64bit OS X and Linux can run 32bit applications. Anyway, assuming you have the binary (named ny), the simplest thing to do is just invoke ny in a directory with init.lsp. Nyquist will load and execute the init.lsp file and you can exit by evaluating (EXIT). Functions are all documented, but to get you started (SREAD filename) returns audio, and (SSAVE soundexpression NY:ALL filename :PLAY NIL) writes a sound to a file as fast as possible (or in real time with simultaneous playback if you leave off the :PLAY option or set it to T). >  James > > > On 10/24/10, Roger Dannenberg<rbd@...> wrote: >> There's a file in nyquist/lib/grapheq.lsp that implements NBANDRANGE: >> >> nbandrang/e//(input/, /gains/, /lowf/, /highf/) 
Sign up for the SourceForge newsletter:
No, thanks