Hello everyone,
I'm doing an audio processing program.
- The user records a sound
- He does the proper processing
- He saves the new sound in the folder he wants with the name he wants.
So, what I've done is:
>> [signal,FS,NBITS]=wavread('clar.wav');>> wavwrite(signal, FS, NBITS, 'new_sound'); % saves a file with the name new_sound.wav in the current folder
>> uiputfile('.wav','Save sound','new_sound.wav');
However,
- uiputfile doesn't save the file in another folder.
- In the current folder, uiputfile doesn't save the file with another name.
This is the window it appears when I execute uiputfile. Of course it contains a new_sound.wav file because the wavwrite.
And then, I try to save it in this other folder.
I've repeated the same operation and as you can see, in the MATLAB folder it doesn't exist any new_sound.wav file.
Could you suggest me something?
——————————————————————————————————————————————
SOLUTION FROM dbp:
[i,fs,nbits]=wavread('sound.wav'); [nfname,npath]=uiputfile('.wav','Save sound','new_sound.wav'); if isequal(nfname,0) || isequal(npath,0) return % or whatever other action if 'CANCEL'
else nwavfile=fullfile(npath, nfname); wavwrite(i,fs,nbits,nwavfile); end
Thank you dbp!
Best Answer