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
SignalProcessing/SignalProcessing.hpp@1:b3cf07371911, 2017-01-30 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Mon Jan 30 02:06:57 2017 +0000
- Revision:
- 1:b3cf07371911
- Parent:
- 0:fa74b1130cc3
2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MikamiUitOpen | 0:fa74b1130cc3 | 1 | //-------------------------------------------------------------- |
MikamiUitOpen | 0:fa74b1130cc3 | 2 | // 信号処理の抽象基底クラスおよびその派生クラスの中で簡単なクラス |
MikamiUitOpen | 0:fa74b1130cc3 | 3 | // |
MikamiUitOpen | 1:b3cf07371911 | 4 | // 2017/01/30, Copyright (c) 2017 MIKAMI, Naoki |
MikamiUitOpen | 0:fa74b1130cc3 | 5 | //-------------------------------------------------------------- |
MikamiUitOpen | 0:fa74b1130cc3 | 6 | |
MikamiUitOpen | 1:b3cf07371911 | 7 | #ifndef SIGNAL_PROSECCING_BASE_CLASS_HPP |
MikamiUitOpen | 1:b3cf07371911 | 8 | #define SIGNAL_PROSECCING_BASE_CLASS_HPP |
MikamiUitOpen | 0:fa74b1130cc3 | 9 | |
MikamiUitOpen | 0:fa74b1130cc3 | 10 | // 信号処理の抽象基底クラス |
MikamiUitOpen | 0:fa74b1130cc3 | 11 | class SignalProcessing |
MikamiUitOpen | 0:fa74b1130cc3 | 12 | { |
MikamiUitOpen | 0:fa74b1130cc3 | 13 | public: |
MikamiUitOpen | 0:fa74b1130cc3 | 14 | virtual float Execute(float xn1, float xn2) = 0; |
MikamiUitOpen | 0:fa74b1130cc3 | 15 | }; |
MikamiUitOpen | 0:fa74b1130cc3 | 16 | |
MikamiUitOpen | 1:b3cf07371911 | 17 | //--------------------------------------- |
MikamiUitOpen | 1:b3cf07371911 | 18 | // 以下は派生クラス |
MikamiUitOpen | 1:b3cf07371911 | 19 | //--------------------------------------- |
MikamiUitOpen | 1:b3cf07371911 | 20 | |
MikamiUitOpen | 0:fa74b1130cc3 | 21 | // 入力をそのまま出力する |
MikamiUitOpen | 0:fa74b1130cc3 | 22 | class Through : public SignalProcessing |
MikamiUitOpen | 0:fa74b1130cc3 | 23 | { |
MikamiUitOpen | 0:fa74b1130cc3 | 24 | public: |
MikamiUitOpen | 0:fa74b1130cc3 | 25 | virtual float Execute(float xn1, float xn2) |
MikamiUitOpen | 0:fa74b1130cc3 | 26 | { return (xn1 + xn2)*0.5f; } |
MikamiUitOpen | 0:fa74b1130cc3 | 27 | }; |
MikamiUitOpen | 0:fa74b1130cc3 | 28 | |
MikamiUitOpen | 0:fa74b1130cc3 | 29 | // ボーカルキャンセラ |
MikamiUitOpen | 0:fa74b1130cc3 | 30 | class VocalCanceller : public SignalProcessing |
MikamiUitOpen | 0:fa74b1130cc3 | 31 | { |
MikamiUitOpen | 0:fa74b1130cc3 | 32 | public: |
MikamiUitOpen | 0:fa74b1130cc3 | 33 | virtual float Execute(float xn1, float xn2) |
MikamiUitOpen | 0:fa74b1130cc3 | 34 | { return xn1 - xn2; } |
MikamiUitOpen | 0:fa74b1130cc3 | 35 | }; |
MikamiUitOpen | 1:b3cf07371911 | 36 | #endif // SIGNAL_PROSECCING_BASE_CLASS_HPP |