Basic Audio Signal Processing Library

Dependents:   unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746

オーディオ信号処理用のライブラリです。

mbed-dspのフィルタ群向けに作ったクラス・ラッパーのほか、以下のクラスを用意しています。

  • ヒステリシス
  • sin/cosオシレータ
  • リミッター

クラスは全て名前空間amakusaに含まれます。

Revision:
1:0a37bce4f985
Child:
5:3d6cf4dbf458
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/biquadcascadedf1.h	Mon Jan 02 11:04:49 2017 +0000
@@ -0,0 +1,51 @@
+#ifndef _BIQUADCASCADEDF1_H_
+#define _BIQUADCASCADEDF1_H_
+
+#include "abstractfilter.h"
+namespace amakusa
+{
+/**
+* @brief Wrapper class of the arm_biquad_cascade_df1_f32() and the arm_biquad_cascade_df1_init_f32().
+* @details
+* To use this class, include amakusa.h
+*
+* The biquad filter is depicted as following. The pCoeff array has b0, b1, b2, a1, a2 parameter
+* by this order. If the stage is N, N blockes of these parameers are given. The length of pCoeff
+* is 5N. 
+* @code
+x[n]---+-- b0 -->+---------+---y[n]
+       |         ^         |
+       D         |         |
+       +-- b1 -->+<-- a1 --+
+       D         |         |
+       +-- b2 -->+<-- a2 --+
+* @endcode
+*/
+    class BiQuadCascadeDF1 : public AbstractFilter
+    {
+    public:
+            /**
+            * @brief Constructor
+            * @param[in] stages Number of the Bi-Quad stages. 
+            * @param[in] pCoeff Ponter to the coefficients array.
+            * @param[in] blockSize Maximum number of the samples to be given to run() method at onece. 
+            */
+        BiQuadCascadeDF1(uint16_t stages, float32_t *pCoeff, uint32_t blockSize);
+            /**
+            * deconstructor
+            */
+        virtual ~BiQuadCascadeDF1();
+            /**
+            * @brief Run the filter.
+            * @param[in] pSrc Pointer to the source buffer to be filtered.
+            * @param[out] pDst Pointer to the destination buffer to store the filtered signal. 
+            * @param[in] blockSize Number of the sample to be filitered. If skipped or zero, blockSize is assmued the one passed to the constructor. 
+            */
+        virtual void run( float32_t *pSrc, float32_t *pDst, uint32_t blockSize = 0 );
+    private:
+        arm_biquad_casd_df1_inst_f32 state;
+    };
+    
+}
+
+#endif
\ No newline at end of file