This question is in two parts, both related in some way or another.
Suppose I have a signal where the sample rate is 44100 and compute a normal 1D DFT on this signal. The size of this signal is 220500. I need to compute the Hertz for the outputted DFT.
I calculate the bins using the formula below:
sqrt(output[i].re * output[i]. re + output[i].im * output[i].im)
I then find the maximum number in this vector and compute the following:
freq = max * 44100 / fft.size()
This then gives me a result of: 4526.84
I don't know, something seems to be wrong here, the duration of the file is
0:05 is this result expected or unexpected? I'm sure I need to take into account the number of seconds, but I was lead to believe that the resulting answer should be that of the sample rate (44100)
Let's suppose I've computed a STFT of this signal of size 256 with an overlap of 128, let's suppose I want to calculate the frequency of each of these segments, or, parts, since this will now effectively be a 2D vector. Do I therefore need to calculate this using the formula above, where the FFT size in this case will infact be 256.
Any help would be greatly appreciated :)