c@7: // c@7: // Spectrogram.h c@7: // Tempogram c@7: // c@7: // Created by Carl Bussey on 07/08/2014. c@7: // Copyright (c) 2014 Carl Bussey. All rights reserved. c@7: // c@7: c@7: #ifndef __Tempogram__Spectrogram__ c@7: #define __Tempogram__Spectrogram__ c@7: #include c@7: #include c@7: #include c@7: c@7: class Spectrogram{ c@7: int m_inputLength; c@9: int m_windowLength; c@7: int m_fftLength; c@7: int m_hopSize; c@7: int m_numberOfOutputBins; c@7: double * fftInput; c@7: double * fftOutputReal; c@7: double * fftOutputImag; c@7: std::vector< std::vector > spectrogramOutput; c@7: c@7: void initialise(); c@7: void cleanup(); c@7: public: c@7: std::vector< std::vector > audioToMagnitudeSpectrogram(const float * const input, const float * window); c@9: Spectrogram(unsigned int inputLength, unsigned int windowLength, unsigned int fftLength, unsigned int hopSize); c@7: ~Spectrogram(); c@7: }; c@7: c@7: #endif /* defined(__Tempogram__Spectrogram__) */