how can I trim a wav file?
how can I trim a wav file?
(OP)
using
data = wavread('1.wav')
I basically need something that will remove any silence before the sound kicks in.
something like this :
X = 0
while data(X) < 0.1
delete data(X)
X++
I don't know much about matlab except that the help filee is really vague on whiles and you can only delet files and not information on files, so i'm very stuck on this.





RE: how can I trim a wav file?
same beginning
data = wavread('1.wav')
X = 0
y = 0
WHILE data(X) < 0.1
X++
END WHILE
WHILE data(X) != NULL
data2(Y) = data(X)
X++, Y++
END WHILE
this works better in theory i think. not sure again about how to implemeent the whiles, or the NULL
RE: how can I trim a wav file?
Y=1;
while data(X) < 0.1
X = X + 1;
end
while X < 37000
data2(Y) = data(X);
X = X + 1;
Y = Y + 1;
end
is what I have right now, i can't get the NULL thing to work, and also, the resulting data2 is arranged into columns for some reason...