Demo program of digital signal processing: Variable LPF/HPF, Vocal canceller, Pitch shifter, Reverbrator. ディジタル信号処理のデモプログラム. 遮断周波数可変 LPF/HPF,ボーカルキャンセラ,ピッチシフタ,残響生成器.
Dependencies: Array_Matrix F446_AD_DA UIT_AQM1602 mbed
Diff: SignalProcessing/VariableLpHp.hpp
- Revision:
- 4:2f06a5893e4a
- Parent:
- 0:fa74b1130cc3
- Child:
- 5:503bd366fd73
--- a/SignalProcessing/VariableLpHp.hpp Mon Jan 30 08:18:25 2017 +0000 +++ b/SignalProcessing/VariableLpHp.hpp Mon Jan 30 13:58:11 2017 +0000 @@ -1,7 +1,7 @@ //-------------------------------------------------------------- // 遮断周波数可変フィルタ,LPF と HPF // -// 2017/01/26, Copyright (c) 2017 MIKAMI, Naoki +// 2017/01/30, Copyright (c) 2017 MIKAMI, Naoki //-------------------------------------------------------------- #ifndef VARIABLE_LOWPASS_HIGHPASS_FILTER_HPP @@ -28,12 +28,8 @@ float g0; designer_.Execute(fc, passBand, coefs_, g0); for (int n=0; n<ORDER2_; n++) - { - coefsIir_[n].a1 = coefs_[n].a1; - coefsIir_[n].a2 = coefs_[n].a2; - coefsIir_[n].b1 = coefs_[n].b1; - coefsIir_[n].b2 = 1.0f; - } + coefsIir_[n] = *(Biquad::Coefs *)&coefs_[n]; + filter_.SetCoefs(g0, coefsIir_); filter_.Clear(); } @@ -47,4 +43,4 @@ BilinearDesign designer_; IirCascade filter_; }; -#endif // VARIABLE_LOWPASS_HIGHPASS_FILTER_HPP \ No newline at end of file +#endif // VARIABLE_LOWPASS_HIGHPASS_FILTER_HPP