0
$\begingroup$

Let's say I have an audio waveform and I perform an STFT on the waveform and then take the absolute value to get the magnitude spectrogram.

Is there a transformation that I can make to that spectrogram that would produce the same result as taking increasing the volume of the original waveform and recomputing a magnitude spectrogram?

Is it as simple as multiplying all the bins by a constant?

$\endgroup$

1 Answer 1

2
$\begingroup$

Yes. The DFT/FFT is a linear function of the audio waveform, and taking the absolute value does not break the proportional relationship.

-k

$\endgroup$
3
  • $\begingroup$ @Luke really no need to doublecheck with a very clearly worded answer. Especially, if something is that easy to verify yourself, with pencil and paper and the very definitions. $\endgroup$ Feb 11, 2020 at 21:37
  • $\begingroup$ @MarcusMüller it might be easy to verify, but a pretty common use case of SO is to ask questions for things that are easy to verify. Just look at the top questions under the python tag. You are right that I didn't need to double-check. I was being paranoid. $\endgroup$
    – Luke
    Feb 11, 2020 at 22:54
  • $\begingroup$ I really just wanted you to feel encouraged to look these things up and do the check yourself – it's often a very satisfying feeling to be able to see a relationship arise from formulas. $\endgroup$ Feb 11, 2020 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.