0

In my Matlab script I'm loading an audio signal which I then want to decompose into n different sub-bands (and do different stuff with each band).

Let's, for example, assume we have a signal containing frequencies up to 1KHz which I want to divide in to n = 10 sub-bands. (0-100 Hz, 100-200 Hz,...,900-1Khz).

How would I go about achieving something like this? Is there some built-in functions in Matlab or some external Matlab-libraries that can achieve something similiar?

Nyfiken Gul
  • 654
  • 4
  • 20

1 Answers1

2

You Fourier transform the signal. You get ghost frequencies above the Nyquist frequency, which is the highest frequency you can represent using exactly half of your data points. So that gives an upper bound. The lowest frequency you can represent is DC bias.

Simply by setting all of the coefficients to zero outside the band you are interested in, you get sub-bands. You can then inverse transform to recover a real signal.

However from your post it is obvious that you don't have much experience with signals, and the sub-bands may not be what you are looking for. You have issues joining up manipulated signals if you want to transform an entire audio wave, because you have to apply the fft in windows. It's not in reality as easy as I have presented it.

Malcolm McLean
  • 6,258
  • 1
  • 17
  • 18
  • Right, the first part you mentioned comes back to me now. Yes, setting the coefficients to zero outside the band for any specific band feels very obvious, however how I actually achieve that less so. How do I go about finding the 0-100 Hz band in my FFT:ed signal, for example? – Nyfiken Gul Jun 12 '17 at 15:27
  • 1
    You need to design a medium-pass filter. Search for the term "finite impulse response filter" and the abbreviation "FIR". – Malcolm McLean Jun 12 '17 at 15:35
  • Okay, thank you - looking into some bandpass filters now - feels like a much better solution. I guess FFT:ing the signal is redundant if I manage to make a bandpass filter now, right? – Nyfiken Gul Jun 12 '17 at 15:44