
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.cpp
- Committer:
- MikamiUitOpen
- Date:
- 2017-02-21
- Revision:
- 1:cc596a8d40c9
- Parent:
- 0:a539141b9dec
- Child:
- 6:c38ec7939609
File content as of revision 1:cc596a8d40c9:
//------------------------------------------------------- // Class for spectrum analysis using FFT // // 2017/02/04, Copyright (c) 2017 MIKAMI, Naoki //------------------------------------------------------- #include "FFT_Analyzer.hpp" namespace Mikami { FftAnalyzer::FftAnalyzer(int nData, int nFft) : AnalyzerBase(nData, nFft, nFft), yFft_(nFft/2+1) {} void FftAnalyzer::Analyze(const float xn[], float yn[]) { fft_.Execute(xn, yFft_); // Execute FFT // Translate to dB for (int n=0; n<=N_FFT_/2; n++) yn[n] = 10.0f*log10f(Norm(yFft_[n])); } }