cutOffFreq=100; % Cutoff freq (截止頻率) filterOrder=5; % Order of filter (濾波器的階數) au=myAudioRead('wubai_solicitude.wav'); [b, a]=butter(filterOrder, cutOffFreq/(au.fs/2), 'low'); au.signal=au.signal(60*au.fs:90*au.fs); % 30 seconds of singing (30 秒歌聲) y=filter(b, a, au.signal); % ====== Plotting (畫圖) time=(1:length(au.signal))/au.fs; subplot(2,1,1); plot(time, au.signal); subplot(2,1,2); plot(time, y); % ====== Save wav files (存檔) myAudioWrite(au, 'wubai_solicitude_orig.wav'); au.signal=y; myAudioWrite(au, sprintf('wubai_solicitude_%d.wav', cutOffFreq));