Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Signal Processing HELP (wavread, wavwrite, fft)

36 views
Skip to first unread message

Dante

unread,
May 27, 2012, 8:16:07 PM5/27/12
to
I am currently working on a project where I have about three hours of data, and I am breaking it up into sections when I read it and plot it.

Current code:
-------------------------------------------------------------
N1=1; N2=44100;
[wave,fs]=wavread('insectuno.wav', [N1 N2]);
siz=wavread('insectuno.wav','size');
sound(wave,fs);
t=0:1/fs:(length(wave)-1)/fs;
plot(t,wave);
figure(1);
plot(t,wave);
title('Wave File');
ylabel('Amplitude');
xlabel('Length (in secs)');
n=length(wave)-1;
f=0:fs/n:fs;

wavefft=abs(fft(wave));

figure(2);
plot(f,wavefft);
xlabel('Frequency in Hz');
ylabel('Magnitude');
title('The Wave FFT');

------------------------------------------------------

Now what I want to do is separate certain sections of my plots (where the peaks are) and save them as separate .wav files.

So basically in the end I will have removed the non-relevant noises from my data, and in the separate .wav files I will have the respected noise with it's respected insect (part of my project). I'm assuming that I have to create a loop, but I'm having trouble doing that.

Any suggestions will be much appreciated!
0 new messages