1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
4 Vamp feature extraction plugins using Paul Brossier's Aubio library.
6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2006 Chris Cannam.
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
17 #ifndef _NOTES_PLUGIN_H_
18 #define _NOTES_PLUGIN_H_
20 #include <vamp-sdk/Plugin.h>
21 #include <aubio/aubio.h>
27 class Notes : public Vamp::Plugin
30 Notes(float inputSampleRate);
33 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
36 InputDomain getInputDomain() const { return TimeDomain; }
38 std::string getIdentifier() const;
39 std::string getName() const;
40 std::string getDescription() const;
41 std::string getMaker() const;
42 int getPluginVersion() const;
43 std::string getCopyright() const;
45 ParameterList getParameterDescriptors() const;
46 float getParameter(std::string) const;
47 void setParameter(std::string, float);
49 size_t getPreferredStepSize() const;
50 size_t getPreferredBlockSize() const;
52 OutputList getOutputDescriptors() const;
54 FeatureSet process(const float *const *inputBuffers,
55 Vamp::RealTime timestamp);
57 FeatureSet getRemainingFeatures();
64 aubio_peakpicker_t *m_peakpick;
65 aubio_onset_t *m_onsetdet;
66 OnsetType m_onsettype;
67 aubio_pitch_t *m_pitchdet;
68 PitchType m_pitchtype;
78 std::deque<float> m_notebuf;
80 Vamp::RealTime m_delay;
81 Vamp::RealTime m_currentOnset;
82 Vamp::RealTime m_lastTimeStamp;
87 void pushNote(FeatureSet &, const Vamp::RealTime &);