wscript: check for 64bit using sys.maxsize (closes #3)
[vamp-aubio-plugins.git] / plugins / Notes.cpp
index c8688cd..0f65110 100644 (file)
@@ -6,11 +6,20 @@
     Centre for Digital Music, Queen Mary, University of London.
     This file copyright 2006-2008 Chris Cannam and QMUL.
     
-    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/>.
 
 */
 
@@ -162,6 +171,7 @@ Notes::getParameterDescriptors() const
     ParameterDescriptor desc;
     desc.identifier = "onsettype";
     desc.name = "Onset Detection Function Type";
+    desc.description = "Type of onset detection function to use";
     desc.minValue = 0;
     desc.maxValue = 7;
     desc.defaultValue = (int)OnsetComplex;
@@ -180,6 +190,7 @@ Notes::getParameterDescriptors() const
     desc = ParameterDescriptor();
     desc.identifier = "pitchtype";
     desc.name = "Pitch Detection Function Type";
+    desc.description = "Type of pitch detection function to use";
     desc.minValue = 0;
     desc.maxValue = 4;
     desc.defaultValue = (int)PitchYinFFT;
@@ -195,6 +206,7 @@ Notes::getParameterDescriptors() const
     desc = ParameterDescriptor();
     desc.identifier = "minpitch";
     desc.name = "Minimum Pitch";
+    desc.description = "Lowest pitch value to look for";
     desc.minValue = 0;
     desc.maxValue = 127;
     desc.defaultValue = 32;
@@ -206,6 +218,7 @@ Notes::getParameterDescriptors() const
     desc = ParameterDescriptor();
     desc.identifier = "maxpitch";
     desc.name = "Maximum Pitch";
+    desc.description = "Highest pitch value to look for";
     desc.minValue = 0;
     desc.maxValue = 127;
     desc.defaultValue = 95;
@@ -217,6 +230,7 @@ Notes::getParameterDescriptors() const
     desc = ParameterDescriptor();
     desc.identifier = "wraprange";
     desc.name = "Fold Higher or Lower Notes into Range";
+    desc.description = "Notes detected outside the range will be transposed to higher or lower octaves";
     desc.minValue = 0;
     desc.maxValue = 1;
     desc.defaultValue = 0;
@@ -227,6 +241,7 @@ Notes::getParameterDescriptors() const
     desc = ParameterDescriptor();
     desc.identifier = "avoidleaps";
     desc.name = "Avoid Multi-Octave Jumps";
+    desc.description = "Minimize octave jumps by transposing to the octave of the previously detected note";
     desc.minValue = 0;
     desc.maxValue = 1;
     desc.defaultValue = 0;
@@ -237,6 +252,7 @@ Notes::getParameterDescriptors() const
     desc = ParameterDescriptor();
     desc.identifier = "peakpickthreshold";
     desc.name = "Peak Picker Threshold";
+    desc.description = "Peak picking threshold, the higher the least detection";
     desc.minValue = 0;
     desc.maxValue = 1;
     desc.defaultValue = 0.3;
@@ -246,6 +262,7 @@ Notes::getParameterDescriptors() const
     desc = ParameterDescriptor();
     desc.identifier = "silencethreshold";
     desc.name = "Silence Threshold";
+    desc.description = "Silence threshold, the higher the least detection";
     desc.minValue = -120;
     desc.maxValue = 0;
     desc.defaultValue = -70;
@@ -256,6 +273,7 @@ Notes::getParameterDescriptors() const
     desc = ParameterDescriptor();
     desc.identifier = "minioi";
     desc.name = "Minimum Inter-Onset Interval";
+    desc.description = "Time interval below which two consecutive onsets should be merged";
     desc.minValue = 0;
     desc.maxValue = 40;
     desc.defaultValue = 4;
@@ -340,6 +358,7 @@ Notes::getOutputDescriptors() const
     OutputDescriptor d;
     d.identifier = "notes";
     d.name = "Notes";
+    d.description = "List of notes detected, with their frequency and velocity";
     d.unit = "Hz";
     d.hasFixedBinCount = true;
 
@@ -361,7 +380,7 @@ Notes::FeatureSet
 Notes::process(const float *const *inputBuffers, Vamp::RealTime timestamp)
 {
     for (size_t i = 0; i < m_stepSize; ++i) {
-        fvec_write_sample(m_ibuf, inputBuffers[0][i], i);
+        fvec_set_sample(m_ibuf, inputBuffers[0][i], i);
     }
 
     aubio_onset_do(m_onsetdet, m_ibuf, m_onset);