matlab諧波生成方法


常見的諧波生成公式有:

參看論文:
1.PERCEPTUALLY-MOTIVATED OBJECTIVE GRADING OF NONLINEAR PROCESSING IN VIRTUAL BASS SYSTEMS
2.Harmonic and Intermodulation Analysis of Nonlinear Devices Used in Virtual Bass Systems
具體的matlab代碼為
function Ha = calculate_harmonics()
[d , sr] = wavread('110hz.wav');
% full-wave rectifier NLD transfer function , y = |x|
y = abs(d);
% 論文中的公式
y_poly = 1.307 * d.^6 - 2.6593 * d.^4 + 2.2781 * d.^2 + 0.0838;
% soft clipping y = x/(K|x|+1),K=1
K = 1;
y_soft = d./(K
abs(d)+1);
function my_plot(data)
N = length(data);
xdft = fft(data);
xdft = xdft(1:N/2+1);
freq = 0:sr/N:sr/2;
plot(freq, (2/N)*abs(xdft))
end
subplot(411)
my_plot(d)
subplot(412)
my_plot(y)
subplot(413)
my_plot(y_poly)
subplot(414)
my_plot(y_soft)
end
測試結果為


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM