Discussion:
[linux-audio-dev] JAAA Bandw parameter
Andrew Gaydenko
2004-12-12 03:54:46 UTC
Permalink
Hi,

1. Can anybody explain me (I think, Fons Adriaensen can :-) the
JAAA "Bandw" parameter meaning?

2. When Bandw parameter is rather small, I see two spectrums - main (blue)
and, below the first, - the second one (gray). What is the last spectre spectrum
meaning?

Andrew
Fons Adriaensen
2004-12-12 10:20:57 UTC
Permalink
Post by Andrew Gaydenko
1. Can anybody explain me (I think, Fons Adriaensen can :-) the
JAAA "Bandw" parameter meaning?
The bandwidth determines how much detail you see on the frequency scale.
If you have a small bandwidth, you will be able to separate two signals that are
very close together in frequency, while for a larger bandwidth they will merge into
a single peak. So why not use a very small bandwidth all the time ? The reason is
that small bandwidth requires a longer FFT, and you will see less detail in time.
So there is a tradeoff to be made between resolution in time and in frequency.
Post by Andrew Gaydenko
2. When Bandw parameter is rather small, I see two spectrums - main (blue)
and, below the first, - the second one (gray). What is the last spectre spectrum
meaning?
Andrew Gaydenko
2004-12-12 12:04:31 UTC
Permalink
Thanks! I'll try to say the same from user point of view :-)

So, if I understand well, gray drawing is some kind of noise filtering
which is possible when analysis takes place some period of time.

In othe words, a card SNR is blue, as our ears do not integrate a
sound during such long period of time. But for more o less constant
noise spectrum (which is true for any card), noise integration alow
us to expand measurement range (about 20db in my case) - gray spectrum.

Andrew

======= On Sunday 12 December 2004 13:20, Fons Adriaensen wrote: =======
Post by Andrew Gaydenko
1. Can anybody explain me (I think, Fons Adriaensen can :-) the
JAAA "Bandw" parameter meaning?
The bandwidth determines how much detail you see on the frequency scale.
If you have a small bandwidth, you will be able to separate two signals that are
very close together in frequency, while for a larger bandwidth they will merge into
a single peak. So why not use a very small bandwidth all the time ? The reason is
that small bandwidth requires a longer FFT, and you will see less detail in time.
So there is a tradeoff to be made between resolution in time and in frequency.
Post by Andrew Gaydenko
2. When Bandw parameter is rather small, I see two spectrums - main (blue)
and, below the first, - the second one (gray). What is the last spectre spectrum
meaning?
Fons Adriaensen
2004-12-12 14:05:54 UTC
Permalink
Post by Andrew Gaydenko
So, if I understand well, gray drawing is some kind of noise filtering
which is possible when analysis takes place some period of time.
In othe words, a card SNR is blue, as our ears do not integrate a
sound during such long period of time. But for more o less constant
noise spectrum (which is true for any card), noise integration alow
us to expand measurement range (about 20db in my case) - gray spectrum.
No, this is not correct. The difference between the two traces has
nothing to do with averaging over time. There is nothing magical about
it - it's just an artefact of the limitied display resolution.

In case the combination of bandwidth, display range and display size
is such that there is more than one measurement per displayed pixel,
the blue trace is the maximum over the frequency range represented
by a pixel, and the gray one is the average over the same range.

An example should make this clear.

Suppose the sample frequency is 48 kHz, and the FFT length is 4096.
The FFT will give a measurement every 48000 / 4096 = 11.72 Hz.
JAAA interpolates the spectrum at half the FFT step, so we really
have a measurement every 11.72 / 2 = 5.86 Hz.

If we display the full range of 0..24 kHz, and the picture is 500
pixels wide, then each pixel represents 24000 / 500 = 48 Hz.

So there are 48 / 5.86 = 8.2 measurements per pixel. In this case
each pixel will represent 8 or 9 measurements. The blue line shows
the maximum of these 8 or 9 values, and the gray trace the average.

The two traces are displayed because you need them both, depending
on what you want to measure. An analog spectrum analyser would
show a wide band, with the average somewhere near the middle. This
can be done as well, but the current method provides a more accurate
display.

The Video Average function (VidAv) does averaging over time. This
reduces the variation for noise signals, so they can be read and
measured more accurately. The reduced variation also means that
peak and average value will come closer, as you can see on the
traces.

To measure the SNR of your card:

- Disconnect all input signals.
- Set the display range so you can see the noise. This spectrum
should be flat, except at the lowest frequencies.
- Switch on the VidAv function and put a noise marker in the
flat part of the spectrum.
- Read the noise density value, No, in the upper left corner.

Now compute -(No + 10 * log10 (Fsample / 2)), this is the SNR.

Example: you read No = -130 dB/Hz, and the sample frequency is
48 kHz. 10 * log10 (24 kHz) = 43.8 dBHz, so the SNR is
-(-130 + 43.8) = 86.2 dB.

This assumes the noise spectrum is flat. If it isn't you need to
integrate No over the frequency range. Future versions of JAAA will
probably contain a function to do this, together with A-weigthing.
--
FA
Andrew Gaydenko
2004-12-12 18:03:32 UTC
Permalink
Probably, the last questions today :-)

1. What is the meaning of the "10 * log10 (Fsample / 2)" part?

2. When noise spectrum is approximately flat - is there
a common correlation with A-weighted value (say, "about 10db")?

Andrew

======= On Sunday 12 December 2004 17:05, Fons Adriaensen wrote: =======
Post by Andrew Gaydenko
In othe words, a card SNR is blue, as our ears do not integrate a
sound during such long period of time. But for more o less constant
noise spectrum (which is true for any card), noise integration alow
us to expand measurement range (about 20db in my case) - gray spectrum.
...
To measure the SNR of your card:

- Disconnect all input signals.
- Set the display range so you can see the noise. This spectrum
should be flat, except at the lowest frequencies.
- Switch on the VidAv function and put a noise marker in the
flat part of the spectrum.
- Read the noise density value, No, in the upper left corner.

Now compute -(No + 10 * log10 (Fsample / 2)), this is the SNR.

Example: you read No = -130 dB/Hz, and the sample frequency is
48 kHz. 10 * log10 (24 kHz) = 43.8 dBHz, so the SNR is
-(-130 + 43.8) = 86.2 dB.

This assumes the noise spectrum is flat. If it isn't you need to
integrate No over the frequency range. Future versions of JAAA will
probably contain a function to do this, together with A-weigthing.
--
FA
Fons Adriaensen
2004-12-12 21:18:33 UTC
Permalink
Post by Andrew Gaydenko
Probably, the last questions today :-)
1. What is the meaning of the "10 * log10 (Fsample / 2)" part?
It's just the frequency range expressed in dB.

No = noise density = power per Hertz.
No * frequency_range = noise_power.

In dB, the multiply becomes an addition.
And since the maximum signal level is O dB, SNR = -noise_power.
Post by Andrew Gaydenko
2. When noise spectrum is approximately flat - is there
a common correlation with A-weighted value (say, "about 10db")?
I have no exact value at hand, but yes, it will be something like
10 dB. Most manufacturers of sound cards give the A-weighted figure
(if anything at all) -- it looks better :-)
--
FA
Andrew Gaydenko
2004-12-12 22:30:10 UTC
Permalink
Thanks for all today lessons!

Andrew

======= On Monday 13 December 2004 00:18, Fons Adriaensen wrote: =======
Post by Andrew Gaydenko
Probably, the last questions today :-)
1. What is the meaning of the "10 * log10 (Fsample / 2)" part?
It's just the frequency range expressed in dB.

No = noise density = power per Hertz.
No * frequency_range = noise_power.

In dB, the multiply becomes an addition.
And since the maximum signal level is O dB, SNR = -noise_power.
Post by Andrew Gaydenko
2. When noise spectrum is approximately flat - is there
a common correlation with A-weighted value (say, "about 10db")?
I have no exact value at hand, but yes, it will be something like
10 dB. Most manufacturers of sound cards give the A-weighted figure
(if anything at all) -- it looks better :-)
--
FA
Loading...