![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
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:
- 2019-11-24
- Revision:
- 7:5ba884060d3b
- Parent:
- 6:c38ec7939609
File content as of revision 7:5ba884060d3b:
//------------------------------------------------------- // Class for spectrum analysis using FFT // // 2018/11/24, Copyright (c) 2018 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])); } }