sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* spectrogram
@ 2014-10-31 18:19 Markus Glugla
  2014-11-01 11:19 ` spectrogram Rob Sykes
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Glugla @ 2014-10-31 18:19 UTC (permalink / raw)
  To: sox-devel

Hello,

I am new on this list and I have a question.

The source code for the spectrogram includes the following line:

double dBFS = 10 * log10 ( p > magnitudes [ i ] * p-> block_norm ) ;

I'm not sure, but the product p-> magnitudes [ i ] * p-> block_norm
describes an amplitude spectrum and not a power spectrum, right?

If so, then it should be 20*log10(...) instead 10*log10(...) with an
output displayed in dBFS.

I would be grateful for an explanation, thank you.

Markus Glugla




------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: spectrogram
  2014-10-31 18:19 spectrogram Markus Glugla
@ 2014-11-01 11:19 ` Rob Sykes
  2014-11-01 11:53   ` spectrogram Markus Glugla
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Sykes @ 2014-11-01 11:19 UTC (permalink / raw)
  To: sox-devel@lists.sourceforge.net


[-- Attachment #1.1: Type: text/plain, Size: 394 bytes --]





On Friday, 31 October 2014, 18:40, Markus Glugla <markus.glugla@physik.tu-berlin.de> wrote:
 

>If so, then it should be 20*log10(...) instead 10*log10(...) with an
>output displayed in dBFS.
>
>I would be grateful for an explanation, thank you.
>
Hello Markus, this is because the magnitudes variable is not so well-named: it actually contains magnitude squared.

Cheers, Rob

[-- Attachment #1.2: Type: text/html, Size: 1531 bytes --]

[-- Attachment #2: Type: text/plain, Size: 79 bytes --]

------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: spectrogram
  2014-11-01 11:19 ` spectrogram Rob Sykes
@ 2014-11-01 11:53   ` Markus Glugla
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Glugla @ 2014-11-01 11:53 UTC (permalink / raw)
  To: sox-devel

Hello Rob,

> it actually contains magnitude squared.
Yes, thank you for the hint which opened my eyes . I have found the
place in the source code: p->magnitudes[i] += sqr(...).

Thanks to you, Rob.

Regards, Markus.





------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-01 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-31 18:19 spectrogram Markus Glugla
2014-11-01 11:19 ` spectrogram Rob Sykes
2014-11-01 11:53   ` spectrogram Markus Glugla

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).