This preview shows page 1. Sign up to view the full content.
Unformatted text preview: %determines the new duration if newdur > duration2 %checks to see if the desired duration is longer or shorter than the %new duration change = round((newdur - duration2).*sf); %determines the length of the change vector newlength = zeros(change,1); %creates the silence vector vecamp = [amp;newlength]; %concatenates the silence vector else change = round(newdur.*sf); %if the desired length is shorter than the new length then part of the %sound will not be played vecamp = [amp(1:change)]; %cuts of the undesired sound end end...
View Full Document
- Spring '08