Basic Audio Signal Processing Library
Dependents: unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746
オーディオ信号処理用のライブラリです。
mbed-dspのフィルタ群向けに作ったクラス・ラッパーのほか、以下のクラスを用意しています。
- ヒステリシス
- sin/cosオシレータ
- リミッター
クラスは全て名前空間amakusaに含まれます。
oscsincos.h
- Committer:
- shorie
- Date:
- 2016-12-11
- Revision:
- 0:058daa59980d
- Child:
- 2:fbdf03b330ae
File content as of revision 0:058daa59980d:
namespace amakusa { /** * \brief Sine & Cosine Oscillator */ class OSCSinCos { public: /** * \brief constructor * \param freq Frequency in Hz. * \param Fs Sampling frequency in Hz. */ OSCSinCos( float freq, int Fs ); /** * \brief wave generator method * \param c Pointer to the buffer to output the sine signal. * \param s Pointer to the buffer to output the cosine singal. If NULL, cosine signal will be skipped. * \params count Number of sample to be generated. */ void run( float *s, float *c , int count ); /** * \brief wave generator method * \param c Pointer to the buffer to output the sine signal. * \params count Number of sample to be generated. */ void run( float *s, int count ){run(s, 0, count);} /** * \brief set the oscillation furequncy. * \param freq Frequency in Hz. */ void setFrequency( float freq ); /** * \brief set the oscillator's internal phase * \param freq phase in radian. */ void setPhase( float phase ); /** * \brief get the oscillation furequncy. * \returns Frequency in Hz. */ float getFrequency(); /** * \brief get the internal phase * \returns Phase in radian */ float getPhase(); private: float deltaPhase; // deltaPhase per sample. int sampleFreq; // in Hz int phaseInSample; // internal phase [sample] }; }