Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %Reading the file
- [y, fs] = audioread('bogis.wav');
- %Creating the vector according to which delay is varied
- a= 0.01;
- b= 0.4;
- low_n = round(a*fs);
- high_n = round(b*fs);
- delay_step = 2 /(1/fs);
- n = low_n;
- no_points = length(y(:,1));
- out_wav(:,1) = zeros(1,no_points);
- for i=1:no_points
- if(i<=2*fs)
- delay(i) = (((a*b)/2)*i) + a*fs;
- elseif(i>2*fs && i<=4*fs)
- delay(i) = (-(a-b)/2)*(i-2*fs)+b*fs;
- end
- end
- % n = i-delay;
- % if n>0
- % out_wav(i) = y(i)+y(n);
- % else
- % out_wav(i) = y(i);
- % end
- % end
- p = audioplayer(out_wav,fs);
- play(p);
- plot(out_wav);
- pause;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement