I have a list of samples of a wave with all values between -1
and +1
. Those values have been read from a music file. I will now,
scipy.fftpack.rfft
)sqrt(real^2 + imag^2)
)What are the maximum values I can expect to be in this list after all of this? I would have expected the maximum power to be 1
, as the maximum amplitude in the input data is also 1
. However, this is only the case for a simple sine wave. As soon as I start doing this with real music, I get higher values.
How would I "normalize" the power to get values between 0
and 1
? Is it even possible to find out the maximum value? If not, what is the best practice to scale the results?
If you look at a DC signal 1 1 1 1
, its DFT is 4 0 0 0
.
To normalize that back into [0,1], you need to divide by 4, i.e. the number of points.