Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.31 KB | None | 0 0
  1. [y, Fs] = audioread('C:\Users\Public\Music\Sample Music\Kalimba.mp3');
  2.  
  3. y = y(5e3:60e3, :);
  4.  
  5. M = 147;
  6. K = 160;
  7. N = 24*M - 1;
  8.  
  9. h = fir1(N, 1/M, kaiser(N+1,7.8562));
  10. h = h';
  11.  
  12. upSampled = upsample(y, K);
  13.  
  14. t = filter(h,1,upSampled(:,1));
  15.  
  16. downSampled = downsample(t,M);
  17.  
  18. sound  ( 100*downSampled, 48000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement