sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* Extra documentation / question about stat -freq
@ 2015-03-22 20:14 Pander
  0 siblings, 0 replies; only message in thread
From: Pander @ 2015-03-22 20:14 UTC (permalink / raw)
  To: sox-devel

Hi all,

When running stat -freq, one gest a series of power spectra. The
documentation states:

"The  -freq  option  calculates  the input's power spectrum (4096 point
DFT) instead of the statistics listed above.  This should only be used
with a single channel audio file."

The implication is that it is not guaranteed that the last power
spectrum consists of a result based on 4096 points. To illustrate this,
make a 30 second recording of a 125 Hz signal with an 48kHz sample rate.
The three resulting spectra look like this:
- first https://i.imgur.com/Erk1ouN.png
- second https://i.imgur.com/78tBJpZ.png
- third and last https://i.imgur.com/oWsF7H4.png

It is clear that the last one is proper on the outline but has many
intermediate points which are not desirable.

This is of course understandable (and correct?). However, should this be
noted in the documentation as a warning to prevent wrong assumptions?

I can reproduce this almost always. With a WAV file of 487 MB the first
and one but last power spectra look like https://i.imgur.com/ePpwM1d.png
and https://i.imgur.com/NPkCSqA.png respectively but the last one is
also malformed, see https://i.imgur.com/qjrxCbr.png

When using averages over multiple power spectra, is it wise to ignore
the last one? Is there a way to calculate when the DFT fits exactly and
the last one doesn't have to be ignored? Can automatic notification this
be part of sox?

Regards,

Pander

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-22 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-22 20:14 Extra documentation / question about stat -freq Pander

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).