Vowel synthesizer using digital resonators. This program can run without LCD display. ディジタル共振器を使った合成母音ジェネレータ.LCD表示器なしでも動く.
Dependencies: UITDSP_ADDA UIT_ACM1602NI UIT_AQM1602 mbed
Radiator.hpp
- Committer:
- MikamiUitOpen
- Date:
- 2014-12-17
- Revision:
- 4:dd2ec72068d0
- Parent:
- 0:6c67a9387981
File content as of revision 4:dd2ec72068d0:
//------------------------------------------------------------------------------ // 口からの放射の効果(ヘッダ) // 作成者:三上直樹,2013/11/26 作成,(c)三上直樹 2013 //------------------------------------------------------------------------------ #include "mbed.h" #ifndef RADIATOR_HPP #define RADIATOR_HPP namespace Mikami { class Radiator { private: const float C1_; float xnM1_; // コピー・コンストラクタの使用禁止 Radiator(const Radiator& g); // 代入演算子の使用禁止 Radiator& operator=(const Radiator& g); public: // デフォルト・コンストラクタ explicit Radiator(float c1 = 1.0f) : C1_(c1) { Clear(); } // 差分に対応する処理の実行 float Execute(float xin) { float yn = xin - C1_*xnM1_; xnM1_ = xin; // x[n-1] ← x[n] return yn; } // 内部の遅延器のクリア void Clear() { xnM1_ = 0; } }; } #endif // RADIATOR_HPP