How do i silence part of wav file ?
4 views (last 30 days)
Show older comments
So i need to input star and and of a part of wav file i want to alter and then make that part silent.
>> song1 = wavread('C:\Program Files\MATLAB\AM.wav');
>> song1(44100:44100*10) = 0;
I tried this (silencing from 1 to 10 sec) but nothing happens.
Any ideas ?
0 Comments
Accepted Answer
Image Analyst
on 14 May 2014
This works for me. It blanks out some seconds:
% song1 = wavread('C:\Program Files\MATLAB\R2014a\toolbox\signal\sigdemos\guitartune.wav');
song1 = wavread('C:\Program Files\MATLAB\R2014a\toolbox\signal\sigdemos\noisymusic.wav');
fprintf('song1 is %d elements long\n', length(song1));
subplot(2,1,1);
plot(song1);
song1(44100:44100*10) = 0;
subplot(2,1,2);
plot(song1);
% sound(song1);
msgbox('Done with demo!');
0 Comments
More Answers (0)
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!