For Programmers: Free Programming Magazines  


Home > Archive > Matlab > July 2006 > adding effect to many files









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author adding effect to many files
ss

2006-07-31, 4:07 am

Hallo, All

I have a little question.
I have many WAV files wich have the same length, I need to add some effect
(noise for example) to all of them.
I need your advice how to solve this problem.
10x for any help


Peter Bone

2006-07-31, 8:03 am

Use something like
files = dir('c:/wav files');
To create a list of all the file path names. Make sure the folder contains only the wav files.
Use a 'for' loop to go through the list loading each file one at a time and modyfying it and then saving it either by overwriting with the same file name or as a new file name. You'll need to write an m file.
Loren Shure

2006-07-31, 8:03 am

ss wrote:
> Hallo, All
>
> I have a little question.
> I have many WAV files wich have the same length, I need to add some effect
> (noise for example) to all of them.
> I need your advice how to solve this problem.
> 10x for any help
>
>


myfiles = dir('*.wav');
for ind = 1:length(myfiles)
sig = wavread(myfiles(ind));
output{ind} = doSomething(sig);
end

--
--Loren
http://blogs.mathworks.com/loren/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com