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

Committer:
shorie
Date:
2017-02-18
Revision:
8:1fa224c83cfa
Parent:
2:fbdf03b330ae

File content as of revision 8:1fa224c83cfa:

#ifndef _HYSTERESIS_H_
#define _HYSTERESIS_H_

#include <stdint.h>

namespace amakusa
{
/**
* @brief Hysteresis algorithm to the descrete input value. 
* @details
* To use this class, include amakusa.h
*/
    class Hysteresis
    {
    public:
            /**
            * @brief Constructor
            * @param[in] min_input the Minumum input value for run() method. Must be smaller than INT32_MAX.
            * @param[in] max_input the Maximum input value for run() method. Must be bigger than INT32_MIN.
            */
        Hysteresis( int32_t min_input, int32_t max_input );
            /**
            * @brief Run the Hysteresis algorithm
            * @param[in] in_data A data to be applied hysteresis
            * @returns data with hysteresis. The value range is [min_input, max_input ] of the constructor. 
            */
        virtual int32_t run( int32_t in_data  );
    private:
        int32_t last_value, min, max;
    };
    
}


#endif