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
MySpectrogram/FFT_Analyzer.hpp@6:c38ec7939609, 2018-11-04 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Sun Nov 04 10:41:02 2018 +0000
- Revision:
- 6:c38ec7939609
- Parent:
- 0:a539141b9dec
7
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MikamiUitOpen | 0:a539141b9dec | 1 | //------------------------------------------------------- |
MikamiUitOpen | 0:a539141b9dec | 2 | // Class for spectrum analysis using FFT (Header) |
MikamiUitOpen | 0:a539141b9dec | 3 | // |
MikamiUitOpen | 6:c38ec7939609 | 4 | // 2018/11/04, Copyright (c) 2018 MIKAMI, Naoki |
MikamiUitOpen | 0:a539141b9dec | 5 | //------------------------------------------------------- |
MikamiUitOpen | 0:a539141b9dec | 6 | |
MikamiUitOpen | 0:a539141b9dec | 7 | #ifndef FFT_ANALYZER_HPP |
MikamiUitOpen | 0:a539141b9dec | 8 | #define FFT_ANALYZER_HPP |
MikamiUitOpen | 0:a539141b9dec | 9 | |
MikamiUitOpen | 0:a539141b9dec | 10 | #include "AnalyzerBase.hpp" |
MikamiUitOpen | 0:a539141b9dec | 11 | |
MikamiUitOpen | 0:a539141b9dec | 12 | namespace Mikami |
MikamiUitOpen | 0:a539141b9dec | 13 | { |
MikamiUitOpen | 0:a539141b9dec | 14 | class FftAnalyzer : public AnalyzerBase |
MikamiUitOpen | 0:a539141b9dec | 15 | { |
MikamiUitOpen | 0:a539141b9dec | 16 | public: |
MikamiUitOpen | 0:a539141b9dec | 17 | FftAnalyzer(int nData, int nFft); |
MikamiUitOpen | 0:a539141b9dec | 18 | virtual ~FftAnalyzer() {} |
MikamiUitOpen | 0:a539141b9dec | 19 | |
MikamiUitOpen | 0:a539141b9dec | 20 | private: |
MikamiUitOpen | 0:a539141b9dec | 21 | Array<Complex> yFft_; // output of FFT |
MikamiUitOpen | 0:a539141b9dec | 22 | |
MikamiUitOpen | 0:a539141b9dec | 23 | virtual void Analyze(const float xn[], float yn[]); |
MikamiUitOpen | 0:a539141b9dec | 24 | |
MikamiUitOpen | 0:a539141b9dec | 25 | // disallow copy constructor and assignment operator |
MikamiUitOpen | 0:a539141b9dec | 26 | FftAnalyzer(const FftAnalyzer& ); |
MikamiUitOpen | 0:a539141b9dec | 27 | FftAnalyzer& operator=(const FftAnalyzer& ); |
MikamiUitOpen | 0:a539141b9dec | 28 | }; |
MikamiUitOpen | 0:a539141b9dec | 29 | } |
MikamiUitOpen | 0:a539141b9dec | 30 | |
MikamiUitOpen | 0:a539141b9dec | 31 | #endif // FFT_ANALYZER_HPP |