Basic Audio Signal Processing Library
Dependents: unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746
オーディオ信号処理用のライブラリです。
mbed-dspのフィルタ群向けに作ったクラス・ラッパーのほか、以下のクラスを用意しています。
- ヒステリシス
- sin/cosオシレータ
- リミッター
クラスは全て名前空間amakusaに含まれます。
hysteresis.h@2:fbdf03b330ae, 2017-01-21 (annotated)
- Committer:
- shorie
- Date:
- Sat Jan 21 07:16:37 2017 +0000
- Revision:
- 2:fbdf03b330ae
update with hysterisis
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shorie | 2:fbdf03b330ae | 1 | #ifndef _HYSTERESIS_H_ |
shorie | 2:fbdf03b330ae | 2 | #define _HYSTERESIS_H_ |
shorie | 2:fbdf03b330ae | 3 | |
shorie | 2:fbdf03b330ae | 4 | #include <stdint.h> |
shorie | 2:fbdf03b330ae | 5 | |
shorie | 2:fbdf03b330ae | 6 | namespace amakusa |
shorie | 2:fbdf03b330ae | 7 | { |
shorie | 2:fbdf03b330ae | 8 | /** |
shorie | 2:fbdf03b330ae | 9 | * @brief Hysteresis algorithm to the descrete input value. |
shorie | 2:fbdf03b330ae | 10 | * @details |
shorie | 2:fbdf03b330ae | 11 | * To use this class, include amakusa.h |
shorie | 2:fbdf03b330ae | 12 | */ |
shorie | 2:fbdf03b330ae | 13 | class Hysteresis |
shorie | 2:fbdf03b330ae | 14 | { |
shorie | 2:fbdf03b330ae | 15 | public: |
shorie | 2:fbdf03b330ae | 16 | /** |
shorie | 2:fbdf03b330ae | 17 | * @brief Constructor |
shorie | 2:fbdf03b330ae | 18 | * @param[in] min_input the Minumum input value for run() method. Must be smaller than INT32_MAX. |
shorie | 2:fbdf03b330ae | 19 | * @param[in] max_input the Maximum input value for run() method. Must be bigger than INT32_MIN. |
shorie | 2:fbdf03b330ae | 20 | */ |
shorie | 2:fbdf03b330ae | 21 | Hysteresis( int32_t min_input, int32_t max_input ); |
shorie | 2:fbdf03b330ae | 22 | /** |
shorie | 2:fbdf03b330ae | 23 | * @brief Run the Hysteresis algorithm |
shorie | 2:fbdf03b330ae | 24 | * @param[in] in_data A data to be applied hysteresis |
shorie | 2:fbdf03b330ae | 25 | * @returns data with hysteresis. The value range is [min_input, max_input ] of the constructor. |
shorie | 2:fbdf03b330ae | 26 | */ |
shorie | 2:fbdf03b330ae | 27 | virtual int32_t run( int32_t in_data ); |
shorie | 2:fbdf03b330ae | 28 | private: |
shorie | 2:fbdf03b330ae | 29 | int32_t last_value, min, max; |
shorie | 2:fbdf03b330ae | 30 | }; |
shorie | 2:fbdf03b330ae | 31 | |
shorie | 2:fbdf03b330ae | 32 | } |
shorie | 2:fbdf03b330ae | 33 | |
shorie | 2:fbdf03b330ae | 34 | |
shorie | 2:fbdf03b330ae | 35 | #endif |