X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fvamp-plugins%2FOnset.h;h=132ba1379f6a44c19cb7e7660ad2843df1ccbbd6;hb=f21a66797ad6292fc6cd2d65cd160d5869fc186f;hp=314e107308ccdc4723e3ccebfbfe1014c2e4be84;hpb=08371ae2cf6231bbb8522645d14add41ffa9c1c0;p=ardour.git diff --git a/libs/vamp-plugins/Onset.h b/libs/vamp-plugins/Onset.h index 314e107308..132ba1379f 100644 --- a/libs/vamp-plugins/Onset.h +++ b/libs/vamp-plugins/Onset.h @@ -5,7 +5,7 @@ Centre for Digital Music, Queen Mary, University of London. This file copyright 2006 Chris Cannam. - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the @@ -20,6 +20,19 @@ #include #include +#ifdef HAVE_AUBIO4 +enum OnsetType { + OnsetEnergy, + OnsetSpecDiff, + OnsetHFC, + OnsetComplex, + OnsetPhase, + OnsetKL, + OnsetMKL, + OnsetSpecFlux // new in 0.4! +}; +#endif + class Onset : public Vamp::Plugin { public: @@ -54,20 +67,25 @@ public: protected: fvec_t *m_ibuf; - cvec_t *m_fftgrain; fvec_t *m_onset; +#ifdef HAVE_AUBIO4 + aubio_onset_t *m_onsetdet; + OnsetType m_onsettype; + float m_minioi; +#else + cvec_t *m_fftgrain; aubio_pvoc_t *m_pv; aubio_pickpeak_t *m_peakpick; aubio_onsetdetection_t *m_onsetdet; aubio_onsetdetection_type m_onsettype; - float m_threshold; + size_t m_channelCount; +#endif float m_silence; + float m_threshold; size_t m_stepSize; size_t m_blockSize; - size_t m_channelCount; Vamp::RealTime m_delay; Vamp::RealTime m_lastOnset; }; - #endif