asdfa.txt
上传用户:abcwxk
上传日期:2016-05-20
资源大小:434k
文件大小:1k
源码类别:

midi

开发平台:

Visual C++

  1. figure(1)
  2. plot(data_in_window)
  3. figure(2)
  4. plot(correlation_of_window)
  5. figure(3)
  6. plot(diff1)
  7. figure(4);
  8. plot(correlation_of_window(2:end));hold on
  9. plot(correlation_of_window( 1 : (length(correlation_of_window)-1) ));hold off;
  10. figure(5)
  11. plot(diff2)
  12. [y,fs]=wavread('c:hum测试数据2完美生活_歌词.wav');
  13. load h;
  14. yf=filter(h,1,y);
  15. %----------无LP----------
  16. pitch = Pitch_Detection_Autocorrelation(y,fs,30,20);
  17. t=0:0.02:(length(pitch)-1)*0.02;
  18. figure;plot(t,pitch);
  19. title('La noLP 4430');
  20. title('La noLP 70-1000');
  21. %------------------------
  22. %----------LP1000----------
  23. pitch = Pitch_Detection_Autocorrelation(yf,fs,30,20);
  24. t=0:0.02:(length(pitch)-1)*0.02;
  25. figure;plot(t,pitch);
  26. title('La LP1000 4430');
  27. title('La LP1000 70-1000');
  28. %------------------------
  29. %-------中值滤波---------
  30. mm=zeros(length(pitch)-4,1);
  31. for i=1:(length(pitch)-4)
  32.     mm(i)=median(pitch(i:(i+4)));
  33. end
  34. figure;plot(mm);
  35. title('La LP1000 4430 Median');
  36. title('La LP1000 70-1000 Median');
  37. title('La noLP 4430 Median');
  38. title('La noLP 70-1000 Median');
  39. %------------------------
  40. pitch = Pitch_Detection_Autocorrelation(yf,fs,30,20);
  41. figure;plot(t,pitch);
  42. title(' 无LP ');
  43. title('LP1000')
  44. mm=zeros(length(pitch_h)-4,1);
  45. for i=1:(length(pitch_h)-4)
  46.     mm(i)=median(pitch_h(i:(i+4)));
  47. end