![]() |
【求助】如何处理分析音乐信号?????
[SIZE="5"]我这里有一个滤波器的程序,我想问一下如何利用这个程序对一段实录的音乐信号进行滤波处理?????????????????[/SIZE]
N=input('窗宽度N='); k=input('窗型:1.矩形窗,2.汉宁窗,3.汉明窗:'); subplot(2,2,1); w=pi/3; a=(N-1)/2; n=0:(N-1); m=n-a+eps; hd=sin(w*m)/(pi*m); if k==1 B=boxcar(N); else if k==2 B=hanning(N); else if k==3 B=hamming(N); end end end h=hd*B; stem(n,h,'.'); xlabel('n'); ylabel('h(n)'); title('在窗函数下的N=10时h(n)函数'); subplot(2,2,2); [H,w]=freqz(h,[1],1024); mag=abs(H); db=20*log10((mag+eps)/max(mag)); plot(w/pi,db); xlabel('w/п'); ylabel('20log[H(ejw)]'); title('h(n)的幅频特性'); grid; pha=angle(H); subplot(2,2,3); plot(w,pha); xlabel('n'); ylabel('φ'); title('h(n)的相频特性'); subplot(2,2,4); plot(w,mag); xlabel('w'); ylabel('H(ejw)'); title('h(n)的幅频特性'); |
所有时间均为北京时间。现在的时间是 09:50。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.