libmain.cpp, plugins/: update to GPLv3
[vamp-aubio-plugins.git] / plugins / Onset.h
index bf80065..00b9815 100644 (file)
@@ -6,11 +6,20 @@
     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
-    License, or (at your option) any later version.  See the file
-    COPYING included with this distribution for more information.
+    This file is part of vamp-aubio-plugins.
+
+    vamp-aubio 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 3 of the License, or
+    (at your option) any later version.
+
+    vamp-aubio is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with aubio.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 
@@ -20,6 +29,8 @@
 #include <vamp-sdk/Plugin.h>
 #include <aubio/aubio.h>
 
+#include "Types.h"
+
 class Onset : public Vamp::Plugin
 {
 public:
@@ -31,6 +42,7 @@ public:
 
     InputDomain getInputDomain() const { return TimeDomain; }
 
+    std::string getIdentifier() const;
     std::string getName() const;
     std::string getDescription() const;
     std::string getMaker() const;
@@ -46,23 +58,21 @@ 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_onset_t *m_onsetdet;
+    OnsetType m_onsettype;
     float m_threshold;
     float m_silence;
+    float m_minioi;
     size_t m_stepSize;
     size_t m_blockSize;
-    size_t m_channelCount;
     Vamp::RealTime m_delay;
     Vamp::RealTime m_lastOnset;
 };