Version using MEMS microphone and CODEC for the program "F746_RealtimeSpectrumAnalyzer". "F746_RealtimeSpectrumAnalyzer" の入力を MEMS のマイクと CODEC に変更.このプログラムは Tomona Nanase さんが作成し DISCO-F746NG_Oscilloscope の名前で登録しているプログラムで, CODEC を使って入力する部分を参考にして作成.このプログラムの説明は,CQ出版社のインターフェース誌,2016年4月号に掲載.
Dependencies: BSP_DISCO_F746NG BUTTON_GROUP LCD_DISCO_F746NG TS_DISCO_F746NG UIT_FFT_Real mbed
LinearPrediction.hpp
00001 //----------------------------------------------------- 00002 // Class for linear prediction (Header) 00003 // 00004 // 2015/12/15, Copyright (c) 2015 MIKAMI, Naoki 00005 //----------------------------------------------------- 00006 00007 #ifndef LINEAR_PREDICTION_HPP 00008 #define LINEAR_PREDICTION_HPP 00009 00010 #include "mbed.h" 00011 00012 namespace Mikami 00013 { 00014 class LinearPred 00015 { 00016 public: 00017 LinearPred(int nData, int order); 00018 ~LinearPred(); 00019 bool Execute(const float x[], float a[], float &em); 00020 private: 00021 const uint16_t N_DATA_; 00022 const uint16_t ORDER_; 00023 00024 float* r_; // for auto-correlation 00025 float* k_; // for PARCOR coefficients 00026 float* am_; // working area 00027 00028 void AutoCorr(const float x[]); 00029 bool Durbin(float a[], float &em); 00030 00031 // disallow copy constructor and assignment operator 00032 LinearPred(const LinearPred& ); 00033 LinearPred& operator=(const LinearPred& ); 00034 }; 00035 } 00036 #endif // LINEAR_PREDICTION_HPP
Generated on Sun Jul 17 2022 12:37:24 by 1.7.2