On Fri, Aug 31, 2012 at 6:40 PM, Paul Davis <paul(a)linuxaudiosystems.com>wrote;wrote:
On Fri, Aug 31, 2012 at 11:26 AM, Chris Bannister
<
cbannister(a)slingshot.co.nz> wrote:
On Mon, Aug 27, 2012 at 10:54:28PM -0600, Bearcat
M. Şándor wrote:
Folks,
Is there a Linux program out there that i can throw a wave file at that
will tell me what the lowest and highest frequencies are in it, where
they are and at what dB they occur?
Do you mean dBm? dB is a ratio.
dbFS probably, since its digital (sample value == 0 => 0 dbFS)
If we really start to look at the details of this question, the dB issue is
the least of concerns, but let's look at that first:
Paul probably meant sample value 1.0 to be 0 dBFS. That is a clear and good
definition for sample values, but powers (RMS), are not that simple: Some
like to keep things a simple and just treat the signal and power levels
equally, giving a full scale square wave the power of 0 dB. However, this
leads to the fact that a sine wave (and thus also an isolated frequency)
can have a power of -3 dB at the maximum. Some like to make things a bit
more complicated, and define power dB relative to the power of a full scale
sine wave.
However, the biggest problem in the question is that it doesn't consider
the time-frequency uncertainty, and the fundamental nature of time limited
signals (a time limited signal can't be band limited).
You can not measure frequencies whose period is shorter than the
measurement data. That means that you can't measure the power at 1Hz with a
resolution better than one second. This means that the "where they are"
part of the question is not well defined.
If you take one sample from the signal, and analyse that, you'll just have
an impulse. And an impulse has equal power at frequencies from 0 to
nyquist. The problem we see here will manifest itself with any time limited
signal, you will have some "leak" which will spread all across the
spectrum. This means the "lowest and highest" part of the question doesn't
make sense: it will always be from zero (or the lowest bin) to nyquist.
What you can do, is use a tool like Sonic Visualiser to look at the
spectrogram of the piece (with long overlapping analysis windows). Playing
around with the analysis settings should also teach you about the
time-frequency uncertainty I discussed above, in a rather interactive way.
It also includes nice stuff like peak frequency plotting, certainly worth a
look at.
-Sakari-