Iwant to extract a 512 -sample segment of audio and use a hanning window on thesegment. Iwouldalso like to hop by 256 samples so tha each subsequent frameoverlaps the previous frameby 256 samples andstore thedft of each new frame. How would do this?

[y, fs]= wavread('low_town_groove.wav'); for i= 1:length(y)
n=[1:256]
x=n*hanning(256);
X1=fft(x,256);
x1=abs(X1);
end

Answers (1)

You can use spectrogram to do this quite easily. Otherwise you can use buffer() to divide your signal up into columns of a matrix with the specified overlap, then you just call fft() on the matrix.

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Asked:

on 19 Oct 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!