X-Git-Url: https://git.aubio.org/?p=vamp-aubio-plugins.git;a=blobdiff_plain;f=plugins%2FNotes.h;h=5bf32aa59910eca9c354dcdced4ef29c80130aee;hp=cb282305830335f26a3f3a336f2b4cf55b9c6ce0;hb=76eec45012ee0e4d999c3cc31debee1d533c0731;hpb=bc6722042486cce45f2f552238f4f45ab3e2a830 diff --git a/plugins/Notes.h b/plugins/Notes.h index cb28230..5bf32aa 100644 --- a/plugins/Notes.h +++ b/plugins/Notes.h @@ -18,10 +18,12 @@ #define _NOTES_PLUGIN_H_ #include -#include +#include #include +#include "Types.h" + class Notes : public Vamp::Plugin { public: @@ -33,6 +35,7 @@ public: InputDomain getInputDomain() const { return TimeDomain; } + std::string getIdentifier() const; std::string getName() const; std::string getDescription() const; std::string getMaker() const; @@ -48,27 +51,29 @@ public: OutputList getOutputDescriptors() const; - FeatureSet process(float **inputBuffers, Vamp::RealTime timestamp); + FeatureSet process(const float *const *inputBuffers, + Vamp::RealTime timestamp); FeatureSet getRemainingFeatures(); protected: fvec_t *m_ibuf; - cvec_t *m_fftgrain; fvec_t *m_onset; - aubio_pvoc_t *m_pv; - aubio_pickpeak_t *m_peakpick; - aubio_onsetdetection_t *m_onsetdet; - aubio_onsetdetection_type m_onsettype; - aubio_pitchdetection_t *m_pitchdet; - aubio_pitchdetection_type m_pitchtype; - aubio_pitchdetection_mode m_pitchmode; + fvec_t *m_pitch; + aubio_onset_t *m_onsetdet; + OnsetType m_onsettype; + aubio_pitch_t *m_pitchdet; + PitchType m_pitchtype; float m_threshold; float m_silence; + float m_minioi; size_t m_median; size_t m_stepSize; size_t m_blockSize; - size_t m_channelCount; + int m_minpitch; + int m_maxpitch; + bool m_wrapRange; + bool m_avoidLeaps; std::deque m_notebuf; size_t m_count; Vamp::RealTime m_delay; @@ -76,6 +81,7 @@ protected: Vamp::RealTime m_lastTimeStamp; float m_currentLevel; bool m_haveCurrent; + int m_prevPitch; void pushNote(FeatureSet &, const Vamp::RealTime &); };