Play last third of a wav file
2 次查看(过去 30 天)
显示 更早的评论
this is part of a question I have to create a program for, I have no code just yet, but I was wondering how to play the last part of a wav file as asked: The second WAV file will have the last Hallelujah repeated three times (and no other sound). any help for this part will get me going in the right direction thanks.
0 个评论
采纳的回答
Youssef Khmou
2013-3-26
编辑:Youssef Khmou
2013-3-26
hi, try :
sound(y(2/3:end,Fs); % with Fs the sampling frequency
% EDITED ANSWER
ok Walter is right the answer is not complete/wrong, here is the correct version :
% example :
data=load('gong.mat')
y=data.y;
Fs=data.Fs;
N=length(y);
sound(y(round(2/3*N):N),Fs); % round|ceil|floor
2 个评论
更多回答(1 个)
Image Analyst
2013-3-26
You pretty much do have code for this. It's in your other question: my code in my answer. The code just needs slight adaptation.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!