annotate Spectrogram.h @ 7:21147df9cb2d

* Error when deleting Spectrogram object in Tempogram::getRemainingFeatures(). * Moved Spectrogram computation into own class.
author Carl Bussey <c.bussey@se10.qmul.ac.uk>
date Thu, 07 Aug 2014 16:21:21 +0100
parents
children be59b4a73f49
rev   line source
c@7 1 //
c@7 2 // Spectrogram.h
c@7 3 // Tempogram
c@7 4 //
c@7 5 // Created by Carl Bussey on 07/08/2014.
c@7 6 // Copyright (c) 2014 Carl Bussey. All rights reserved.
c@7 7 //
c@7 8
c@7 9 #ifndef __Tempogram__Spectrogram__
c@7 10 #define __Tempogram__Spectrogram__
c@7 11 #include <vector>
c@7 12 #include <vamp-sdk/FFT.h>
c@7 13 #include <cmath>
c@7 14
c@7 15 class Spectrogram{
c@7 16 int m_inputLength;
c@7 17 int m_fftLength;
c@7 18 int m_hopSize;
c@7 19 int m_numberOfOutputBins;
c@7 20 double * fftInput;
c@7 21 double * fftOutputReal;
c@7 22 double * fftOutputImag;
c@7 23 std::vector< std::vector <float> > spectrogramOutput;
c@7 24
c@7 25 void initialise();
c@7 26 void cleanup();
c@7 27 public:
c@7 28 std::vector< std::vector<float> > audioToMagnitudeSpectrogram(const float * const input, const float * window);
c@7 29 Spectrogram(unsigned int inputLength, unsigned int fftLength, unsigned int hopSize);
c@7 30 ~Spectrogram();
c@7 31 };
c@7 32
c@7 33 #endif /* defined(__Tempogram__Spectrogram__) */