I understand the theoretical meaning of the magnitude of a FFT from a mathematical sense. But what about when the sound audio is recorded using a PC microphone using a package like PyAudio, and FFT is calculated using Python. It seems the magnitude is unitless and the range depends on factors like sound card, number of bits used in encoding, etc.

Is it fair to say that the magnitude in this case has no meaning in an absolute sense but can be used to compare two signals?


Actually, to say the either the sound values or the DFT magnitutes are unitless (or meaningless) is quite misleading. The sound values actually represent changes in the sound pressure level at the microphone. This pressure has physical units. You can think of the microphone and A/D conversion as a "transducer" which converts the units into something else. Ideally, this conversion is linear. So the units in the sound file do have meaning, but most of the time it is not worthwhile to calibrate them to the actual physical units.

The DFT magnitudes are then in the same units, after you normalize by 1/N, where N is the sample count of your DFT. The bit depth has to do with precision, not scale.

Your conclusion is still correct, but now better founded. You can compare two signals on the resultant scale.


  • $\begingroup$ But if you use 8 bit to encode, magnitude can only go up to 255, and if you use 9 bits, it can go up to 511, so in the latter case you'll see values like 400 which wouldn't be possible in the former. Correct? So in this case how you encode it affects how big the numbers are. $\endgroup$
    – user173729
    May 9 '19 at 2:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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