Realtime sound spectrogram using FFT or linear prediction. Spectrogram is displayed on the display of PC. リアルタイム・スペクトログラム.解析の手法:FFT,線形予測法.スペクトログラムは PC のディスプレー装置に表示される.PC 側のプログラム:F446_Spectrogram.

Dependencies:   Array_Matrix mbed SerialTxRxIntr F446_AD_DA UIT_FFT_Real

Revision:
0:a539141b9dec
diff -r 000000000000 -r a539141b9dec MySpectrogram/LPC_Analyzer.hpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MySpectrogram/LPC_Analyzer.hpp	Fri Feb 17 04:55:10 2017 +0000
@@ -0,0 +1,36 @@
+//---------------------------------------------------------------
+//  Class for spectrum analysis using linear prediction (Header)
+//
+//  2017/02/11, Copyright (c) 2017 MIKAMI, Naoki
+//---------------------------------------------------------------
+
+#ifndef LPC_ANALYZER_HPP
+#define LPC_ANALYZER_HPP
+
+#include "AnalyzerBase.hpp"
+#include "LinearPrediction.hpp"
+
+namespace Mikami
+{
+    class LpcAnalyzer : public AnalyzerBase
+    {
+    public:
+        LpcAnalyzer(int nData, int nFft, int order);
+        virtual ~LpcAnalyzer() {}
+        
+    private:
+        int order_;
+        LinearPred lp_;
+
+        Array<float> an_;       // predictor coefficient 
+        Array<float> xFft_;     // input for FFT
+        Array<Complex> yFft_;   // output of FFT
+
+        virtual void Analyze(const float xn[], float yn[]);
+
+        // disallow copy constructor and assignment operator
+        LpcAnalyzer(const LpcAnalyzer& );
+        LpcAnalyzer& operator=(const LpcAnalyzer& );
+    };
+}
+#endif  // LPC_ANALYZER_HPP