Hi,
不好意思,根据文档A1的确要反转。公式有所更新,我已经做过验证,请参考下列代码:
double f0 = 1000;
double fs = 48000;
double gain = 0;
//HP
double omega = 2d * Math.PI * f0 / fs;
double gainLinear = Math.Pow(10d, gain / 20d);
double a1 = Math.Pow(2.7, - omega);
//double b0 = gainLinear * a1;
//double b1 = -a1 * gainLinear;
double b1 = -1.0 * (1.0 + a1) * 0.5 * gainLinear;
double b0 = -b1;
Thanks,
Jun
Hi,
不好意思,根据文档A1的确要反转。公式有所更新,我已经做过验证,请参考下列代码:
double f0 = 1000;
double fs = 48000;
double gain = 0;
//HP
double omega = 2d * Math.PI * f0 / fs;
double gainLinear = Math.Pow(10d, gain / 20d);
double a1 = Math.Pow(2.7, - omega);
//double b0 = gainLinear * a1;
//double b1 = -a1 * gainLinear;
double b1 = -1.0 * (1.0 + a1) * 0.5 * gainLinear;
double b0 = -b1;
Thanks,
Jun
举报