1
$\begingroup$

In theory I have 3 axis: time, frequency and amplitude (which is scaled in by $20\log$). I have an audio signal. I noticed that I have very high amplitudes in the range of $1$-$1000$ $\mathrm{Hz}$. So I made 3 frequency bands: $y_{low}$, $y_{medium}$ and $y_{high}$, where $y$ refers to the signal and the subindex to the frequency band.

Now I defined a frequency vector for my bands:

LOW = 1:200
MEDIUM = 201:600
HIGH = 601:1000

Afterwards I wanted to know the values of my bin, depending on the frequency band. Basically y_LOW/4096 --> (fft points). Now I did an arithmetic mean with the values of my bins, which is saved in a single variable. Before that happens, I am doing a STFT. So, a spectrum is shown every $50 \ \mathrm{ms}$. I want to plot my 3 values (since I have 3 frequency bands) every $50 \ \mathrm{ms}$. The values should be shown as a point or something similar.

If the code is required, I can post it.

$\endgroup$

closed as unclear what you're asking by A_A, MBaz, Laurent Duval, Matt L., Peter K. Jan 29 '17 at 18:59

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Can you please edit your question for clarity? What is described is not 3D FFT but typical STFT, it sounds like what you are after is an alternative way at visualising a spectrogram (?) $\endgroup$ – A_A Jan 25 '17 at 14:38
  • $\begingroup$ @A_A My bad, i wasnt sure if its called something like that. But thanks for pointing it out. $\endgroup$ – user26149 Jan 25 '17 at 15:47
  • $\begingroup$ But yes, as you mentioned, i am trying to find a another way, how to visualise my spectogram. $\endgroup$ – user26150 Jan 25 '17 at 15:50
  • $\begingroup$ Once you know the bins corresponding to the frequency bands(y_low, medium and high) for every 50 ms, you just take arithmetic mean of required bins for corresponding frequency bands. so you end up having three values per 50 ms of audio, plotting these three values per 50 ms for entire audio is what needed ? or I understood it wrong. $\endgroup$ – arpit jain Jan 27 '17 at 5:18
  • $\begingroup$ Welcome to SP.SE! It's not clear to me what your question is? $\endgroup$ – Peter K. Jan 29 '17 at 18:59
0
$\begingroup$

Instead of calculating the STFT, you could just implement a 3 band filter bank as shown in the image below.

enter image description here

Your input signal x[n] could then be broken into 3 subbands: x0[n], x1[n], x2[n] which contain the energy associated with each frequency range. You could then feed each individual signal into an accumulator block in which the output would be the sum of the last x number of points. Or in you case, the x number of points that occurred in 50 ms. This would give you a single number in which you could map to some visualization output. You could implement normalization factors however you would like.

All you would have to do is define the filters H0, H1, and H2 as bandpass filters corresponding to your desired cutoff frequencies.

$\endgroup$

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