How to let the user choose sections of two different WAV files and join these two sections togerther?
1 view (last 30 days)
Show older comments
Hi I am new to MATLAB and what I can do till now is play two wav files independently. But the requirement ask me to make the users choose section from each file and play independently.And what's more,combine these two sections together and play. I uses these code to choose section,but I can do nothing but play it.Can anyone tell me if there exists better solutions?
[s,fs]=audioread('hootie.wav');
handles.s=s;
handles.fs=fs;
handles.myPlayer=audioplayer(s,fs);
play(handles.myPlayer);
guidata(hObject,handles);
plot(handles.axes2,s);
[x1,y1]=ginput(1) %select the start point
[x2,y2]=ginput(1) %select the end point
soundsc(s(x1:x2),fs); %listen to the wav from start point to end point
1 Comment
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!