Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FFTSize = 4096;
- Y = wavread('zenity.wav');
- Y = Y(:,1);
- sr = 44100;
- current_window = zeros(FFTSize, 1);
- final = zeros(length(Y), 1);
- for k = 1:length(Y)/(FFTSize/2)-1
- for m = 1:FFTSize
- current_window(m, 1) = Y((k-1)*(FFTSize/2)+m, 1);
- end;
- current_window = current_window.*hamming(FFTSize);
- Ydft = fft(current_window, FFTSize);
- a = abs(Ydft);
- p = angle(Ydft);
- for kk = 30:FFTSize %not sure of this part but you can modify and get it to work from there
- a(kk,1) = 0;
- end;
- ift = ifft (a.*exp(sqrt(-1)*p), FFTSize);
- for m = 1:FFTSize
- final(m+(k-1)*(FFTSize/2), 1) = final(m+(k-1)*(FFTSize/2), 1) + ift(m);
- end;
- end;
- wavwrite(final, 44100,16,'zenityout.wav')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement