[LAU] Frequency-response analyzer for Linux?

Ken Restivo ken at restivo.org
Sat Jul 18 13:27:22 EDT 2009


On Sat, Jul 18, 2009 at 01:46:59PM +0200, Fons Adriaensen wrote:
> On Fri, Jul 17, 2009 at 07:18:30PM -0700, Ken Restivo wrote:
> 
> > The white noise was similarly not flat:
> > http://restivo.org/misc/white.png
> 
> To get a flat trace for pink noise, you have to
> set the 'Resp' (response) control at the bottom
> to 'Prop' (proportional). 
> 
> To understand what's happening here you need to
> grok the following.
> 
> A spectrum analyser uses a set of bandpass filters
> to measure signal levels at different frequencies
> (the implementation maybe different, but the basic
> idea is set of filters).
> 
> There are two well-known types: 
> 
> - A 'linear scale' analyser uses a set of filters
> with a constant _difference_ of center frequency 
> between adjacent filters, and all filters have the
> same bandwidth. This is what you get using a simple
> FFT, as used for example in Jaaa.
> 
> - A 'logarithmic scale' analyser uses a set of filters
> with a constant _ratio_ of center frequency between
> adjacent filters, and the bandwidth of each filter is
> proportional to center frequency. This is the case e.g.
> for a 1/3 octave analyser.
> 
> Now assume that you design each analyser so it will 
> indicate the correct level for a sine tone at the 
> exact center frequency of one of the filters.
> 
> Then the two types of analyser will react differently
> to noise.
> 
> The 'linear' one will indicate a flat spectrum for
> white noise, and a slope of -3dB/octave for pink.
> 
> The 'logarithmic' analyser will indicate a flat
> spectrum for pink noise, and a slope of +3dB/oct
> for white.
> 
> The analyser used in Japa is neither linear nor
> logarithmic. It uses a 'warped' frequency scale
> that is adapted to human hearing. You can see the
> scale if you set the 'Scale' control (bottom) to
> 'Warp'. With this setting, each filter corresponds
> to the same width on the screen.
> 
> The 'Warp' control (right) will select on of three
> 'warp factors'. The first and default one called
> 'Bark' corresponds closely to the so-called 'Bark
> scale' used in psycho-acoustics (there's no relation
> to dog sounds).
> 
> Since Japa is neither 'lin' nor 'log', it will
> normally not display a flat spectrum for either
> white or pink noise. Setting the 'Resp' control
> to 'Prop' will adjust the filter gains so you
> get a flat trace for pink noise. This setting is
> for _noise_ measurements only, it will produce
> wrong results for sine tones. For these use
> the 'Flat' setting.
> 
> Measuring FR using noise can be difficult since
> noise by its very nature is random, and you have
> to select a slow analyser response to get any
> accurate readings. 
> 
> Japa allows to use a trick to make this more
> practical:
> 
> Connect the pink noise out to the app to be
> measured, _and_ to one of Japa's own inputs.
> Connect the output of the tested app to one
> of the other Japa inputs.
> 
> Now select the app's out on channel A, and the
> noise loopback on channel B, and set the display
> to 'A/B'. The resulting trace is the difference
> (in dB) of the two signals and it will move a
> lot less since most of the randomness cancels.
> Since we are using a relative measurement, the
> 'Resp' setting doesn't matter in this case.
> 

Awesome! That's an excellent tutorial, and your instructions worked perfectly.

I did the following:

japa -J &
sleep 10
jack-rack -s testing &
sleep 10
jack_connect jack_rack_testing:out_1 japa:in_1
jack_connect japa:pink jack_rack_testing:in_1
jack_connect japa:pink japa:in_2


And it turns out that your wonderful Moog filter indeed looks pretty close to characteristics I need for the Wah pedal.

http://restivo.org/misc/japa-moog.png

Thanks for writing a great tool, a great tutorial, and a great filter!

-ken



More information about the Linux-audio-user mailing list