On Fri, Aug 31, 2012 at 6:40 PM, Paul Davis <span dir="ltr"><<a href="mailto:paul@linuxaudiosystems.com" target="_blank">paul@linuxaudiosystems.com</a>></span> wrote:<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On Fri, Aug 31, 2012 at 11:26 AM, Chris Bannister <span dir="ltr"><<a href="mailto:cbannister@slingshot.co.nz" target="_blank">cbannister@slingshot.co.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>On Mon, Aug 27, 2012 at 10:54:28PM -0600, Bearcat M. Şándor wrote:<br>
> Folks,<br>
><br>
> Is there a Linux program out there that i can throw a wave file at that<br>
> will tell me what the lowest and highest frequencies are in it, where<br>
> they are and at what dB they occur?<br>
<br>
</div>Do you mean dBm? dB is a ratio.<br></blockquote></div><div><br>dbFS probably, since its digital (sample value == 0 => 0 dbFS)<br></div></div>

<br></blockquote></div><br><div>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:</div><div><br></div><div>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.</div>
<div><br></div><div>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). </div>
<div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>-Sakari-</div>