Spectrum analyzer using DISCO-F746NG. Spectrum is calculated by FFT or linear prediction. The vowel data is in "vowel_data.hpp"
Dependencies: BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG UIT_FFT_Real mbed BUTTON_GROUP
Diff: SpactrumAnalysisClasses/FFT_Analysis.cpp
- Revision:
- 1:2ef356b500f2
- Parent:
- 0:c35b8a23a863
--- a/SpactrumAnalysisClasses/FFT_Analysis.cpp Mon Oct 26 08:06:57 2015 +0000 +++ b/SpactrumAnalysisClasses/FFT_Analysis.cpp Mon Oct 26 13:25:03 2015 +0000 @@ -38,7 +38,7 @@ for (int n=0; n<=N_FFT_/2; n++) normY[n] = Sqr(yFft[n].real()) + Sqr(yFft[n].imag()); - // Searce maximum + // Search maximum float max = 0; for (int n=0; n<=N_FFT_/2; n++) max = (max > normY[n]) ? max : normY[n]; @@ -50,3 +50,4 @@ } } +