c@5: // c@17: // NoveltyCurveProcessor.h c@5: // Tempogram c@5: // c@5: // Created by Carl Bussey on 10/07/2014. c@5: // Copyright (c) 2014 Carl Bussey. All rights reserved. c@5: // c@5: c@11: // Don't new delete objects c@11: c@5: #ifndef __Tempogram__NoveltyCurve__ c@5: #define __Tempogram__NoveltyCurve__ c@5: c@5: #include c@7: #include c@7: #include c@7: #include c@7: #include "FIRFilter.h" c@7: #include "WindowFunction.h" c@7: #include c@14: #include "SpectrogramProcessor.h" c@5: c@14: class NoveltyCurveProcessor{ c@5: float m_samplingFrequency; c@20: size_t m_fftLength; c@20: size_t m_blockSize; c@5: int m_compressionConstant; c@20: size_t m_numberOfBands; c@13: int * m_pBandBoundaries; c@13: float * m_pBandSum; c@5: c@5: void initialise(); c@5: void cleanup(); c@13: void subtractLocalAverage(std::vector &noveltyCurve, const size_t &smoothLength) const; c@22: void smoothedDifferentiator(SpectrogramTransposed &spectrogram, const size_t &smoothLength) const; c@22: void halfWaveRectify(SpectrogramTransposed &spectrogram) const; c@5: c@5: public: c@5: c@22: NoveltyCurveProcessor(const float &samplingFrequency, const size_t &fftLength, const size_t &compressionConstant); c@14: ~NoveltyCurveProcessor(); c@22: std::vector spectrogramToNoveltyCurve(const Spectrogram &spectrogram) const; c@5: }; c@5: c@5: #endif /* defined(__Tempogram__NoveltyCurve__) */