# HG changeset patch # User Chris Cannam # Date 1317736567 -3600 # Node ID 3c430ef1ed662f623db7004f90e95a38ecca332f # Parent 895ae8fffdb73f647f3e61258bae8dcf57527131 Add code docs from SDK 2.3 diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/AmplitudeFollower_8cpp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/AmplitudeFollower_8cpp.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: AmplitudeFollower.cpp File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
AmplitudeFollower.cpp File Reference
+
+
+ +

Go to the source code of this file.

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/AmplitudeFollower_8cpp_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/AmplitudeFollower_8cpp_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,334 @@ + + + + +VampPluginSDK: AmplitudeFollower.cpp Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
AmplitudeFollower.cpp
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     This file copyright 2006 Dan Stowell.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #include "AmplitudeFollower.h"
+00038 
+00039 #include <cmath>
+00040 
+00041 #include <string>
+00042 #include <vector>
+00043 #include <iostream>
+00044 
+00045 using std::string;
+00046 using std::vector;
+00047 using std::cerr;
+00048 using std::endl;
+00049 
+00055 AmplitudeFollower::AmplitudeFollower(float inputSampleRate) :
+00056     Plugin(inputSampleRate),
+00057     m_stepSize(0),
+00058     m_previn(0.0f),
+00059     m_clampcoef(0.01f),
+00060     m_relaxcoef(0.01f)
+00061 {
+00062 }
+00063 
+00064 AmplitudeFollower::~AmplitudeFollower()
+00065 {
+00066 }
+00067 
+00068 string
+00069 AmplitudeFollower::getIdentifier() const
+00070 {
+00071     return "amplitudefollower";
+00072 }
+00073 
+00074 string
+00075 AmplitudeFollower::getName() const
+00076 {
+00077     return "Amplitude Follower";
+00078 }
+00079 
+00080 string
+00081 AmplitudeFollower::getDescription() const
+00082 {
+00083     return "Track the amplitude of the audio signal";
+00084 }
+00085 
+00086 string
+00087 AmplitudeFollower::getMaker() const
+00088 {
+00089     return "Vamp SDK Example Plugins";
+00090 }
+00091 
+00092 int
+00093 AmplitudeFollower::getPluginVersion() const
+00094 {
+00095     return 1;
+00096 }
+00097 
+00098 string
+00099 AmplitudeFollower::getCopyright() const
+00100 {
+00101     return "Code copyright 2006 Dan Stowell; method from SuperCollider.  Freely redistributable (BSD license)";
+00102 }
+00103 
+00104 bool
+00105 AmplitudeFollower::initialise(size_t channels, size_t stepSize, size_t blockSize)
+00106 {
+00107     if (channels < getMinChannelCount() ||
+00108         channels > getMaxChannelCount()) return false;
+00109 
+00110     m_stepSize = std::min(stepSize, blockSize);
+00111         
+00112     // Translate the coefficients 
+00113     // from their "convenient" 60dB convergence-time values
+00114     // to real coefficients
+00115     m_clampcoef = m_clampcoef==0.0 ? 0.0 : exp(log(0.1)/(m_clampcoef * m_inputSampleRate));
+00116     m_relaxcoef = m_relaxcoef==0.0 ? 0.0 : exp(log(0.1)/(m_relaxcoef * m_inputSampleRate));
+00117 
+00118     return true;
+00119 }
+00120 
+00121 void
+00122 AmplitudeFollower::reset()
+00123 {
+00124     m_previn = 0.0f;
+00125 }
+00126 
+00127 AmplitudeFollower::OutputList
+00128 AmplitudeFollower::getOutputDescriptors() const
+00129 {
+00130     OutputList list;
+00131 
+00132     OutputDescriptor sca;
+00133     sca.identifier = "amplitude";
+00134     sca.name = "Amplitude";
+00135     sca.description = "The peak tracked amplitude for the current processing block";
+00136     sca.unit = "V";
+00137     sca.hasFixedBinCount = true;
+00138     sca.binCount = 1;
+00139     sca.hasKnownExtents = false;
+00140     sca.isQuantized = false;
+00141     sca.sampleType = OutputDescriptor::OneSamplePerStep;
+00142     list.push_back(sca);
+00143 
+00144     return list;
+00145 }
+00146 
+00147 AmplitudeFollower::ParameterList
+00148 AmplitudeFollower::getParameterDescriptors() const
+00149 {
+00150     ParameterList list;
+00151         
+00152     ParameterDescriptor att;
+00153     att.identifier = "attack";
+00154     att.name = "Attack time";
+00155     att.description = "The 60dB convergence time for an increase in amplitude";
+00156     att.unit = "s";
+00157     att.minValue = 0.0f;
+00158     att.maxValue = 1.f;
+00159     att.defaultValue = 0.01f;
+00160     att.isQuantized = false;
+00161     
+00162     list.push_back(att);
+00163     
+00164     ParameterDescriptor dec;
+00165     dec.identifier = "release";
+00166     dec.name = "Release time";
+00167     dec.description = "The 60dB convergence time for a decrease in amplitude";
+00168     dec.unit = "s";
+00169     dec.minValue = 0.0f;
+00170     dec.maxValue = 1.f;
+00171     dec.defaultValue = 0.01f;
+00172     dec.isQuantized = false;
+00173     
+00174     list.push_back(dec);
+00175     
+00176     return list;
+00177 }
+00178 
+00179 void AmplitudeFollower::setParameter(std::string paramid, float newval)
+00180 {
+00181     if (paramid == "attack") {
+00182         m_clampcoef = newval;
+00183     } else if (paramid == "release") {
+00184         m_relaxcoef = newval;
+00185     }
+00186 }
+00187 
+00188 float AmplitudeFollower::getParameter(std::string paramid) const
+00189 {
+00190     if (paramid == "attack") {
+00191         return m_clampcoef;
+00192     } else if (paramid == "release") {
+00193         return m_relaxcoef;
+00194     }
+00195 
+00196     return 0.0f;
+00197 }
+00198 
+00199 AmplitudeFollower::FeatureSet
+00200 AmplitudeFollower::process(const float *const *inputBuffers,
+00201                            Vamp::RealTime timestamp)
+00202 {
+00203     if (m_stepSize == 0) {
+00204         cerr << "ERROR: AmplitudeFollower::process: "
+00205              << "AmplitudeFollower has not been initialised"
+00206              << endl;
+00207         return FeatureSet();
+00208     }
+00209 
+00210     float previn = m_previn;
+00211 
+00212     FeatureSet returnFeatures;
+00213         
+00214     float val;
+00215     float peak = 0.0f;
+00216 
+00217     for (size_t i = 0; i < m_stepSize; ++i) {
+00218 
+00219         val = fabs(inputBuffers[0][i]);
+00220                 
+00221         if (val < previn) {
+00222             val = val + (previn - val) * m_relaxcoef;
+00223         } else {
+00224             val = val + (previn - val) * m_clampcoef;
+00225         }
+00226 
+00227         if (val > peak) peak = val;
+00228         previn = val;
+00229     }
+00230 
+00231     m_previn = previn;
+00232 
+00233     // Now store the "feature" (peak amp) for this sample
+00234     Feature feature;
+00235     feature.hasTimestamp = false;
+00236     feature.values.push_back(peak);
+00237     returnFeatures[0].push_back(feature);
+00238 
+00239     return returnFeatures;
+00240 }
+00241 
+00242 AmplitudeFollower::FeatureSet
+00243 AmplitudeFollower::getRemainingFeatures()
+00244 {
+00245     return FeatureSet();
+00246 }
+00247 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/AmplitudeFollower_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/AmplitudeFollower_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,102 @@ + + + + +VampPluginSDK: AmplitudeFollower.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
AmplitudeFollower.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  AmplitudeFollower
 Example plugin implementing the SuperCollider amplitude follower function. More...
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/AmplitudeFollower_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/AmplitudeFollower_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,171 @@ + + + + +VampPluginSDK: AmplitudeFollower.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
AmplitudeFollower.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     This file copyright 2006 Dan Stowell.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _AMPLITUDE_FOLLOWER_PLUGIN_H_
+00038 #define _AMPLITUDE_FOLLOWER_PLUGIN_H_
+00039 
+00040 #include "vamp-sdk/Plugin.h"
+00041 
+00047 class AmplitudeFollower : public Vamp::Plugin
+00048 {
+00049 public:
+00050     AmplitudeFollower(float inputSampleRate);
+00051     virtual ~AmplitudeFollower();
+00052 
+00053     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00054     void reset();
+00055 
+00056     InputDomain getInputDomain() const { return TimeDomain; }
+00057 
+00058     std::string getIdentifier() const;
+00059     std::string getName() const;
+00060     std::string getDescription() const;
+00061     std::string getMaker() const;
+00062     int getPluginVersion() const;
+00063     std::string getCopyright() const;
+00064         
+00065     OutputList getOutputDescriptors() const;
+00066         
+00067     ParameterList getParameterDescriptors() const;
+00068     float getParameter(std::string paramid) const;
+00069     void setParameter(std::string paramid, float newval);
+00070 
+00071     FeatureSet process(const float *const *inputBuffers,
+00072                        Vamp::RealTime timestamp);
+00073 
+00074     FeatureSet getRemainingFeatures();
+00075 
+00076 protected:
+00077     size_t m_stepSize;
+00078     float  m_previn;
+00079     float  m_clampcoef;
+00080     float  m_relaxcoef;
+00081 };
+00082 
+00083 
+00084 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/FixedTempoEstimator_8cpp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/FixedTempoEstimator_8cpp.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,195 @@ + + + + +VampPluginSDK: FixedTempoEstimator.cpp File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
FixedTempoEstimator.cpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + +

+Classes

class  FixedTempoEstimator::D

+Variables

static int TempoOutput = 0
static int CandidatesOutput = 1
static int DFOutput = 2
static int ACFOutput = 3
static int FilteredACFOutput = 4
+

Variable Documentation

+ +
+
+ + + + +
int TempoOutput = 0 [static]
+
+
+ +

Definition at line 183 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures().

+ +
+
+ +
+
+ + + + +
int CandidatesOutput = 1 [static]
+
+
+ +

Definition at line 184 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures().

+ +
+
+ +
+
+ + + + +
int DFOutput = 2 [static]
+
+
+ +

Definition at line 185 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures().

+ +
+
+ +
+
+ + + + +
int ACFOutput = 3 [static]
+
+
+ +

Definition at line 186 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures().

+ +
+
+ +
+
+ + + + +
int FilteredACFOutput = 4 [static]
+
+
+ +

Definition at line 187 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures().

+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/FixedTempoEstimator_8cpp_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/FixedTempoEstimator_8cpp_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,817 @@ + + + + +VampPluginSDK: FixedTempoEstimator.cpp Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
FixedTempoEstimator.cpp
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006-2009 Chris Cannam and QMUL.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #include "FixedTempoEstimator.h"
+00038 
+00039 using std::string;
+00040 using std::vector;
+00041 using std::cerr;
+00042 using std::endl;
+00043 
+00044 using Vamp::RealTime;
+00045 
+00046 #include <cmath>
+00047 #include <cstdio>
+00048 
+00049 
+00050 class FixedTempoEstimator::D
+00051 // this class just avoids us having to declare any data members in the header
+00052 {
+00053 public:
+00054     D(float inputSampleRate);
+00055     ~D();
+00056 
+00057     size_t getPreferredStepSize() const { return 64; }
+00058     size_t getPreferredBlockSize() const { return 256; }
+00059 
+00060     ParameterList getParameterDescriptors() const;
+00061     float getParameter(string id) const;
+00062     void setParameter(string id, float value);
+00063 
+00064     OutputList getOutputDescriptors() const;
+00065 
+00066     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00067     void reset();
+00068     FeatureSet process(const float *const *, RealTime);
+00069     FeatureSet getRemainingFeatures();
+00070 
+00071 private:
+00072     void calculate();
+00073     FeatureSet assembleFeatures();
+00074 
+00075     float lag2tempo(int);
+00076     int tempo2lag(float);
+00077 
+00078     float m_inputSampleRate;
+00079     size_t m_stepSize;
+00080     size_t m_blockSize;
+00081 
+00082     float m_minbpm;
+00083     float m_maxbpm;
+00084     float m_maxdflen;
+00085 
+00086     float *m_priorMagnitudes;
+00087 
+00088     size_t m_dfsize;
+00089     float *m_df;
+00090     float *m_r;
+00091     float *m_fr;
+00092     float *m_t;
+00093     size_t m_n;
+00094 
+00095     Vamp::RealTime m_start;
+00096     Vamp::RealTime m_lasttime;
+00097 };
+00098 
+00099 FixedTempoEstimator::D::D(float inputSampleRate) :
+00100     m_inputSampleRate(inputSampleRate),
+00101     m_stepSize(0),
+00102     m_blockSize(0),
+00103     m_minbpm(50),
+00104     m_maxbpm(190),
+00105     m_maxdflen(10),
+00106     m_priorMagnitudes(0),
+00107     m_df(0),
+00108     m_r(0),
+00109     m_fr(0),
+00110     m_t(0),
+00111     m_n(0)
+00112 {
+00113 }
+00114 
+00115 FixedTempoEstimator::D::~D()
+00116 {
+00117     delete[] m_priorMagnitudes;
+00118     delete[] m_df;
+00119     delete[] m_r;
+00120     delete[] m_fr;
+00121     delete[] m_t;
+00122 }
+00123 
+00124 FixedTempoEstimator::ParameterList
+00125 FixedTempoEstimator::D::getParameterDescriptors() const
+00126 {
+00127     ParameterList list;
+00128 
+00129     ParameterDescriptor d;
+00130     d.identifier = "minbpm";
+00131     d.name = "Minimum estimated tempo";
+00132     d.description = "Minimum beat-per-minute value which the tempo estimator is able to return";
+00133     d.unit = "bpm";
+00134     d.minValue = 10;
+00135     d.maxValue = 360;
+00136     d.defaultValue = 50;
+00137     d.isQuantized = false;
+00138     list.push_back(d);
+00139 
+00140     d.identifier = "maxbpm";
+00141     d.name = "Maximum estimated tempo";
+00142     d.description = "Maximum beat-per-minute value which the tempo estimator is able to return";
+00143     d.defaultValue = 190;
+00144     list.push_back(d);
+00145 
+00146     d.identifier = "maxdflen";
+00147     d.name = "Input duration to study";
+00148     d.description = "Length of audio input, in seconds, which should be taken into account when estimating tempo.  There is no need to supply the plugin with any further input once this time has elapsed since the start of the audio.  The tempo estimator may use only the first part of this, up to eight times the slowest beat duration: increasing this value further than that is unlikely to improve results.";
+00149     d.unit = "s";
+00150     d.minValue = 2;
+00151     d.maxValue = 40;
+00152     d.defaultValue = 10;
+00153     list.push_back(d);
+00154 
+00155     return list;
+00156 }
+00157 
+00158 float
+00159 FixedTempoEstimator::D::getParameter(string id) const
+00160 {
+00161     if (id == "minbpm") {
+00162         return m_minbpm;
+00163     } else if (id == "maxbpm") {
+00164         return m_maxbpm;
+00165     } else if (id == "maxdflen") {
+00166         return m_maxdflen;
+00167     }
+00168     return 0.f;
+00169 }
+00170 
+00171 void
+00172 FixedTempoEstimator::D::setParameter(string id, float value)
+00173 {
+00174     if (id == "minbpm") {
+00175         m_minbpm = value;
+00176     } else if (id == "maxbpm") {
+00177         m_maxbpm = value;
+00178     } else if (id == "maxdflen") {
+00179         m_maxdflen = value;
+00180     }
+00181 }
+00182 
+00183 static int TempoOutput = 0;
+00184 static int CandidatesOutput = 1;
+00185 static int DFOutput = 2;
+00186 static int ACFOutput = 3;
+00187 static int FilteredACFOutput = 4;
+00188 
+00189 FixedTempoEstimator::OutputList
+00190 FixedTempoEstimator::D::getOutputDescriptors() const
+00191 {
+00192     OutputList list;
+00193 
+00194     OutputDescriptor d;
+00195     d.identifier = "tempo";
+00196     d.name = "Tempo";
+00197     d.description = "Estimated tempo";
+00198     d.unit = "bpm";
+00199     d.hasFixedBinCount = true;
+00200     d.binCount = 1;
+00201     d.hasKnownExtents = false;
+00202     d.isQuantized = false;
+00203     d.sampleType = OutputDescriptor::VariableSampleRate;
+00204     d.sampleRate = m_inputSampleRate;
+00205     d.hasDuration = true; // our returned tempo spans a certain range
+00206     list.push_back(d);
+00207 
+00208     d.identifier = "candidates";
+00209     d.name = "Tempo candidates";
+00210     d.description = "Possible tempo estimates, one per bin with the most likely in the first bin";
+00211     d.unit = "bpm";
+00212     d.hasFixedBinCount = false;
+00213     list.push_back(d);
+00214 
+00215     d.identifier = "detectionfunction";
+00216     d.name = "Detection Function";
+00217     d.description = "Onset detection function";
+00218     d.unit = "";
+00219     d.hasFixedBinCount = 1;
+00220     d.binCount = 1;
+00221     d.hasKnownExtents = true;
+00222     d.minValue = 0.0;
+00223     d.maxValue = 1.0;
+00224     d.isQuantized = false;
+00225     d.quantizeStep = 0.0;
+00226     d.sampleType = OutputDescriptor::FixedSampleRate;
+00227     if (m_stepSize) {
+00228         d.sampleRate = m_inputSampleRate / m_stepSize;
+00229     } else {
+00230         d.sampleRate = m_inputSampleRate / (getPreferredBlockSize()/2);
+00231     }
+00232     d.hasDuration = false;
+00233     list.push_back(d);
+00234 
+00235     d.identifier = "acf";
+00236     d.name = "Autocorrelation Function";
+00237     d.description = "Autocorrelation of onset detection function";
+00238     d.hasKnownExtents = false;
+00239     d.unit = "r";
+00240     list.push_back(d);
+00241 
+00242     d.identifier = "filtered_acf";
+00243     d.name = "Filtered Autocorrelation";
+00244     d.description = "Filtered autocorrelation of onset detection function";
+00245     d.unit = "r";
+00246     list.push_back(d);
+00247 
+00248     return list;
+00249 }
+00250 
+00251 bool
+00252 FixedTempoEstimator::D::initialise(size_t, size_t stepSize, size_t blockSize)
+00253 {
+00254     m_stepSize = stepSize;
+00255     m_blockSize = blockSize;
+00256 
+00257     float dfLengthSecs = m_maxdflen;
+00258     m_dfsize = (dfLengthSecs * m_inputSampleRate) / m_stepSize;
+00259 
+00260     m_priorMagnitudes = new float[m_blockSize/2];
+00261     m_df = new float[m_dfsize];
+00262 
+00263     for (size_t i = 0; i < m_blockSize/2; ++i) {
+00264         m_priorMagnitudes[i] = 0.f;
+00265     }
+00266     for (size_t i = 0; i < m_dfsize; ++i) {
+00267         m_df[i] = 0.f;
+00268     }
+00269 
+00270     m_n = 0;
+00271 
+00272     return true;
+00273 }
+00274 
+00275 void
+00276 FixedTempoEstimator::D::reset()
+00277 {
+00278     if (!m_priorMagnitudes) return;
+00279 
+00280     for (size_t i = 0; i < m_blockSize/2; ++i) {
+00281         m_priorMagnitudes[i] = 0.f;
+00282     }
+00283     for (size_t i = 0; i < m_dfsize; ++i) {
+00284         m_df[i] = 0.f;
+00285     }
+00286 
+00287     delete[] m_r;
+00288     m_r = 0;
+00289 
+00290     delete[] m_fr; 
+00291     m_fr = 0;
+00292 
+00293     delete[] m_t; 
+00294     m_t = 0;
+00295 
+00296     m_n = 0;
+00297 
+00298     m_start = RealTime::zeroTime;
+00299     m_lasttime = RealTime::zeroTime;
+00300 }
+00301 
+00302 FixedTempoEstimator::FeatureSet
+00303 FixedTempoEstimator::D::process(const float *const *inputBuffers, RealTime ts)
+00304 {
+00305     FeatureSet fs;
+00306 
+00307     if (m_stepSize == 0) {
+00308         cerr << "ERROR: FixedTempoEstimator::process: "
+00309              << "FixedTempoEstimator has not been initialised"
+00310              << endl;
+00311         return fs;
+00312     }
+00313 
+00314     if (m_n == 0) m_start = ts;
+00315     m_lasttime = ts;
+00316 
+00317     if (m_n == m_dfsize) {
+00318         // If we have seen enough input, do the estimation and return
+00319         calculate();
+00320         fs = assembleFeatures();
+00321         ++m_n;
+00322         return fs;
+00323     }
+00324 
+00325     // If we have seen more than enough, just discard and return!
+00326     if (m_n > m_dfsize) return FeatureSet();
+00327 
+00328     float value = 0.f;
+00329 
+00330     // m_df will contain an onset detection function based on the rise
+00331     // in overall power from one spectral frame to the next --
+00332     // simplistic but reasonably effective for our purposes.
+00333 
+00334     for (size_t i = 1; i < m_blockSize/2; ++i) {
+00335 
+00336         float real = inputBuffers[0][i*2];
+00337         float imag = inputBuffers[0][i*2 + 1];
+00338 
+00339         float sqrmag = real * real + imag * imag;
+00340         value += fabsf(sqrmag - m_priorMagnitudes[i]);
+00341 
+00342         m_priorMagnitudes[i] = sqrmag;
+00343     }
+00344 
+00345     m_df[m_n] = value;
+00346 
+00347     ++m_n;
+00348     return fs;
+00349 }    
+00350 
+00351 FixedTempoEstimator::FeatureSet
+00352 FixedTempoEstimator::D::getRemainingFeatures()
+00353 {
+00354     FeatureSet fs;
+00355     if (m_n > m_dfsize) return fs;
+00356     calculate();
+00357     fs = assembleFeatures();
+00358     ++m_n;
+00359     return fs;
+00360 }
+00361 
+00362 float
+00363 FixedTempoEstimator::D::lag2tempo(int lag)
+00364 {
+00365     return 60.f / ((lag * m_stepSize) / m_inputSampleRate);
+00366 }
+00367 
+00368 int
+00369 FixedTempoEstimator::D::tempo2lag(float tempo)
+00370 {
+00371     return ((60.f / tempo) * m_inputSampleRate) / m_stepSize;
+00372 }
+00373 
+00374 void
+00375 FixedTempoEstimator::D::calculate()
+00376 {    
+00377     if (m_r) {
+00378         cerr << "FixedTempoEstimator::calculate: calculation already happened?" << endl;
+00379         return;
+00380     }
+00381 
+00382     if (m_n < m_dfsize / 9 &&
+00383         m_n < (1.0 * m_inputSampleRate) / m_stepSize) { // 1 second
+00384         cerr << "FixedTempoEstimator::calculate: Input is too short" << endl;
+00385         return;
+00386     }
+00387 
+00388     // This function takes m_df (the detection function array filled
+00389     // out in process()) and calculates m_r (the raw autocorrelation)
+00390     // and m_fr (the filtered autocorrelation from whose peaks tempo
+00391     // estimates will be taken).
+00392 
+00393     int n = m_n; // length of actual df array (m_dfsize is the theoretical max)
+00394 
+00395     m_r  = new float[n/2]; // raw autocorrelation
+00396     m_fr = new float[n/2]; // filtered autocorrelation
+00397     m_t  = new float[n/2]; // averaged tempo estimate for each lag value
+00398 
+00399     for (int i = 0; i < n/2; ++i) {
+00400         m_r[i]  = 0.f;
+00401         m_fr[i] = 0.f;
+00402         m_t[i]  = lag2tempo(i);
+00403     }
+00404 
+00405     // Calculate the raw autocorrelation of the detection function
+00406 
+00407     for (int i = 0; i < n/2; ++i) {
+00408 
+00409         for (int j = i; j < n; ++j) {
+00410             m_r[i] += m_df[j] * m_df[j - i];
+00411         }
+00412 
+00413         m_r[i] /= n - i - 1;
+00414     }
+00415 
+00416     // Filter the autocorrelation and average out the tempo estimates
+00417     
+00418     float related[] = { 0.5, 2, 4, 8 };
+00419 
+00420     for (int i = 1; i < n/2-1; ++i) {
+00421 
+00422         m_fr[i] = m_r[i];
+00423 
+00424         int div = 1;
+00425 
+00426         for (int j = 0; j < int(sizeof(related)/sizeof(related[0])); ++j) {
+00427 
+00428             // Check for an obvious peak at each metrically related lag
+00429 
+00430             int k0 = int(i * related[j] + 0.5);
+00431 
+00432             if (k0 >= 0 && k0 < int(n/2)) {
+00433 
+00434                 int kmax = 0, kmin = 0;
+00435                 float kvmax = 0, kvmin = 0;
+00436                 bool have = false;
+00437 
+00438                 for (int k = k0 - 1; k <= k0 + 1; ++k) {
+00439 
+00440                     if (k < 0 || k >= n/2) continue;
+00441 
+00442                     if (!have || (m_r[k] > kvmax)) { kmax = k; kvmax = m_r[k]; }
+00443                     if (!have || (m_r[k] < kvmin)) { kmin = k; kvmin = m_r[k]; }
+00444                     
+00445                     have = true;
+00446                 }
+00447                 
+00448                 // Boost the original lag according to the strongest
+00449                 // value found close to this related lag
+00450 
+00451                 m_fr[i] += m_r[kmax] / 5;
+00452 
+00453                 if ((kmax == 0 || m_r[kmax] > m_r[kmax-1]) &&
+00454                     (kmax == n/2-1 || m_r[kmax] > m_r[kmax+1]) &&
+00455                     kvmax > kvmin * 1.05) {
+00456 
+00457                     // The strongest value close to the related lag is
+00458                     // also a pretty good looking peak, so use it to
+00459                     // improve our tempo estimate for the original lag
+00460                     
+00461                     m_t[i] = m_t[i] + lag2tempo(kmax) * related[j];
+00462                     ++div;
+00463                 }
+00464             }
+00465         }
+00466         
+00467         m_t[i] /= div;
+00468         
+00469         // Finally apply a primitive perceptual weighting (to prefer
+00470         // tempi of around 120-130)
+00471 
+00472         float weight = 1.f - fabsf(128.f - lag2tempo(i)) * 0.005;
+00473         if (weight < 0.f) weight = 0.f;
+00474         weight = weight * weight * weight;
+00475 
+00476         m_fr[i] += m_fr[i] * (weight / 3);
+00477     }
+00478 }
+00479     
+00480 FixedTempoEstimator::FeatureSet
+00481 FixedTempoEstimator::D::assembleFeatures()
+00482 {
+00483     FeatureSet fs;
+00484     if (!m_r) return fs; // No autocorrelation: no results
+00485 
+00486     Feature feature;
+00487     feature.hasTimestamp = true;
+00488     feature.hasDuration = false;
+00489     feature.label = "";
+00490     feature.values.clear();
+00491     feature.values.push_back(0.f);
+00492 
+00493     char buffer[40];
+00494 
+00495     int n = m_n;
+00496 
+00497     for (int i = 0; i < n; ++i) {
+00498 
+00499         // Return the detection function in the DF output
+00500 
+00501         feature.timestamp = m_start +
+00502             RealTime::frame2RealTime(i * m_stepSize, m_inputSampleRate);
+00503         feature.values[0] = m_df[i];
+00504         feature.label = "";
+00505         fs[DFOutput].push_back(feature);
+00506     }
+00507 
+00508     for (int i = 1; i < n/2; ++i) {
+00509 
+00510         // Return the raw autocorrelation in the ACF output, each
+00511         // value labelled according to its corresponding tempo
+00512 
+00513         feature.timestamp = m_start +
+00514             RealTime::frame2RealTime(i * m_stepSize, m_inputSampleRate);
+00515         feature.values[0] = m_r[i];
+00516         sprintf(buffer, "%.1f bpm", lag2tempo(i));
+00517         if (i == n/2-1) feature.label = "";
+00518         else feature.label = buffer;
+00519         fs[ACFOutput].push_back(feature);
+00520     }
+00521 
+00522     float t0 = m_minbpm; // our minimum detected tempo
+00523     float t1 = m_maxbpm; // our maximum detected tempo
+00524 
+00525     int p0 = tempo2lag(t1);
+00526     int p1 = tempo2lag(t0);
+00527 
+00528     std::map<float, int> candidates;
+00529 
+00530     for (int i = p0; i <= p1 && i+1 < n/2; ++i) {
+00531 
+00532         if (m_fr[i] > m_fr[i-1] &&
+00533             m_fr[i] > m_fr[i+1]) {
+00534 
+00535             // This is a peak in the filtered autocorrelation: stick
+00536             // it into the map from filtered autocorrelation to lag
+00537             // index -- this sorts our peaks by filtered acf value
+00538 
+00539             candidates[m_fr[i]] = i;
+00540         }
+00541 
+00542         // Also return the filtered autocorrelation in its own output
+00543 
+00544         feature.timestamp = m_start +
+00545             RealTime::frame2RealTime(i * m_stepSize, m_inputSampleRate);
+00546         feature.values[0] = m_fr[i];
+00547         sprintf(buffer, "%.1f bpm", lag2tempo(i));
+00548         if (i == p1 || i == n/2-2) feature.label = "";
+00549         else feature.label = buffer;
+00550         fs[FilteredACFOutput].push_back(feature);
+00551     }
+00552 
+00553     if (candidates.empty()) {
+00554         cerr << "No tempo candidates!" << endl;
+00555         return fs;
+00556     }
+00557 
+00558     feature.hasTimestamp = true;
+00559     feature.timestamp = m_start;
+00560     
+00561     feature.hasDuration = true;
+00562     feature.duration = m_lasttime - m_start;
+00563 
+00564     // The map contains only peaks and is sorted by filtered acf
+00565     // value, so the final element in it is our "best" tempo guess
+00566 
+00567     std::map<float, int>::const_iterator ci = candidates.end();
+00568     --ci;
+00569     int maxpi = ci->second;
+00570 
+00571     if (m_t[maxpi] > 0) {
+00572 
+00573         // This lag has an adjusted tempo from the averaging process:
+00574         // use it
+00575 
+00576         feature.values[0] = m_t[maxpi];
+00577 
+00578     } else {
+00579 
+00580         // shouldn't happen -- it would imply that this high value was
+00581         // not a peak!
+00582 
+00583         feature.values[0] = lag2tempo(maxpi);
+00584         cerr << "WARNING: No stored tempo for index " << maxpi << endl;
+00585     }
+00586 
+00587     sprintf(buffer, "%.1f bpm", feature.values[0]);
+00588     feature.label = buffer;
+00589 
+00590     // Return the best tempo in the main output
+00591 
+00592     fs[TempoOutput].push_back(feature);
+00593 
+00594     // And return the other estimates (up to the arbitrarily chosen
+00595     // number of 10 of them) in the candidates output
+00596 
+00597     feature.values.clear();
+00598     feature.label = "";
+00599 
+00600     while (feature.values.size() < 10) {
+00601         if (m_t[ci->second] > 0) {
+00602             feature.values.push_back(m_t[ci->second]);
+00603         } else {
+00604             feature.values.push_back(lag2tempo(ci->second));
+00605         }
+00606         if (ci == candidates.begin()) break;
+00607         --ci;
+00608     }
+00609 
+00610     fs[CandidatesOutput].push_back(feature);
+00611     
+00612     return fs;
+00613 }
+00614 
+00615     
+00616 
+00617 FixedTempoEstimator::FixedTempoEstimator(float inputSampleRate) :
+00618     Plugin(inputSampleRate),
+00619     m_d(new D(inputSampleRate))
+00620 {
+00621 }
+00622 
+00623 FixedTempoEstimator::~FixedTempoEstimator()
+00624 {
+00625     delete m_d;
+00626 }
+00627 
+00628 string
+00629 FixedTempoEstimator::getIdentifier() const
+00630 {
+00631     return "fixedtempo";
+00632 }
+00633 
+00634 string
+00635 FixedTempoEstimator::getName() const
+00636 {
+00637     return "Simple Fixed Tempo Estimator";
+00638 }
+00639 
+00640 string
+00641 FixedTempoEstimator::getDescription() const
+00642 {
+00643     return "Study a short section of audio and estimate its tempo, assuming the tempo is constant";
+00644 }
+00645 
+00646 string
+00647 FixedTempoEstimator::getMaker() const
+00648 {
+00649     return "Vamp SDK Example Plugins";
+00650 }
+00651 
+00652 int
+00653 FixedTempoEstimator::getPluginVersion() const
+00654 {
+00655     return 1;
+00656 }
+00657 
+00658 string
+00659 FixedTempoEstimator::getCopyright() const
+00660 {
+00661     return "Code copyright 2008 Queen Mary, University of London.  Freely redistributable (BSD license)";
+00662 }
+00663 
+00664 size_t
+00665 FixedTempoEstimator::getPreferredStepSize() const
+00666 {
+00667     return m_d->getPreferredStepSize();
+00668 }
+00669 
+00670 size_t
+00671 FixedTempoEstimator::getPreferredBlockSize() const
+00672 {
+00673     return m_d->getPreferredBlockSize();
+00674 }
+00675 
+00676 bool
+00677 FixedTempoEstimator::initialise(size_t channels, size_t stepSize, size_t blockSize)
+00678 {
+00679     if (channels < getMinChannelCount() ||
+00680         channels > getMaxChannelCount()) return false;
+00681 
+00682     return m_d->initialise(channels, stepSize, blockSize);
+00683 }
+00684 
+00685 void
+00686 FixedTempoEstimator::reset()
+00687 {
+00688     return m_d->reset();
+00689 }
+00690 
+00691 FixedTempoEstimator::ParameterList
+00692 FixedTempoEstimator::getParameterDescriptors() const
+00693 {
+00694     return m_d->getParameterDescriptors();
+00695 }
+00696 
+00697 float
+00698 FixedTempoEstimator::getParameter(std::string id) const
+00699 {
+00700     return m_d->getParameter(id);
+00701 }
+00702 
+00703 void
+00704 FixedTempoEstimator::setParameter(std::string id, float value)
+00705 {
+00706     m_d->setParameter(id, value);
+00707 }
+00708 
+00709 FixedTempoEstimator::OutputList
+00710 FixedTempoEstimator::getOutputDescriptors() const
+00711 {
+00712     return m_d->getOutputDescriptors();
+00713 }
+00714 
+00715 FixedTempoEstimator::FeatureSet
+00716 FixedTempoEstimator::process(const float *const *inputBuffers, RealTime ts)
+00717 {
+00718     return m_d->process(inputBuffers, ts);
+00719 }
+00720 
+00721 FixedTempoEstimator::FeatureSet
+00722 FixedTempoEstimator::getRemainingFeatures()
+00723 {
+00724     return m_d->getRemainingFeatures();
+00725 }
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/FixedTempoEstimator_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/FixedTempoEstimator_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,102 @@ + + + + +VampPluginSDK: FixedTempoEstimator.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
FixedTempoEstimator.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  FixedTempoEstimator
 Example plugin that estimates the tempo of a short fixed-tempo sample. More...
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/FixedTempoEstimator_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/FixedTempoEstimator_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,172 @@ + + + + +VampPluginSDK: FixedTempoEstimator.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
FixedTempoEstimator.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006-2009 Chris Cannam and QMUL.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _FIXED_TEMPO_ESTIMATOR_PLUGIN_H_
+00038 #define _FIXED_TEMPO_ESTIMATOR_PLUGIN_H_
+00039 
+00040 #include "vamp-sdk/Plugin.h"
+00041 
+00046 class FixedTempoEstimator : public Vamp::Plugin
+00047 {
+00048 public:
+00049     FixedTempoEstimator(float inputSampleRate);
+00050     virtual ~FixedTempoEstimator();
+00051 
+00052     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00053     void reset();
+00054 
+00055     InputDomain getInputDomain() const { return FrequencyDomain; }
+00056 
+00057     std::string getIdentifier() const;
+00058     std::string getName() const;
+00059     std::string getDescription() const;
+00060     std::string getMaker() const;
+00061     int getPluginVersion() const;
+00062     std::string getCopyright() const;
+00063 
+00064     size_t getPreferredStepSize() const;
+00065     size_t getPreferredBlockSize() const;
+00066 
+00067     ParameterList getParameterDescriptors() const;
+00068     float getParameter(std::string id) const;
+00069     void setParameter(std::string id, float value);
+00070 
+00071     OutputList getOutputDescriptors() const;
+00072 
+00073     FeatureSet process(const float *const *inputBuffers,
+00074                        Vamp::RealTime timestamp);
+00075 
+00076     FeatureSet getRemainingFeatures();
+00077 
+00078 protected:
+00079     class D;
+00080     D *m_d;
+00081 };
+00082 
+00083 
+00084 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PercussionOnsetDetector_8cpp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PercussionOnsetDetector_8cpp.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: PercussionOnsetDetector.cpp File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PercussionOnsetDetector.cpp File Reference
+
+
+ +

Go to the source code of this file.

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PercussionOnsetDetector_8cpp_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PercussionOnsetDetector_8cpp_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,379 @@ + + + + +VampPluginSDK: PercussionOnsetDetector.cpp Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PercussionOnsetDetector.cpp
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #include "PercussionOnsetDetector.h"
+00038 
+00039 using std::string;
+00040 using std::vector;
+00041 using std::cerr;
+00042 using std::endl;
+00043 
+00044 #include <cmath>
+00045 
+00046 
+00047 PercussionOnsetDetector::PercussionOnsetDetector(float inputSampleRate) :
+00048     Plugin(inputSampleRate),
+00049     m_stepSize(0),
+00050     m_blockSize(0),
+00051     m_threshold(3),
+00052     m_sensitivity(40),
+00053     m_priorMagnitudes(0),
+00054     m_dfMinus1(0),
+00055     m_dfMinus2(0)
+00056 {
+00057 }
+00058 
+00059 PercussionOnsetDetector::~PercussionOnsetDetector()
+00060 {
+00061     delete[] m_priorMagnitudes;
+00062 }
+00063 
+00064 string
+00065 PercussionOnsetDetector::getIdentifier() const
+00066 {
+00067     return "percussiononsets";
+00068 }
+00069 
+00070 string
+00071 PercussionOnsetDetector::getName() const
+00072 {
+00073     return "Simple Percussion Onset Detector";
+00074 }
+00075 
+00076 string
+00077 PercussionOnsetDetector::getDescription() const
+00078 {
+00079     return "Detect percussive note onsets by identifying broadband energy rises";
+00080 }
+00081 
+00082 string
+00083 PercussionOnsetDetector::getMaker() const
+00084 {
+00085     return "Vamp SDK Example Plugins";
+00086 }
+00087 
+00088 int
+00089 PercussionOnsetDetector::getPluginVersion() const
+00090 {
+00091     return 2;
+00092 }
+00093 
+00094 string
+00095 PercussionOnsetDetector::getCopyright() const
+00096 {
+00097     return "Code copyright 2006 Queen Mary, University of London, after Dan Barry et al 2005.  Freely redistributable (BSD license)";
+00098 }
+00099 
+00100 size_t
+00101 PercussionOnsetDetector::getPreferredStepSize() const
+00102 {
+00103     return 0;
+00104 }
+00105 
+00106 size_t
+00107 PercussionOnsetDetector::getPreferredBlockSize() const
+00108 {
+00109     return 1024;
+00110 }
+00111 
+00112 bool
+00113 PercussionOnsetDetector::initialise(size_t channels, size_t stepSize, size_t blockSize)
+00114 {
+00115     if (channels < getMinChannelCount() ||
+00116         channels > getMaxChannelCount()) return false;
+00117 
+00118     m_stepSize = stepSize;
+00119     m_blockSize = blockSize;
+00120 
+00121     m_priorMagnitudes = new float[m_blockSize/2];
+00122 
+00123     for (size_t i = 0; i < m_blockSize/2; ++i) {
+00124         m_priorMagnitudes[i] = 0.f;
+00125     }
+00126 
+00127     m_dfMinus1 = 0.f;
+00128     m_dfMinus2 = 0.f;
+00129 
+00130     return true;
+00131 }
+00132 
+00133 void
+00134 PercussionOnsetDetector::reset()
+00135 {
+00136     for (size_t i = 0; i < m_blockSize/2; ++i) {
+00137         m_priorMagnitudes[i] = 0.f;
+00138     }
+00139 
+00140     m_dfMinus1 = 0.f;
+00141     m_dfMinus2 = 0.f;
+00142 }
+00143 
+00144 PercussionOnsetDetector::ParameterList
+00145 PercussionOnsetDetector::getParameterDescriptors() const
+00146 {
+00147     ParameterList list;
+00148 
+00149     ParameterDescriptor d;
+00150     d.identifier = "threshold";
+00151     d.name = "Energy rise threshold";
+00152     d.description = "Energy rise within a frequency bin necessary to count toward broadband total";
+00153     d.unit = "dB";
+00154     d.minValue = 0;
+00155     d.maxValue = 20;
+00156     d.defaultValue = 3;
+00157     d.isQuantized = false;
+00158     list.push_back(d);
+00159 
+00160     d.identifier = "sensitivity";
+00161     d.name = "Sensitivity";
+00162     d.description = "Sensitivity of peak detector applied to broadband detection function";
+00163     d.unit = "%";
+00164     d.minValue = 0;
+00165     d.maxValue = 100;
+00166     d.defaultValue = 40;
+00167     d.isQuantized = false;
+00168     list.push_back(d);
+00169 
+00170     return list;
+00171 }
+00172 
+00173 float
+00174 PercussionOnsetDetector::getParameter(std::string id) const
+00175 {
+00176     if (id == "threshold") return m_threshold;
+00177     if (id == "sensitivity") return m_sensitivity;
+00178     return 0.f;
+00179 }
+00180 
+00181 void
+00182 PercussionOnsetDetector::setParameter(std::string id, float value)
+00183 {
+00184     if (id == "threshold") {
+00185         if (value < 0) value = 0;
+00186         if (value > 20) value = 20;
+00187         m_threshold = value;
+00188     } else if (id == "sensitivity") {
+00189         if (value < 0) value = 0;
+00190         if (value > 100) value = 100;
+00191         m_sensitivity = value;
+00192     }
+00193 }
+00194 
+00195 PercussionOnsetDetector::OutputList
+00196 PercussionOnsetDetector::getOutputDescriptors() const
+00197 {
+00198     OutputList list;
+00199 
+00200     OutputDescriptor d;
+00201     d.identifier = "onsets";
+00202     d.name = "Onsets";
+00203     d.description = "Percussive note onset locations";
+00204     d.unit = "";
+00205     d.hasFixedBinCount = true;
+00206     d.binCount = 0;
+00207     d.hasKnownExtents = false;
+00208     d.isQuantized = false;
+00209     d.sampleType = OutputDescriptor::VariableSampleRate;
+00210     d.sampleRate = m_inputSampleRate;
+00211     list.push_back(d);
+00212 
+00213     d.identifier = "detectionfunction";
+00214     d.name = "Detection Function";
+00215     d.description = "Broadband energy rise detection function";
+00216     d.binCount = 1;
+00217     d.isQuantized = true;
+00218     d.quantizeStep = 1.0;
+00219     d.sampleType = OutputDescriptor::OneSamplePerStep;
+00220     list.push_back(d);
+00221 
+00222     return list;
+00223 }
+00224 
+00225 PercussionOnsetDetector::FeatureSet
+00226 PercussionOnsetDetector::process(const float *const *inputBuffers,
+00227                                  Vamp::RealTime ts)
+00228 {
+00229     if (m_stepSize == 0) {
+00230         cerr << "ERROR: PercussionOnsetDetector::process: "
+00231              << "PercussionOnsetDetector has not been initialised"
+00232              << endl;
+00233         return FeatureSet();
+00234     }
+00235 
+00236     int count = 0;
+00237 
+00238     for (size_t i = 1; i < m_blockSize/2; ++i) {
+00239 
+00240         float real = inputBuffers[0][i*2];
+00241         float imag = inputBuffers[0][i*2 + 1];
+00242 
+00243         float sqrmag = real * real + imag * imag;
+00244 
+00245         if (m_priorMagnitudes[i] > 0.f) {
+00246             float diff = 10.f * log10f(sqrmag / m_priorMagnitudes[i]);
+00247 
+00248 //        std::cout << "i=" << i << ", sqrmag=" << sqrmag << ", prior=" << m_priorMagnitudes[i] << ", diff=" << diff << ", threshold=" << m_threshold << " " << (diff >= m_threshold ? "[*]" : "") << std::endl;
+00249 
+00250             if (diff >= m_threshold) ++count;
+00251         }
+00252 
+00253         m_priorMagnitudes[i] = sqrmag;
+00254     }
+00255 
+00256     FeatureSet returnFeatures;
+00257 
+00258     Feature detectionFunction;
+00259     detectionFunction.hasTimestamp = false;
+00260     detectionFunction.values.push_back(count);
+00261     returnFeatures[1].push_back(detectionFunction);
+00262 
+00263     if (m_dfMinus2 < m_dfMinus1 &&
+00264         m_dfMinus1 >= count &&
+00265         m_dfMinus1 > ((100 - m_sensitivity) * m_blockSize) / 200) {
+00266 
+00267 //std::cout << "result at " << ts << "! (count == " << count << ", prev == " << m_dfMinus1 << ")" << std::endl;
+00268 
+00269         Feature onset;
+00270         onset.hasTimestamp = true;
+00271         onset.timestamp = ts - Vamp::RealTime::frame2RealTime
+00272             (m_stepSize, int(m_inputSampleRate + 0.5));
+00273         returnFeatures[0].push_back(onset);
+00274     }
+00275 
+00276     m_dfMinus2 = m_dfMinus1;
+00277     m_dfMinus1 = count;
+00278 
+00279     return returnFeatures;
+00280 }
+00281 
+00282 PercussionOnsetDetector::FeatureSet
+00283 PercussionOnsetDetector::getRemainingFeatures()
+00284 {
+00285     return FeatureSet();
+00286 }
+00287 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PercussionOnsetDetector_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PercussionOnsetDetector_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,102 @@ + + + + +VampPluginSDK: PercussionOnsetDetector.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PercussionOnsetDetector.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  PercussionOnsetDetector
 Example plugin that detects percussive events. More...
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PercussionOnsetDetector_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PercussionOnsetDetector_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,178 @@ + + + + +VampPluginSDK: PercussionOnsetDetector.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PercussionOnsetDetector.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _PERCUSSION_ONSET_DETECTOR_PLUGIN_H_
+00038 #define _PERCUSSION_ONSET_DETECTOR_PLUGIN_H_
+00039 
+00040 #include "vamp-sdk/Plugin.h"
+00041 
+00046 class PercussionOnsetDetector : public Vamp::Plugin
+00047 {
+00048 public:
+00049     PercussionOnsetDetector(float inputSampleRate);
+00050     virtual ~PercussionOnsetDetector();
+00051 
+00052     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00053     void reset();
+00054 
+00055     InputDomain getInputDomain() const { return FrequencyDomain; }
+00056 
+00057     std::string getIdentifier() const;
+00058     std::string getName() const;
+00059     std::string getDescription() const;
+00060     std::string getMaker() const;
+00061     int getPluginVersion() const;
+00062     std::string getCopyright() const;
+00063 
+00064     size_t getPreferredStepSize() const;
+00065     size_t getPreferredBlockSize() const;
+00066 
+00067     ParameterList getParameterDescriptors() const;
+00068     float getParameter(std::string id) const;
+00069     void setParameter(std::string id, float value);
+00070 
+00071     OutputList getOutputDescriptors() const;
+00072 
+00073     FeatureSet process(const float *const *inputBuffers,
+00074                        Vamp::RealTime timestamp);
+00075 
+00076     FeatureSet getRemainingFeatures();
+00077 
+00078 protected:
+00079     size_t m_stepSize;
+00080     size_t m_blockSize;
+00081 
+00082     float  m_threshold;
+00083     float  m_sensitivity;
+00084     float *m_priorMagnitudes;
+00085     float  m_dfMinus1;
+00086     float  m_dfMinus2;
+00087 };
+00088 
+00089 
+00090 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginAdapter_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginAdapter_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,108 @@ + + + + +VampPluginSDK: PluginAdapter.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PluginAdapter.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Classes

class  Vamp::PluginAdapterBase
 PluginAdapter and PluginAdapterBase provide a wrapper class that a plugin library can use to make its C++ Vamp::Plugin objects available through the Vamp C API. More...
class  Vamp::PluginAdapter< P >
 PluginAdapter turns a PluginAdapterBase into a specific wrapper for a particular plugin implementation. More...

+Namespaces

namespace  Vamp
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginAdapter_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginAdapter_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,185 @@ + + + + +VampPluginSDK: PluginAdapter.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PluginAdapter.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_PLUGIN_ADAPTER_H_
+00038 #define _VAMP_PLUGIN_ADAPTER_H_
+00039 
+00040 #include <map>
+00041 #include <vamp/vamp.h>
+00042 
+00043 #include "Plugin.h"
+00044 
+00045 #include "plugguard.h"
+00046 _VAMP_SDK_PLUGSPACE_BEGIN(PluginAdapter.h)
+00047 
+00048 namespace Vamp {
+00049 
+00065 class PluginAdapterBase
+00066 {
+00067 public:
+00068     virtual ~PluginAdapterBase();
+00069 
+00074     const VampPluginDescriptor *getDescriptor();
+00075 
+00076 protected:
+00077     PluginAdapterBase();
+00078 
+00079     virtual Plugin *createPlugin(float inputSampleRate) = 0;
+00080 
+00081     class Impl;
+00082     Impl *m_impl;
+00083 };
+00084 
+00094 template <typename P>
+00095 class PluginAdapter : public PluginAdapterBase
+00096 {
+00097 public:
+00098     PluginAdapter() : PluginAdapterBase() { }
+00099     virtual ~PluginAdapter() { }
+00100 
+00101 protected:
+00102     Plugin *createPlugin(float inputSampleRate) {
+00103         P *p = new P(inputSampleRate);
+00104         Plugin *plugin = dynamic_cast<Plugin *>(p);
+00105         if (!plugin) {
+00106             std::cerr << "ERROR: PluginAdapter::createPlugin: "
+00107                       << "Template type is not a plugin!"
+00108                       << std::endl;
+00109             delete p;
+00110             return 0;
+00111         }
+00112         return plugin;
+00113     }
+00114 };
+00115     
+00116 }
+00117 
+00118 _VAMP_SDK_PLUGSPACE_END(PluginAdapter.h)
+00119 
+00120 #endif
+00121 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginBufferingAdapter_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginBufferingAdapter_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,107 @@ + + + + +VampPluginSDK: PluginBufferingAdapter.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PluginBufferingAdapter.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Classes

class  Vamp::HostExt::PluginBufferingAdapter
 PluginBufferingAdapter is a Vamp plugin adapter that allows plugins to be used by a host supplying an audio stream in non-overlapping buffers of arbitrary size. More...

+Namespaces

namespace  Vamp
namespace  Vamp::HostExt
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginBufferingAdapter_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginBufferingAdapter_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,186 @@ + + + + +VampPluginSDK: PluginBufferingAdapter.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PluginBufferingAdapter.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006-2009 Chris Cannam and QMUL.
+00010     This file by Mark Levy and Chris Cannam, Copyright 2007-2008 QMUL.
+00011   
+00012     Permission is hereby granted, free of charge, to any person
+00013     obtaining a copy of this software and associated documentation
+00014     files (the "Software"), to deal in the Software without
+00015     restriction, including without limitation the rights to use, copy,
+00016     modify, merge, publish, distribute, sublicense, and/or sell copies
+00017     of the Software, and to permit persons to whom the Software is
+00018     furnished to do so, subject to the following conditions:
+00019 
+00020     The above copyright notice and this permission notice shall be
+00021     included in all copies or substantial portions of the Software.
+00022 
+00023     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00024     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00025     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00026     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00027     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00028     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00029     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00030 
+00031     Except as contained in this notice, the names of the Centre for
+00032     Digital Music; Queen Mary, University of London; and Chris Cannam
+00033     shall not be used in advertising or otherwise to promote the sale,
+00034     use or other dealings in this Software without prior written
+00035     authorization.
+00036 */
+00037 
+00038 #ifndef _VAMP_PLUGIN_BUFFERING_ADAPTER_H_
+00039 #define _VAMP_PLUGIN_BUFFERING_ADAPTER_H_
+00040 
+00041 #include "hostguard.h"
+00042 #include "PluginWrapper.h"
+00043 
+00044 _VAMP_SDK_HOSTSPACE_BEGIN(PluginBufferingAdapter.h)
+00045 
+00046 namespace Vamp {
+00047         
+00048 namespace HostExt {
+00049                 
+00075 class PluginBufferingAdapter : public PluginWrapper
+00076 {
+00077 public:
+00083     PluginBufferingAdapter(Plugin *plugin);
+00084     virtual ~PluginBufferingAdapter();
+00085 
+00095     size_t getPreferredStepSize() const;
+00096 
+00107     size_t getPreferredBlockSize() const;
+00108 
+00118     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00119 
+00131     size_t getPluginPreferredStepSize() const;
+00132 
+00139     size_t getPluginPreferredBlockSize() const;
+00140 
+00148     void setPluginStepSize(size_t stepSize);
+00149 
+00157     void setPluginBlockSize(size_t blockSize);
+00158 
+00170     void getActualStepAndBlockSizes(size_t &stepSize, size_t &blockSize);
+00171 
+00172     void setParameter(std::string, float);
+00173     void selectProgram(std::string);
+00174 
+00175     OutputList getOutputDescriptors() const;
+00176 
+00177     void reset();
+00178 
+00179     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
+00180     
+00181     FeatureSet getRemainingFeatures();
+00182     
+00183 protected:
+00184     class Impl;
+00185     Impl *m_impl;
+00186 };
+00187     
+00188 }
+00189 
+00190 }
+00191 
+00192 _VAMP_SDK_HOSTSPACE_END(PluginBufferingAdapter.h)
+00193 
+00194 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginChannelAdapter_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginChannelAdapter_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,107 @@ + + + + +VampPluginSDK: PluginChannelAdapter.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PluginChannelAdapter.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Classes

class  Vamp::HostExt::PluginChannelAdapter
 PluginChannelAdapter is a Vamp plugin adapter that implements a policy for management of plugins that expect a different number of input channels from the number actually available in the source audio data. More...

+Namespaces

namespace  Vamp
namespace  Vamp::HostExt
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginChannelAdapter_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginChannelAdapter_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,164 @@ + + + + +VampPluginSDK: PluginChannelAdapter.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PluginChannelAdapter.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006-2009 Chris Cannam and QMUL.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_PLUGIN_CHANNEL_ADAPTER_H_
+00038 #define _VAMP_PLUGIN_CHANNEL_ADAPTER_H_
+00039 
+00040 #include "hostguard.h"
+00041 #include "PluginWrapper.h"
+00042 
+00043 _VAMP_SDK_HOSTSPACE_BEGIN(PluginChannelAdapter.h)
+00044 
+00045 namespace Vamp {
+00046 
+00047 namespace HostExt {
+00048 
+00112 class PluginChannelAdapter : public PluginWrapper
+00113 {
+00114 public:
+00120     PluginChannelAdapter(Plugin *plugin);
+00121     virtual ~PluginChannelAdapter();
+00122 
+00123     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00124 
+00125     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
+00126 
+00136     FeatureSet processInterleaved(const float *inputBuffer, RealTime timestamp);
+00137 
+00138 protected:
+00139     class Impl;
+00140     Impl *m_impl;
+00141 };
+00142 
+00143 }
+00144 
+00145 }
+00146 
+00147 _VAMP_SDK_HOSTSPACE_END(PluginChannelAdapter.h)
+00148 
+00149 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginHostAdapter_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginHostAdapter_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,106 @@ + + + + +VampPluginSDK: PluginHostAdapter.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PluginHostAdapter.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Classes

class  Vamp::PluginHostAdapter
 PluginHostAdapter is a wrapper class that a Vamp host can use to make the C-language VampPluginDescriptor object appear as a C++ Vamp::Plugin object. More...

+Namespaces

namespace  Vamp
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginHostAdapter_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginHostAdapter_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,198 @@ + + + + +VampPluginSDK: PluginHostAdapter.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PluginHostAdapter.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_PLUGIN_HOST_ADAPTER_H_
+00038 #define _VAMP_PLUGIN_HOST_ADAPTER_H_
+00039 
+00040 #include "hostguard.h"
+00041 #include "Plugin.h"
+00042 
+00043 #include <vamp/vamp.h>
+00044 
+00045 #include <vector>
+00046 
+00047 _VAMP_SDK_HOSTSPACE_BEGIN(PluginHostAdapter.h)
+00048 
+00049 namespace Vamp {
+00050 
+00068 class PluginHostAdapter : public Plugin
+00069 {
+00070 public:
+00071     PluginHostAdapter(const VampPluginDescriptor *descriptor,
+00072                       float inputSampleRate);
+00073     virtual ~PluginHostAdapter();
+00074     
+00075     static std::vector<std::string> getPluginPath();
+00076 
+00077     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00078     void reset();
+00079 
+00080     InputDomain getInputDomain() const;
+00081 
+00082     unsigned int getVampApiVersion() const;
+00083     std::string getIdentifier() const;
+00084     std::string getName() const;
+00085     std::string getDescription() const;
+00086     std::string getMaker() const;
+00087     int getPluginVersion() const;
+00088     std::string getCopyright() const;
+00089 
+00090     ParameterList getParameterDescriptors() const;
+00091     float getParameter(std::string) const;
+00092     void setParameter(std::string, float);
+00093 
+00094     ProgramList getPrograms() const;
+00095     std::string getCurrentProgram() const;
+00096     void selectProgram(std::string);
+00097 
+00098     size_t getPreferredStepSize() const;
+00099     size_t getPreferredBlockSize() const;
+00100 
+00101     size_t getMinChannelCount() const;
+00102     size_t getMaxChannelCount() const;
+00103 
+00104     OutputList getOutputDescriptors() const;
+00105 
+00106     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
+00107 
+00108     FeatureSet getRemainingFeatures();
+00109 
+00110 protected:
+00111     void convertFeatures(VampFeatureList *, FeatureSet &);
+00112 
+00113     const VampPluginDescriptor *m_descriptor;
+00114     VampPluginHandle m_handle;
+00115 };
+00116 
+00117 }
+00118 
+00119 _VAMP_SDK_HOSTSPACE_END(PluginHostAdapter.h)
+00120 
+00121 #endif
+00122 
+00123 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginInputDomainAdapter_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginInputDomainAdapter_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,107 @@ + + + + +VampPluginSDK: PluginInputDomainAdapter.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PluginInputDomainAdapter.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Classes

class  Vamp::HostExt::PluginInputDomainAdapter
 PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input into frequency-domain input for plugins that need it. More...

+Namespaces

namespace  Vamp
namespace  Vamp::HostExt
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginInputDomainAdapter_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginInputDomainAdapter_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,204 @@ + + + + +VampPluginSDK: PluginInputDomainAdapter.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PluginInputDomainAdapter.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006-2009 Chris Cannam and QMUL.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_PLUGIN_INPUT_DOMAIN_ADAPTER_H_
+00038 #define _VAMP_PLUGIN_INPUT_DOMAIN_ADAPTER_H_
+00039 
+00040 #include "hostguard.h"
+00041 #include "PluginWrapper.h"
+00042 
+00043 _VAMP_SDK_HOSTSPACE_BEGIN(PluginInputDomainAdapter.h)
+00044 
+00045 namespace Vamp {
+00046 
+00047 namespace HostExt {
+00048 
+00087 class PluginInputDomainAdapter : public PluginWrapper
+00088 {
+00089 public:
+00095     PluginInputDomainAdapter(Plugin *plugin);
+00096     virtual ~PluginInputDomainAdapter();
+00097     
+00098     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00099     void reset();
+00100 
+00101     InputDomain getInputDomain() const;
+00102 
+00103     size_t getPreferredStepSize() const;
+00104     size_t getPreferredBlockSize() const;
+00105 
+00106     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
+00107 
+00142     enum ProcessTimestampMethod {
+00143         ShiftTimestamp,
+00144         ShiftData,
+00145         NoShift
+00146     };
+00147 
+00156     void setProcessTimestampMethod(ProcessTimestampMethod);
+00157 
+00163     ProcessTimestampMethod getProcessTimestampMethod() const;
+00164 
+00190     RealTime getTimestampAdjustment() const;
+00191 
+00195     enum WindowType {
+00196 
+00197         RectangularWindow    = 0,
+00198 
+00199         BartlettWindow       = 1, 
+00200         TriangularWindow     = 1, 
+00201 
+00202         HammingWindow        = 2,
+00203 
+00204         HanningWindow        = 3, 
+00205         HannWindow           = 3, 
+00206 
+00207         BlackmanWindow       = 4,
+00208 
+00209         NuttallWindow        = 7,
+00210 
+00211         BlackmanHarrisWindow = 8
+00212     };
+00213 
+00217     WindowType getWindowType() const;
+00218     
+00222     void setWindowType(WindowType type);
+00223 
+00224 
+00225 protected:
+00226     class Impl;
+00227     Impl *m_impl;
+00228 };
+00229 
+00230 }
+00231 
+00232 }
+00233 
+00234 _VAMP_SDK_HOSTSPACE_END(PluginInputDomainAdapter.h)
+00235 
+00236 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginLoader_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginLoader_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,107 @@ + + + + +VampPluginSDK: PluginLoader.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PluginLoader.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Classes

class  Vamp::HostExt::PluginLoader
 Vamp::HostExt::PluginLoader is a convenience class for discovering and loading Vamp plugins using the typical plugin-path, library naming, and categorisation conventions described in the Vamp SDK documentation. More...

+Namespaces

namespace  Vamp
namespace  Vamp::HostExt
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginLoader_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginLoader_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,199 @@ + + + + +VampPluginSDK: PluginLoader.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PluginLoader.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006-2009 Chris Cannam and QMUL.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_PLUGIN_LOADER_H_
+00038 #define _VAMP_PLUGIN_LOADER_H_
+00039 
+00040 #include <vector>
+00041 #include <string>
+00042 #include <map>
+00043 
+00044 #include "hostguard.h"
+00045 #include "PluginWrapper.h"
+00046 
+00047 _VAMP_SDK_HOSTSPACE_BEGIN(PluginLoader.h)
+00048 
+00049 namespace Vamp {
+00050 
+00051 class Plugin;
+00052 
+00053 namespace HostExt {
+00054 
+00072 class PluginLoader
+00073 {
+00074 public:
+00079     static PluginLoader *getInstance();
+00080 
+00101     typedef std::string PluginKey;
+00102 
+00107     typedef std::vector<PluginKey> PluginKeyList;
+00108 
+00119     typedef std::vector<std::string> PluginCategoryHierarchy;
+00120 
+00125     PluginKeyList listPlugins();
+00126 
+00169     enum AdapterFlags {
+00170 
+00171         ADAPT_INPUT_DOMAIN  = 0x01,
+00172         ADAPT_CHANNEL_COUNT = 0x02,
+00173         ADAPT_BUFFER_SIZE   = 0x04,
+00174 
+00175         ADAPT_ALL_SAFE      = 0x03,
+00176 
+00177         ADAPT_ALL           = 0xff
+00178     };
+00179 
+00197     Plugin *loadPlugin(PluginKey key,
+00198                        float inputSampleRate,
+00199                        int adapterFlags = 0);
+00200 
+00206     PluginKey composePluginKey(std::string libraryName,
+00207                                std::string identifier);
+00208 
+00218     PluginCategoryHierarchy getPluginCategory(PluginKey plugin);
+00219 
+00224     std::string getLibraryPathForPlugin(PluginKey plugin);
+00225 
+00226 protected:
+00227     PluginLoader();
+00228     virtual ~PluginLoader();
+00229 
+00230     class Impl;
+00231     Impl *m_impl;
+00232 
+00233     static PluginLoader *m_instance;
+00234 };
+00235 
+00236 }
+00237 
+00238 }
+00239 
+00240 _VAMP_SDK_HOSTSPACE_END(PluginLoader.h)
+00241 
+00242 #endif
+00243 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginSummarisingAdapter_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginSummarisingAdapter_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,107 @@ + + + + +VampPluginSDK: PluginSummarisingAdapter.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PluginSummarisingAdapter.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Classes

class  Vamp::HostExt::PluginSummarisingAdapter
 PluginSummarisingAdapter is a Vamp plugin adapter that provides summarisation methods such as mean and median averages of output features, for use in any context where an available plugin produces individual values but the result that is actually needed is some sort of aggregate. More...

+Namespaces

namespace  Vamp
namespace  Vamp::HostExt
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginSummarisingAdapter_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginSummarisingAdapter_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,197 @@ + + + + +VampPluginSDK: PluginSummarisingAdapter.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PluginSummarisingAdapter.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006-2009 Chris Cannam and QMUL.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_PLUGIN_SUMMARISING_ADAPTER_H_
+00038 #define _VAMP_PLUGIN_SUMMARISING_ADAPTER_H_
+00039 
+00040 #include "hostguard.h"
+00041 #include "PluginWrapper.h"
+00042 
+00043 #include <set>
+00044 
+00045 _VAMP_SDK_HOSTSPACE_BEGIN(PluginSummarisingAdapter.h)
+00046 
+00047 namespace Vamp {
+00048 
+00049 namespace HostExt {
+00050 
+00086 class PluginSummarisingAdapter : public PluginWrapper
+00087 {
+00088 public:
+00094     PluginSummarisingAdapter(Plugin *plugin); 
+00095     virtual ~PluginSummarisingAdapter();
+00096 
+00097     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00098 
+00099     void reset();
+00100 
+00101     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
+00102     FeatureSet getRemainingFeatures();
+00103 
+00104     typedef std::set<RealTime> SegmentBoundaries;
+00105 
+00119     void setSummarySegmentBoundaries(const SegmentBoundaries &);
+00120 
+00121     enum SummaryType {
+00122         Minimum            = 0,
+00123         Maximum            = 1,
+00124         Mean               = 2,
+00125         Median             = 3,
+00126         Mode               = 4,
+00127         Sum                = 5,
+00128         Variance           = 6,
+00129         StandardDeviation  = 7,
+00130         Count              = 8,
+00131 
+00132         UnknownSummaryType = 999
+00133     };
+00134 
+00157     enum AveragingMethod {
+00158         SampleAverage         = 0,
+00159         ContinuousTimeAverage = 1
+00160     };
+00161 
+00170     FeatureList getSummaryForOutput(int output,
+00171                                     SummaryType type,
+00172                                     AveragingMethod method = SampleAverage);
+00173 
+00183     FeatureSet getSummaryForAllOutputs(SummaryType type,
+00184                                        AveragingMethod method = SampleAverage);
+00185 
+00186 protected:
+00187     class Impl;
+00188     Impl *m_impl;
+00189 };
+00190 
+00191 }
+00192 
+00193 }
+00194 
+00195 _VAMP_SDK_HOSTSPACE_END(PluginSummarisingAdapter.h)
+00196 
+00197 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginWrapper_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginWrapper_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,107 @@ + + + + +VampPluginSDK: PluginWrapper.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PluginWrapper.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Classes

class  Vamp::HostExt::PluginWrapper
 PluginWrapper is a simple base class for adapter plugins. More...

+Namespaces

namespace  Vamp
namespace  Vamp::HostExt
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PluginWrapper_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PluginWrapper_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,199 @@ + + + + +VampPluginSDK: PluginWrapper.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PluginWrapper.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006-2009 Chris Cannam and QMUL.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_PLUGIN_WRAPPER_H_
+00038 #define _VAMP_PLUGIN_WRAPPER_H_
+00039 
+00040 #include "hostguard.h"
+00041 #include <vamp-hostsdk/Plugin.h>
+00042 
+00043 _VAMP_SDK_HOSTSPACE_BEGIN(PluginWrapper.h)
+00044 
+00045 namespace Vamp {
+00046 
+00047 namespace HostExt {
+00048 
+00062 class PluginWrapper : public Plugin
+00063 {
+00064 public:
+00065     virtual ~PluginWrapper();
+00066     
+00067     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00068     void reset();
+00069 
+00070     InputDomain getInputDomain() const;
+00071 
+00072     unsigned int getVampApiVersion() const;
+00073     std::string getIdentifier() const;
+00074     std::string getName() const;
+00075     std::string getDescription() const;
+00076     std::string getMaker() const;
+00077     int getPluginVersion() const;
+00078     std::string getCopyright() const;
+00079 
+00080     ParameterList getParameterDescriptors() const;
+00081     float getParameter(std::string) const;
+00082     void setParameter(std::string, float);
+00083 
+00084     ProgramList getPrograms() const;
+00085     std::string getCurrentProgram() const;
+00086     void selectProgram(std::string);
+00087 
+00088     size_t getPreferredStepSize() const;
+00089     size_t getPreferredBlockSize() const;
+00090 
+00091     size_t getMinChannelCount() const;
+00092     size_t getMaxChannelCount() const;
+00093 
+00094     OutputList getOutputDescriptors() const;
+00095 
+00096     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
+00097 
+00098     FeatureSet getRemainingFeatures();
+00099 
+00115     template <typename WrapperType>
+00116     WrapperType *getWrapper() {
+00117         WrapperType *w = dynamic_cast<WrapperType *>(this);
+00118         if (w) return w;
+00119         PluginWrapper *pw = dynamic_cast<PluginWrapper *>(m_plugin);
+00120         if (pw) return pw->getWrapper<WrapperType>();
+00121         return 0;
+00122     }
+00123 
+00124 protected:
+00125     PluginWrapper(Plugin *plugin); // I take ownership of plugin
+00126     Plugin *m_plugin;
+00127 };
+00128 
+00129 }
+00130 
+00131 }
+00132 
+00133 _VAMP_SDK_HOSTSPACE_END(PluginWrapper.h)
+00134 
+00135 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PowerSpectrum_8cpp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PowerSpectrum_8cpp.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: PowerSpectrum.cpp File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PowerSpectrum.cpp File Reference
+
+
+ +

Go to the source code of this file.

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PowerSpectrum_8cpp_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PowerSpectrum_8cpp_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,262 @@ + + + + +VampPluginSDK: PowerSpectrum.cpp Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PowerSpectrum.cpp
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2008 QMUL.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #include "PowerSpectrum.h"
+00038 
+00039 using std::string;
+00040 using std::cerr;
+00041 using std::endl;
+00042 
+00043 #include <math.h>
+00044 
+00045 PowerSpectrum::PowerSpectrum(float inputSampleRate) :
+00046     Plugin(inputSampleRate),
+00047     m_blockSize(0)
+00048 {
+00049 }
+00050 
+00051 PowerSpectrum::~PowerSpectrum()
+00052 {
+00053 }
+00054 
+00055 string
+00056 PowerSpectrum::getIdentifier() const
+00057 {
+00058     return "powerspectrum";
+00059 }
+00060 
+00061 string
+00062 PowerSpectrum::getName() const
+00063 {
+00064     return "Simple Power Spectrum";
+00065 }
+00066 
+00067 string
+00068 PowerSpectrum::getDescription() const
+00069 {
+00070     return "Return the power spectrum of a signal";
+00071 }
+00072 
+00073 string
+00074 PowerSpectrum::getMaker() const
+00075 {
+00076     return "Vamp SDK Example Plugins";
+00077 }
+00078 
+00079 int
+00080 PowerSpectrum::getPluginVersion() const
+00081 {
+00082     return 1;
+00083 }
+00084 
+00085 string
+00086 PowerSpectrum::getCopyright() const
+00087 {
+00088     return "Freely redistributable (BSD license)";
+00089 }
+00090 
+00091 bool
+00092 PowerSpectrum::initialise(size_t channels, size_t stepSize, size_t blockSize)
+00093 {
+00094     if (channels < getMinChannelCount() ||
+00095         channels > getMaxChannelCount()) return false;
+00096 
+00097     m_blockSize = blockSize;
+00098 
+00099     return true;
+00100 }
+00101 
+00102 void
+00103 PowerSpectrum::reset()
+00104 {
+00105 }
+00106 
+00107 PowerSpectrum::OutputList
+00108 PowerSpectrum::getOutputDescriptors() const
+00109 {
+00110     OutputList list;
+00111 
+00112     OutputDescriptor d;
+00113     d.identifier = "powerspectrum";
+00114     d.name = "Power Spectrum";
+00115     d.description = "Power values of the frequency spectrum bins calculated from the input signal";
+00116     d.unit = "";
+00117     d.hasFixedBinCount = true;
+00118     if (m_blockSize == 0) {
+00119         // Just so as not to return "1".  This is the bin count that
+00120         // would result from a block size of 1024, which is a likely
+00121         // default -- but the host should always set the block size
+00122         // before querying the bin count for certain.
+00123         d.binCount = 513;
+00124     } else {
+00125         d.binCount = m_blockSize / 2 + 1;
+00126     }
+00127     d.hasKnownExtents = false;
+00128     d.isQuantized = false;
+00129     d.sampleType = OutputDescriptor::OneSamplePerStep;
+00130     list.push_back(d);
+00131 
+00132     return list;
+00133 }
+00134 
+00135 PowerSpectrum::FeatureSet
+00136 PowerSpectrum::process(const float *const *inputBuffers, Vamp::RealTime timestamp)
+00137 {
+00138     FeatureSet fs;
+00139 
+00140     if (m_blockSize == 0) {
+00141         cerr << "ERROR: PowerSpectrum::process: Not initialised" << endl;
+00142         return fs;
+00143     }
+00144 
+00145     size_t n = m_blockSize / 2 + 1;
+00146     const float *fbuf = inputBuffers[0];
+00147 
+00148     Feature feature;
+00149     feature.hasTimestamp = false;
+00150     feature.values.reserve(n); // optional
+00151 
+00152     for (size_t i = 0; i < n; ++i) {
+00153 
+00154         double real = fbuf[i * 2];
+00155         double imag = fbuf[i * 2 + 1];
+00156 
+00157         feature.values.push_back(real * real + imag * imag);
+00158     }
+00159 
+00160     fs[0].push_back(feature);
+00161 
+00162     return fs;
+00163 }
+00164 
+00165 PowerSpectrum::FeatureSet
+00166 PowerSpectrum::getRemainingFeatures()
+00167 {
+00168     return FeatureSet();
+00169 }
+00170 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PowerSpectrum_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PowerSpectrum_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,102 @@ + + + + +VampPluginSDK: PowerSpectrum.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PowerSpectrum.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  PowerSpectrum
 Example plugin that returns a power spectrum calculated (trivially) from the frequency domain representation of each block of audio. More...
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/PowerSpectrum_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/PowerSpectrum_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,164 @@ + + + + +VampPluginSDK: PowerSpectrum.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PowerSpectrum.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _POWER_SPECTRUM_PLUGIN_H_
+00038 #define _POWER_SPECTRUM_PLUGIN_H_
+00039 
+00040 #include "vamp-sdk/Plugin.h"
+00041 
+00050 class PowerSpectrum : public Vamp::Plugin
+00051 {
+00052 public:
+00053     PowerSpectrum(float inputSampleRate);
+00054     virtual ~PowerSpectrum();
+00055 
+00056     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00057     void reset();
+00058 
+00059     InputDomain getInputDomain() const { return FrequencyDomain; }
+00060 
+00061     std::string getIdentifier() const;
+00062     std::string getName() const;
+00063     std::string getDescription() const;
+00064     std::string getMaker() const;
+00065     int getPluginVersion() const;
+00066     std::string getCopyright() const;
+00067 
+00068     OutputList getOutputDescriptors() const;
+00069 
+00070     FeatureSet process(const float *const *inputBuffers,
+00071                        Vamp::RealTime timestamp);
+00072 
+00073     FeatureSet getRemainingFeatures();
+00074 
+00075 protected:
+00076     size_t m_blockSize;
+00077 };
+00078 
+00079 
+00080 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/SpectralCentroid_8cpp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/SpectralCentroid_8cpp.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: SpectralCentroid.cpp File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SpectralCentroid.cpp File Reference
+
+
+ +

Go to the source code of this file.

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/SpectralCentroid_8cpp_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/SpectralCentroid_8cpp_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,288 @@ + + + + +VampPluginSDK: SpectralCentroid.cpp Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SpectralCentroid.cpp
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #include "SpectralCentroid.h"
+00038 
+00039 using std::string;
+00040 using std::vector;
+00041 using std::cerr;
+00042 using std::endl;
+00043 
+00044 #include <math.h>
+00045 
+00046 #ifdef __SUNPRO_CC
+00047 #include <ieeefp.h>
+00048 #define isinf(x) (!finite(x))
+00049 #endif
+00050 
+00051 #ifdef WIN32
+00052 #define isnan(x) false
+00053 #define isinf(x) false
+00054 #endif
+00055 
+00056 SpectralCentroid::SpectralCentroid(float inputSampleRate) :
+00057     Plugin(inputSampleRate),
+00058     m_stepSize(0),
+00059     m_blockSize(0)
+00060 {
+00061 }
+00062 
+00063 SpectralCentroid::~SpectralCentroid()
+00064 {
+00065 }
+00066 
+00067 string
+00068 SpectralCentroid::getIdentifier() const
+00069 {
+00070     return "spectralcentroid";
+00071 }
+00072 
+00073 string
+00074 SpectralCentroid::getName() const
+00075 {
+00076     return "Spectral Centroid";
+00077 }
+00078 
+00079 string
+00080 SpectralCentroid::getDescription() const
+00081 {
+00082     return "Calculate the centroid frequency of the spectrum of the input signal";
+00083 }
+00084 
+00085 string
+00086 SpectralCentroid::getMaker() const
+00087 {
+00088     return "Vamp SDK Example Plugins";
+00089 }
+00090 
+00091 int
+00092 SpectralCentroid::getPluginVersion() const
+00093 {
+00094     return 2;
+00095 }
+00096 
+00097 string
+00098 SpectralCentroid::getCopyright() const
+00099 {
+00100     return "Freely redistributable (BSD license)";
+00101 }
+00102 
+00103 bool
+00104 SpectralCentroid::initialise(size_t channels, size_t stepSize, size_t blockSize)
+00105 {
+00106     if (channels < getMinChannelCount() ||
+00107         channels > getMaxChannelCount()) return false;
+00108 
+00109     m_stepSize = stepSize;
+00110     m_blockSize = blockSize;
+00111 
+00112     return true;
+00113 }
+00114 
+00115 void
+00116 SpectralCentroid::reset()
+00117 {
+00118 }
+00119 
+00120 SpectralCentroid::OutputList
+00121 SpectralCentroid::getOutputDescriptors() const
+00122 {
+00123     OutputList list;
+00124 
+00125     OutputDescriptor d;
+00126     d.identifier = "logcentroid";
+00127     d.name = "Log Frequency Centroid";
+00128     d.description = "Centroid of the log weighted frequency spectrum";
+00129     d.unit = "Hz";
+00130     d.hasFixedBinCount = true;
+00131     d.binCount = 1;
+00132     d.hasKnownExtents = false;
+00133     d.isQuantized = false;
+00134     d.sampleType = OutputDescriptor::OneSamplePerStep;
+00135     list.push_back(d);
+00136 
+00137     d.identifier = "linearcentroid";
+00138     d.name = "Linear Frequency Centroid";
+00139     d.description = "Centroid of the linear frequency spectrum";
+00140     list.push_back(d);
+00141 
+00142     return list;
+00143 }
+00144 
+00145 SpectralCentroid::FeatureSet
+00146 SpectralCentroid::process(const float *const *inputBuffers, Vamp::RealTime timestamp)
+00147 {
+00148     if (m_stepSize == 0) {
+00149         cerr << "ERROR: SpectralCentroid::process: "
+00150              << "SpectralCentroid has not been initialised"
+00151              << endl;
+00152         return FeatureSet();
+00153     }
+00154 
+00155     double numLin = 0.0, numLog = 0.0, denom = 0.0;
+00156 
+00157     for (size_t i = 1; i <= m_blockSize/2; ++i) {
+00158         double freq = (double(i) * m_inputSampleRate) / m_blockSize;
+00159         double real = inputBuffers[0][i*2];
+00160         double imag = inputBuffers[0][i*2 + 1];
+00161         double scalemag = sqrt(real * real + imag * imag) / (m_blockSize/2);
+00162         numLin += freq * scalemag;
+00163         numLog += log10f(freq) * scalemag;
+00164         denom += scalemag;
+00165     }
+00166 
+00167     FeatureSet returnFeatures;
+00168 
+00169     if (denom != 0.0) {
+00170         float centroidLin = float(numLin / denom);
+00171         float centroidLog = powf(10, float(numLog / denom));
+00172 
+00173         Feature feature;
+00174         feature.hasTimestamp = false;
+00175 
+00176         if (!isnan(centroidLog) && !isinf(centroidLog)) {
+00177             feature.values.push_back(centroidLog);
+00178         }
+00179         returnFeatures[0].push_back(feature);
+00180 
+00181         feature.values.clear();
+00182         if (!isnan(centroidLin) && !isinf(centroidLin)) {
+00183             feature.values.push_back(centroidLin);
+00184         }
+00185         returnFeatures[1].push_back(feature);
+00186     }
+00187 
+00188     return returnFeatures;
+00189 }
+00190 
+00191 SpectralCentroid::FeatureSet
+00192 SpectralCentroid::getRemainingFeatures()
+00193 {
+00194     return FeatureSet();
+00195 }
+00196 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/SpectralCentroid_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/SpectralCentroid_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,102 @@ + + + + +VampPluginSDK: SpectralCentroid.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SpectralCentroid.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  SpectralCentroid
 Example plugin that calculates the centre of gravity of the frequency domain representation of each block of audio. More...
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/SpectralCentroid_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/SpectralCentroid_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,165 @@ + + + + +VampPluginSDK: SpectralCentroid.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SpectralCentroid.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _SPECTRAL_CENTROID_PLUGIN_H_
+00038 #define _SPECTRAL_CENTROID_PLUGIN_H_
+00039 
+00040 #include "vamp-sdk/Plugin.h"
+00041 
+00047 class SpectralCentroid : public Vamp::Plugin
+00048 {
+00049 public:
+00050     SpectralCentroid(float inputSampleRate);
+00051     virtual ~SpectralCentroid();
+00052 
+00053     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00054     void reset();
+00055 
+00056     InputDomain getInputDomain() const { return FrequencyDomain; }
+00057 
+00058     std::string getIdentifier() const;
+00059     std::string getName() const;
+00060     std::string getDescription() const;
+00061     std::string getMaker() const;
+00062     int getPluginVersion() const;
+00063     std::string getCopyright() const;
+00064 
+00065     OutputList getOutputDescriptors() const;
+00066 
+00067     FeatureSet process(const float *const *inputBuffers,
+00068                        Vamp::RealTime timestamp);
+00069 
+00070     FeatureSet getRemainingFeatures();
+00071 
+00072 protected:
+00073     size_t m_stepSize;
+00074     size_t m_blockSize;
+00075 };
+00076 
+00077 
+00078 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ZeroCrossing_8cpp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/ZeroCrossing_8cpp.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: ZeroCrossing.cpp File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ZeroCrossing.cpp File Reference
+
+
+ +

Go to the source code of this file.

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ZeroCrossing_8cpp_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/ZeroCrossing_8cpp_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,287 @@ + + + + +VampPluginSDK: ZeroCrossing.cpp Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ZeroCrossing.cpp
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #include "ZeroCrossing.h"
+00038 
+00039 using std::string;
+00040 using std::vector;
+00041 using std::cerr;
+00042 using std::endl;
+00043 
+00044 #include <cmath>
+00045 
+00046 ZeroCrossing::ZeroCrossing(float inputSampleRate) :
+00047     Plugin(inputSampleRate),
+00048     m_stepSize(0),
+00049     m_previousSample(0.0f)
+00050 {
+00051 }
+00052 
+00053 ZeroCrossing::~ZeroCrossing()
+00054 {
+00055 }
+00056 
+00057 string
+00058 ZeroCrossing::getIdentifier() const
+00059 {
+00060     return "zerocrossing";
+00061 }
+00062 
+00063 string
+00064 ZeroCrossing::getName() const
+00065 {
+00066     return "Zero Crossings";
+00067 }
+00068 
+00069 string
+00070 ZeroCrossing::getDescription() const
+00071 {
+00072     return "Detect and count zero crossing points";
+00073 }
+00074 
+00075 string
+00076 ZeroCrossing::getMaker() const
+00077 {
+00078     return "Vamp SDK Example Plugins";
+00079 }
+00080 
+00081 int
+00082 ZeroCrossing::getPluginVersion() const
+00083 {
+00084     return 2;
+00085 }
+00086 
+00087 string
+00088 ZeroCrossing::getCopyright() const
+00089 {
+00090     return "Freely redistributable (BSD license)";
+00091 }
+00092 
+00093 bool
+00094 ZeroCrossing::initialise(size_t channels, size_t stepSize, size_t blockSize)
+00095 {
+00096     if (channels < getMinChannelCount() ||
+00097         channels > getMaxChannelCount()) return false;
+00098 
+00099     m_stepSize = std::min(stepSize, blockSize);
+00100 
+00101     return true;
+00102 }
+00103 
+00104 void
+00105 ZeroCrossing::reset()
+00106 {
+00107     m_previousSample = 0.0f;
+00108 }
+00109 
+00110 ZeroCrossing::OutputList
+00111 ZeroCrossing::getOutputDescriptors() const
+00112 {
+00113     OutputList list;
+00114 
+00115     OutputDescriptor zc;
+00116     zc.identifier = "counts";
+00117     zc.name = "Zero Crossing Counts";
+00118     zc.description = "The number of zero crossing points per processing block";
+00119     zc.unit = "crossings";
+00120     zc.hasFixedBinCount = true;
+00121     zc.binCount = 1;
+00122     zc.hasKnownExtents = false;
+00123     zc.isQuantized = true;
+00124     zc.quantizeStep = 1.0;
+00125     zc.sampleType = OutputDescriptor::OneSamplePerStep;
+00126     list.push_back(zc);
+00127 
+00128     zc.identifier = "zerocrossings";
+00129     zc.name = "Zero Crossings";
+00130     zc.description = "The locations of zero crossing points";
+00131     zc.unit = "";
+00132     zc.hasFixedBinCount = true;
+00133     zc.binCount = 0;
+00134     zc.sampleType = OutputDescriptor::VariableSampleRate;
+00135     zc.sampleRate = m_inputSampleRate;
+00136     list.push_back(zc);
+00137 
+00138     return list;
+00139 }
+00140 
+00141 ZeroCrossing::FeatureSet
+00142 ZeroCrossing::process(const float *const *inputBuffers,
+00143                       Vamp::RealTime timestamp)
+00144 {
+00145     if (m_stepSize == 0) {
+00146         cerr << "ERROR: ZeroCrossing::process: "
+00147              << "ZeroCrossing has not been initialised"
+00148              << endl;
+00149         return FeatureSet();
+00150     }
+00151 
+00152     float prev = m_previousSample;
+00153     size_t count = 0;
+00154 
+00155     FeatureSet returnFeatures;
+00156 
+00157     for (size_t i = 0; i < m_stepSize; ++i) {
+00158 
+00159         float sample = inputBuffers[0][i];
+00160         bool crossing = false;
+00161 
+00162         if (sample <= 0.0) {
+00163             if (prev > 0.0) crossing = true;
+00164         } else if (sample > 0.0) {
+00165             if (prev <= 0.0) crossing = true;
+00166         }
+00167 
+00168         if (crossing) {
+00169             ++count; 
+00170             Feature feature;
+00171             feature.hasTimestamp = true;
+00172             feature.timestamp = timestamp +
+00173                 Vamp::RealTime::frame2RealTime(i, (size_t)m_inputSampleRate);
+00174             returnFeatures[1].push_back(feature);
+00175         }
+00176 
+00177         prev = sample;
+00178     }
+00179 
+00180     m_previousSample = prev;
+00181 
+00182     Feature feature;
+00183     feature.hasTimestamp = false;
+00184     feature.values.push_back(float(count));
+00185 
+00186     returnFeatures[0].push_back(feature);
+00187     return returnFeatures;
+00188 }
+00189 
+00190 ZeroCrossing::FeatureSet
+00191 ZeroCrossing::getRemainingFeatures()
+00192 {
+00193     return FeatureSet();
+00194 }
+00195 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ZeroCrossing_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/ZeroCrossing_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,102 @@ + + + + +VampPluginSDK: ZeroCrossing.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ZeroCrossing.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  ZeroCrossing
 Example plugin that calculates the positions and density of zero-crossing points in an audio waveform. More...
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ZeroCrossing_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/ZeroCrossing_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,165 @@ + + + + +VampPluginSDK: ZeroCrossing.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ZeroCrossing.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _ZERO_CROSSING_PLUGIN_H_
+00038 #define _ZERO_CROSSING_PLUGIN_H_
+00039 
+00040 #include "vamp-sdk/Plugin.h"
+00041 
+00047 class ZeroCrossing : public Vamp::Plugin
+00048 {
+00049 public:
+00050     ZeroCrossing(float inputSampleRate);
+00051     virtual ~ZeroCrossing();
+00052 
+00053     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00054     void reset();
+00055 
+00056     InputDomain getInputDomain() const { return TimeDomain; }
+00057 
+00058     std::string getIdentifier() const;
+00059     std::string getName() const;
+00060     std::string getDescription() const;
+00061     std::string getMaker() const;
+00062     int getPluginVersion() const;
+00063     std::string getCopyright() const;
+00064 
+00065     OutputList getOutputDescriptors() const;
+00066 
+00067     FeatureSet process(const float *const *inputBuffers,
+00068                        Vamp::RealTime timestamp);
+00069 
+00070     FeatureSet getRemainingFeatures();
+00071 
+00072 protected:
+00073     size_t m_stepSize;
+00074     float m_previousSample;
+00075 };
+00076 
+00077 
+00078 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/annotated.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/annotated.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,123 @@ + + + + +VampPluginSDK: Class List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_VampFeature
_VampFeatureList
_VampFeatureUnion
_VampFeatureV2
_VampOutputDescriptor
_VampParameterDescriptorC language API for Vamp plugins
_VampPluginDescriptor
AmplitudeFollowerExample plugin implementing the SuperCollider amplitude follower function
FixedTempoEstimator::D
Vamp::Plugin::Feature
FixedTempoEstimatorExample plugin that estimates the tempo of a short fixed-tempo sample
Vamp::Plugin::OutputDescriptor
Vamp::PluginBase::ParameterDescriptor
PercussionOnsetDetectorExample plugin that detects percussive events
Vamp::PluginVamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio or related data
Vamp::PluginAdapter< P >PluginAdapter turns a PluginAdapterBase into a specific wrapper for a particular plugin implementation
Vamp::PluginAdapterBasePluginAdapter and PluginAdapterBase provide a wrapper class that a plugin library can use to make its C++ Vamp::Plugin objects available through the Vamp C API
Vamp::PluginBaseA base class for plugins with optional configurable parameters, programs, etc
Vamp::HostExt::PluginBufferingAdapterPluginBufferingAdapter is a Vamp plugin adapter that allows plugins to be used by a host supplying an audio stream in non-overlapping buffers of arbitrary size
Vamp::HostExt::PluginChannelAdapterPluginChannelAdapter is a Vamp plugin adapter that implements a policy for management of plugins that expect a different number of input channels from the number actually available in the source audio data
Vamp::PluginHostAdapterPluginHostAdapter is a wrapper class that a Vamp host can use to make the C-language VampPluginDescriptor object appear as a C++ Vamp::Plugin object
Vamp::HostExt::PluginInputDomainAdapterPluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input into frequency-domain input for plugins that need it
Vamp::HostExt::PluginLoaderVamp::HostExt::PluginLoader is a convenience class for discovering and loading Vamp plugins using the typical plugin-path, library naming, and categorisation conventions described in the Vamp SDK documentation
Vamp::HostExt::PluginSummarisingAdapterPluginSummarisingAdapter is a Vamp plugin adapter that provides summarisation methods such as mean and median averages of output features, for use in any context where an available plugin produces individual values but the result that is actually needed is some sort of aggregate
Vamp::HostExt::PluginWrapperPluginWrapper is a simple base class for adapter plugins
PowerSpectrumExample plugin that returns a power spectrum calculated (trivially) from the frequency domain representation of each block of audio
Vamp::RealTimeRealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conversion functions
SpectralCentroidExample plugin that calculates the centre of gravity of the frequency domain representation of each block of audio
ZeroCrossingExample plugin that calculates the positions and density of zero-crossing points in an audio waveform
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/bc_s.png Binary file code-docs/bc_s.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classAmplitudeFollower-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classAmplitudeFollower-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,135 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
AmplitudeFollower Member List
+
+
+This is the complete list of members for AmplitudeFollower, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AmplitudeFollower(float inputSampleRate)AmplitudeFollower
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const AmplitudeFollower [virtual]
getCurrentProgram() const Vamp::PluginBase [inline, virtual]
getDescription() const AmplitudeFollower [virtual]
getIdentifier() const AmplitudeFollower [virtual]
getInputDomain() const AmplitudeFollower [inline, virtual]
getMaker() const AmplitudeFollower [virtual]
getMaxChannelCount() const Vamp::Plugin [inline, virtual]
getMinChannelCount() const Vamp::Plugin [inline, virtual]
getName() const AmplitudeFollower [virtual]
getOutputDescriptors() const AmplitudeFollower [virtual]
getParameter(std::string paramid) const AmplitudeFollower [virtual]
getParameterDescriptors() const AmplitudeFollower [virtual]
getPluginVersion() const AmplitudeFollower [virtual]
getPreferredBlockSize() const Vamp::Plugin [inline, virtual]
getPreferredStepSize() const Vamp::Plugin [inline, virtual]
getPrograms() const Vamp::PluginBase [inline, virtual]
getRemainingFeatures()AmplitudeFollower [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::PluginBase [inline, virtual]
initialise(size_t channels, size_t stepSize, size_t blockSize)AmplitudeFollower [virtual]
InputDomain enum nameVamp::Plugin
m_clampcoefAmplitudeFollower [protected]
m_inputSampleRateVamp::Plugin [protected]
m_previnAmplitudeFollower [protected]
m_relaxcoefAmplitudeFollower [protected]
m_stepSizeAmplitudeFollower [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
process(const float *const *inputBuffers, Vamp::RealTime timestamp)AmplitudeFollower [virtual]
ProgramList typedefVamp::PluginBase
reset()AmplitudeFollower [virtual]
selectProgram(std::string)Vamp::PluginBase [inline, virtual]
setParameter(std::string paramid, float newval)AmplitudeFollower [virtual]
TimeDomain enum valueVamp::Plugin
~AmplitudeFollower()AmplitudeFollower [virtual]
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classAmplitudeFollower.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classAmplitudeFollower.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1044 @@ + + + + +VampPluginSDK: AmplitudeFollower Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
AmplitudeFollower Class Reference
+
+
+ +

Example plugin implementing the SuperCollider amplitude follower function. + More...

+ +

#include <AmplitudeFollower.h>

+
+Inheritance diagram for AmplitudeFollower:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 AmplitudeFollower (float inputSampleRate)
 An implementation of SuperCollider's amplitude-follower algorithm as a simple Vamp plugin.
virtual ~AmplitudeFollower ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
float getParameter (std::string paramid) const
 Get the value of a named parameter.
void setParameter (std::string paramid, float newval)
 Set a named parameter.
FeatureSet process (const float *const *inputBuffers, Vamp::RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
virtual size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
virtual size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
virtual size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
virtual size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.
virtual unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
virtual ProgramList getPrograms () const
 Get the program settings available in this plugin.
virtual std::string getCurrentProgram () const
 Get the current program.
virtual void selectProgram (std::string)
 Select a program.

+Protected Attributes

size_t m_stepSize
float m_previn
float m_clampcoef
float m_relaxcoef
float m_inputSampleRate
+

Detailed Description

+

Example plugin implementing the SuperCollider amplitude follower function.

+ +

Definition at line 47 of file AmplitudeFollower.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
AmplitudeFollower::AmplitudeFollower (float inputSampleRate)
+
+
+ +

An implementation of SuperCollider's amplitude-follower algorithm as a simple Vamp plugin.

+ +

Definition at line 55 of file AmplitudeFollower.cpp.

+ +
+
+ +
+
+ + + + + + + +
AmplitudeFollower::~AmplitudeFollower () [virtual]
+
+
+ +

Definition at line 64 of file AmplitudeFollower.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool AmplitudeFollower::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 105 of file AmplitudeFollower.cpp.

+ +

References Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), m_clampcoef, Vamp::Plugin::m_inputSampleRate, m_relaxcoef, and m_stepSize.

+ +
+
+ +
+
+ + + + + + + +
void AmplitudeFollower::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implements Vamp::Plugin.

+ +

Definition at line 122 of file AmplitudeFollower.cpp.

+ +

References m_previn.

+ +
+
+ +
+
+ + + + + + + +
InputDomain AmplitudeFollower::getInputDomain () const [inline, virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 56 of file AmplitudeFollower.h.

+ +

References Vamp::Plugin::TimeDomain.

+ +
+
+ +
+
+ + + + + + + +
string AmplitudeFollower::getIdentifier () const [virtual]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 69 of file AmplitudeFollower.cpp.

+ +
+
+ +
+
+ + + + + + + +
string AmplitudeFollower::getName () const [virtual]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 75 of file AmplitudeFollower.cpp.

+ +
+
+ +
+
+ + + + + + + +
string AmplitudeFollower::getDescription () const [virtual]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 81 of file AmplitudeFollower.cpp.

+ +
+
+ +
+
+ + + + + + + +
string AmplitudeFollower::getMaker () const [virtual]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 87 of file AmplitudeFollower.cpp.

+ +
+
+ +
+
+ + + + + + + +
int AmplitudeFollower::getPluginVersion () const [virtual]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 93 of file AmplitudeFollower.cpp.

+ +
+
+ +
+
+ + + + + + + +
string AmplitudeFollower::getCopyright () const [virtual]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 99 of file AmplitudeFollower.cpp.

+ +
+
+ +
+
+ + + + + + + +
AmplitudeFollower::OutputList AmplitudeFollower::getOutputDescriptors () const [virtual]
+
+ +
+ + + +
+
+ + + + + + + + +
float AmplitudeFollower::getParameter (std::string ) const [virtual]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Definition at line 188 of file AmplitudeFollower.cpp.

+ +

References m_clampcoef, and m_relaxcoef.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void AmplitudeFollower::setParameter (std::string ,
float  
) [virtual]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Definition at line 179 of file AmplitudeFollower.cpp.

+ +

References m_clampcoef, and m_relaxcoef.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
AmplitudeFollower::FeatureSet AmplitudeFollower::process (const float *const * inputBuffers,
Vamp::RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Implements Vamp::Plugin.

+ +

Definition at line 200 of file AmplitudeFollower.cpp.

+ +

References Vamp::Plugin::Feature::hasTimestamp, m_clampcoef, m_previn, m_relaxcoef, m_stepSize, and Vamp::Plugin::Feature::values.

+ +
+
+ +
+
+ + + + + + + +
AmplitudeFollower::FeatureSet AmplitudeFollower::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 243 of file AmplitudeFollower.cpp.

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredBlockSize () const [inline, virtual, inherited]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 179 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredStepSize () const [inline, virtual, inherited]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 194 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMinChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMaxChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + + + + +
virtual unsigned int Vamp::PluginBase::getVampApiVersion () const [inline, virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 72 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual ProgramList Vamp::PluginBase::getPrograms () const [inline, virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 237 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCurrentProgram () const [inline, virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 242 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Vamp::PluginBase::selectProgram (std::string ) [inline, virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 248 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
size_t AmplitudeFollower::m_stepSize [protected]
+
+
+ +

Definition at line 77 of file AmplitudeFollower.h.

+ +

Referenced by initialise(), and process().

+ +
+
+ +
+
+ + + + +
float AmplitudeFollower::m_previn [protected]
+
+
+ +

Definition at line 78 of file AmplitudeFollower.h.

+ +

Referenced by process(), and reset().

+ +
+
+ +
+
+ + + + +
float AmplitudeFollower::m_clampcoef [protected]
+
+
+ +

Definition at line 79 of file AmplitudeFollower.h.

+ +

Referenced by getParameter(), initialise(), process(), and setParameter().

+ +
+
+ +
+
+ + + + +
float AmplitudeFollower::m_relaxcoef [protected]
+
+
+ +

Definition at line 80 of file AmplitudeFollower.h.

+ +

Referenced by getParameter(), initialise(), process(), and setParameter().

+ +
+
+ + +
The documentation for this class was generated from the following files: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classAmplitudeFollower__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classAmplitudeFollower__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,4 @@ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classAmplitudeFollower__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classAmplitudeFollower__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +378861f0015413e8059212a2b0322a82 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classAmplitudeFollower__inherit__graph.png Binary file code-docs/classAmplitudeFollower__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classFixedTempoEstimator-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classFixedTempoEstimator-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,132 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
FixedTempoEstimator Member List
+
+
+This is the complete list of members for FixedTempoEstimator, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FixedTempoEstimator(float inputSampleRate)FixedTempoEstimator
FrequencyDomain enum valueVamp::Plugin
getCopyright() const FixedTempoEstimator [virtual]
getCurrentProgram() const Vamp::PluginBase [inline, virtual]
getDescription() const FixedTempoEstimator [virtual]
getIdentifier() const FixedTempoEstimator [virtual]
getInputDomain() const FixedTempoEstimator [inline, virtual]
getMaker() const FixedTempoEstimator [virtual]
getMaxChannelCount() const Vamp::Plugin [inline, virtual]
getMinChannelCount() const Vamp::Plugin [inline, virtual]
getName() const FixedTempoEstimator [virtual]
getOutputDescriptors() const FixedTempoEstimator [virtual]
getParameter(std::string id) const FixedTempoEstimator [virtual]
getParameterDescriptors() const FixedTempoEstimator [virtual]
getPluginVersion() const FixedTempoEstimator [virtual]
getPreferredBlockSize() const FixedTempoEstimator [virtual]
getPreferredStepSize() const FixedTempoEstimator [virtual]
getPrograms() const Vamp::PluginBase [inline, virtual]
getRemainingFeatures()FixedTempoEstimator [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::PluginBase [inline, virtual]
initialise(size_t channels, size_t stepSize, size_t blockSize)FixedTempoEstimator [virtual]
InputDomain enum nameVamp::Plugin
m_dFixedTempoEstimator [protected]
m_inputSampleRateVamp::Plugin [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
process(const float *const *inputBuffers, Vamp::RealTime timestamp)FixedTempoEstimator [virtual]
ProgramList typedefVamp::PluginBase
reset()FixedTempoEstimator [virtual]
selectProgram(std::string)Vamp::PluginBase [inline, virtual]
setParameter(std::string id, float value)FixedTempoEstimator [virtual]
TimeDomain enum valueVamp::Plugin
~FixedTempoEstimator()FixedTempoEstimator [virtual]
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classFixedTempoEstimator.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classFixedTempoEstimator.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,997 @@ + + + + +VampPluginSDK: FixedTempoEstimator Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
FixedTempoEstimator Class Reference
+
+
+ +

Example plugin that estimates the tempo of a short fixed-tempo sample. + More...

+ +

#include <FixedTempoEstimator.h>

+
+Inheritance diagram for FixedTempoEstimator:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

class  D

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 FixedTempoEstimator (float inputSampleRate)
virtual ~FixedTempoEstimator ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
float getParameter (std::string id) const
 Get the value of a named parameter.
void setParameter (std::string id, float value)
 Set a named parameter.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
FeatureSet process (const float *const *inputBuffers, Vamp::RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
virtual size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
virtual size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.
virtual unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
virtual ProgramList getPrograms () const
 Get the program settings available in this plugin.
virtual std::string getCurrentProgram () const
 Get the current program.
virtual void selectProgram (std::string)
 Select a program.

+Protected Attributes

Dm_d
float m_inputSampleRate
+

Detailed Description

+

Example plugin that estimates the tempo of a short fixed-tempo sample.

+ +

Definition at line 46 of file FixedTempoEstimator.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
FixedTempoEstimator::FixedTempoEstimator (float inputSampleRate)
+
+
+ +

Definition at line 617 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + + + + +
FixedTempoEstimator::~FixedTempoEstimator () [virtual]
+
+
+ +

Definition at line 623 of file FixedTempoEstimator.cpp.

+ +

References m_d.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool FixedTempoEstimator::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 677 of file FixedTempoEstimator.cpp.

+ +

References Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), FixedTempoEstimator::D::initialise(), and m_d.

+ +
+
+ +
+
+ + + + + + + +
void FixedTempoEstimator::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implements Vamp::Plugin.

+ +

Definition at line 686 of file FixedTempoEstimator.cpp.

+ +

References m_d, and FixedTempoEstimator::D::reset().

+ +
+
+ +
+
+ + + + + + + +
InputDomain FixedTempoEstimator::getInputDomain () const [inline, virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 55 of file FixedTempoEstimator.h.

+ +

References Vamp::Plugin::FrequencyDomain.

+ +
+
+ +
+
+ + + + + + + +
string FixedTempoEstimator::getIdentifier () const [virtual]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 629 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + + + + +
string FixedTempoEstimator::getName () const [virtual]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 635 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + + + + +
string FixedTempoEstimator::getDescription () const [virtual]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 641 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + + + + +
string FixedTempoEstimator::getMaker () const [virtual]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 647 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + + + + +
int FixedTempoEstimator::getPluginVersion () const [virtual]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 653 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + + + + +
string FixedTempoEstimator::getCopyright () const [virtual]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 659 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + + + + +
size_t FixedTempoEstimator::getPreferredStepSize () const [virtual]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Definition at line 665 of file FixedTempoEstimator.cpp.

+ +

References FixedTempoEstimator::D::getPreferredStepSize(), and m_d.

+ +
+
+ +
+
+ + + + + + + +
size_t FixedTempoEstimator::getPreferredBlockSize () const [virtual]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Definition at line 671 of file FixedTempoEstimator.cpp.

+ +

References FixedTempoEstimator::D::getPreferredBlockSize(), and m_d.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors().

+ +
+
+ +
+
+ + + + + + + +
FixedTempoEstimator::ParameterList FixedTempoEstimator::getParameterDescriptors () const [virtual]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Definition at line 692 of file FixedTempoEstimator.cpp.

+ +

References FixedTempoEstimator::D::getParameterDescriptors(), and m_d.

+ +
+
+ +
+
+ + + + + + + + +
float FixedTempoEstimator::getParameter (std::string ) const [virtual]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Definition at line 698 of file FixedTempoEstimator.cpp.

+ +

References FixedTempoEstimator::D::getParameter(), and m_d.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void FixedTempoEstimator::setParameter (std::string ,
float  
) [virtual]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Definition at line 704 of file FixedTempoEstimator.cpp.

+ +

References m_d, and FixedTempoEstimator::D::setParameter().

+ +
+
+ +
+
+ + + + + + + +
FixedTempoEstimator::OutputList FixedTempoEstimator::getOutputDescriptors () const [virtual]
+
+
+ +

Get the outputs of this plugin.

+

An output's index in this list is used as its numeric index when looking it up in the FeatureSet returned from the process() call.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 710 of file FixedTempoEstimator.cpp.

+ +

References FixedTempoEstimator::D::getOutputDescriptors(), and m_d.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FixedTempoEstimator::FeatureSet FixedTempoEstimator::process (const float *const * inputBuffers,
Vamp::RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Implements Vamp::Plugin.

+ +

Definition at line 716 of file FixedTempoEstimator.cpp.

+ +

References m_d, and FixedTempoEstimator::D::process().

+ +
+
+ +
+
+ + + + + + + +
FixedTempoEstimator::FeatureSet FixedTempoEstimator::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 722 of file FixedTempoEstimator.cpp.

+ +

References FixedTempoEstimator::D::getRemainingFeatures(), and m_d.

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMinChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMaxChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + + + + +
virtual unsigned int Vamp::PluginBase::getVampApiVersion () const [inline, virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 72 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual ProgramList Vamp::PluginBase::getPrograms () const [inline, virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 237 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCurrentProgram () const [inline, virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 242 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Vamp::PluginBase::selectProgram (std::string ) [inline, virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 248 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Data Documentation

+ + + + +
The documentation for this class was generated from the following files: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classFixedTempoEstimator_1_1D-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classFixedTempoEstimator_1_1D-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,124 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
FixedTempoEstimator::D Member List
+
+
+This is the complete list of members for FixedTempoEstimator::D, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
assembleFeatures()FixedTempoEstimator::D [private]
calculate()FixedTempoEstimator::D [private]
D(float inputSampleRate)FixedTempoEstimator::D
getOutputDescriptors() const FixedTempoEstimator::D
getParameter(string id) const FixedTempoEstimator::D
getParameterDescriptors() const FixedTempoEstimator::D
getPreferredBlockSize() const FixedTempoEstimator::D [inline]
getPreferredStepSize() const FixedTempoEstimator::D [inline]
getRemainingFeatures()FixedTempoEstimator::D
initialise(size_t channels, size_t stepSize, size_t blockSize)FixedTempoEstimator::D
lag2tempo(int)FixedTempoEstimator::D [private]
m_blockSizeFixedTempoEstimator::D [private]
m_dfFixedTempoEstimator::D [private]
m_dfsizeFixedTempoEstimator::D [private]
m_frFixedTempoEstimator::D [private]
m_inputSampleRateFixedTempoEstimator::D [private]
m_lasttimeFixedTempoEstimator::D [private]
m_maxbpmFixedTempoEstimator::D [private]
m_maxdflenFixedTempoEstimator::D [private]
m_minbpmFixedTempoEstimator::D [private]
m_nFixedTempoEstimator::D [private]
m_priorMagnitudesFixedTempoEstimator::D [private]
m_rFixedTempoEstimator::D [private]
m_startFixedTempoEstimator::D [private]
m_stepSizeFixedTempoEstimator::D [private]
m_tFixedTempoEstimator::D [private]
process(const float *const *, RealTime)FixedTempoEstimator::D
reset()FixedTempoEstimator::D
setParameter(string id, float value)FixedTempoEstimator::D
tempo2lag(float)FixedTempoEstimator::D [private]
~D()FixedTempoEstimator::D
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classFixedTempoEstimator_1_1D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classFixedTempoEstimator_1_1D.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,738 @@ + + + + +VampPluginSDK: FixedTempoEstimator::D Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
FixedTempoEstimator::D Class Reference
+
+
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 D (float inputSampleRate)
 ~D ()
size_t getPreferredStepSize () const
size_t getPreferredBlockSize () const
ParameterList getParameterDescriptors () const
float getParameter (string id) const
void setParameter (string id, float value)
OutputList getOutputDescriptors () const
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
void reset ()
FeatureSet process (const float *const *, RealTime)
FeatureSet getRemainingFeatures ()

+Private Member Functions

void calculate ()
FeatureSet assembleFeatures ()
float lag2tempo (int)
int tempo2lag (float)

+Private Attributes

float m_inputSampleRate
size_t m_stepSize
size_t m_blockSize
float m_minbpm
float m_maxbpm
float m_maxdflen
float * m_priorMagnitudes
size_t m_dfsize
float * m_df
float * m_r
float * m_fr
float * m_t
size_t m_n
Vamp::RealTime m_start
Vamp::RealTime m_lasttime
+

Detailed Description

+
+

Definition at line 50 of file FixedTempoEstimator.cpp.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
FixedTempoEstimator::D::D (float inputSampleRate)
+
+
+ +

Definition at line 99 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + + + + +
FixedTempoEstimator::D::~D ()
+
+
+ +

Definition at line 115 of file FixedTempoEstimator.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
size_t FixedTempoEstimator::D::getPreferredStepSize () const [inline]
+
+
+ +

Definition at line 57 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::getPreferredStepSize().

+ +
+
+ +
+
+ + + + + + + +
size_t FixedTempoEstimator::D::getPreferredBlockSize () const [inline]
+
+
+ +

Definition at line 58 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::getPreferredBlockSize().

+ +
+
+ + + +
+
+ + + + + + + + +
float FixedTempoEstimator::D::getParameter (string id) const
+
+
+ +

Definition at line 159 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::getParameter().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void FixedTempoEstimator::D::setParameter (string id,
float value 
)
+
+
+ +

Definition at line 172 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::setParameter().

+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool FixedTempoEstimator::D::initialise (size_t channels,
size_t stepSize,
size_t blockSize 
)
+
+
+ +

Definition at line 252 of file FixedTempoEstimator.cpp.

+ +

References Vamp::Plugin::m_inputSampleRate.

+ +

Referenced by FixedTempoEstimator::initialise().

+ +
+
+ +
+
+ + + + + + + +
void FixedTempoEstimator::D::reset ()
+
+
+ +

Definition at line 276 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::reset().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FixedTempoEstimator::FeatureSet FixedTempoEstimator::D::process (const float *const * inputBuffers,
RealTime ts 
)
+
+
+ +

Definition at line 303 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::process().

+ +
+
+ +
+
+ + + + + + + +
FixedTempoEstimator::FeatureSet FixedTempoEstimator::D::getRemainingFeatures ()
+
+
+ +

Definition at line 352 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::getRemainingFeatures().

+ +
+
+ +
+
+ + + + + + + +
void FixedTempoEstimator::D::calculate () [private]
+
+
+ +

Definition at line 375 of file FixedTempoEstimator.cpp.

+ +

References Vamp::Plugin::m_inputSampleRate.

+ +
+
+ + + +
+
+ + + + + + + + +
float FixedTempoEstimator::D::lag2tempo (int lag) [private]
+
+
+ +

Definition at line 363 of file FixedTempoEstimator.cpp.

+ +

References Vamp::Plugin::m_inputSampleRate.

+ +
+
+ +
+
+ + + + + + + + +
int FixedTempoEstimator::D::tempo2lag (float tempo) [private]
+
+
+ +

Definition at line 369 of file FixedTempoEstimator.cpp.

+ +

References Vamp::Plugin::m_inputSampleRate.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
float FixedTempoEstimator::D::m_inputSampleRate [private]
+
+
+ +

Definition at line 78 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
size_t FixedTempoEstimator::D::m_stepSize [private]
+
+
+ +

Definition at line 79 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
size_t FixedTempoEstimator::D::m_blockSize [private]
+
+
+ +

Definition at line 80 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
float FixedTempoEstimator::D::m_minbpm [private]
+
+
+ +

Definition at line 82 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
float FixedTempoEstimator::D::m_maxbpm [private]
+
+
+ +

Definition at line 83 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
float FixedTempoEstimator::D::m_maxdflen [private]
+
+
+ +

Definition at line 84 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
float* FixedTempoEstimator::D::m_priorMagnitudes [private]
+
+
+ +

Definition at line 86 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
size_t FixedTempoEstimator::D::m_dfsize [private]
+
+
+ +

Definition at line 88 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
float* FixedTempoEstimator::D::m_df [private]
+
+
+ +

Definition at line 89 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
float* FixedTempoEstimator::D::m_r [private]
+
+
+ +

Definition at line 90 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
float* FixedTempoEstimator::D::m_fr [private]
+
+
+ +

Definition at line 91 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
float* FixedTempoEstimator::D::m_t [private]
+
+
+ +

Definition at line 92 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+
+ + + + +
size_t FixedTempoEstimator::D::m_n [private]
+
+
+ +

Definition at line 93 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+ +
+ +

Definition at line 95 of file FixedTempoEstimator.cpp.

+ +
+
+ +
+ +
+ +

Definition at line 96 of file FixedTempoEstimator.cpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classFixedTempoEstimator__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classFixedTempoEstimator__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,4 @@ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classFixedTempoEstimator__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classFixedTempoEstimator__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +326039cc76da1b1dddbe8c796ad3202b \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classFixedTempoEstimator__inherit__graph.png Binary file code-docs/classFixedTempoEstimator__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPercussionOnsetDetector-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classPercussionOnsetDetector-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,138 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PercussionOnsetDetector Member List
+
+
+This is the complete list of members for PercussionOnsetDetector, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const PercussionOnsetDetector [virtual]
getCurrentProgram() const Vamp::PluginBase [inline, virtual]
getDescription() const PercussionOnsetDetector [virtual]
getIdentifier() const PercussionOnsetDetector [virtual]
getInputDomain() const PercussionOnsetDetector [inline, virtual]
getMaker() const PercussionOnsetDetector [virtual]
getMaxChannelCount() const Vamp::Plugin [inline, virtual]
getMinChannelCount() const Vamp::Plugin [inline, virtual]
getName() const PercussionOnsetDetector [virtual]
getOutputDescriptors() const PercussionOnsetDetector [virtual]
getParameter(std::string id) const PercussionOnsetDetector [virtual]
getParameterDescriptors() const PercussionOnsetDetector [virtual]
getPluginVersion() const PercussionOnsetDetector [virtual]
getPreferredBlockSize() const PercussionOnsetDetector [virtual]
getPreferredStepSize() const PercussionOnsetDetector [virtual]
getPrograms() const Vamp::PluginBase [inline, virtual]
getRemainingFeatures()PercussionOnsetDetector [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::PluginBase [inline, virtual]
initialise(size_t channels, size_t stepSize, size_t blockSize)PercussionOnsetDetector [virtual]
InputDomain enum nameVamp::Plugin
m_blockSizePercussionOnsetDetector [protected]
m_dfMinus1PercussionOnsetDetector [protected]
m_dfMinus2PercussionOnsetDetector [protected]
m_inputSampleRateVamp::Plugin [protected]
m_priorMagnitudesPercussionOnsetDetector [protected]
m_sensitivityPercussionOnsetDetector [protected]
m_stepSizePercussionOnsetDetector [protected]
m_thresholdPercussionOnsetDetector [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
PercussionOnsetDetector(float inputSampleRate)PercussionOnsetDetector
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
process(const float *const *inputBuffers, Vamp::RealTime timestamp)PercussionOnsetDetector [virtual]
ProgramList typedefVamp::PluginBase
reset()PercussionOnsetDetector [virtual]
selectProgram(std::string)Vamp::PluginBase [inline, virtual]
setParameter(std::string id, float value)PercussionOnsetDetector [virtual]
TimeDomain enum valueVamp::Plugin
~PercussionOnsetDetector()PercussionOnsetDetector [virtual]
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPercussionOnsetDetector.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classPercussionOnsetDetector.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1093 @@ + + + + +VampPluginSDK: PercussionOnsetDetector Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PercussionOnsetDetector Class Reference
+
+
+ +

Example plugin that detects percussive events. + More...

+ +

#include <PercussionOnsetDetector.h>

+
+Inheritance diagram for PercussionOnsetDetector:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 PercussionOnsetDetector (float inputSampleRate)
virtual ~PercussionOnsetDetector ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
float getParameter (std::string id) const
 Get the value of a named parameter.
void setParameter (std::string id, float value)
 Set a named parameter.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
FeatureSet process (const float *const *inputBuffers, Vamp::RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
virtual size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
virtual size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.
virtual unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
virtual ProgramList getPrograms () const
 Get the program settings available in this plugin.
virtual std::string getCurrentProgram () const
 Get the current program.
virtual void selectProgram (std::string)
 Select a program.

+Protected Attributes

size_t m_stepSize
size_t m_blockSize
float m_threshold
float m_sensitivity
float * m_priorMagnitudes
float m_dfMinus1
float m_dfMinus2
float m_inputSampleRate
+

Detailed Description

+

Example plugin that detects percussive events.

+ +

Definition at line 46 of file PercussionOnsetDetector.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
PercussionOnsetDetector::PercussionOnsetDetector (float inputSampleRate)
+
+
+ +

Definition at line 47 of file PercussionOnsetDetector.cpp.

+ +
+
+ +
+
+ + + + + + + +
PercussionOnsetDetector::~PercussionOnsetDetector () [virtual]
+
+
+ +

Definition at line 59 of file PercussionOnsetDetector.cpp.

+ +

References m_priorMagnitudes.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool PercussionOnsetDetector::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 113 of file PercussionOnsetDetector.cpp.

+ +

References Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), m_blockSize, m_dfMinus1, m_dfMinus2, m_priorMagnitudes, and m_stepSize.

+ +
+
+ +
+
+ + + + + + + +
void PercussionOnsetDetector::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implements Vamp::Plugin.

+ +

Definition at line 134 of file PercussionOnsetDetector.cpp.

+ +

References m_blockSize, m_dfMinus1, m_dfMinus2, and m_priorMagnitudes.

+ +
+
+ +
+
+ + + + + + + +
InputDomain PercussionOnsetDetector::getInputDomain () const [inline, virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 55 of file PercussionOnsetDetector.h.

+ +

References Vamp::Plugin::FrequencyDomain.

+ +
+
+ +
+
+ + + + + + + +
string PercussionOnsetDetector::getIdentifier () const [virtual]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 65 of file PercussionOnsetDetector.cpp.

+ +
+
+ +
+
+ + + + + + + +
string PercussionOnsetDetector::getName () const [virtual]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 71 of file PercussionOnsetDetector.cpp.

+ +
+
+ +
+
+ + + + + + + +
string PercussionOnsetDetector::getDescription () const [virtual]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 77 of file PercussionOnsetDetector.cpp.

+ +
+
+ +
+
+ + + + + + + +
string PercussionOnsetDetector::getMaker () const [virtual]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 83 of file PercussionOnsetDetector.cpp.

+ +
+
+ +
+
+ + + + + + + +
int PercussionOnsetDetector::getPluginVersion () const [virtual]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 89 of file PercussionOnsetDetector.cpp.

+ +
+
+ +
+
+ + + + + + + +
string PercussionOnsetDetector::getCopyright () const [virtual]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 95 of file PercussionOnsetDetector.cpp.

+ +
+
+ +
+
+ + + + + + + +
size_t PercussionOnsetDetector::getPreferredStepSize () const [virtual]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Definition at line 101 of file PercussionOnsetDetector.cpp.

+ +
+
+ +
+
+ + + + + + + +
size_t PercussionOnsetDetector::getPreferredBlockSize () const [virtual]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Definition at line 107 of file PercussionOnsetDetector.cpp.

+ +
+
+ + + +
+
+ + + + + + + + +
float PercussionOnsetDetector::getParameter (std::string ) const [virtual]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Definition at line 174 of file PercussionOnsetDetector.cpp.

+ +

References m_sensitivity, and m_threshold.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void PercussionOnsetDetector::setParameter (std::string ,
float  
) [virtual]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Definition at line 182 of file PercussionOnsetDetector.cpp.

+ +

References m_sensitivity, and m_threshold.

+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + +
PercussionOnsetDetector::FeatureSet PercussionOnsetDetector::process (const float *const * inputBuffers,
Vamp::RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Implements Vamp::Plugin.

+ +

Definition at line 226 of file PercussionOnsetDetector.cpp.

+ +

References Vamp::RealTime::frame2RealTime(), Vamp::Plugin::Feature::hasTimestamp, m_blockSize, m_dfMinus1, m_dfMinus2, Vamp::Plugin::m_inputSampleRate, m_priorMagnitudes, m_sensitivity, m_stepSize, m_threshold, Vamp::Plugin::Feature::timestamp, and Vamp::Plugin::Feature::values.

+ +
+
+ +
+
+ + + + + + + +
PercussionOnsetDetector::FeatureSet PercussionOnsetDetector::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 283 of file PercussionOnsetDetector.cpp.

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMinChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMaxChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + + + + +
virtual unsigned int Vamp::PluginBase::getVampApiVersion () const [inline, virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 72 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual ProgramList Vamp::PluginBase::getPrograms () const [inline, virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 237 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCurrentProgram () const [inline, virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 242 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Vamp::PluginBase::selectProgram (std::string ) [inline, virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 248 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
size_t PercussionOnsetDetector::m_stepSize [protected]
+
+
+ +

Definition at line 79 of file PercussionOnsetDetector.h.

+ +

Referenced by initialise(), and process().

+ +
+
+ +
+
+ + + + +
size_t PercussionOnsetDetector::m_blockSize [protected]
+
+
+ +

Definition at line 80 of file PercussionOnsetDetector.h.

+ +

Referenced by initialise(), process(), and reset().

+ +
+
+ +
+
+ + + + +
float PercussionOnsetDetector::m_threshold [protected]
+
+
+ +

Definition at line 82 of file PercussionOnsetDetector.h.

+ +

Referenced by getParameter(), process(), and setParameter().

+ +
+
+ +
+
+ + + + +
float PercussionOnsetDetector::m_sensitivity [protected]
+
+
+ +

Definition at line 83 of file PercussionOnsetDetector.h.

+ +

Referenced by getParameter(), process(), and setParameter().

+ +
+
+ +
+
+ + + + +
float* PercussionOnsetDetector::m_priorMagnitudes [protected]
+
+
+ +

Definition at line 84 of file PercussionOnsetDetector.h.

+ +

Referenced by initialise(), process(), reset(), and ~PercussionOnsetDetector().

+ +
+
+ +
+
+ + + + +
float PercussionOnsetDetector::m_dfMinus1 [protected]
+
+
+ +

Definition at line 85 of file PercussionOnsetDetector.h.

+ +

Referenced by initialise(), process(), and reset().

+ +
+
+ +
+
+ + + + +
float PercussionOnsetDetector::m_dfMinus2 [protected]
+
+
+ +

Definition at line 86 of file PercussionOnsetDetector.h.

+ +

Referenced by initialise(), process(), and reset().

+ +
+
+ + +
The documentation for this class was generated from the following files: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPercussionOnsetDetector__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classPercussionOnsetDetector__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,4 @@ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPercussionOnsetDetector__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classPercussionOnsetDetector__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +65a7ed879a604f7c870b2fede02ff821 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPercussionOnsetDetector__inherit__graph.png Binary file code-docs/classPercussionOnsetDetector__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPowerSpectrum-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classPowerSpectrum-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,132 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
PowerSpectrum Member List
+
+
+This is the complete list of members for PowerSpectrum, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const PowerSpectrum [virtual]
getCurrentProgram() const Vamp::PluginBase [inline, virtual]
getDescription() const PowerSpectrum [virtual]
getIdentifier() const PowerSpectrum [virtual]
getInputDomain() const PowerSpectrum [inline, virtual]
getMaker() const PowerSpectrum [virtual]
getMaxChannelCount() const Vamp::Plugin [inline, virtual]
getMinChannelCount() const Vamp::Plugin [inline, virtual]
getName() const PowerSpectrum [virtual]
getOutputDescriptors() const PowerSpectrum [virtual]
getParameter(std::string) const Vamp::PluginBase [inline, virtual]
getParameterDescriptors() const Vamp::PluginBase [inline, virtual]
getPluginVersion() const PowerSpectrum [virtual]
getPreferredBlockSize() const Vamp::Plugin [inline, virtual]
getPreferredStepSize() const Vamp::Plugin [inline, virtual]
getPrograms() const Vamp::PluginBase [inline, virtual]
getRemainingFeatures()PowerSpectrum [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::PluginBase [inline, virtual]
initialise(size_t channels, size_t stepSize, size_t blockSize)PowerSpectrum [virtual]
InputDomain enum nameVamp::Plugin
m_blockSizePowerSpectrum [protected]
m_inputSampleRateVamp::Plugin [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
PowerSpectrum(float inputSampleRate)PowerSpectrum
process(const float *const *inputBuffers, Vamp::RealTime timestamp)PowerSpectrum [virtual]
ProgramList typedefVamp::PluginBase
reset()PowerSpectrum [virtual]
selectProgram(std::string)Vamp::PluginBase [inline, virtual]
setParameter(std::string, float)Vamp::PluginBase [inline, virtual]
TimeDomain enum valueVamp::Plugin
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
~PowerSpectrum()PowerSpectrum [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPowerSpectrum.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classPowerSpectrum.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,982 @@ + + + + +VampPluginSDK: PowerSpectrum Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
PowerSpectrum Class Reference
+
+
+ +

Example plugin that returns a power spectrum calculated (trivially) from the frequency domain representation of each block of audio. + More...

+ +

#include <PowerSpectrum.h>

+
+Inheritance diagram for PowerSpectrum:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 PowerSpectrum (float inputSampleRate)
virtual ~PowerSpectrum ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
FeatureSet process (const float *const *inputBuffers, Vamp::RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
virtual size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
virtual size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
virtual size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
virtual size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.
virtual unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
virtual ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
virtual float getParameter (std::string) const
 Get the value of a named parameter.
virtual void setParameter (std::string, float)
 Set a named parameter.
virtual ProgramList getPrograms () const
 Get the program settings available in this plugin.
virtual std::string getCurrentProgram () const
 Get the current program.
virtual void selectProgram (std::string)
 Select a program.

+Protected Attributes

size_t m_blockSize
float m_inputSampleRate
+

Detailed Description

+

Example plugin that returns a power spectrum calculated (trivially) from the frequency domain representation of each block of audio.

+

This is one of the simplest possible Vamp plugins, included as an example of how to return the appropriate value structure for this sort of visualisation.

+ +

Definition at line 50 of file PowerSpectrum.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
PowerSpectrum::PowerSpectrum (float inputSampleRate)
+
+
+ +

Definition at line 45 of file PowerSpectrum.cpp.

+ +
+
+ +
+
+ + + + + + + +
PowerSpectrum::~PowerSpectrum () [virtual]
+
+
+ +

Definition at line 51 of file PowerSpectrum.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool PowerSpectrum::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 92 of file PowerSpectrum.cpp.

+ +

References Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), and m_blockSize.

+ +
+
+ +
+
+ + + + + + + +
void PowerSpectrum::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implements Vamp::Plugin.

+ +

Definition at line 103 of file PowerSpectrum.cpp.

+ +
+
+ +
+
+ + + + + + + +
InputDomain PowerSpectrum::getInputDomain () const [inline, virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 59 of file PowerSpectrum.h.

+ +

References Vamp::Plugin::FrequencyDomain.

+ +
+
+ +
+
+ + + + + + + +
string PowerSpectrum::getIdentifier () const [virtual]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 56 of file PowerSpectrum.cpp.

+ +
+
+ +
+
+ + + + + + + +
string PowerSpectrum::getName () const [virtual]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 62 of file PowerSpectrum.cpp.

+ +
+
+ +
+
+ + + + + + + +
string PowerSpectrum::getDescription () const [virtual]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 68 of file PowerSpectrum.cpp.

+ +
+
+ +
+
+ + + + + + + +
string PowerSpectrum::getMaker () const [virtual]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 74 of file PowerSpectrum.cpp.

+ +
+
+ +
+
+ + + + + + + +
int PowerSpectrum::getPluginVersion () const [virtual]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 80 of file PowerSpectrum.cpp.

+ +
+
+ +
+
+ + + + + + + +
string PowerSpectrum::getCopyright () const [virtual]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 86 of file PowerSpectrum.cpp.

+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + +
PowerSpectrum::FeatureSet PowerSpectrum::process (const float *const * inputBuffers,
Vamp::RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Implements Vamp::Plugin.

+ +

Definition at line 136 of file PowerSpectrum.cpp.

+ +

References Vamp::Plugin::Feature::hasTimestamp, m_blockSize, and Vamp::Plugin::Feature::values.

+ +
+
+ +
+
+ + + + + + + +
PowerSpectrum::FeatureSet PowerSpectrum::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 166 of file PowerSpectrum.cpp.

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredBlockSize () const [inline, virtual, inherited]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 179 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredStepSize () const [inline, virtual, inherited]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 194 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMinChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMaxChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + + + + +
virtual unsigned int Vamp::PluginBase::getVampApiVersion () const [inline, virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 72 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual ParameterList Vamp::PluginBase::getParameterDescriptors () const [inline, virtual, inherited]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 208 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + + +
virtual float Vamp::PluginBase::getParameter (std::string ) const [inline, virtual, inherited]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 216 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Vamp::PluginBase::setParameter (std::string ,
float  
) [inline, virtual, inherited]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 222 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual ProgramList Vamp::PluginBase::getPrograms () const [inline, virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 237 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCurrentProgram () const [inline, virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 242 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Vamp::PluginBase::selectProgram (std::string ) [inline, virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 248 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
size_t PowerSpectrum::m_blockSize [protected]
+
+
+ +

Definition at line 76 of file PowerSpectrum.h.

+ +

Referenced by getOutputDescriptors(), initialise(), and process().

+ +
+
+ + +
The documentation for this class was generated from the following files: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPowerSpectrum__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classPowerSpectrum__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,4 @@ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPowerSpectrum__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classPowerSpectrum__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +c9f07b131caa51e199fa4d4ebafc8ea7 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classPowerSpectrum__inherit__graph.png Binary file code-docs/classPowerSpectrum__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classSpectralCentroid-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classSpectralCentroid-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,133 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
SpectralCentroid Member List
+
+
+This is the complete list of members for SpectralCentroid, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const SpectralCentroid [virtual]
getCurrentProgram() const Vamp::PluginBase [inline, virtual]
getDescription() const SpectralCentroid [virtual]
getIdentifier() const SpectralCentroid [virtual]
getInputDomain() const SpectralCentroid [inline, virtual]
getMaker() const SpectralCentroid [virtual]
getMaxChannelCount() const Vamp::Plugin [inline, virtual]
getMinChannelCount() const Vamp::Plugin [inline, virtual]
getName() const SpectralCentroid [virtual]
getOutputDescriptors() const SpectralCentroid [virtual]
getParameter(std::string) const Vamp::PluginBase [inline, virtual]
getParameterDescriptors() const Vamp::PluginBase [inline, virtual]
getPluginVersion() const SpectralCentroid [virtual]
getPreferredBlockSize() const Vamp::Plugin [inline, virtual]
getPreferredStepSize() const Vamp::Plugin [inline, virtual]
getPrograms() const Vamp::PluginBase [inline, virtual]
getRemainingFeatures()SpectralCentroid [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::PluginBase [inline, virtual]
initialise(size_t channels, size_t stepSize, size_t blockSize)SpectralCentroid [virtual]
InputDomain enum nameVamp::Plugin
m_blockSizeSpectralCentroid [protected]
m_inputSampleRateVamp::Plugin [protected]
m_stepSizeSpectralCentroid [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
process(const float *const *inputBuffers, Vamp::RealTime timestamp)SpectralCentroid [virtual]
ProgramList typedefVamp::PluginBase
reset()SpectralCentroid [virtual]
selectProgram(std::string)Vamp::PluginBase [inline, virtual]
setParameter(std::string, float)Vamp::PluginBase [inline, virtual]
SpectralCentroid(float inputSampleRate)SpectralCentroid
TimeDomain enum valueVamp::Plugin
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
~SpectralCentroid()SpectralCentroid [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classSpectralCentroid.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classSpectralCentroid.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,999 @@ + + + + +VampPluginSDK: SpectralCentroid Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
SpectralCentroid Class Reference
+
+
+ +

Example plugin that calculates the centre of gravity of the frequency domain representation of each block of audio. + More...

+ +

#include <SpectralCentroid.h>

+
+Inheritance diagram for SpectralCentroid:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 SpectralCentroid (float inputSampleRate)
virtual ~SpectralCentroid ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
FeatureSet process (const float *const *inputBuffers, Vamp::RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
virtual size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
virtual size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
virtual size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
virtual size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.
virtual unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
virtual ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
virtual float getParameter (std::string) const
 Get the value of a named parameter.
virtual void setParameter (std::string, float)
 Set a named parameter.
virtual ProgramList getPrograms () const
 Get the program settings available in this plugin.
virtual std::string getCurrentProgram () const
 Get the current program.
virtual void selectProgram (std::string)
 Select a program.

+Protected Attributes

size_t m_stepSize
size_t m_blockSize
float m_inputSampleRate
+

Detailed Description

+

Example plugin that calculates the centre of gravity of the frequency domain representation of each block of audio.

+ +

Definition at line 47 of file SpectralCentroid.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
SpectralCentroid::SpectralCentroid (float inputSampleRate)
+
+
+ +

Definition at line 56 of file SpectralCentroid.cpp.

+ +
+
+ +
+
+ + + + + + + +
SpectralCentroid::~SpectralCentroid () [virtual]
+
+
+ +

Definition at line 63 of file SpectralCentroid.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SpectralCentroid::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 104 of file SpectralCentroid.cpp.

+ +

References Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), m_blockSize, and m_stepSize.

+ +
+
+ +
+
+ + + + + + + +
void SpectralCentroid::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implements Vamp::Plugin.

+ +

Definition at line 116 of file SpectralCentroid.cpp.

+ +
+
+ +
+
+ + + + + + + +
InputDomain SpectralCentroid::getInputDomain () const [inline, virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 56 of file SpectralCentroid.h.

+ +

References Vamp::Plugin::FrequencyDomain.

+ +
+
+ +
+
+ + + + + + + +
string SpectralCentroid::getIdentifier () const [virtual]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 68 of file SpectralCentroid.cpp.

+ +
+
+ +
+
+ + + + + + + +
string SpectralCentroid::getName () const [virtual]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 74 of file SpectralCentroid.cpp.

+ +
+
+ +
+
+ + + + + + + +
string SpectralCentroid::getDescription () const [virtual]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 80 of file SpectralCentroid.cpp.

+ +
+
+ +
+
+ + + + + + + +
string SpectralCentroid::getMaker () const [virtual]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 86 of file SpectralCentroid.cpp.

+ +
+
+ +
+
+ + + + + + + +
int SpectralCentroid::getPluginVersion () const [virtual]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 92 of file SpectralCentroid.cpp.

+ +
+
+ +
+
+ + + + + + + +
string SpectralCentroid::getCopyright () const [virtual]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 98 of file SpectralCentroid.cpp.

+ +
+
+ +
+
+ + + + + + + +
SpectralCentroid::OutputList SpectralCentroid::getOutputDescriptors () const [virtual]
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
SpectralCentroid::FeatureSet SpectralCentroid::process (const float *const * inputBuffers,
Vamp::RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Implements Vamp::Plugin.

+ +

Definition at line 146 of file SpectralCentroid.cpp.

+ +

References Vamp::Plugin::Feature::hasTimestamp, m_blockSize, Vamp::Plugin::m_inputSampleRate, m_stepSize, and Vamp::Plugin::Feature::values.

+ +
+
+ +
+
+ + + + + + + +
SpectralCentroid::FeatureSet SpectralCentroid::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 192 of file SpectralCentroid.cpp.

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredBlockSize () const [inline, virtual, inherited]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 179 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredStepSize () const [inline, virtual, inherited]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 194 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMinChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMaxChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + + + + +
virtual unsigned int Vamp::PluginBase::getVampApiVersion () const [inline, virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 72 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual ParameterList Vamp::PluginBase::getParameterDescriptors () const [inline, virtual, inherited]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 208 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + + +
virtual float Vamp::PluginBase::getParameter (std::string ) const [inline, virtual, inherited]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 216 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Vamp::PluginBase::setParameter (std::string ,
float  
) [inline, virtual, inherited]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 222 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual ProgramList Vamp::PluginBase::getPrograms () const [inline, virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 237 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCurrentProgram () const [inline, virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 242 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Vamp::PluginBase::selectProgram (std::string ) [inline, virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 248 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
size_t SpectralCentroid::m_stepSize [protected]
+
+
+ +

Definition at line 73 of file SpectralCentroid.h.

+ +

Referenced by initialise(), and process().

+ +
+
+ +
+
+ + + + +
size_t SpectralCentroid::m_blockSize [protected]
+
+
+ +

Definition at line 74 of file SpectralCentroid.h.

+ +

Referenced by initialise(), and process().

+ +
+
+ + +
The documentation for this class was generated from the following files: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classSpectralCentroid__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classSpectralCentroid__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,4 @@ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classSpectralCentroid__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classSpectralCentroid__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +7e73ddf67ea78e976dc767617b467cc0 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classSpectralCentroid__inherit__graph.png Binary file code-docs/classSpectralCentroid__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,141 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::HostExt::PluginBufferingAdapter Member List
+
+
+This is the complete list of members for Vamp::HostExt::PluginBufferingAdapter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getActualStepAndBlockSizes(size_t &stepSize, size_t &blockSize)Vamp::HostExt::PluginBufferingAdapter
getCopyright() const Vamp::HostExt::PluginWrapper [virtual]
getCurrentProgram() const Vamp::HostExt::PluginWrapper [virtual]
getDescription() const Vamp::HostExt::PluginWrapper [virtual]
getIdentifier() const Vamp::HostExt::PluginWrapper [virtual]
getInputDomain() const Vamp::HostExt::PluginWrapper [virtual]
getMaker() const Vamp::HostExt::PluginWrapper [virtual]
getMaxChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getMinChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getName() const Vamp::HostExt::PluginWrapper [virtual]
getOutputDescriptors() const Vamp::HostExt::PluginBufferingAdapter [virtual]
getParameter(std::string) const Vamp::HostExt::PluginWrapper [virtual]
getParameterDescriptors() const Vamp::HostExt::PluginWrapper [virtual]
getPluginPreferredBlockSize() const Vamp::HostExt::PluginBufferingAdapter
getPluginPreferredStepSize() const Vamp::HostExt::PluginBufferingAdapter
getPluginVersion() const Vamp::HostExt::PluginWrapper [virtual]
getPreferredBlockSize() const Vamp::HostExt::PluginBufferingAdapter [virtual]
getPreferredStepSize() const Vamp::HostExt::PluginBufferingAdapter [virtual]
getPrograms() const Vamp::HostExt::PluginWrapper [virtual]
getRemainingFeatures()Vamp::HostExt::PluginBufferingAdapter [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::HostExt::PluginWrapper [virtual]
getWrapper()Vamp::HostExt::PluginWrapper [inline]
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::HostExt::PluginBufferingAdapter [virtual]
InputDomain enum nameVamp::Plugin
m_implVamp::HostExt::PluginBufferingAdapter [protected]
m_inputSampleRateVamp::Plugin [protected]
m_pluginVamp::HostExt::PluginWrapper [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
PluginBufferingAdapter(Plugin *plugin)Vamp::HostExt::PluginBufferingAdapter
PluginWrapper(Plugin *plugin)Vamp::HostExt::PluginWrapper [protected]
process(const float *const *inputBuffers, RealTime timestamp)Vamp::HostExt::PluginBufferingAdapter [virtual]
ProgramList typedefVamp::PluginBase
reset()Vamp::HostExt::PluginBufferingAdapter [virtual]
selectProgram(std::string)Vamp::HostExt::PluginBufferingAdapter [virtual]
setParameter(std::string, float)Vamp::HostExt::PluginBufferingAdapter [virtual]
setPluginBlockSize(size_t blockSize)Vamp::HostExt::PluginBufferingAdapter
setPluginStepSize(size_t stepSize)Vamp::HostExt::PluginBufferingAdapter
TimeDomain enum valueVamp::Plugin
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
~PluginBufferingAdapter()Vamp::HostExt::PluginBufferingAdapter [virtual]
~PluginWrapper()Vamp::HostExt::PluginWrapper [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1082 @@ + + + + +VampPluginSDK: Vamp::HostExt::PluginBufferingAdapter Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::HostExt::PluginBufferingAdapter Class Reference
+
+
+ +

PluginBufferingAdapter is a Vamp plugin adapter that allows plugins to be used by a host supplying an audio stream in non-overlapping buffers of arbitrary size. + More...

+ +

#include <vamp-hostsdk/PluginBufferingAdapter.h>

+
+Inheritance diagram for Vamp::HostExt::PluginBufferingAdapter:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 PluginBufferingAdapter (Plugin *plugin)
 Construct a PluginBufferingAdapter wrapping the given plugin.
virtual ~PluginBufferingAdapter ()
size_t getPreferredStepSize () const
 Return the preferred step size for this adapter.
size_t getPreferredBlockSize () const
 Return the preferred block size for this adapter.
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise the adapter (and therefore the plugin) for the given number of channels.
size_t getPluginPreferredStepSize () const
 Return the preferred step size of the plugin wrapped by this adapter.
size_t getPluginPreferredBlockSize () const
 Return the preferred block size of the plugin wrapped by this adapter.
void setPluginStepSize (size_t stepSize)
 Set the step size that will be used for the underlying plugin when initialise() is called.
void setPluginBlockSize (size_t blockSize)
 Set the block size that will be used for the underlying plugin when initialise() is called.
void getActualStepAndBlockSizes (size_t &stepSize, size_t &blockSize)
 Return the step and block sizes that were actually used when initialising the underlying plugin.
void setParameter (std::string, float)
 Set a named parameter.
void selectProgram (std::string)
 Select a program.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
float getParameter (std::string) const
 Get the value of a named parameter.
ProgramList getPrograms () const
 Get the program settings available in this plugin.
std::string getCurrentProgram () const
 Get the current program.
size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
template<typename WrapperType >
WrapperType * getWrapper ()
 Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+Protected Attributes

Impl * m_impl
Pluginm_plugin
float m_inputSampleRate
+

Detailed Description

+

PluginBufferingAdapter is a Vamp plugin adapter that allows plugins to be used by a host supplying an audio stream in non-overlapping buffers of arbitrary size.

+

A host using PluginBufferingAdapter may ignore the preferred step and block size reported by the plugin, and still expect the plugin to run. The value of blockSize and stepSize passed to initialise should be the size of the buffer which the host will supply; the stepSize should be equal to the blockSize.

+

If the internal step size used for the plugin differs from that supplied by the host, the adapter will modify the sample type and rate specifications for the plugin outputs appropriately, and set timestamps on the output features for outputs that formerly used a different sample rate specification. This is necessary in order to obtain correct time stamping.

+

In other respects, the PluginBufferingAdapter behaves identically to the plugin that it wraps. The wrapped plugin will be deleted when the wrapper is deleted.

+ +

Definition at line 75 of file PluginBufferingAdapter.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter (Pluginplugin)
+
+
+ +

Construct a PluginBufferingAdapter wrapping the given plugin.

+

The adapter takes ownership of the plugin, which will be deleted when the adapter is deleted.

+ +
+
+ +
+
+ + + + + + + +
virtual Vamp::HostExt::PluginBufferingAdapter::~PluginBufferingAdapter () [virtual]
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginBufferingAdapter::getPreferredStepSize () const [virtual]
+
+
+ +

Return the preferred step size for this adapter.

+

Because of the way this adapter works, its preferred step size will always be the same as its preferred block size. This may or may not be the same as the preferred step size of the underlying plugin, which may be obtained by calling getPluginPreferredStepSize().

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginBufferingAdapter::getPreferredBlockSize () const [virtual]
+
+
+ +

Return the preferred block size for this adapter.

+

This may or may not be the same as the preferred block size of the underlying plugin, which may be obtained by calling getPluginPreferredBlockSize().

+

Note that this adapter may be initialised with any block size, not just its supposedly preferred one.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Vamp::HostExt::PluginBufferingAdapter::initialise (size_t channels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise the adapter (and therefore the plugin) for the given number of channels.

+

Initialise the adapter for the given step and block size, which must be equal.

+

The step and block size used for the underlying plugin will depend on its preferences, or any values previously passed to setPluginStepSize and setPluginBlockSize.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginBufferingAdapter::getPluginPreferredStepSize () const
+
+
+ +

Return the preferred step size of the plugin wrapped by this adapter.

+

This is included mainly for informational purposes. This value is not likely to be a valid step size for the adapter itself, and it is not usually of any use in interpreting the results (because the adapter re-writes OneSamplePerStep outputs to FixedSampleRate so that the hop size no longer needs to be known beforehand in order to interpret them).

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginBufferingAdapter::getPluginPreferredBlockSize () const
+
+
+ +

Return the preferred block size of the plugin wrapped by this adapter.

+

This is included mainly for informational purposes.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginBufferingAdapter::setPluginStepSize (size_t stepSize)
+
+
+ +

Set the step size that will be used for the underlying plugin when initialise() is called.

+

If this is not set, the plugin's own preferred step size will be used. You will not usually need to call this function. If you do call it, it must be before the first call to initialise().

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginBufferingAdapter::setPluginBlockSize (size_t blockSize)
+
+
+ +

Set the block size that will be used for the underlying plugin when initialise() is called.

+

If this is not set, the plugin's own preferred block size will be used. You will not usually need to call this function. If you do call it, it must be before the first call to initialise().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Vamp::HostExt::PluginBufferingAdapter::getActualStepAndBlockSizes (size_t & stepSize,
size_t & blockSize 
)
+
+
+ +

Return the step and block sizes that were actually used when initialising the underlying plugin.

+

This is included mainly for informational purposes. You will not usually need to call this function. If this is called before initialise(), it will return 0 for both values. If it is called after a failed call to initialise(), it will return the values that were used in the failed call to the plugin's initialise() function.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Vamp::HostExt::PluginBufferingAdapter::setParameter (std::string ,
float  
) [virtual]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginBufferingAdapter::selectProgram (std::string ) [virtual]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
OutputList Vamp::HostExt::PluginBufferingAdapter::getOutputDescriptors () const [virtual]
+
+
+ +

Get the outputs of this plugin.

+

An output's index in this list is used as its numeric index when looking it up in the FeatureSet returned from the process() call.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
void Vamp::HostExt::PluginBufferingAdapter::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FeatureSet Vamp::HostExt::PluginBufferingAdapter::process (const float *const * inputBuffers,
RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
FeatureSet Vamp::HostExt::PluginBufferingAdapter::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
InputDomain Vamp::HostExt::PluginWrapper::getInputDomain () const [virtual, inherited]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter.

+ +
+
+ +
+
+ + + + + + + +
unsigned int Vamp::HostExt::PluginWrapper::getVampApiVersion () const [virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getIdentifier () const [virtual, inherited]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getName () const [virtual, inherited]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getDescription () const [virtual, inherited]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getMaker () const [virtual, inherited]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
int Vamp::HostExt::PluginWrapper::getPluginVersion () const [virtual, inherited]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCopyright () const [virtual, inherited]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors () const [virtual, inherited]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
float Vamp::HostExt::PluginWrapper::getParameter (std::string ) const [virtual, inherited]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
ProgramList Vamp::HostExt::PluginWrapper::getPrograms () const [virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCurrentProgram () const [virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMinChannelCount () const [virtual, inherited]
+
+
+ +

Get the minimum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMaxChannelCount () const [virtual, inherited]
+
+
+ +

Get the maximum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+
+template<typename WrapperType >
+ + + + + + + +
WrapperType* Vamp::HostExt::PluginWrapper::getWrapper () [inline, inherited]
+
+
+ +

Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.

+

This is useful in situations where a plugin is wrapped by multiple different wrappers (one inside another) and the host wants to call some wrapper-specific function on one of the layers without having to care about the order in which they are wrapped. For example, the plugin returned by PluginLoader::loadPlugin may have more than one wrapper; if the host wanted to query or fine-tune some property of one of them, it would be hard to do so without knowing the order of the wrappers. This function therefore gives direct access to the wrapper of a particular type.

+ +

Definition at line 116 of file PluginWrapper.h.

+ +

References Vamp::HostExt::PluginWrapper::getWrapper().

+ +

Referenced by Vamp::HostExt::PluginWrapper::getWrapper(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
Impl* Vamp::HostExt::PluginBufferingAdapter::m_impl [protected]
+
+
+ +

Definition at line 184 of file PluginBufferingAdapter.h.

+ +
+
+ +
+
+ + + + +
Plugin* Vamp::HostExt::PluginWrapper::m_plugin [protected, inherited]
+
+
+ +

Definition at line 126 of file PluginWrapper.h.

+ +
+
+ + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,5 @@ + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +b3be1bdefae501d137e8a9fd93bcd450 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.png Binary file code-docs/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,137 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::HostExt::PluginChannelAdapter Member List
+
+
+This is the complete list of members for Vamp::HostExt::PluginChannelAdapter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const Vamp::HostExt::PluginWrapper [virtual]
getCurrentProgram() const Vamp::HostExt::PluginWrapper [virtual]
getDescription() const Vamp::HostExt::PluginWrapper [virtual]
getIdentifier() const Vamp::HostExt::PluginWrapper [virtual]
getInputDomain() const Vamp::HostExt::PluginWrapper [virtual]
getMaker() const Vamp::HostExt::PluginWrapper [virtual]
getMaxChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getMinChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getName() const Vamp::HostExt::PluginWrapper [virtual]
getOutputDescriptors() const Vamp::HostExt::PluginWrapper [virtual]
getParameter(std::string) const Vamp::HostExt::PluginWrapper [virtual]
getParameterDescriptors() const Vamp::HostExt::PluginWrapper [virtual]
getPluginVersion() const Vamp::HostExt::PluginWrapper [virtual]
getPreferredBlockSize() const Vamp::HostExt::PluginWrapper [virtual]
getPreferredStepSize() const Vamp::HostExt::PluginWrapper [virtual]
getPrograms() const Vamp::HostExt::PluginWrapper [virtual]
getRemainingFeatures()Vamp::HostExt::PluginWrapper [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::HostExt::PluginWrapper [virtual]
getWrapper()Vamp::HostExt::PluginWrapper [inline]
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::HostExt::PluginChannelAdapter [virtual]
InputDomain enum nameVamp::Plugin
m_implVamp::HostExt::PluginChannelAdapter [protected]
m_inputSampleRateVamp::Plugin [protected]
m_pluginVamp::HostExt::PluginWrapper [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
PluginChannelAdapter(Plugin *plugin)Vamp::HostExt::PluginChannelAdapter
PluginWrapper(Plugin *plugin)Vamp::HostExt::PluginWrapper [protected]
process(const float *const *inputBuffers, RealTime timestamp)Vamp::HostExt::PluginChannelAdapter [virtual]
processInterleaved(const float *inputBuffer, RealTime timestamp)Vamp::HostExt::PluginChannelAdapter
ProgramList typedefVamp::PluginBase
reset()Vamp::HostExt::PluginWrapper [virtual]
selectProgram(std::string)Vamp::HostExt::PluginWrapper [virtual]
setParameter(std::string, float)Vamp::HostExt::PluginWrapper [virtual]
TimeDomain enum valueVamp::Plugin
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
~PluginChannelAdapter()Vamp::HostExt::PluginChannelAdapter [virtual]
~PluginWrapper()Vamp::HostExt::PluginWrapper [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1032 @@ + + + + +VampPluginSDK: Vamp::HostExt::PluginChannelAdapter Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::HostExt::PluginChannelAdapter Class Reference
+
+
+ +

PluginChannelAdapter is a Vamp plugin adapter that implements a policy for management of plugins that expect a different number of input channels from the number actually available in the source audio data. + More...

+ +

#include <vamp-hostsdk/PluginChannelAdapter.h>

+
+Inheritance diagram for Vamp::HostExt::PluginChannelAdapter:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 PluginChannelAdapter (Plugin *plugin)
 Construct a PluginChannelAdapter wrapping the given plugin.
virtual ~PluginChannelAdapter ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)
 Process a single block of input data.
FeatureSet processInterleaved (const float *inputBuffer, RealTime timestamp)
 Call process(), providing interleaved audio data with the number of channels passed to initialise().
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
float getParameter (std::string) const
 Get the value of a named parameter.
void setParameter (std::string, float)
 Set a named parameter.
ProgramList getPrograms () const
 Get the program settings available in this plugin.
std::string getCurrentProgram () const
 Get the current program.
void selectProgram (std::string)
 Select a program.
size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
template<typename WrapperType >
WrapperType * getWrapper ()
 Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+Protected Attributes

Impl * m_impl
Pluginm_plugin
float m_inputSampleRate
+

Detailed Description

+

PluginChannelAdapter is a Vamp plugin adapter that implements a policy for management of plugins that expect a different number of input channels from the number actually available in the source audio data.

+

A host using PluginChannelAdapter may ignore the getMinChannelCount and getMaxChannelCount reported by the plugin, and still expect the plugin to run.

+

PluginChannelAdapter implements the following policy:

+
    +
  • If the plugin supports the provided number of channels directly, PluginChannelAdapter will just run the plugin as normal.
  • +
+
    +
  • If the plugin only supports exactly one channel but more than one channel is provided, PluginChannelAdapter will use the mean of the channels. This ensures that the resulting values remain within the same magnitude range as expected for mono data.
  • +
+
    +
  • If the plugin requires more than one channel but exactly one is provided, the provided channel will be duplicated across all the plugin input channels.
  • +
+

If none of the above apply:

+
    +
  • If the plugin requires more channels than are provided, the minimum acceptable number of channels will be produced by adding empty (zero valued) channels to those provided.
  • +
+
    +
  • If the plugin requires fewer channels than are provided, the maximum acceptable number of channels will be produced by discarding the excess channels.
  • +
+

Hosts requiring a different channel policy from the above will need to implement it themselves, instead of using PluginChannelAdapter.

+

Note that PluginChannelAdapter does not override the minimum and maximum channel counts returned by the wrapped plugin. The host will need to be aware that it is using a PluginChannelAdapter, and be prepared to ignore these counts as necessary. (This contrasts with the approach used in PluginInputDomainAdapter, which aims to make the host completely unaware of which underlying input domain is in fact in use.)

+

(The rationale for this is that a host may wish to use the PluginChannelAdapter but still discriminate in some way on the basis of the number of channels actually supported. For example, a simple stereo audio host may prefer to reject plugins that require more than two channels on the grounds that doesn't actually understand what they are for, rather than allow the channel adapter to make a potentially meaningless channel conversion for them.)

+

In every respect other than its management of channels, the PluginChannelAdapter behaves identically to the plugin that it wraps. The wrapped plugin will be deleted when the wrapper is deleted.

+
Note:
This class was introduced in version 1.1 of the Vamp plugin SDK.
+ +

Definition at line 112 of file PluginChannelAdapter.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Vamp::HostExt::PluginChannelAdapter::PluginChannelAdapter (Pluginplugin)
+
+
+ +

Construct a PluginChannelAdapter wrapping the given plugin.

+

The adapter takes ownership of the plugin, which will be deleted when the adapter is deleted.

+ +
+
+ +
+
+ + + + + + + +
virtual Vamp::HostExt::PluginChannelAdapter::~PluginChannelAdapter () [virtual]
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Vamp::HostExt::PluginChannelAdapter::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FeatureSet Vamp::HostExt::PluginChannelAdapter::process (const float *const * inputBuffers,
RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FeatureSet Vamp::HostExt::PluginChannelAdapter::processInterleaved (const float * inputBuffer,
RealTime timestamp 
)
+
+
+ +

Call process(), providing interleaved audio data with the number of channels passed to initialise().

+

The adapter will de-interleave into temporary buffers as appropriate before calling process().

+
Note:
This function was introduced in version 1.4 of the Vamp plugin SDK.
+ +
+
+ +
+
+ + + + + + + +
void Vamp::HostExt::PluginWrapper::reset () [virtual, inherited]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, and Vamp::HostExt::PluginSummarisingAdapter.

+ +
+
+ +
+
+ + + + + + + +
InputDomain Vamp::HostExt::PluginWrapper::getInputDomain () const [virtual, inherited]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter.

+ +
+
+ +
+
+ + + + + + + +
unsigned int Vamp::HostExt::PluginWrapper::getVampApiVersion () const [virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getIdentifier () const [virtual, inherited]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getName () const [virtual, inherited]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getDescription () const [virtual, inherited]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getMaker () const [virtual, inherited]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
int Vamp::HostExt::PluginWrapper::getPluginVersion () const [virtual, inherited]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCopyright () const [virtual, inherited]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors () const [virtual, inherited]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
float Vamp::HostExt::PluginWrapper::getParameter (std::string ) const [virtual, inherited]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Vamp::HostExt::PluginWrapper::setParameter (std::string ,
float  
) [virtual, inherited]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
ProgramList Vamp::HostExt::PluginWrapper::getPrograms () const [virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCurrentProgram () const [virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginWrapper::selectProgram (std::string ) [virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented from Vamp::PluginBase.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getPreferredStepSize () const [virtual, inherited]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter, and Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getPreferredBlockSize () const [virtual, inherited]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, and Vamp::HostExt::PluginInputDomainAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMinChannelCount () const [virtual, inherited]
+
+
+ +

Get the minimum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMaxChannelCount () const [virtual, inherited]
+
+
+ +

Get the maximum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors () const [virtual, inherited]
+
+
+ +

Get the outputs of this plugin.

+

An output's index in this list is used as its numeric index when looking it up in the FeatureSet returned from the process() call.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
FeatureSet Vamp::HostExt::PluginWrapper::getRemainingFeatures () [virtual, inherited]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, and Vamp::HostExt::PluginSummarisingAdapter.

+ +
+
+ +
+
+
+template<typename WrapperType >
+ + + + + + + +
WrapperType* Vamp::HostExt::PluginWrapper::getWrapper () [inline, inherited]
+
+
+ +

Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.

+

This is useful in situations where a plugin is wrapped by multiple different wrappers (one inside another) and the host wants to call some wrapper-specific function on one of the layers without having to care about the order in which they are wrapped. For example, the plugin returned by PluginLoader::loadPlugin may have more than one wrapper; if the host wanted to query or fine-tune some property of one of them, it would be hard to do so without knowing the order of the wrappers. This function therefore gives direct access to the wrapper of a particular type.

+ +

Definition at line 116 of file PluginWrapper.h.

+ +

References Vamp::HostExt::PluginWrapper::getWrapper().

+ +

Referenced by Vamp::HostExt::PluginWrapper::getWrapper(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
Impl* Vamp::HostExt::PluginChannelAdapter::m_impl [protected]
+
+
+ +

Definition at line 139 of file PluginChannelAdapter.h.

+ +
+
+ +
+
+ + + + +
Plugin* Vamp::HostExt::PluginWrapper::m_plugin [protected, inherited]
+
+
+ +

Definition at line 126 of file PluginWrapper.h.

+ +
+
+ + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,5 @@ + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +3448b64532b61eb89ef1b984342e8530 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.png Binary file code-docs/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,155 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::HostExt::PluginInputDomainAdapter Member List
+
+
+This is the complete list of members for Vamp::HostExt::PluginInputDomainAdapter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BartlettWindow enum valueVamp::HostExt::PluginInputDomainAdapter
BlackmanHarrisWindow enum valueVamp::HostExt::PluginInputDomainAdapter
BlackmanWindow enum valueVamp::HostExt::PluginInputDomainAdapter
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const Vamp::HostExt::PluginWrapper [virtual]
getCurrentProgram() const Vamp::HostExt::PluginWrapper [virtual]
getDescription() const Vamp::HostExt::PluginWrapper [virtual]
getIdentifier() const Vamp::HostExt::PluginWrapper [virtual]
getInputDomain() const Vamp::HostExt::PluginInputDomainAdapter [virtual]
getMaker() const Vamp::HostExt::PluginWrapper [virtual]
getMaxChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getMinChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getName() const Vamp::HostExt::PluginWrapper [virtual]
getOutputDescriptors() const Vamp::HostExt::PluginWrapper [virtual]
getParameter(std::string) const Vamp::HostExt::PluginWrapper [virtual]
getParameterDescriptors() const Vamp::HostExt::PluginWrapper [virtual]
getPluginVersion() const Vamp::HostExt::PluginWrapper [virtual]
getPreferredBlockSize() const Vamp::HostExt::PluginInputDomainAdapter [virtual]
getPreferredStepSize() const Vamp::HostExt::PluginInputDomainAdapter [virtual]
getProcessTimestampMethod() const Vamp::HostExt::PluginInputDomainAdapter
getPrograms() const Vamp::HostExt::PluginWrapper [virtual]
getRemainingFeatures()Vamp::HostExt::PluginWrapper [virtual]
getTimestampAdjustment() const Vamp::HostExt::PluginInputDomainAdapter
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::HostExt::PluginWrapper [virtual]
getWindowType() const Vamp::HostExt::PluginInputDomainAdapter
getWrapper()Vamp::HostExt::PluginWrapper [inline]
HammingWindow enum valueVamp::HostExt::PluginInputDomainAdapter
HanningWindow enum valueVamp::HostExt::PluginInputDomainAdapter
HannWindow enum valueVamp::HostExt::PluginInputDomainAdapter
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::HostExt::PluginInputDomainAdapter [virtual]
InputDomain enum nameVamp::Plugin
m_implVamp::HostExt::PluginInputDomainAdapter [protected]
m_inputSampleRateVamp::Plugin [protected]
m_pluginVamp::HostExt::PluginWrapper [protected]
NoShift enum valueVamp::HostExt::PluginInputDomainAdapter
NuttallWindow enum valueVamp::HostExt::PluginInputDomainAdapter
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
PluginInputDomainAdapter(Plugin *plugin)Vamp::HostExt::PluginInputDomainAdapter
PluginWrapper(Plugin *plugin)Vamp::HostExt::PluginWrapper [protected]
process(const float *const *inputBuffers, RealTime timestamp)Vamp::HostExt::PluginInputDomainAdapter [virtual]
ProcessTimestampMethod enum nameVamp::HostExt::PluginInputDomainAdapter
ProgramList typedefVamp::PluginBase
RectangularWindow enum valueVamp::HostExt::PluginInputDomainAdapter
reset()Vamp::HostExt::PluginInputDomainAdapter [virtual]
selectProgram(std::string)Vamp::HostExt::PluginWrapper [virtual]
setParameter(std::string, float)Vamp::HostExt::PluginWrapper [virtual]
setProcessTimestampMethod(ProcessTimestampMethod)Vamp::HostExt::PluginInputDomainAdapter
setWindowType(WindowType type)Vamp::HostExt::PluginInputDomainAdapter
ShiftData enum valueVamp::HostExt::PluginInputDomainAdapter
ShiftTimestamp enum valueVamp::HostExt::PluginInputDomainAdapter
TimeDomain enum valueVamp::Plugin
TriangularWindow enum valueVamp::HostExt::PluginInputDomainAdapter
WindowType enum nameVamp::HostExt::PluginInputDomainAdapter
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
~PluginInputDomainAdapter()Vamp::HostExt::PluginInputDomainAdapter [virtual]
~PluginWrapper()Vamp::HostExt::PluginWrapper [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1182 @@ + + + + +VampPluginSDK: Vamp::HostExt::PluginInputDomainAdapter Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::HostExt::PluginInputDomainAdapter Class Reference
+
+
+ +

PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input into frequency-domain input for plugins that need it. + More...

+ +

#include <vamp-hostsdk/PluginInputDomainAdapter.h>

+
+Inheritance diagram for Vamp::HostExt::PluginInputDomainAdapter:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  ProcessTimestampMethod { ShiftTimestamp, +ShiftData, +NoShift + }
 ProcessTimestampMethod determines how the PluginInputDomainAdapter handles timestamps for the data passed to the process() function of the plugin it wraps, in the case where the plugin is expecting frequency-domain data. More...
enum  WindowType {
+  RectangularWindow = 0, +BartlettWindow = 1, +TriangularWindow = 1, +HammingWindow = 2, +
+  HanningWindow = 3, +HannWindow = 3, +BlackmanWindow = 4, +NuttallWindow = 7, +
+  BlackmanHarrisWindow = 8 +
+ }
 The set of supported window shapes. More...
enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 PluginInputDomainAdapter (Plugin *plugin)
 Construct a PluginInputDomainAdapter wrapping the given plugin.
virtual ~PluginInputDomainAdapter ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)
 Process a single block of input data.
void setProcessTimestampMethod (ProcessTimestampMethod)
 Set the method used for timestamp adjustment in plugins taking frequency-domain input.
ProcessTimestampMethod getProcessTimestampMethod () const
 Retrieve the method used for timestamp adjustment in plugins taking frequency-domain input.
RealTime getTimestampAdjustment () const
 Return the amount by which the timestamps supplied to process() are being incremented when they are passed to the plugin's own process() implementation.
WindowType getWindowType () const
 Return the current window shape.
void setWindowType (WindowType type)
 Set the current window shape.
unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
float getParameter (std::string) const
 Get the value of a named parameter.
void setParameter (std::string, float)
 Set a named parameter.
ProgramList getPrograms () const
 Get the program settings available in this plugin.
std::string getCurrentProgram () const
 Get the current program.
void selectProgram (std::string)
 Select a program.
size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
template<typename WrapperType >
WrapperType * getWrapper ()
 Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+Protected Attributes

Impl * m_impl
Pluginm_plugin
float m_inputSampleRate
+

Detailed Description

+

PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input into frequency-domain input for plugins that need it.

+

This permits a host to use time- and frequency-domain plugins interchangeably without needing to handle the conversion itself.

+

This adapter uses a basic windowed FFT (using Hann window by default) that supports power-of-two block sizes only. If a frequency domain plugin requests a non-power-of-two blocksize, the adapter will adjust it to a nearby power of two instead. Thus, getPreferredBlockSize() will always return a power of two if the wrapped plugin is a frequency domain one. If the plugin doesn't accept the adjusted power of two block size, initialise() will fail.

+

The adapter provides no way for the host to discover whether the underlying plugin is actually a time or frequency domain plugin (except that if the preferred block size is not a power of two, it must be a time domain plugin).

+

The FFT implementation is simple and self-contained, but unlikely to be the fastest available: a host can usually do better if it cares enough.

+

The window shape for the FFT frame can be set using setWindowType and the current shape retrieved using getWindowType. (This was added in v2.3 of the SDK.)

+

In every respect other than its input domain handling, the PluginInputDomainAdapter behaves identically to the plugin that it wraps. The wrapped plugin will be deleted when the wrapper is deleted.

+
Note:
This class was introduced in version 1.1 of the Vamp plugin SDK.
+ +

Definition at line 87 of file PluginInputDomainAdapter.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+ +
+ +

ProcessTimestampMethod determines how the PluginInputDomainAdapter handles timestamps for the data passed to the process() function of the plugin it wraps, in the case where the plugin is expecting frequency-domain data.

+

The Vamp specification requires that the timestamp passed to the plugin for frequency-domain input should be that of the centre of the processing block, rather than the start as is the case for time-domain input.

+

Since PluginInputDomainAdapter aims to be transparent in use, it needs to handle this timestamp adjustment itself. However, some control is available over the method used for adjustment, by means of the ProcessTimestampMethod setting.

+

If ProcessTimestampMethod is set to ShiftTimestamp (the default), then the data passed to the wrapped plugin will be calculated from the same input data block as passed to the wrapper, but the timestamp passed to the plugin will be advanced by half of the window size.

+

If ProcessTimestampMethod is set to ShiftData, then the timestamp passed to the wrapped plugin will be the same as that passed to the process call of the wrapper, but the data block used to calculate the input will be shifted back (earlier) by half of the window size, with half a block of zero padding at the start of the first process call. This has the advantage of preserving the first half block of audio without any deterioration from window shaping.

+

If ProcessTimestampMethod is set to NoShift, then no adjustment will be made and the timestamps will be incorrect.

+
Enumerator:
+ + + +
ShiftTimestamp  +
ShiftData  +
NoShift  +
+
+
+ +

Definition at line 142 of file PluginInputDomainAdapter.h.

+ +
+
+ +
+ +
+ +

The set of supported window shapes.

+
Enumerator:
+ + + + + + + + + +
RectangularWindow  +
BartlettWindow  +
TriangularWindow  +

synonym for RectangularWindow

+
HammingWindow  +

synonym for BartlettWindow

+
HanningWindow  +
HannWindow  +

synonym for HannWindow

+
BlackmanWindow  +

synonym for HanningWindow

+
NuttallWindow  +
BlackmanHarrisWindow  +
+
+
+ +

Definition at line 195 of file PluginInputDomainAdapter.h.

+ +
+
+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter (Pluginplugin)
+
+
+ +

Construct a PluginInputDomainAdapter wrapping the given plugin.

+

The adapter takes ownership of the plugin, which will be deleted when the adapter is deleted.

+ +
+
+ +
+
+ + + + + + + +
virtual Vamp::HostExt::PluginInputDomainAdapter::~PluginInputDomainAdapter () [virtual]
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Vamp::HostExt::PluginInputDomainAdapter::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
void Vamp::HostExt::PluginInputDomainAdapter::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
InputDomain Vamp::HostExt::PluginInputDomainAdapter::getInputDomain () const [virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginInputDomainAdapter::getPreferredStepSize () const [virtual]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginInputDomainAdapter::getPreferredBlockSize () const [virtual]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FeatureSet Vamp::HostExt::PluginInputDomainAdapter::process (const float *const * inputBuffers,
RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginInputDomainAdapter::setProcessTimestampMethod (ProcessTimestampMethod )
+
+
+ +

Set the method used for timestamp adjustment in plugins taking frequency-domain input.

+

See the ProcessTimestampMethod documentation for details.

+

This function must be called before the first call to process().

+ +
+
+ +
+
+ + + + + + + +
ProcessTimestampMethod Vamp::HostExt::PluginInputDomainAdapter::getProcessTimestampMethod () const
+
+
+ +

Retrieve the method used for timestamp adjustment in plugins taking frequency-domain input.

+

See the ProcessTimestampMethod documentation for details.

+ +
+
+ +
+
+ + + + + + + +
RealTime Vamp::HostExt::PluginInputDomainAdapter::getTimestampAdjustment () const
+
+
+ +

Return the amount by which the timestamps supplied to process() are being incremented when they are passed to the plugin's own process() implementation.

+

The Vamp API mandates that the timestamp passed to the plugin for time-domain input should be the time of the first sample in the block, but the timestamp passed for frequency-domain input should be the timestamp of the centre of the block.

+

The PluginInputDomainAdapter adjusts its timestamps properly so that the plugin receives correct times, but in some circumstances (such as for establishing the correct timing of implicitly-timed features, i.e. features without their own timestamps) the host may need to be aware that this adjustment is taking place.

+

If the plugin requires time-domain input or the PluginInputDomainAdapter is configured with its ProcessTimestampMethod set to ShiftData instead of ShiftTimestamp, then this function will return zero.

+

The result of calling this function before initialise() has been called is undefined.

+ +

Referenced by runPlugin().

+ +
+
+ +
+
+ + + + + + + +
WindowType Vamp::HostExt::PluginInputDomainAdapter::getWindowType () const
+
+
+ +

Return the current window shape.

+

The default is HanningWindow.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginInputDomainAdapter::setWindowType (WindowType type)
+
+
+ +

Set the current window shape.

+ +
+
+ +
+
+ + + + + + + +
unsigned int Vamp::HostExt::PluginWrapper::getVampApiVersion () const [virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getIdentifier () const [virtual, inherited]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getName () const [virtual, inherited]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getDescription () const [virtual, inherited]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getMaker () const [virtual, inherited]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
int Vamp::HostExt::PluginWrapper::getPluginVersion () const [virtual, inherited]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCopyright () const [virtual, inherited]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors () const [virtual, inherited]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
float Vamp::HostExt::PluginWrapper::getParameter (std::string ) const [virtual, inherited]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Vamp::HostExt::PluginWrapper::setParameter (std::string ,
float  
) [virtual, inherited]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
ProgramList Vamp::HostExt::PluginWrapper::getPrograms () const [virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCurrentProgram () const [virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginWrapper::selectProgram (std::string ) [virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented from Vamp::PluginBase.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMinChannelCount () const [virtual, inherited]
+
+
+ +

Get the minimum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMaxChannelCount () const [virtual, inherited]
+
+
+ +

Get the maximum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors () const [virtual, inherited]
+
+
+ +

Get the outputs of this plugin.

+

An output's index in this list is used as its numeric index when looking it up in the FeatureSet returned from the process() call.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
FeatureSet Vamp::HostExt::PluginWrapper::getRemainingFeatures () [virtual, inherited]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, and Vamp::HostExt::PluginSummarisingAdapter.

+ +
+
+ +
+
+
+template<typename WrapperType >
+ + + + + + + +
WrapperType* Vamp::HostExt::PluginWrapper::getWrapper () [inline, inherited]
+
+
+ +

Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.

+

This is useful in situations where a plugin is wrapped by multiple different wrappers (one inside another) and the host wants to call some wrapper-specific function on one of the layers without having to care about the order in which they are wrapped. For example, the plugin returned by PluginLoader::loadPlugin may have more than one wrapper; if the host wanted to query or fine-tune some property of one of them, it would be hard to do so without knowing the order of the wrappers. This function therefore gives direct access to the wrapper of a particular type.

+ +

Definition at line 116 of file PluginWrapper.h.

+ +

References Vamp::HostExt::PluginWrapper::getWrapper().

+ +

Referenced by Vamp::HostExt::PluginWrapper::getWrapper(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 226 of file PluginInputDomainAdapter.h.

+ +
+
+ +
+
+ + + + +
Plugin* Vamp::HostExt::PluginWrapper::m_plugin [protected, inherited]
+
+
+ +

Definition at line 126 of file PluginWrapper.h.

+ +
+
+ + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,5 @@ + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +bb2695c4dab223710ed0b6904102564c \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.png Binary file code-docs/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginLoader-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginLoader-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,112 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::HostExt::PluginLoader Member List
+
+
+This is the complete list of members for Vamp::HostExt::PluginLoader, including all inherited members. + + + + + + + + + + + + + + + + + + + +
ADAPT_ALL enum valueVamp::HostExt::PluginLoader
ADAPT_ALL_SAFE enum valueVamp::HostExt::PluginLoader
ADAPT_BUFFER_SIZE enum valueVamp::HostExt::PluginLoader
ADAPT_CHANNEL_COUNT enum valueVamp::HostExt::PluginLoader
ADAPT_INPUT_DOMAIN enum valueVamp::HostExt::PluginLoader
AdapterFlags enum nameVamp::HostExt::PluginLoader
composePluginKey(std::string libraryName, std::string identifier)Vamp::HostExt::PluginLoader
getInstance()Vamp::HostExt::PluginLoader [static]
getLibraryPathForPlugin(PluginKey plugin)Vamp::HostExt::PluginLoader
getPluginCategory(PluginKey plugin)Vamp::HostExt::PluginLoader
listPlugins()Vamp::HostExt::PluginLoader
loadPlugin(PluginKey key, float inputSampleRate, int adapterFlags=0)Vamp::HostExt::PluginLoader
m_implVamp::HostExt::PluginLoader [protected]
m_instanceVamp::HostExt::PluginLoader [protected, static]
PluginCategoryHierarchy typedefVamp::HostExt::PluginLoader
PluginKey typedefVamp::HostExt::PluginLoader
PluginKeyList typedefVamp::HostExt::PluginLoader
PluginLoader()Vamp::HostExt::PluginLoader [protected]
~PluginLoader()Vamp::HostExt::PluginLoader [protected, virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginLoader.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginLoader.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,486 @@ + + + + +VampPluginSDK: Vamp::HostExt::PluginLoader Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::HostExt::PluginLoader Class Reference
+
+
+ +

Vamp::HostExt::PluginLoader is a convenience class for discovering and loading Vamp plugins using the typical plugin-path, library naming, and categorisation conventions described in the Vamp SDK documentation. + More...

+ +

#include <vamp-hostsdk/PluginLoader.h>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  AdapterFlags {
+  ADAPT_INPUT_DOMAIN = 0x01, +ADAPT_CHANNEL_COUNT = 0x02, +ADAPT_BUFFER_SIZE = 0x04, +ADAPT_ALL_SAFE = 0x03, +
+  ADAPT_ALL = 0xff +
+ }
 AdapterFlags contains a set of values that may be OR'd together to indicate in which circumstances PluginLoader should use a plugin adapter to make a plugin easier to use for a host that does not want to cater for complex features. More...
typedef std::string PluginKey
 PluginKey is a string type that is used to identify a plugin uniquely within the scope of "the current system".
typedef std::vector< PluginKeyPluginKeyList
 PluginKeyList is a sequence of plugin keys, such as returned by listPlugins().
typedef std::vector< std::string > PluginCategoryHierarchy
 PluginCategoryHierarchy is a sequence of general->specific category names, as may be associated with a single plugin.

+Public Member Functions

PluginKeyList listPlugins ()
 Search for all available Vamp plugins, and return a list of them in the order in which they were found.
PluginloadPlugin (PluginKey key, float inputSampleRate, int adapterFlags=0)
 Load a Vamp plugin, given its identifying key.
PluginKey composePluginKey (std::string libraryName, std::string identifier)
 Given a Vamp plugin library name and plugin identifier, return the corresponding plugin key in a form suitable for passing in to loadPlugin().
PluginCategoryHierarchy getPluginCategory (PluginKey plugin)
 Return the category hierarchy for a Vamp plugin, given its identifying key.
std::string getLibraryPathForPlugin (PluginKey plugin)
 Return the file path of the dynamic library from which the given plugin will be loaded (if available).

+Static Public Member Functions

static PluginLoadergetInstance ()
 Obtain a pointer to the singleton instance of PluginLoader.

+Protected Member Functions

 PluginLoader ()
virtual ~PluginLoader ()

+Protected Attributes

Impl * m_impl

+Static Protected Attributes

static PluginLoaderm_instance
+

Detailed Description

+

Vamp::HostExt::PluginLoader is a convenience class for discovering and loading Vamp plugins using the typical plugin-path, library naming, and categorisation conventions described in the Vamp SDK documentation.

+

This class is intended to greatly simplify the task of becoming a Vamp plugin host for any C++ application.

+

Hosts are not required by the Vamp specification to use the same plugin search path and naming conventions as implemented by this class, and are certainly not required to use this actual class. But we do strongly recommend it.

+
Note:
This class was introduced in version 1.1 of the Vamp plugin SDK.
+ +

Definition at line 72 of file PluginLoader.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::string Vamp::HostExt::PluginLoader::PluginKey
+
+
+ +

PluginKey is a string type that is used to identify a plugin uniquely within the scope of "the current system".

+

It consists of the lower-cased base name of the plugin library, a colon separator, and the identifier string for the plugin. It is only meaningful in the context of a given plugin path (the one returned by PluginHostAdapter::getPluginPath()).

+

Use composePluginKey() to construct a plugin key from a known plugin library name and identifier.

+

Note: the fact that the library component of the key is lower-cased implies that library names are matched case-insensitively by the PluginLoader class, regardless of the case sensitivity of the underlying filesystem. (Plugin identifiers _are_ case sensitive, however.) Also, it is not possible to portably extract a working library name from a plugin key, as the result may fail on case-sensitive filesystems. Use getLibraryPathForPlugin() instead.

+ +

Definition at line 101 of file PluginLoader.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<PluginKey> Vamp::HostExt::PluginLoader::PluginKeyList
+
+
+ +

PluginKeyList is a sequence of plugin keys, such as returned by listPlugins().

+ +

Definition at line 107 of file PluginLoader.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::HostExt::PluginLoader::PluginCategoryHierarchy
+
+
+ +

PluginCategoryHierarchy is a sequence of general->specific category names, as may be associated with a single plugin.

+

This sequence describes the location of a plugin within a category forest, containing the human-readable names of the plugin's category tree root, followed by each of the nodes down to the leaf containing the plugin.

+
See also:
getPluginCategory()
+ +

Definition at line 119 of file PluginLoader.h.

+ +
+
+

Member Enumeration Documentation

+ +
+ +
+ +

AdapterFlags contains a set of values that may be OR'd together to indicate in which circumstances PluginLoader should use a plugin adapter to make a plugin easier to use for a host that does not want to cater for complex features.

+

The available flags are:

+

ADAPT_INPUT_DOMAIN - If the plugin expects frequency domain input, wrap it in a PluginInputDomainAdapter that automatically converts the plugin to one that expects time-domain input. This enables a host to accommodate time- and frequency-domain plugins without needing to do any conversion itself.

+

ADAPT_CHANNEL_COUNT - Wrap the plugin in a PluginChannelAdapter to handle any mismatch between the number of channels of audio the plugin can handle and the number available in the host. This enables a host to use plugins that may require the input to be mixed down to mono, etc., without having to worry about doing that itself.

+

ADAPT_BUFFER_SIZE - Wrap the plugin in a PluginBufferingAdapter permitting the host to provide audio input using any block size, with no overlap, regardless of the plugin's preferred block size (suitable for hosts that read from non-seekable streaming media, for example). This adapter introduces some run-time overhead and also changes the semantics of the plugin slightly (see the PluginBufferingAdapter header documentation for details).

+

ADAPT_ALL_SAFE - Perform all available adaptations that are meaningful for the plugin and "safe". Currently this means to ADAPT_INPUT_DOMAIN if the plugin wants FrequencyDomain input; ADAPT_CHANNEL_COUNT always; and ADAPT_BUFFER_SIZE never.

+

ADAPT_ALL - Perform all available adaptations that are meaningful for the plugin.

+

See PluginInputDomainAdapter, PluginChannelAdapter and PluginBufferingAdapter for more details of the classes that the loader may use if these flags are set.

+
Enumerator:
+ + + + + +
ADAPT_INPUT_DOMAIN  +
ADAPT_CHANNEL_COUNT  +
ADAPT_BUFFER_SIZE  +
ADAPT_ALL_SAFE  +
ADAPT_ALL  +
+
+
+ +

Definition at line 169 of file PluginLoader.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Vamp::HostExt::PluginLoader::PluginLoader () [protected]
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual Vamp::HostExt::PluginLoader::~PluginLoader () [protected, virtual]
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
static PluginLoader* Vamp::HostExt::PluginLoader::getInstance () [static]
+
+
+ +

Obtain a pointer to the singleton instance of PluginLoader.

+

Use this to obtain your loader object.

+ +
+
+ +
+
+ + + + + + + +
PluginKeyList Vamp::HostExt::PluginLoader::listPlugins ()
+
+
+ +

Search for all available Vamp plugins, and return a list of them in the order in which they were found.

+ +

Referenced by enumeratePlugins(), and printPluginCategoryList().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Plugin* Vamp::HostExt::PluginLoader::loadPlugin (PluginKey key,
float inputSampleRate,
int adapterFlags = 0 
)
+
+
+ +

Load a Vamp plugin, given its identifying key.

+

If the plugin could not be loaded, returns 0.

+

The returned plugin should be deleted (using the standard C++ delete keyword) after use.

+
Parameters:
+ + +
adapterFlagsa bitwise OR of the values in the AdapterFlags enumeration, indicating under which circumstances an adapter should be used to wrap the original plugin. If adapterFlags is 0, no optional adapters will be used. Otherwise, the returned plugin may be of an adapter class type which will behave identically to the original plugin, apart from any particular features implemented by the adapter itself.
+
+
+
See also:
AdapterFlags, PluginInputDomainAdapter, PluginChannelAdapter
+ +

Referenced by enumeratePlugins(), printPluginCategoryList(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
PluginKey Vamp::HostExt::PluginLoader::composePluginKey (std::string libraryName,
std::string identifier 
)
+
+
+ +

Given a Vamp plugin library name and plugin identifier, return the corresponding plugin key in a form suitable for passing in to loadPlugin().

+ +

Referenced by runPlugin().

+ +
+
+ +
+
+ + + + + + + + +
PluginCategoryHierarchy Vamp::HostExt::PluginLoader::getPluginCategory (PluginKey plugin)
+
+
+ +

Return the category hierarchy for a Vamp plugin, given its identifying key.

+

If the plugin has no category information, return an empty hierarchy.

+
See also:
PluginCategoryHierarchy
+ +

Referenced by enumeratePlugins(), and printPluginCategoryList().

+ +
+
+ +
+
+ + + + + + + + +
std::string Vamp::HostExt::PluginLoader::getLibraryPathForPlugin (PluginKey plugin)
+
+
+ +

Return the file path of the dynamic library from which the given plugin will be loaded (if available).

+ +

Referenced by enumeratePlugins().

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
Impl* Vamp::HostExt::PluginLoader::m_impl [protected]
+
+
+ +

Definition at line 230 of file PluginLoader.h.

+ +
+
+ +
+
+ + + + +
PluginLoader* Vamp::HostExt::PluginLoader::m_instance [static, protected]
+
+
+ +

Definition at line 233 of file PluginLoader.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,154 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::HostExt::PluginSummarisingAdapter Member List
+
+
+This is the complete list of members for Vamp::HostExt::PluginSummarisingAdapter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AveragingMethod enum nameVamp::HostExt::PluginSummarisingAdapter
ContinuousTimeAverage enum valueVamp::HostExt::PluginSummarisingAdapter
Count enum valueVamp::HostExt::PluginSummarisingAdapter
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const Vamp::HostExt::PluginWrapper [virtual]
getCurrentProgram() const Vamp::HostExt::PluginWrapper [virtual]
getDescription() const Vamp::HostExt::PluginWrapper [virtual]
getIdentifier() const Vamp::HostExt::PluginWrapper [virtual]
getInputDomain() const Vamp::HostExt::PluginWrapper [virtual]
getMaker() const Vamp::HostExt::PluginWrapper [virtual]
getMaxChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getMinChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getName() const Vamp::HostExt::PluginWrapper [virtual]
getOutputDescriptors() const Vamp::HostExt::PluginWrapper [virtual]
getParameter(std::string) const Vamp::HostExt::PluginWrapper [virtual]
getParameterDescriptors() const Vamp::HostExt::PluginWrapper [virtual]
getPluginVersion() const Vamp::HostExt::PluginWrapper [virtual]
getPreferredBlockSize() const Vamp::HostExt::PluginWrapper [virtual]
getPreferredStepSize() const Vamp::HostExt::PluginWrapper [virtual]
getPrograms() const Vamp::HostExt::PluginWrapper [virtual]
getRemainingFeatures()Vamp::HostExt::PluginSummarisingAdapter [virtual]
getSummaryForAllOutputs(SummaryType type, AveragingMethod method=SampleAverage)Vamp::HostExt::PluginSummarisingAdapter
getSummaryForOutput(int output, SummaryType type, AveragingMethod method=SampleAverage)Vamp::HostExt::PluginSummarisingAdapter
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::HostExt::PluginWrapper [virtual]
getWrapper()Vamp::HostExt::PluginWrapper [inline]
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::HostExt::PluginSummarisingAdapter [virtual]
InputDomain enum nameVamp::Plugin
m_implVamp::HostExt::PluginSummarisingAdapter [protected]
m_inputSampleRateVamp::Plugin [protected]
m_pluginVamp::HostExt::PluginWrapper [protected]
Maximum enum valueVamp::HostExt::PluginSummarisingAdapter
Mean enum valueVamp::HostExt::PluginSummarisingAdapter
Median enum valueVamp::HostExt::PluginSummarisingAdapter
Minimum enum valueVamp::HostExt::PluginSummarisingAdapter
Mode enum valueVamp::HostExt::PluginSummarisingAdapter
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
PluginSummarisingAdapter(Plugin *plugin)Vamp::HostExt::PluginSummarisingAdapter
PluginWrapper(Plugin *plugin)Vamp::HostExt::PluginWrapper [protected]
process(const float *const *inputBuffers, RealTime timestamp)Vamp::HostExt::PluginSummarisingAdapter [virtual]
ProgramList typedefVamp::PluginBase
reset()Vamp::HostExt::PluginSummarisingAdapter [virtual]
SampleAverage enum valueVamp::HostExt::PluginSummarisingAdapter
SegmentBoundaries typedefVamp::HostExt::PluginSummarisingAdapter
selectProgram(std::string)Vamp::HostExt::PluginWrapper [virtual]
setParameter(std::string, float)Vamp::HostExt::PluginWrapper [virtual]
setSummarySegmentBoundaries(const SegmentBoundaries &)Vamp::HostExt::PluginSummarisingAdapter
StandardDeviation enum valueVamp::HostExt::PluginSummarisingAdapter
Sum enum valueVamp::HostExt::PluginSummarisingAdapter
SummaryType enum nameVamp::HostExt::PluginSummarisingAdapter
TimeDomain enum valueVamp::Plugin
UnknownSummaryType enum valueVamp::HostExt::PluginSummarisingAdapter
Variance enum valueVamp::HostExt::PluginSummarisingAdapter
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
~PluginSummarisingAdapter()Vamp::HostExt::PluginSummarisingAdapter [virtual]
~PluginWrapper()Vamp::HostExt::PluginWrapper [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1171 @@ + + + + +VampPluginSDK: Vamp::HostExt::PluginSummarisingAdapter Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::HostExt::PluginSummarisingAdapter Class Reference
+
+
+ +

PluginSummarisingAdapter is a Vamp plugin adapter that provides summarisation methods such as mean and median averages of output features, for use in any context where an available plugin produces individual values but the result that is actually needed is some sort of aggregate. + More...

+ +

#include <vamp-hostsdk/PluginSummarisingAdapter.h>

+
+Inheritance diagram for Vamp::HostExt::PluginSummarisingAdapter:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  SummaryType {
+  Minimum = 0, +Maximum = 1, +Mean = 2, +Median = 3, +
+  Mode = 4, +Sum = 5, +Variance = 6, +StandardDeviation = 7, +
+  Count = 8, +UnknownSummaryType = 999 +
+ }
enum  AveragingMethod { SampleAverage = 0, +ContinuousTimeAverage = 1 + }
 AveragingMethod indicates how the adapter should handle average-based summaries of features whose results are not equally spaced in time. More...
typedef std::set< RealTimeSegmentBoundaries
enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 PluginSummarisingAdapter (Plugin *plugin)
 Construct a PluginSummarisingAdapter wrapping the given plugin.
virtual ~PluginSummarisingAdapter ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
void setSummarySegmentBoundaries (const SegmentBoundaries &)
 Specify a series of segment boundaries, such that one summary will be returned for each of the contiguous intra-boundary segments.
FeatureList getSummaryForOutput (int output, SummaryType type, AveragingMethod method=SampleAverage)
 Return summaries of the features that were returned on the given output, using the given SummaryType and AveragingMethod.
FeatureSet getSummaryForAllOutputs (SummaryType type, AveragingMethod method=SampleAverage)
 Return summaries of the features that were returned on all of the plugin's outputs, using the given SummaryType and AveragingMethod.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
float getParameter (std::string) const
 Get the value of a named parameter.
void setParameter (std::string, float)
 Set a named parameter.
ProgramList getPrograms () const
 Get the program settings available in this plugin.
std::string getCurrentProgram () const
 Get the current program.
void selectProgram (std::string)
 Select a program.
size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
template<typename WrapperType >
WrapperType * getWrapper ()
 Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+Protected Attributes

Impl * m_impl
Pluginm_plugin
float m_inputSampleRate
+

Detailed Description

+

PluginSummarisingAdapter is a Vamp plugin adapter that provides summarisation methods such as mean and median averages of output features, for use in any context where an available plugin produces individual values but the result that is actually needed is some sort of aggregate.

+

To make use of PluginSummarisingAdapter, the host should configure, initialise and run the plugin through the adapter interface just as normal. Then, after the process and getRemainingFeatures methods have been properly called and processing is complete, the host may call getSummaryForOutput or getSummaryForAllOutputs to obtain summarised features: averages, maximum values, etc, depending on the SummaryType passed to the function.

+

By default PluginSummarisingAdapter calculates a single summary of each output's feature across the whole duration of processed audio. A host needing summaries of sub-segments of the whole audio may call setSummarySegmentBoundaries before retrieving the summaries, providing a list of times such that one summary will be provided for each segment between two consecutive times.

+

PluginSummarisingAdapter is straightforward rather than fast. It calculates all of the summary types for all outputs always, and then returns only the ones that are requested. It is designed on the basis that, for most features, summarising and storing summarised results is far cheaper than calculating the results in the first place. If this is not true for your particular feature, PluginSummarisingAdapter may not be the best approach for you.

+
Note:
This class was introduced in version 2.0 of the Vamp plugin SDK.
+ +

Definition at line 86 of file PluginSummarisingAdapter.h.

+

Member Typedef Documentation

+ +
+ +
+ +

Definition at line 104 of file PluginSummarisingAdapter.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+ +
+
Enumerator:
+ + + + + + + + + + +
Minimum  +
Maximum  +
Mean  +
Median  +
Mode  +
Sum  +
Variance  +
StandardDeviation  +
Count  +
UnknownSummaryType  +
+
+
+ +

Definition at line 121 of file PluginSummarisingAdapter.h.

+ +
+
+ +
+ +
+ +

AveragingMethod indicates how the adapter should handle average-based summaries of features whose results are not equally spaced in time.

+

If SampleAverage is specified, summary types based on averages will be calculated by treating each result individually without regard to its time: for example, the mean will be the sum of all values divided by the number of values.

+

If ContinuousTimeAverage is specified, each feature will be considered to have a duration, either as specified in the feature's duration field, or until the following feature: thus, for example, the mean will be the sum of the products of values and durations, divided by the total duration.

+

Although SampleAverage is useful for many types of feature, ContinuousTimeAverage is essential for some situations, for example finding the result that spans the largest proportion of the input given a feature that emits a new result only when the value changes (the modal value integrated over time).

+
Enumerator:
+ + +
SampleAverage  +
ContinuousTimeAverage  +
+
+
+ +

Definition at line 157 of file PluginSummarisingAdapter.h.

+ +
+
+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
Vamp::HostExt::PluginSummarisingAdapter::PluginSummarisingAdapter (Pluginplugin)
+
+
+ +

Construct a PluginSummarisingAdapter wrapping the given plugin.

+

The adapter takes ownership of the plugin, which will be deleted when the adapter is deleted.

+ +
+
+ +
+
+ + + + + + + +
virtual Vamp::HostExt::PluginSummarisingAdapter::~PluginSummarisingAdapter () [virtual]
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Vamp::HostExt::PluginSummarisingAdapter::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
void Vamp::HostExt::PluginSummarisingAdapter::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FeatureSet Vamp::HostExt::PluginSummarisingAdapter::process (const float *const * inputBuffers,
RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + +
FeatureSet Vamp::HostExt::PluginSummarisingAdapter::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Reimplemented from Vamp::HostExt::PluginWrapper.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginSummarisingAdapter::setSummarySegmentBoundaries (const SegmentBoundaries)
+
+
+ +

Specify a series of segment boundaries, such that one summary will be returned for each of the contiguous intra-boundary segments.

+

This function must be called before getSummaryForOutput or getSummaryForAllOutputs.

+

Note that you cannot retrieve results with multiple different segmentations by repeatedly calling this function followed by one of the getSummary functions. The summaries are all calculated at the first call to any getSummary function, and once the summaries have been calculated, they remain calculated.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList Vamp::HostExt::PluginSummarisingAdapter::getSummaryForOutput (int output,
SummaryType type,
AveragingMethod method = SampleAverage 
)
+
+
+ +

Return summaries of the features that were returned on the given output, using the given SummaryType and AveragingMethod.

+

The plugin must have been fully run (process() and getRemainingFeatures() calls all made as appropriate) before this function is called.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FeatureSet Vamp::HostExt::PluginSummarisingAdapter::getSummaryForAllOutputs (SummaryType type,
AveragingMethod method = SampleAverage 
)
+
+
+ +

Return summaries of the features that were returned on all of the plugin's outputs, using the given SummaryType and AveragingMethod.

+

The plugin must have been fully run (process() and getRemainingFeatures() calls all made as appropriate) before this function is called.

+ +
+
+ +
+
+ + + + + + + +
InputDomain Vamp::HostExt::PluginWrapper::getInputDomain () const [virtual, inherited]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter.

+ +
+
+ +
+
+ + + + + + + +
unsigned int Vamp::HostExt::PluginWrapper::getVampApiVersion () const [virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getIdentifier () const [virtual, inherited]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getName () const [virtual, inherited]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getDescription () const [virtual, inherited]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getMaker () const [virtual, inherited]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
int Vamp::HostExt::PluginWrapper::getPluginVersion () const [virtual, inherited]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCopyright () const [virtual, inherited]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors () const [virtual, inherited]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
float Vamp::HostExt::PluginWrapper::getParameter (std::string ) const [virtual, inherited]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Vamp::HostExt::PluginWrapper::setParameter (std::string ,
float  
) [virtual, inherited]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
ProgramList Vamp::HostExt::PluginWrapper::getPrograms () const [virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCurrentProgram () const [virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginWrapper::selectProgram (std::string ) [virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented from Vamp::PluginBase.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getPreferredStepSize () const [virtual, inherited]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter, and Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getPreferredBlockSize () const [virtual, inherited]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, and Vamp::HostExt::PluginInputDomainAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMinChannelCount () const [virtual, inherited]
+
+
+ +

Get the minimum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMaxChannelCount () const [virtual, inherited]
+
+
+ +

Get the maximum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors () const [virtual, inherited]
+
+
+ +

Get the outputs of this plugin.

+

An output's index in this list is used as its numeric index when looking it up in the FeatureSet returned from the process() call.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+
+template<typename WrapperType >
+ + + + + + + +
WrapperType* Vamp::HostExt::PluginWrapper::getWrapper () [inline, inherited]
+
+
+ +

Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.

+

This is useful in situations where a plugin is wrapped by multiple different wrappers (one inside another) and the host wants to call some wrapper-specific function on one of the layers without having to care about the order in which they are wrapped. For example, the plugin returned by PluginLoader::loadPlugin may have more than one wrapper; if the host wanted to query or fine-tune some property of one of them, it would be hard to do so without knowing the order of the wrappers. This function therefore gives direct access to the wrapper of a particular type.

+ +

Definition at line 116 of file PluginWrapper.h.

+ +

References Vamp::HostExt::PluginWrapper::getWrapper().

+ +

Referenced by Vamp::HostExt::PluginWrapper::getWrapper(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 187 of file PluginSummarisingAdapter.h.

+ +
+
+ +
+
+ + + + +
Plugin* Vamp::HostExt::PluginWrapper::m_plugin [protected, inherited]
+
+
+ +

Definition at line 126 of file PluginWrapper.h.

+ +
+
+ + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,5 @@ + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +77bad68c7ea4516223818bad8bc14f95 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.png Binary file code-docs/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginWrapper-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginWrapper-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,133 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::HostExt::PluginWrapper Member List
+
+
+This is the complete list of members for Vamp::HostExt::PluginWrapper, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const Vamp::HostExt::PluginWrapper [virtual]
getCurrentProgram() const Vamp::HostExt::PluginWrapper [virtual]
getDescription() const Vamp::HostExt::PluginWrapper [virtual]
getIdentifier() const Vamp::HostExt::PluginWrapper [virtual]
getInputDomain() const Vamp::HostExt::PluginWrapper [virtual]
getMaker() const Vamp::HostExt::PluginWrapper [virtual]
getMaxChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getMinChannelCount() const Vamp::HostExt::PluginWrapper [virtual]
getName() const Vamp::HostExt::PluginWrapper [virtual]
getOutputDescriptors() const Vamp::HostExt::PluginWrapper [virtual]
getParameter(std::string) const Vamp::HostExt::PluginWrapper [virtual]
getParameterDescriptors() const Vamp::HostExt::PluginWrapper [virtual]
getPluginVersion() const Vamp::HostExt::PluginWrapper [virtual]
getPreferredBlockSize() const Vamp::HostExt::PluginWrapper [virtual]
getPreferredStepSize() const Vamp::HostExt::PluginWrapper [virtual]
getPrograms() const Vamp::HostExt::PluginWrapper [virtual]
getRemainingFeatures()Vamp::HostExt::PluginWrapper [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::HostExt::PluginWrapper [virtual]
getWrapper()Vamp::HostExt::PluginWrapper [inline]
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::HostExt::PluginWrapper [virtual]
InputDomain enum nameVamp::Plugin
m_inputSampleRateVamp::Plugin [protected]
m_pluginVamp::HostExt::PluginWrapper [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
PluginWrapper(Plugin *plugin)Vamp::HostExt::PluginWrapper [protected]
process(const float *const *inputBuffers, RealTime timestamp)Vamp::HostExt::PluginWrapper [virtual]
ProgramList typedefVamp::PluginBase
reset()Vamp::HostExt::PluginWrapper [virtual]
selectProgram(std::string)Vamp::HostExt::PluginWrapper [virtual]
setParameter(std::string, float)Vamp::HostExt::PluginWrapper [virtual]
TimeDomain enum valueVamp::Plugin
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
~PluginWrapper()Vamp::HostExt::PluginWrapper [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginWrapper.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginWrapper.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,965 @@ + + + + +VampPluginSDK: Vamp::HostExt::PluginWrapper Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::HostExt::PluginWrapper Class Reference
+
+
+ +

PluginWrapper is a simple base class for adapter plugins. + More...

+ +

#include <vamp-hostsdk/PluginWrapper.h>

+
+Inheritance diagram for Vamp::HostExt::PluginWrapper:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

virtual ~PluginWrapper ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
float getParameter (std::string) const
 Get the value of a named parameter.
void setParameter (std::string, float)
 Set a named parameter.
ProgramList getPrograms () const
 Get the program settings available in this plugin.
std::string getCurrentProgram () const
 Get the current program.
void selectProgram (std::string)
 Select a program.
size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
template<typename WrapperType >
WrapperType * getWrapper ()
 Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+Protected Member Functions

 PluginWrapper (Plugin *plugin)

+Protected Attributes

Pluginm_plugin
float m_inputSampleRate
+

Detailed Description

+

PluginWrapper is a simple base class for adapter plugins.

+

It takes a pointer to a "to be wrapped" Vamp plugin on construction, and provides implementations of all the Vamp plugin methods that simply delegate through to the wrapped plugin. A subclass can therefore override only the methods that are meaningful for the particular adapter.

+
Note:
This class was introduced in version 1.1 of the Vamp plugin SDK.
+ +

Definition at line 62 of file PluginWrapper.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual Vamp::HostExt::PluginWrapper::~PluginWrapper () [virtual]
+
+
+ +
+
+ +
+
+ + + + + + + + +
Vamp::HostExt::PluginWrapper::PluginWrapper (Pluginplugin) [protected]
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Vamp::HostExt::PluginWrapper::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginChannelAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, and Vamp::HostExt::PluginSummarisingAdapter.

+ +
+
+ +
+
+ + + + + + + +
void Vamp::HostExt::PluginWrapper::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, and Vamp::HostExt::PluginSummarisingAdapter.

+ +
+
+ +
+
+ + + + + + + +
InputDomain Vamp::HostExt::PluginWrapper::getInputDomain () const [virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter.

+ +
+
+ +
+
+ + + + + + + +
unsigned int Vamp::HostExt::PluginWrapper::getVampApiVersion () const [virtual]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getIdentifier () const [virtual]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getName () const [virtual]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getDescription () const [virtual]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getMaker () const [virtual]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
int Vamp::HostExt::PluginWrapper::getPluginVersion () const [virtual]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCopyright () const [virtual]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors () const [virtual]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
float Vamp::HostExt::PluginWrapper::getParameter (std::string ) const [virtual]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Vamp::HostExt::PluginWrapper::setParameter (std::string ,
float  
) [virtual]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
ProgramList Vamp::HostExt::PluginWrapper::getPrograms () const [virtual]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::HostExt::PluginWrapper::getCurrentProgram () const [virtual]
+
+
+ +

Get the current program.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::HostExt::PluginWrapper::selectProgram (std::string ) [virtual]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented from Vamp::PluginBase.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getPreferredStepSize () const [virtual]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter, and Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getPreferredBlockSize () const [virtual]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, and Vamp::HostExt::PluginInputDomainAdapter.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMinChannelCount () const [virtual]
+
+
+ +

Get the minimum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::HostExt::PluginWrapper::getMaxChannelCount () const [virtual]
+
+
+ +

Get the maximum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors () const [virtual]
+
+
+ +

Get the outputs of this plugin.

+

An output's index in this list is used as its numeric index when looking it up in the FeatureSet returned from the process() call.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FeatureSet Vamp::HostExt::PluginWrapper::process (const float *const * inputBuffers,
RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, Vamp::HostExt::PluginInputDomainAdapter, and Vamp::HostExt::PluginSummarisingAdapter.

+ +
+
+ +
+
+ + + + + + + +
FeatureSet Vamp::HostExt::PluginWrapper::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, and Vamp::HostExt::PluginSummarisingAdapter.

+ +
+
+ +
+
+
+template<typename WrapperType >
+ + + + + + + +
WrapperType* Vamp::HostExt::PluginWrapper::getWrapper () [inline]
+
+
+ +

Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present.

+

This is useful in situations where a plugin is wrapped by multiple different wrappers (one inside another) and the host wants to call some wrapper-specific function on one of the layers without having to care about the order in which they are wrapped. For example, the plugin returned by PluginLoader::loadPlugin may have more than one wrapper; if the host wanted to query or fine-tune some property of one of them, it would be hard to do so without knowing the order of the wrappers. This function therefore gives direct access to the wrapper of a particular type.

+ +

Definition at line 116 of file PluginWrapper.h.

+ +

References getWrapper().

+ +

Referenced by getWrapper(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 126 of file PluginWrapper.h.

+ +
+
+ + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,8 @@ + + + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +1cc5f1cfbd60adf995c3a7dba367125f \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.png Binary file code-docs/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1Plugin-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1Plugin-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,129 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::Plugin Member List
+
+
+This is the complete list of members for Vamp::Plugin, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const =0Vamp::PluginBase [pure virtual]
getCurrentProgram() const Vamp::PluginBase [inline, virtual]
getDescription() const =0Vamp::PluginBase [pure virtual]
getIdentifier() const =0Vamp::PluginBase [pure virtual]
getInputDomain() const =0Vamp::Plugin [pure virtual]
getMaker() const =0Vamp::PluginBase [pure virtual]
getMaxChannelCount() const Vamp::Plugin [inline, virtual]
getMinChannelCount() const Vamp::Plugin [inline, virtual]
getName() const =0Vamp::PluginBase [pure virtual]
getOutputDescriptors() const =0Vamp::Plugin [pure virtual]
getParameter(std::string) const Vamp::PluginBase [inline, virtual]
getParameterDescriptors() const Vamp::PluginBase [inline, virtual]
getPluginVersion() const =0Vamp::PluginBase [pure virtual]
getPreferredBlockSize() const Vamp::Plugin [inline, virtual]
getPreferredStepSize() const Vamp::Plugin [inline, virtual]
getPrograms() const Vamp::PluginBase [inline, virtual]
getRemainingFeatures()=0Vamp::Plugin [pure virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::PluginBase [inline, virtual]
initialise(size_t inputChannels, size_t stepSize, size_t blockSize)=0Vamp::Plugin [pure virtual]
InputDomain enum nameVamp::Plugin
m_inputSampleRateVamp::Plugin [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
process(const float *const *inputBuffers, RealTime timestamp)=0Vamp::Plugin [pure virtual]
ProgramList typedefVamp::PluginBase
reset()=0Vamp::Plugin [pure virtual]
selectProgram(std::string)Vamp::PluginBase [inline, virtual]
setParameter(std::string, float)Vamp::PluginBase [inline, virtual]
TimeDomain enum valueVamp::Plugin
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1Plugin.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1Plugin.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,975 @@ + + + + +VampPluginSDK: Vamp::Plugin Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::Plugin Class Reference
+
+
+ +

Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio or related data. + More...

+ +

#include <vamp-sdk/Plugin.h>

+
+Inheritance diagram for Vamp::Plugin:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  Feature
struct  OutputDescriptor

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

virtual ~Plugin ()
virtual bool initialise (size_t inputChannels, size_t stepSize, size_t blockSize)=0
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
virtual void reset ()=0
 Reset the plugin after use, to prepare it for another clean run.
virtual InputDomain getInputDomain () const =0
 Get the plugin's required input domain.
virtual size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
virtual size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
virtual size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
virtual size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
virtual OutputList getOutputDescriptors () const =0
 Get the outputs of this plugin.
virtual FeatureSet process (const float *const *inputBuffers, RealTime timestamp)=0
 Process a single block of input data.
virtual FeatureSet getRemainingFeatures ()=0
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.
virtual unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
virtual std::string getIdentifier () const =0
 Get the computer-usable name of the plugin.
virtual std::string getName () const =0
 Get a human-readable name or title of the plugin.
virtual std::string getDescription () const =0
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
virtual std::string getMaker () const =0
 Get the name of the author or vendor of the plugin in human-readable form.
virtual std::string getCopyright () const =0
 Get the copyright statement or licensing summary for the plugin.
virtual int getPluginVersion () const =0
 Get the version number of the plugin.
virtual ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
virtual float getParameter (std::string) const
 Get the value of a named parameter.
virtual void setParameter (std::string, float)
 Set a named parameter.
virtual ProgramList getPrograms () const
 Get the program settings available in this plugin.
virtual std::string getCurrentProgram () const
 Get the current program.
virtual void selectProgram (std::string)
 Select a program.

+Protected Member Functions

 Plugin (float inputSampleRate)

+Protected Attributes

float m_inputSampleRate
+

Detailed Description

+

Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio or related data.

+

In most cases, the input will be audio and the output will be a stream of derived data at a lower sampling resolution than the input.

+

Note that this class inherits several abstract methods from PluginBase. These must be implemented by the subclass.

+

PLUGIN LIFECYCLE

+

Feature extraction plugins are managed differently from real-time plugins (such as VST effects). The main difference is that the parameters for a feature extraction plugin are configured before the plugin is used, and do not change during use.

+

1. Host constructs the plugin, passing it the input sample rate. The plugin may do basic initialisation, but should not do anything computationally expensive at this point. You must make sure your plugin is cheap to construct, otherwise you'll seriously affect the startup performance of almost all hosts. If you have serious initialisation to do, the proper place is in initialise() (step 5).

+

2. Host may query the plugin's available outputs.

+

3. Host queries programs and parameter descriptors, and may set some or all of them. Parameters that are not explicitly set should take their default values as specified in the parameter descriptor. When a program is set, the parameter values may change and the host will re-query them to check.

+

4. Host queries the preferred step size, block size and number of channels. These may all vary depending on the parameter values. (Note however that you cannot make the number of distinct outputs dependent on parameter values.)

+

5. Plugin is properly initialised with a call to initialise. This fixes the step size, block size, and number of channels, as well as all of the parameter and program settings. If the values passed in to initialise do not match the plugin's advertised preferred values from step 4, the plugin may refuse to initialise and return false (although if possible it should accept the new values). Any computationally expensive setup code should take place here.

+

6. Host finally checks the number of values, resolution, extents etc per output (which may vary depending on the number of channels, step size and block size as well as the parameter values).

+

7. Host will repeatedly call the process method to pass in blocks of input data. This method may return features extracted from that data (if the plugin is causal).

+

8. Host will call getRemainingFeatures exactly once, after all the input data has been processed. This may return any non-causal or leftover features.

+

9. At any point after initialise was called, the host may optionally call the reset method and restart processing. (This does not mean it can change the parameters, which are fixed from initialise until destruction.)

+

A plugin does not need to handle the case where setParameter or selectProgram is called after initialise has been called. It's the host's responsibility not to do that. Similarly, the plugin may safely assume that initialise is called no more than once.

+ +

Definition at line 124 of file vamp-sdk/Plugin.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual Vamp::Plugin::~Plugin () [inline, virtual]
+
+
+ +

Definition at line 127 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + + + + + +
Vamp::Plugin::Plugin (float inputSampleRate) [inline, protected]
+
+
+ +

Definition at line 433 of file vamp-sdk/Plugin.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool Vamp::Plugin::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [pure virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Implemented in Vamp::HostExt::PluginChannelAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual void Vamp::Plugin::reset () [pure virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +
+
+ +
+
+ + + + + + + +
virtual InputDomain Vamp::Plugin::getInputDomain () const [pure virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implemented in Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredBlockSize () const [inline, virtual]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 179 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredStepSize () const [inline, virtual]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 194 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMinChannelCount () const [inline, virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMaxChannelCount () const [inline, virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual OutputList Vamp::Plugin::getOutputDescriptors () const [pure virtual]
+
+
+ +

Get the outputs of this plugin.

+

An output's index in this list is used as its numeric index when looking it up in the FeatureSet returned from the process() call.

+ +

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, AmplitudeFollower, SpectralCentroid, and ZeroCrossing.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual FeatureSet Vamp::Plugin::process (const float *const * inputBuffers,
RealTime timestamp 
) [pure virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, PercussionOnsetDetector, AmplitudeFollower, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

+ +

Referenced by runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual FeatureSet Vamp::Plugin::getRemainingFeatures () [pure virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, PercussionOnsetDetector, AmplitudeFollower, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

+ +

Referenced by runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + + + + +
virtual unsigned int Vamp::PluginBase::getVampApiVersion () const [inline, virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 72 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getIdentifier () const [pure virtual, inherited]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getName () const [pure virtual, inherited]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins(), and printPluginCategoryList().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getDescription () const [pure virtual, inherited]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins(), and printPluginCategoryList().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getMaker () const [pure virtual, inherited]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins(), and printPluginCategoryList().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCopyright () const [pure virtual, inherited]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual int Vamp::PluginBase::getPluginVersion () const [pure virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual ParameterList Vamp::PluginBase::getParameterDescriptors () const [inline, virtual, inherited]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 208 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + + +
virtual float Vamp::PluginBase::getParameter (std::string ) const [inline, virtual, inherited]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 216 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Vamp::PluginBase::setParameter (std::string ,
float  
) [inline, virtual, inherited]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 222 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual ProgramList Vamp::PluginBase::getPrograms () const [inline, virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 237 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCurrentProgram () const [inline, virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 242 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Vamp::PluginBase::selectProgram (std::string ) [inline, virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 248 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Data Documentation

+ + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapter-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginAdapter-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,100 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::PluginAdapter< P > Member List
+
+
+This is the complete list of members for Vamp::PluginAdapter< P >, including all inherited members. + + + + + + + +
createPlugin(float inputSampleRate)Vamp::PluginAdapter< P > [inline, protected, virtual]
getDescriptor()Vamp::PluginAdapterBase
m_implVamp::PluginAdapterBase [protected]
PluginAdapter()Vamp::PluginAdapter< P > [inline]
PluginAdapterBase()Vamp::PluginAdapterBase [protected]
~PluginAdapter()Vamp::PluginAdapter< P > [inline, virtual]
~PluginAdapterBase()Vamp::PluginAdapterBase [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapter.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginAdapter.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,238 @@ + + + + +VampPluginSDK: Vamp::PluginAdapter< P > Class Template Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::PluginAdapter< P > Class Template Reference
+
+
+ +

PluginAdapter turns a PluginAdapterBase into a specific wrapper for a particular plugin implementation. + More...

+ +

#include <vamp-sdk/PluginAdapter.h>

+
+Inheritance diagram for Vamp::PluginAdapter< P >:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

 PluginAdapter ()
virtual ~PluginAdapter ()
const VampPluginDescriptorgetDescriptor ()
 Return a VampPluginDescriptor describing the plugin that is wrapped by this adapter.

+Protected Member Functions

PlugincreatePlugin (float inputSampleRate)

+Protected Attributes

Impl * m_impl
+

Detailed Description

+

template<typename P>
+class Vamp::PluginAdapter< P >

+ +

PluginAdapter turns a PluginAdapterBase into a specific wrapper for a particular plugin implementation.

+

See PluginAdapterBase.

+ +

Definition at line 95 of file PluginAdapter.h.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename P>
+ + + + + + + +
Vamp::PluginAdapter< P >::PluginAdapter () [inline]
+
+
+ +

Definition at line 98 of file PluginAdapter.h.

+ +
+
+ +
+
+
+template<typename P>
+ + + + + + + +
virtual Vamp::PluginAdapter< P >::~PluginAdapter () [inline, virtual]
+
+
+ +

Definition at line 99 of file PluginAdapter.h.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename P>
+ + + + + + + + +
Plugin* Vamp::PluginAdapter< P >::createPlugin (float inputSampleRate) [inline, protected, virtual]
+
+
+ +

Implements Vamp::PluginAdapterBase.

+ +

Definition at line 102 of file PluginAdapter.h.

+ +
+
+ +
+
+ + + + + + + +
const VampPluginDescriptor* Vamp::PluginAdapterBase::getDescriptor () [inherited]
+
+
+ +

Return a VampPluginDescriptor describing the plugin that is wrapped by this adapter.

+ +

Referenced by vampGetPluginDescriptor().

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
Impl* Vamp::PluginAdapterBase::m_impl [protected, inherited]
+
+
+ +

Definition at line 81 of file PluginAdapter.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapterBase-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginAdapterBase-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,98 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::PluginAdapterBase Member List
+
+
+This is the complete list of members for Vamp::PluginAdapterBase, including all inherited members. + + + + + +
createPlugin(float inputSampleRate)=0Vamp::PluginAdapterBase [protected, pure virtual]
getDescriptor()Vamp::PluginAdapterBase
m_implVamp::PluginAdapterBase [protected]
PluginAdapterBase()Vamp::PluginAdapterBase [protected]
~PluginAdapterBase()Vamp::PluginAdapterBase [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapterBase.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginAdapterBase.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,224 @@ + + + + +VampPluginSDK: Vamp::PluginAdapterBase Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::PluginAdapterBase Class Reference
+
+
+ +

PluginAdapter and PluginAdapterBase provide a wrapper class that a plugin library can use to make its C++ Vamp::Plugin objects available through the Vamp C API. + More...

+ +

#include <vamp-sdk/PluginAdapter.h>

+
+Inheritance diagram for Vamp::PluginAdapterBase:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + +

+Public Member Functions

virtual ~PluginAdapterBase ()
const VampPluginDescriptorgetDescriptor ()
 Return a VampPluginDescriptor describing the plugin that is wrapped by this adapter.

+Protected Member Functions

 PluginAdapterBase ()
virtual PlugincreatePlugin (float inputSampleRate)=0

+Protected Attributes

Impl * m_impl
+

Detailed Description

+

PluginAdapter and PluginAdapterBase provide a wrapper class that a plugin library can use to make its C++ Vamp::Plugin objects available through the Vamp C API.

+

Almost all Vamp plugin libraries will want to make use of this. To do so, all they need to do is declare a PluginAdapter<T> for each plugin class T in their library. It's very simple, and you need to know absolutely nothing about how it works in order to use it. Just cut and paste from an existing plugin's discovery function.

+
See also:
vampGetPluginDescriptor
+ +

Definition at line 65 of file PluginAdapter.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual Vamp::PluginAdapterBase::~PluginAdapterBase () [virtual]
+
+
+ +
+
+ +
+
+ + + + + + + +
Vamp::PluginAdapterBase::PluginAdapterBase () [protected]
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
const VampPluginDescriptor* Vamp::PluginAdapterBase::getDescriptor ()
+
+
+ +

Return a VampPluginDescriptor describing the plugin that is wrapped by this adapter.

+ +

Referenced by vampGetPluginDescriptor().

+ +
+
+ +
+
+ + + + + + + + +
virtual Plugin* Vamp::PluginAdapterBase::createPlugin (float inputSampleRate) [protected, pure virtual]
+
+
+ +

Implemented in Vamp::PluginAdapter< P >.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
Impl* Vamp::PluginAdapterBase::m_impl [protected]
+
+
+ +

Definition at line 81 of file PluginAdapter.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapterBase__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginAdapterBase__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapterBase__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginAdapterBase__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +4569c9c6c32b74fbfa74700a2924fb33 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapterBase__inherit__graph.png Binary file code-docs/classVamp_1_1PluginAdapterBase__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapter__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginAdapter__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapter__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginAdapter__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +f312ca787c956ac63a107eac4f63ee01 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginAdapter__inherit__graph.png Binary file code-docs/classVamp_1_1PluginAdapter__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginBase-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginBase-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,110 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::PluginBase Member List
+
+
+This is the complete list of members for Vamp::PluginBase, including all inherited members. + + + + + + + + + + + + + + + + + +
getCopyright() const =0Vamp::PluginBase [pure virtual]
getCurrentProgram() const Vamp::PluginBase [inline, virtual]
getDescription() const =0Vamp::PluginBase [pure virtual]
getIdentifier() const =0Vamp::PluginBase [pure virtual]
getMaker() const =0Vamp::PluginBase [pure virtual]
getName() const =0Vamp::PluginBase [pure virtual]
getParameter(std::string) const Vamp::PluginBase [inline, virtual]
getParameterDescriptors() const Vamp::PluginBase [inline, virtual]
getPluginVersion() const =0Vamp::PluginBase [pure virtual]
getPrograms() const Vamp::PluginBase [inline, virtual]
getType() const =0Vamp::PluginBase [pure virtual]
getVampApiVersion() const Vamp::PluginBase [inline, virtual]
ParameterList typedefVamp::PluginBase
ProgramList typedefVamp::PluginBase
selectProgram(std::string)Vamp::PluginBase [inline, virtual]
setParameter(std::string, float)Vamp::PluginBase [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginBase.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginBase.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,551 @@ + + + + +VampPluginSDK: Vamp::PluginBase Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::PluginBase Class Reference
+
+
+ +

A base class for plugins with optional configurable parameters, programs, etc. + More...

+ +

#include <PluginBase.h>

+
+Inheritance diagram for Vamp::PluginBase:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  ParameterDescriptor

+Public Types

typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

virtual ~PluginBase ()
virtual unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
virtual std::string getIdentifier () const =0
 Get the computer-usable name of the plugin.
virtual std::string getName () const =0
 Get a human-readable name or title of the plugin.
virtual std::string getDescription () const =0
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
virtual std::string getMaker () const =0
 Get the name of the author or vendor of the plugin in human-readable form.
virtual std::string getCopyright () const =0
 Get the copyright statement or licensing summary for the plugin.
virtual int getPluginVersion () const =0
 Get the version number of the plugin.
virtual ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
virtual float getParameter (std::string) const
 Get the value of a named parameter.
virtual void setParameter (std::string, float)
 Set a named parameter.
virtual ProgramList getPrograms () const
 Get the program settings available in this plugin.
virtual std::string getCurrentProgram () const
 Get the current program.
virtual void selectProgram (std::string)
 Select a program.
virtual std::string getType () const =0
 Get the type of plugin.
+

Detailed Description

+

A base class for plugins with optional configurable parameters, programs, etc.

+

The Vamp::Plugin is derived from this, and individual Vamp plugins should derive from that.

+

This class does not provide the necessary interfaces to instantiate or run a plugin. It only specifies an interface for retrieving those controls that the host may wish to show to the user for editing. It could meaningfully be subclassed by real-time plugins or other sorts of plugin as well as Vamp plugins.

+ +

Definition at line 64 of file vamp-sdk/PluginBase.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
virtual Vamp::PluginBase::~PluginBase () [inline, virtual]
+
+
+ +

Definition at line 67 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
virtual unsigned int Vamp::PluginBase::getVampApiVersion () const [inline, virtual]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 72 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getIdentifier () const [pure virtual]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getName () const [pure virtual]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins(), and printPluginCategoryList().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getDescription () const [pure virtual]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins(), and printPluginCategoryList().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getMaker () const [pure virtual]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins(), and printPluginCategoryList().

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCopyright () const [pure virtual]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual int Vamp::PluginBase::getPluginVersion () const [pure virtual]
+
+ +
+ +
+
+ + + + + + + +
virtual ParameterList Vamp::PluginBase::getParameterDescriptors () const [inline, virtual]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 208 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + + +
virtual float Vamp::PluginBase::getParameter (std::string ) const [inline, virtual]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 216 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Vamp::PluginBase::setParameter (std::string ,
float  
) [inline, virtual]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 222 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual ProgramList Vamp::PluginBase::getPrograms () const [inline, virtual]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 237 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCurrentProgram () const [inline, virtual]
+
+
+ +

Get the current program.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 242 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Vamp::PluginBase::selectProgram (std::string ) [inline, virtual]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 248 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getType () const [pure virtual]
+
+
+ +

Get the type of plugin.

+

This is to be implemented by the immediate subclass, not by actual plugins. Do not attempt to implement this in plugin code.

+ +

Implemented in Vamp::Plugin.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginBase__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginBase__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginBase__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginBase__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +da9feec0bcf181e5e0ad0867eb4bd7fe \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginBase__inherit__graph.png Binary file code-docs/classVamp_1_1PluginBase__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginHostAdapter-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginHostAdapter-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,135 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::PluginHostAdapter Member List
+
+
+This is the complete list of members for Vamp::PluginHostAdapter, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
convertFeatures(VampFeatureList *, FeatureSet &)Vamp::PluginHostAdapter [protected]
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const Vamp::PluginHostAdapter [virtual]
getCurrentProgram() const Vamp::PluginHostAdapter [virtual]
getDescription() const Vamp::PluginHostAdapter [virtual]
getIdentifier() const Vamp::PluginHostAdapter [virtual]
getInputDomain() const Vamp::PluginHostAdapter [virtual]
getMaker() const Vamp::PluginHostAdapter [virtual]
getMaxChannelCount() const Vamp::PluginHostAdapter [virtual]
getMinChannelCount() const Vamp::PluginHostAdapter [virtual]
getName() const Vamp::PluginHostAdapter [virtual]
getOutputDescriptors() const Vamp::PluginHostAdapter [virtual]
getParameter(std::string) const Vamp::PluginHostAdapter [virtual]
getParameterDescriptors() const Vamp::PluginHostAdapter [virtual]
getPluginPath()Vamp::PluginHostAdapter [static]
getPluginVersion() const Vamp::PluginHostAdapter [virtual]
getPreferredBlockSize() const Vamp::PluginHostAdapter [virtual]
getPreferredStepSize() const Vamp::PluginHostAdapter [virtual]
getPrograms() const Vamp::PluginHostAdapter [virtual]
getRemainingFeatures()Vamp::PluginHostAdapter [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::PluginHostAdapter [virtual]
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::PluginHostAdapter [virtual]
InputDomain enum nameVamp::Plugin
m_descriptorVamp::PluginHostAdapter [protected]
m_handleVamp::PluginHostAdapter [protected]
m_inputSampleRateVamp::Plugin [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
PluginHostAdapter(const VampPluginDescriptor *descriptor, float inputSampleRate)Vamp::PluginHostAdapter
process(const float *const *inputBuffers, RealTime timestamp)Vamp::PluginHostAdapter [virtual]
ProgramList typedefVamp::PluginBase
reset()Vamp::PluginHostAdapter [virtual]
selectProgram(std::string)Vamp::PluginHostAdapter [virtual]
setParameter(std::string, float)Vamp::PluginHostAdapter [virtual]
TimeDomain enum valueVamp::Plugin
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
~PluginHostAdapter()Vamp::PluginHostAdapter [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginHostAdapter.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginHostAdapter.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,988 @@ + + + + +VampPluginSDK: Vamp::PluginHostAdapter Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::PluginHostAdapter Class Reference
+
+
+ +

PluginHostAdapter is a wrapper class that a Vamp host can use to make the C-language VampPluginDescriptor object appear as a C++ Vamp::Plugin object. + More...

+ +

#include <vamp-hostsdk/PluginHostAdapter.h>

+
+Inheritance diagram for Vamp::PluginHostAdapter:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 PluginHostAdapter (const VampPluginDescriptor *descriptor, float inputSampleRate)
virtual ~PluginHostAdapter ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
float getParameter (std::string) const
 Get the value of a named parameter.
void setParameter (std::string, float)
 Set a named parameter.
ProgramList getPrograms () const
 Get the program settings available in this plugin.
std::string getCurrentProgram () const
 Get the current program.
void selectProgram (std::string)
 Select a program.
size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+Static Public Member Functions

static std::vector< std::string > getPluginPath ()

+Protected Member Functions

void convertFeatures (VampFeatureList *, FeatureSet &)

+Protected Attributes

const VampPluginDescriptorm_descriptor
VampPluginHandle m_handle
float m_inputSampleRate
+

Detailed Description

+

PluginHostAdapter is a wrapper class that a Vamp host can use to make the C-language VampPluginDescriptor object appear as a C++ Vamp::Plugin object.

+

The Vamp API is defined in vamp/vamp.h as a C API. The C++ objects used for convenience by plugins and hosts actually communicate using the C low-level API, but the details of this communication are handled seamlessly by the Vamp SDK implementation provided the plugin and host use the proper C++ wrapper objects.

+

See also PluginAdapter, the plugin-side wrapper that makes a C++ plugin object available using the C query API.

+ +

Definition at line 68 of file PluginHostAdapter.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Vamp::PluginHostAdapter::PluginHostAdapter (const VampPluginDescriptordescriptor,
float inputSampleRate 
)
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual Vamp::PluginHostAdapter::~PluginHostAdapter () [virtual]
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
static std::vector<std::string> Vamp::PluginHostAdapter::getPluginPath () [static]
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Vamp::PluginHostAdapter::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Implements Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
void Vamp::PluginHostAdapter::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implements Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
InputDomain Vamp::PluginHostAdapter::getInputDomain () const [virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
unsigned int Vamp::PluginHostAdapter::getVampApiVersion () const [virtual]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::PluginHostAdapter::getIdentifier () const [virtual]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::PluginHostAdapter::getName () const [virtual]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::PluginHostAdapter::getDescription () const [virtual]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::PluginHostAdapter::getMaker () const [virtual]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
int Vamp::PluginHostAdapter::getPluginVersion () const [virtual]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::PluginHostAdapter::getCopyright () const [virtual]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
ParameterList Vamp::PluginHostAdapter::getParameterDescriptors () const [virtual]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
float Vamp::PluginHostAdapter::getParameter (std::string ) const [virtual]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Vamp::PluginHostAdapter::setParameter (std::string ,
float  
) [virtual]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
ProgramList Vamp::PluginHostAdapter::getPrograms () const [virtual]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::PluginHostAdapter::getCurrentProgram () const [virtual]
+
+
+ +

Get the current program.

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + + +
void Vamp::PluginHostAdapter::selectProgram (std::string ) [virtual]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented from Vamp::PluginBase.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::PluginHostAdapter::getPreferredStepSize () const [virtual]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::PluginHostAdapter::getPreferredBlockSize () const [virtual]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::PluginHostAdapter::getMinChannelCount () const [virtual]
+
+
+ +

Get the minimum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
size_t Vamp::PluginHostAdapter::getMaxChannelCount () const [virtual]
+
+
+ +

Get the maximum supported number of input channels.

+ +

Reimplemented from Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
OutputList Vamp::PluginHostAdapter::getOutputDescriptors () const [virtual]
+
+
+ +

Get the outputs of this plugin.

+

An output's index in this list is used as its numeric index when looking it up in the FeatureSet returned from the process() call.

+ +

Implements Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
FeatureSet Vamp::PluginHostAdapter::process (const float *const * inputBuffers,
RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Implements Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + +
FeatureSet Vamp::PluginHostAdapter::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void Vamp::PluginHostAdapter::convertFeatures (VampFeatureList,
FeatureSet 
) [protected]
+
+
+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

Definition at line 113 of file PluginHostAdapter.h.

+ +
+
+ +
+ +
+ +

Definition at line 114 of file PluginHostAdapter.h.

+ +
+
+ + +
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginHostAdapter__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginHostAdapter__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,4 @@ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginHostAdapter__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1PluginHostAdapter__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +2992e89428ff4fe754343c5ad5231eb9 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1PluginHostAdapter__inherit__graph.png Binary file code-docs/classVamp_1_1PluginHostAdapter__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1Plugin__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1Plugin__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1Plugin__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1Plugin__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +f76e0377de46d8a56f43bb69e9f014ea \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1Plugin__inherit__graph.png Binary file code-docs/classVamp_1_1Plugin__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classVamp_1_1RealTime-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classVamp_1_1RealTime-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,120 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Vamp::RealTime Member List
+
+
+This is the complete list of members for Vamp::RealTime, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
frame2RealTime(long frame, unsigned int sampleRate)Vamp::RealTime [static]
fromMilliseconds(int msec)Vamp::RealTime [static]
fromSeconds(double sec)Vamp::RealTime [static]
fromTimeval(const struct timeval &)Vamp::RealTime [static]
msec() const Vamp::RealTime [inline]
nsecVamp::RealTime
operator!=(const RealTime &r) const Vamp::RealTime [inline]
operator+(const RealTime &r) const Vamp::RealTime [inline]
operator-(const RealTime &r) const Vamp::RealTime [inline]
operator-() const Vamp::RealTime [inline]
operator/(int d) const Vamp::RealTime
operator/(const RealTime &r) const Vamp::RealTime
operator<(const RealTime &r) const Vamp::RealTime [inline]
operator<=(const RealTime &r) const Vamp::RealTime [inline]
operator=(const RealTime &r)Vamp::RealTime [inline]
operator==(const RealTime &r) const Vamp::RealTime [inline]
operator>(const RealTime &r) const Vamp::RealTime [inline]
operator>=(const RealTime &r) const Vamp::RealTime [inline]
RealTime()Vamp::RealTime [inline]
RealTime(int s, int n)Vamp::RealTime
RealTime(const RealTime &r)Vamp::RealTime [inline]
realTime2Frame(const RealTime &r, unsigned int sampleRate)Vamp::RealTime [static]
secVamp::RealTime
toString() const Vamp::RealTime
toText(bool fixedDp=false) const Vamp::RealTime
usec() const Vamp::RealTime [inline]
zeroTimeVamp::RealTime [static]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classZeroCrossing-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classZeroCrossing-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,133 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
ZeroCrossing Member List
+
+
+This is the complete list of members for ZeroCrossing, including all inherited members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureList typedefVamp::Plugin
FeatureSet typedefVamp::Plugin
FrequencyDomain enum valueVamp::Plugin
getCopyright() const ZeroCrossing [virtual]
getCurrentProgram() const Vamp::PluginBase [inline, virtual]
getDescription() const ZeroCrossing [virtual]
getIdentifier() const ZeroCrossing [virtual]
getInputDomain() const ZeroCrossing [inline, virtual]
getMaker() const ZeroCrossing [virtual]
getMaxChannelCount() const Vamp::Plugin [inline, virtual]
getMinChannelCount() const Vamp::Plugin [inline, virtual]
getName() const ZeroCrossing [virtual]
getOutputDescriptors() const ZeroCrossing [virtual]
getParameter(std::string) const Vamp::PluginBase [inline, virtual]
getParameterDescriptors() const Vamp::PluginBase [inline, virtual]
getPluginVersion() const ZeroCrossing [virtual]
getPreferredBlockSize() const Vamp::Plugin [inline, virtual]
getPreferredStepSize() const Vamp::Plugin [inline, virtual]
getPrograms() const Vamp::PluginBase [inline, virtual]
getRemainingFeatures()ZeroCrossing [virtual]
getType() const Vamp::Plugin [inline, virtual]
getVampApiVersion() const Vamp::PluginBase [inline, virtual]
initialise(size_t channels, size_t stepSize, size_t blockSize)ZeroCrossing [virtual]
InputDomain enum nameVamp::Plugin
m_inputSampleRateVamp::Plugin [protected]
m_previousSampleZeroCrossing [protected]
m_stepSizeZeroCrossing [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
process(const float *const *inputBuffers, Vamp::RealTime timestamp)ZeroCrossing [virtual]
ProgramList typedefVamp::PluginBase
reset()ZeroCrossing [virtual]
selectProgram(std::string)Vamp::PluginBase [inline, virtual]
setParameter(std::string, float)Vamp::PluginBase [inline, virtual]
TimeDomain enum valueVamp::Plugin
ZeroCrossing(float inputSampleRate)ZeroCrossing
~Plugin()Vamp::Plugin [inline, virtual]
~PluginBase()Vamp::PluginBase [inline, virtual]
~ZeroCrossing()ZeroCrossing [virtual]
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classZeroCrossing.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classZeroCrossing.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1001 @@ + + + + +VampPluginSDK: ZeroCrossing Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
ZeroCrossing Class Reference
+
+
+ +

Example plugin that calculates the positions and density of zero-crossing points in an audio waveform. + More...

+ +

#include <ZeroCrossing.h>

+
+Inheritance diagram for ZeroCrossing:
+
+
Inheritance graph
+ + +
[legend]
+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  InputDomain { TimeDomain, +FrequencyDomain + }
typedef std::vector
+< OutputDescriptor
OutputList
typedef std::vector< FeatureFeatureList
typedef std::map< int,
+FeatureList
FeatureSet
typedef std::vector
+< ParameterDescriptor
ParameterList
typedef std::vector< std::string > ProgramList

+Public Member Functions

 ZeroCrossing (float inputSampleRate)
virtual ~ZeroCrossing ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).
void reset ()
 Reset the plugin after use, to prepare it for another clean run.
InputDomain getInputDomain () const
 Get the plugin's required input domain.
std::string getIdentifier () const
 Get the computer-usable name of the plugin.
std::string getName () const
 Get a human-readable name or title of the plugin.
std::string getDescription () const
 Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".
std::string getMaker () const
 Get the name of the author or vendor of the plugin in human-readable form.
int getPluginVersion () const
 Get the version number of the plugin.
std::string getCopyright () const
 Get the copyright statement or licensing summary for the plugin.
OutputList getOutputDescriptors () const
 Get the outputs of this plugin.
FeatureSet process (const float *const *inputBuffers, Vamp::RealTime timestamp)
 Process a single block of input data.
FeatureSet getRemainingFeatures ()
 After all blocks have been processed, calculate and return any remaining features derived from the complete input.
virtual size_t getPreferredBlockSize () const
 Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).
virtual size_t getPreferredStepSize () const
 Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.
virtual size_t getMinChannelCount () const
 Get the minimum supported number of input channels.
virtual size_t getMaxChannelCount () const
 Get the maximum supported number of input channels.
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.
virtual unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin.
virtual ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin.
virtual float getParameter (std::string) const
 Get the value of a named parameter.
virtual void setParameter (std::string, float)
 Set a named parameter.
virtual ProgramList getPrograms () const
 Get the program settings available in this plugin.
virtual std::string getCurrentProgram () const
 Get the current program.
virtual void selectProgram (std::string)
 Select a program.

+Protected Attributes

size_t m_stepSize
float m_previousSample
float m_inputSampleRate
+

Detailed Description

+

Example plugin that calculates the positions and density of zero-crossing points in an audio waveform.

+ +

Definition at line 47 of file ZeroCrossing.h.

+

Member Typedef Documentation

+ +
+
+ + + + +
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList [inherited]
+
+
+ +

Definition at line 327 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<Feature> Vamp::Plugin::FeatureList [inherited]
+
+
+ +

Definition at line 385 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet [inherited]
+
+
+ +

Definition at line 387 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList [inherited]
+
+
+ +

Definition at line 203 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
typedef std::vector<std::string> Vamp::PluginBase::ProgramList [inherited]
+
+
+ +

Definition at line 225 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Enumeration Documentation

+ +
+
+ + + + +
enum Vamp::Plugin::InputDomain [inherited]
+
+
+
Enumerator:
+ + +
TimeDomain  +
FrequencyDomain  +
+
+
+ +

Definition at line 152 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
ZeroCrossing::ZeroCrossing (float inputSampleRate)
+
+
+ +

Definition at line 46 of file ZeroCrossing.cpp.

+ +
+
+ +
+
+ + + + + + + +
ZeroCrossing::~ZeroCrossing () [virtual]
+
+
+ +

Definition at line 53 of file ZeroCrossing.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool ZeroCrossing::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
) [virtual]
+
+
+ +

Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).

+

The input sample rate should have been already specified at construction time.

+

Return true for successful initialisation, false if the number of input channels, step size and/or block size cannot be supported.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 94 of file ZeroCrossing.cpp.

+ +

References Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), and m_stepSize.

+ +
+
+ +
+
+ + + + + + + +
void ZeroCrossing::reset () [virtual]
+
+
+ +

Reset the plugin after use, to prepare it for another clean run.

+

Not called for the first initialisation (i.e. initialise must also do a reset).

+ +

Implements Vamp::Plugin.

+ +

Definition at line 105 of file ZeroCrossing.cpp.

+ +

References m_previousSample.

+ +
+
+ +
+
+ + + + + + + +
InputDomain ZeroCrossing::getInputDomain () const [inline, virtual]
+
+
+ +

Get the plugin's required input domain.

+

If this is TimeDomain, the samples provided to the process() function (below) will be in the time domain, as for a traditional audio processing plugin.

+

If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to process(). The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 56 of file ZeroCrossing.h.

+ +

References Vamp::Plugin::TimeDomain.

+ +
+
+ +
+
+ + + + + + + +
string ZeroCrossing::getIdentifier () const [virtual]
+
+
+ +

Get the computer-usable name of the plugin.

+

This should be reasonably short and contain no whitespace or punctuation characters. It may only contain the characters [a-zA-Z0-9_-]. This is the authoritative way for a program to identify a plugin within a given library.

+

This text may be visible to the user, but it should not be the main text used to identify a plugin to the user (that will be the name, below).

+

Example: "zero_crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 58 of file ZeroCrossing.cpp.

+ +
+
+ +
+
+ + + + + + + +
string ZeroCrossing::getName () const [virtual]
+
+
+ +

Get a human-readable name or title of the plugin.

+

This should be brief and self-contained, as it may be used to identify the plugin to the user in isolation (i.e. without also showing the plugin's "identifier").

+

Example: "Zero Crossings"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 64 of file ZeroCrossing.cpp.

+ +
+
+ +
+
+ + + + + + + +
string ZeroCrossing::getDescription () const [virtual]
+
+
+ +

Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name".

+

May be empty if the name has said it all already.

+

Example: "Detect and count zero crossing points"

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 70 of file ZeroCrossing.cpp.

+ +
+
+ +
+
+ + + + + + + +
string ZeroCrossing::getMaker () const [virtual]
+
+
+ +

Get the name of the author or vendor of the plugin in human-readable form.

+

This should be a short identifying text, as it may be used to label plugins from the same source in a menu or similar.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 76 of file ZeroCrossing.cpp.

+ +
+
+ +
+
+ + + + + + + +
int ZeroCrossing::getPluginVersion () const [virtual]
+
+
+ +

Get the version number of the plugin.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 82 of file ZeroCrossing.cpp.

+ +
+
+ +
+
+ + + + + + + +
string ZeroCrossing::getCopyright () const [virtual]
+
+
+ +

Get the copyright statement or licensing summary for the plugin.

+

This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 88 of file ZeroCrossing.cpp.

+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + +
ZeroCrossing::FeatureSet ZeroCrossing::process (const float *const * inputBuffers,
Vamp::RealTime timestamp 
) [virtual]
+
+
+ +

Process a single block of input data.

+

If the plugin's inputDomain is TimeDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize consecutive audio samples (the host will zero-pad as necessary). The timestamp in this case will be the real time in seconds of the start of the supplied block of samples.

+

If the plugin's inputDomain is FrequencyDomain, inputBuffers will point to one array of floats per input channel, and each of these arrays will contain blockSize/2+1 consecutive pairs of real and imaginary component floats corresponding to bins 0..(blockSize/2) of the FFT output. That is, bin 0 (the first pair of floats) contains the DC output, up to bin blockSize/2 which contains the Nyquist-frequency output. There will therefore be blockSize+2 floats per channel in total. The timestamp will be the real time in seconds of the centre of the FFT input window (i.e. the very first block passed to process might contain the FFT of half a block of zero samples and the first half-block of the actual data, with a timestamp of zero).

+

Return any features that have become available after this process call. (These do not necessarily have to fall within the process block, except for OneSamplePerStep outputs.)

+ +

Implements Vamp::Plugin.

+ +

Definition at line 142 of file ZeroCrossing.cpp.

+ +

References Vamp::RealTime::frame2RealTime(), Vamp::Plugin::Feature::hasTimestamp, Vamp::Plugin::m_inputSampleRate, m_previousSample, m_stepSize, Vamp::Plugin::Feature::timestamp, and Vamp::Plugin::Feature::values.

+ +
+
+ +
+
+ + + + + + + +
ZeroCrossing::FeatureSet ZeroCrossing::getRemainingFeatures () [virtual]
+
+
+ +

After all blocks have been processed, calculate and return any remaining features derived from the complete input.

+ +

Implements Vamp::Plugin.

+ +

Definition at line 191 of file ZeroCrossing.cpp.

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredBlockSize () const [inline, virtual, inherited]
+
+
+ +

Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function).

+

This should be called before initialise().

+

A plugin that can handle any block size may return 0. The final block size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 179 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getPreferredStepSize () const [inline, virtual, inherited]
+
+
+ +

Get the preferred step size (window increment -- the distance in sample frames between the start frames of consecutive blocks passed to the process() function) for the plugin.

+

This should be called before initialise().

+

A plugin may return 0 if it has no particular interest in the step size. In this case, the host should make the step size equal to the block size if the plugin is accepting input in the time domain. If the plugin is accepting input in the frequency domain, the host may use any step size. The final step size will be set in the initialise() call.

+ +

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 194 of file vamp-sdk/Plugin.h.

+ +

Referenced by enumeratePlugins(), and runPlugin().

+ +
+
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMinChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual size_t Vamp::Plugin::getMaxChannelCount () const [inline, virtual, inherited]
+
+ +
+ +
+
+ + + + + + + +
virtual std::string Vamp::Plugin::getType () const [inline, virtual, inherited]
+
+
+ +

Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.

+

Do not reimplement this function in your subclass.

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 430 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+
+ + + + + + + +
virtual unsigned int Vamp::PluginBase::getVampApiVersion () const [inline, virtual, inherited]
+
+
+ +

Get the Vamp API compatibility level of the plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 72 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + +
virtual ParameterList Vamp::PluginBase::getParameterDescriptors () const [inline, virtual, inherited]
+
+
+ +

Get the controllable parameters of this plugin.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 208 of file vamp-sdk/PluginBase.h.

+ +

Referenced by enumeratePlugins().

+ +
+
+ +
+
+ + + + + + + + +
virtual float Vamp::PluginBase::getParameter (std::string ) const [inline, virtual, inherited]
+
+
+ +

Get the value of a named parameter.

+

The argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 216 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
virtual void Vamp::PluginBase::setParameter (std::string ,
float  
) [inline, virtual, inherited]
+
+
+ +

Set a named parameter.

+

The first argument is the identifier field from that parameter's descriptor.

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 222 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual ProgramList Vamp::PluginBase::getPrograms () const [inline, virtual, inherited]
+
+
+ +

Get the program settings available in this plugin.

+

A program is a named shorthand for a set of parameter values; changing the program may cause the plugin to alter the values of its published parameters (and/or non-public internal processing parameters). The host should re-read the plugin's parameter values after setting a new program.

+

The programs must have unique names.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 237 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + +
virtual std::string Vamp::PluginBase::getCurrentProgram () const [inline, virtual, inherited]
+
+
+ +

Get the current program.

+ +

Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 242 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + + + + + +
virtual void Vamp::PluginBase::selectProgram (std::string ) [inline, virtual, inherited]
+
+
+ +

Select a program.

+

(If the given program name is not one of the available programs, do nothing.)

+ +

Reimplemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

+ +

Definition at line 248 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
size_t ZeroCrossing::m_stepSize [protected]
+
+
+ +

Definition at line 73 of file ZeroCrossing.h.

+ +

Referenced by initialise(), and process().

+ +
+
+ +
+
+ + + + +
float ZeroCrossing::m_previousSample [protected]
+
+
+ +

Definition at line 74 of file ZeroCrossing.h.

+ +

Referenced by process(), and reset().

+ +
+
+ + +
The documentation for this class was generated from the following files: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classZeroCrossing__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classZeroCrossing__inherit__graph.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,4 @@ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classZeroCrossing__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classZeroCrossing__inherit__graph.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +c606d7f9fcc452640c504b2f9e279914 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classZeroCrossing__inherit__graph.png Binary file code-docs/classZeroCrossing__inherit__graph.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/classes.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/classes.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,122 @@ + + + + +VampPluginSDK: Class Index + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Class Index
+
+
+
A | D | F | O | P | R | S | Z | _
+ + + + + + + + + + + + + + + + + + +
  A  
+
PercussionOnsetDetector   
  S  
+
Plugin (Vamp)   
AmplitudeFollower   PluginAdapter (Vamp)   SpectralCentroid   
  D  
+
PluginAdapterBase (Vamp)   
  Z  
+
PluginBase (Vamp)   
FixedTempoEstimator::D   PluginBufferingAdapter (Vamp::HostExt)   ZeroCrossing   
  F  
+
PluginChannelAdapter (Vamp::HostExt)   
  _  
+
PluginHostAdapter (Vamp)   
Plugin::Feature (Vamp)   PluginInputDomainAdapter (Vamp::HostExt)   _VampFeature   
FixedTempoEstimator   PluginLoader (Vamp::HostExt)   _VampFeatureList   
  O  
+
PluginSummarisingAdapter (Vamp::HostExt)   _VampFeatureUnion   
PluginWrapper (Vamp::HostExt)   _VampFeatureV2   
Plugin::OutputDescriptor (Vamp)   PowerSpectrum   _VampOutputDescriptor   
  P  
+
  R  
+
_VampParameterDescriptor   
_VampPluginDescriptor   
PluginBase::ParameterDescriptor (Vamp)   RealTime (Vamp)   
+
A | D | F | O | P | R | S | Z | _
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/closed.png Binary file code-docs/closed.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_09d7d2829940fe46b7bc0eab58bbbc83.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_09d7d2829940fe46b7bc0eab58bbbc83.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,98 @@ + + + + +VampPluginSDK: vamp/ Directory Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+
+
vamp Directory Reference
+
+
+
+Directory dependency graph for vamp/:
+
+
vamp/
+ + +
+ + + +

+Files

file  vamp.h [code]
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_09d7d2829940fe46b7bc0eab58bbbc83_dep.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_09d7d2829940fe46b7bc0eab58bbbc83_dep.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_09d7d2829940fe46b7bc0eab58bbbc83_dep.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_09d7d2829940fe46b7bc0eab58bbbc83_dep.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +fa1a12dce37ca78c8c973be4a9615a8b \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_09d7d2829940fe46b7bc0eab58bbbc83_dep.png Binary file code-docs/dir_09d7d2829940fe46b7bc0eab58bbbc83_dep.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_4ec587bfce30b9b784fbf1cea7303b09.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_4ec587bfce30b9b784fbf1cea7303b09.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,110 @@ + + + + +VampPluginSDK: examples/ Directory Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+
+
examples Directory Reference
+
+
+
+Directory dependency graph for examples/:
+
+
examples/
+ + +
+ + + + + + + + + + + + + + + +

+Files

file  AmplitudeFollower.cpp [code]
file  AmplitudeFollower.h [code]
file  FixedTempoEstimator.cpp [code]
file  FixedTempoEstimator.h [code]
file  PercussionOnsetDetector.cpp [code]
file  PercussionOnsetDetector.h [code]
file  plugins.cpp [code]
file  PowerSpectrum.cpp [code]
file  PowerSpectrum.h [code]
file  SpectralCentroid.cpp [code]
file  SpectralCentroid.h [code]
file  ZeroCrossing.cpp [code]
file  ZeroCrossing.h [code]
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_4ec587bfce30b9b784fbf1cea7303b09_dep.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_4ec587bfce30b9b784fbf1cea7303b09_dep.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_4ec587bfce30b9b784fbf1cea7303b09_dep.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_4ec587bfce30b9b784fbf1cea7303b09_dep.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +eeb315c6124b9c6db8bdfcd24cd37d2c \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_4ec587bfce30b9b784fbf1cea7303b09_dep.png Binary file code-docs/dir_4ec587bfce30b9b784fbf1cea7303b09_dep.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_629e1dda0168f818e2ee3ab23f68039a.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_629e1dda0168f818e2ee3ab23f68039a.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,98 @@ + + + + +VampPluginSDK: src/ Directory Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+
+
src Directory Reference
+
+
+
+Directory dependency graph for src/:
+
+
src/
+ + +
+ + + +

+Files

file  doc-overview [code]
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_629e1dda0168f818e2ee3ab23f68039a_dep.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_629e1dda0168f818e2ee3ab23f68039a_dep.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_629e1dda0168f818e2ee3ab23f68039a_dep.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_629e1dda0168f818e2ee3ab23f68039a_dep.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +db9baf074e4c9fbd7f1b51c19609d148 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_629e1dda0168f818e2ee3ab23f68039a_dep.png Binary file code-docs/dir_629e1dda0168f818e2ee3ab23f68039a_dep.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_6fbd4b7d3be43d486a3cce3231e92c53.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_6fbd4b7d3be43d486a3cce3231e92c53.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,99 @@ + + + + +VampPluginSDK: host/ Directory Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+
+
host Directory Reference
+
+
+
+Directory dependency graph for host/:
+
+
host/
+ + +
+ + + + +

+Files

file  system.h [code]
file  vamp-simple-host.cpp [code]
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_6fbd4b7d3be43d486a3cce3231e92c53_dep.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_6fbd4b7d3be43d486a3cce3231e92c53_dep.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_6fbd4b7d3be43d486a3cce3231e92c53_dep.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_6fbd4b7d3be43d486a3cce3231e92c53_dep.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +668f8aa105255542a7dc8dd8fbe710ef \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_6fbd4b7d3be43d486a3cce3231e92c53_dep.png Binary file code-docs/dir_6fbd4b7d3be43d486a3cce3231e92c53_dep.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_878d155c6c7dea35ce3fc23c898c55e3.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_878d155c6c7dea35ce3fc23c898c55e3.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,109 @@ + + + + +VampPluginSDK: vamp-hostsdk/ Directory Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+
+
vamp-hostsdk Directory Reference
+
+
+
+Directory dependency graph for vamp-hostsdk/:
+
+
vamp-hostsdk/
+ + +
+ + + + + + + + + + + + + + +

+Files

file  hostguard.h [code]
file  vamp-hostsdk/Plugin.h [code]
file  vamp-hostsdk/PluginBase.h [code]
file  PluginBufferingAdapter.h [code]
file  PluginChannelAdapter.h [code]
file  PluginHostAdapter.h [code]
file  PluginInputDomainAdapter.h [code]
file  PluginLoader.h [code]
file  PluginSummarisingAdapter.h [code]
file  PluginWrapper.h [code]
file  vamp-hostsdk/RealTime.h [code]
file  vamp-hostsdk.h [code]
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_878d155c6c7dea35ce3fc23c898c55e3_dep.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_878d155c6c7dea35ce3fc23c898c55e3_dep.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_878d155c6c7dea35ce3fc23c898c55e3_dep.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_878d155c6c7dea35ce3fc23c898c55e3_dep.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +6489b905a9c2c157c9372559650cab77 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_878d155c6c7dea35ce3fc23c898c55e3_dep.png Binary file code-docs/dir_878d155c6c7dea35ce3fc23c898c55e3_dep.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_fc29d784de6894b015ce0522888485dd.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_fc29d784de6894b015ce0522888485dd.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,103 @@ + + + + +VampPluginSDK: vamp-sdk/ Directory Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+
+
vamp-sdk Directory Reference
+
+
+
+Directory dependency graph for vamp-sdk/:
+
+
vamp-sdk/
+ + +
+ + + + + + + + +

+Files

file  plugguard.h [code]
file  vamp-sdk/Plugin.h [code]
file  PluginAdapter.h [code]
file  vamp-sdk/PluginBase.h [code]
file  vamp-sdk/RealTime.h [code]
file  vamp-sdk.h [code]
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_fc29d784de6894b015ce0522888485dd_dep.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_fc29d784de6894b015ce0522888485dd_dep.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_fc29d784de6894b015ce0522888485dd_dep.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dir_fc29d784de6894b015ce0522888485dd_dep.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +39bc4a0383683e8d24319be4132d8cc8 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dir_fc29d784de6894b015ce0522888485dd_dep.png Binary file code-docs/dir_fc29d784de6894b015ce0522888485dd_dep.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/dirs.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/dirs.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,93 @@ + + + + +VampPluginSDK: Directories + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+
+
Directories
+
+
+
This directory hierarchy is sorted roughly, but not completely, alphabetically:
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/doc-overview.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/doc-overview.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: doc-overview File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
doc-overview File Reference
+
+
+ +

Go to the source code of this file.

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/doc-overview_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/doc-overview_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,93 @@ + + + + +VampPluginSDK: doc-overview Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
doc-overview
+
+
+Go to the documentation of this file.
00001 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/doxygen.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/doxygen.css Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,946 @@ +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 12px; +} + +/* @group Heading Levels */ + +h1 { + font-size: 150%; +} + +.title { + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2 { + font-size: 120%; +} + +h3 { + font-size: 100%; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code { + color: #4665A2; +} + +a.codeRef { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 8px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #C4CFE5; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; +} + +.memname { + white-space: nowrap; + font-weight: bold; + margin-left: 6px; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 8px; + border-top-left-radius: 8px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 2px 5px; + background-color: #FBFCFD; + border-top-width: 0; + /* opera specific markup */ + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +.params, .retval, .exception, .tparams { + border-spacing: 6px 2px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + + + + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0px; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; + margin: 5px; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; +} + +table.fieldtable { + width: 100%; + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + margin-left: 5px; + font-size: 8pt; + padding-left: 5px; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 7px; +} + +dl +{ + padding: 0 0 0 10px; +} + +dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug +{ + border-left:4px solid; + padding: 0 0 0 6px; +} + +dl.note +{ + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + border-color: #00D000; +} + +dl.deprecated +{ + border-color: #505050; +} + +dl.todo +{ + border-color: #00C0E0; +} + +dl.test +{ + border-color: #3030E0; +} + +dl.bug +{ + border-color: #C08050; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } + pre.fragment + { + overflow: visible; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + } +} + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/doxygen.png Binary file code-docs/doxygen.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/files.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/files.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,128 @@ + + + + +VampPluginSDK: File List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AmplitudeFollower.cpp [code]
AmplitudeFollower.h [code]
doc-overview [code]
FixedTempoEstimator.cpp [code]
FixedTempoEstimator.h [code]
hostguard.h [code]
PercussionOnsetDetector.cpp [code]
PercussionOnsetDetector.h [code]
plugguard.h [code]
vamp-sdk/Plugin.h [code]
vamp-hostsdk/Plugin.h [code]
PluginAdapter.h [code]
vamp-sdk/PluginBase.h [code]
vamp-hostsdk/PluginBase.h [code]
PluginBufferingAdapter.h [code]
PluginChannelAdapter.h [code]
PluginHostAdapter.h [code]
PluginInputDomainAdapter.h [code]
PluginLoader.h [code]
plugins.cpp [code]
PluginSummarisingAdapter.h [code]
PluginWrapper.h [code]
PowerSpectrum.cpp [code]
PowerSpectrum.h [code]
vamp-sdk/RealTime.h [code]
vamp-hostsdk/RealTime.h [code]
SpectralCentroid.cpp [code]
SpectralCentroid.h [code]
system.h [code]
vamp-hostsdk.h [code]
vamp-sdk.h [code]
vamp-simple-host.cpp [code]
vamp.h [code]
ZeroCrossing.cpp [code]
ZeroCrossing.h [code]
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2blank.png Binary file code-docs/ftv2blank.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2doc.png Binary file code-docs/ftv2doc.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2folderclosed.png Binary file code-docs/ftv2folderclosed.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2folderopen.png Binary file code-docs/ftv2folderopen.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2lastnode.png Binary file code-docs/ftv2lastnode.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2link.png Binary file code-docs/ftv2link.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2mlastnode.png Binary file code-docs/ftv2mlastnode.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2mnode.png Binary file code-docs/ftv2mnode.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2node.png Binary file code-docs/ftv2node.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2plastnode.png Binary file code-docs/ftv2plastnode.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2pnode.png Binary file code-docs/ftv2pnode.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2splitbar.png Binary file code-docs/ftv2splitbar.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/ftv2vertline.png Binary file code-docs/ftv2vertline.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,155 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- a -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x62.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x62.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,145 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- b -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x63.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x63.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,153 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- c -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x64.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x64.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,151 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- d -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x66.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x66.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,164 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- f -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x67.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x67.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,355 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- g -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x68.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x68.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,155 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- h -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x69.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x69.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,167 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- i -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x6c.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x6c.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,141 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- l -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x6d.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x6d.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,262 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- m -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x6e.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x6e.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,145 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- n -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x6f.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x6f.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,167 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- o -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x70.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x70.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,220 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- p -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x71.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x71.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,134 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- q -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x72.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x72.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,159 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- r -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x73.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x73.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,200 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- s -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x74.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x74.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,146 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- t -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x75.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x75.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,140 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- u -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x76.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x76.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,154 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- v -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x77.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x77.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,131 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- w -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x7a.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x7a.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,134 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- z -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_0x7e.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_0x7e.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,182 @@ + + + + +VampPluginSDK: Class Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- ~ -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_enum.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_enum.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,121 @@ + + + + +VampPluginSDK: Class Members - Enumerations + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_eval.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_eval.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,269 @@ + + + + +VampPluginSDK: Class Members - Enumerator + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- f -

+ + +

- h -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,128 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- a -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x63.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x63.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,135 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- c -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x64.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x64.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,125 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- d -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x66.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x66.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,140 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- f -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x67.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x67.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,336 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- g -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x69.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x69.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,138 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- i -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x6c.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x6c.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,131 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- l -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x6d.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x6d.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,125 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- m -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x6f.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x6f.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,155 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- o -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x70.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x70.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,180 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- p -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x72.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x72.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,143 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- r -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x73.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x73.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,156 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- s -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x74.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x74.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,131 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- t -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x75.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x75.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,125 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- u -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x7a.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x7a.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,125 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- z -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_func_0x7e.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_func_0x7e.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,176 @@ + + + + +VampPluginSDK: Class Members - Functions + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- ~ -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_type.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_type.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,127 @@ + + + + +VampPluginSDK: Class Members - Typedefs + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/functions_vars.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/functions_vars.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,513 @@ + + + + +VampPluginSDK: Class Members - Variables + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+  + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- q -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- z -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/globals.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/globals.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,368 @@ + + + + +VampPluginSDK: File Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all file members with links to the files they belong to:
+ +

- _ -

+ + +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- h -

+ + +

- l -

+ + +

- m -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- z -

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/globals_defs.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/globals_defs.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,153 @@ + + + + +VampPluginSDK: File Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/globals_enum.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/globals_enum.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,109 @@ + + + + +VampPluginSDK: File Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/globals_eval.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/globals_eval.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,127 @@ + + + + +VampPluginSDK: File Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/globals_func.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/globals_func.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,137 @@ + + + + +VampPluginSDK: File Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/globals_type.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/globals_type.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,127 @@ + + + + +VampPluginSDK: File Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/globals_vars.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/globals_vars.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,133 @@ + + + + +VampPluginSDK: File Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/graph_legend.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/graph_legend.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,149 @@ + + + + +VampPluginSDK: Graph Legend + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+
+
Graph Legend
+
+
+

This page explains how to interpret the graphs that are generated by doxygen.

+

Consider the following example:

+
/*! Invisible class because of truncation */
+class Invisible { };
+
+/*! Truncated class, inheritance relation is hidden */
+class Truncated : public Invisible { };
+
+/* Class not documented with doxygen comments */
+class Undocumented { };
+
+/*! Class that is inherited using public inheritance */
+class PublicBase : public Truncated { };
+
+/*! A template class */
+template<class T> class Templ { };
+
+/*! Class that is inherited using protected inheritance */
+class ProtectedBase { };
+
+/*! Class that is inherited using private inheritance */
+class PrivateBase { };
+
+/*! Class that is used by the Inherited class */
+class Used { };
+
+/*! Super class that inherits a number of other classes */
+class Inherited : public PublicBase,
+                  protected ProtectedBase,
+                  private PrivateBase,
+                  public Undocumented,
+                  public Templ<int>
+{
+  private:
+    Used *m_usedClass;
+};
+

This will result in the following graph:

+
+graph_legend.png +
+

The boxes in the above graph have the following meaning:

+ +

The arrows have the following meaning:

+ +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/graph_legend.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/graph_legend.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +aa02ac430847567b48a24a6582604cb8 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/graph_legend.png Binary file code-docs/graph_legend.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/hierarchy.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/hierarchy.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,133 @@ + + + + +VampPluginSDK: Class Hierarchy + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Class Hierarchy
+
+
+
+

Go to the graphical class hierarchy

+This inheritance list is sorted roughly, but not completely, alphabetically:
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/hostguard_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/hostguard_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,201 @@ + + + + +VampPluginSDK: hostguard.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
hostguard.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + +

+Defines

#define _VAMP_IN_HOSTSDK
#define _VAMP_SDK_HOSTSPACE_BEGIN(h)   namespace _VampHost {
#define _VAMP_SDK_HOSTSPACE_END(h)
#define _VAMP_SDK_PLUGSPACE_BEGIN(h)   namespace _VampHost {
#define _VAMP_SDK_PLUGSPACE_END(h)
+

Define Documentation

+ +
+
+ + + + +
#define _VAMP_IN_HOSTSDK
+
+
+ +

Definition at line 44 of file hostguard.h.

+ +
+
+ +
+
+ + + + + + + + +
#define _VAMP_SDK_HOSTSPACE_BEGIN( h)   namespace _VampHost {
+
+
+ +

Definition at line 52 of file hostguard.h.

+ +
+
+ +
+
+ + + + + + + + +
#define _VAMP_SDK_HOSTSPACE_END( h)
+
+
+Value:
} \
+        using namespace _VampHost;
+
+

Definition at line 55 of file hostguard.h.

+ +
+
+ +
+
+ + + + + + + + +
#define _VAMP_SDK_PLUGSPACE_BEGIN( h)   namespace _VampHost {
+
+
+ +

Definition at line 58 of file hostguard.h.

+ +
+
+ +
+
+ + + + + + + + +
#define _VAMP_SDK_PLUGSPACE_END( h)
+
+
+Value:
} \
+        using namespace _VampHost;
+
+

Definition at line 61 of file hostguard.h.

+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/hostguard_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/hostguard_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,161 @@ + + + + +VampPluginSDK: hostguard.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
hostguard.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_HOSTSDK_HOSTGUARD_H_
+00038 #define _VAMP_HOSTSDK_HOSTGUARD_H_
+00039 
+00040 #ifdef _VAMP_IN_PLUGINSDK
+00041 #error You have included headers from both vamp-sdk and vamp-hostsdk in the same source file. Please include only vamp-sdk headers in plugin code, and only vamp-hostsdk headers in host code.
+00042 #else
+00043 
+00044 #define _VAMP_IN_HOSTSDK
+00045 
+00046 #ifdef _VAMP_NO_HOST_NAMESPACE
+00047 #define _VAMP_SDK_HOSTSPACE_BEGIN(h)
+00048 #define _VAMP_SDK_HOSTSPACE_END(h)
+00049 #define _VAMP_SDK_PLUGSPACE_BEGIN(h)
+00050 #define _VAMP_SDK_PLUGSPACE_END(h)
+00051 #else
+00052 #define _VAMP_SDK_HOSTSPACE_BEGIN(h) \
+00053         namespace _VampHost {
+00054 
+00055 #define _VAMP_SDK_HOSTSPACE_END(h) \
+00056         } \
+00057         using namespace _VampHost;
+00058 #define _VAMP_SDK_PLUGSPACE_BEGIN(h) \
+00059         namespace _VampHost {
+00060 
+00061 #define _VAMP_SDK_PLUGSPACE_END(h) \
+00062         } \
+00063         using namespace _VampHost;
+00064 #endif
+00065 
+00066 #endif
+00067 
+00068 #endif
+00069 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/index.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,145 @@ + + + + +VampPluginSDK: Vamp Plugin SDK + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+
+
Vamp Plugin SDK
+
+
+

+About Vamp

+

Vamp is an API for C and C++ plugins that process sampled audio data to produce descriptive output (measurements or semantic observations). Find more information at http://www.vamp-plugins.org/ .

+

Although the official API for Vamp plugins is defined in C for maximum binary compatibility, we strongly recommend using the provided C++ classes in the SDK to implement your own plugins and hosts.

+

+For Plugins

+

Plugins should subclass Vamp::Plugin, and then use a Vamp::PluginAdapter to expose the correct C API for the plugin. Read the documentation for Vamp::PluginBase and Vamp::Plugin before starting.

+

Plugins should be compiled and linked into dynamic libraries using the usual convention for your platform, and should link (preferably statically) with -lvamp-sdk. Any number of plugins can reside in a single dynamic library. See plugins.cpp in the example plugins directory for the sort of code that will need to accompany your plugin class or classes, to make it possible for a host to look up your plugins properly.

+

Please read the relevant README file for your platform found in the Vamp SDK build/ directory, for details about how to ensure the resulting dynamic library exports the correct linker symbols.

+

The following example plugins are provided. You may legally reuse any amount of the code from these examples in any plugins you write, whether proprietary or open-source.

+
    +
  • ZeroCrossing calculates the positions and density of zero-crossing points in an audio waveform.
  • +
+
    +
  • SpectralCentroid calculates the centre of gravity of the frequency domain representation of each block of audio.
  • +
+
    +
  • PowerSpectrum calculates a power spectrum from the input audio. Actually, it doesn't do any work except calculating power from a cartesian complex FFT output. The work of calculating this frequency domain output is done for it by the host or host SDK; the plugin just needs to declare that it wants frequency domain input. This is the simplest of the example plugins.
  • +
+
    +
  • AmplitudeFollower is a simple implementation of SuperCollider's amplitude-follower algorithm.
  • +
+
    +
  • PercussionOnsetDetector estimates the locations of percussive onsets using a simple method described in "Drum Source Separation + using Percussive Feature Detection and Spectral Modulation" by Dan Barry, Derry Fitzgerald, Eugene Coyle and Bob Lawlor, ISSC 2005.
  • +
+
    +
  • FixedTempoEstimator calculates a single beats-per-minute value which is an estimate of the tempo of a piece of music that is assumed to be of fixed tempo, using autocorrelation of a frequency domain energy rise metric. It has several outputs that return intermediate results used in the calculation, and may be a useful example of a plugin having several outputs with varying feature structures.
  • +
+

+For Hosts

+

Hosts will normally use a Vamp::PluginHostAdapter to convert each plugin's exposed C API back into a useful Vamp::Plugin C++ object.

+

The Vamp::HostExt namespace contains several additional C++ classes to do this work for them, and make the host's life easier:

+
    +
  • Vamp::HostExt::PluginLoader provides a very easy interface for a host to discover, load, and find out category information about the available plugins. Most Vamp hosts will probably want to use this class.
  • +
+ +
    +
  • Vamp::HostExt::PluginChannelAdapter provides a simple means for hosts to use plugins that do not necessarily support the same number of audio channels as they have available, without having to apply a channel management / mixdown policy themselves.
  • +
+
    +
  • Vamp::HostExt::PluginBufferingAdapter provides a means for hosts to avoid having to negotiate the input step and block size, instead permitting the host to use any block size they desire (and a step size equal to it). This is particularly useful for "streaming" hosts that cannot seek backwards in the input audio stream and so would otherwise need to implement an additional buffer to support step sizes smaller than the block size.
  • +
+
    +
  • Vamp::HostExt::PluginSummarisingAdapter provides summarisation methods such as mean and median averages of output features, for use in any context where an available plugin produces individual values but the result that is actually needed is some sort of aggregate.
  • +
+

The PluginLoader class can also use the input domain, channel, and buffering adapters automatically to make these conversions transparent to the host if required.

+

Host authors should also refer to the example host code in the host directory of the SDK.

+

Hosts should link with -lvamp-hostsdk.

+

(The following notes in this section are mostly relevant for developers that are not using the HostExt classes, or that wish to know more about the policy they implement.)

+

The Vamp API does not officially specify how to load plugin libraries or where to find them. However, the SDK does include a function (Vamp::PluginHostAdapter::getPluginPath()) that returns a recommended directory search path that hosts may use for plugin libraries, and a class (Vamp::HostExt::PluginLoader) that implements a sensible cross-platform lookup policy using this path. We recommend using this class in your host unless you have a good reason not to want to. This implementation also permits the user to set the environment variable VAMP_PATH to override the default path if desired.

+

The policy used by Vamp::HostExt::PluginLoader -- and our recommendation for any host -- is to search each directory in this path for .DLL (on Windows), .so (on Linux, Solaris, BSD etc) or .dylib (on OS/X) files, then to load each one and perform a dynamic name lookup on the vampGetPluginDescriptor function to enumerate the plugins in the library. The example host has some code that may help, but this operation will necessarily be system-dependent.

+

Vamp also has an informal convention for sorting plugins into functional categories. In addition to the library file itself, a plugin library may install a category file with the same name as the library but .cat extension. The existence and format of this file are not specified by the Vamp API, but by convention the file may contain lines of the format

+
vamp:pluginlibrary:pluginname::General Category > Specific Category
+

which a host may read and use to assign plugins a location within a category tree for display to the user. The expectation is that advanced users may also choose to set up their own preferred category trees, which is why this information is not queried as part of the Vamp plugin's API itself. The Vamp::HostExt::PluginLoader class also provides support for plugin category lookup using this scheme.

+

+License

+

This plugin SDK is freely redistributable under a "new-style BSD" licence. See the file COPYING for more details. In short, you may modify and redistribute the SDK and example plugins within any commercial or non-commercial, proprietary or open-source plugin or application under almost any conditions, with no obligation to provide source code, provided you retain the original copyright note.

+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_0.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_0.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_0.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_0.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +eb4b9fd0bb977a81ffad93a07a3424d4 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_0.png Binary file code-docs/inherit_graph_0.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_1.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_1.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_1.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_1.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +c38face13a6d22bcee624099c9b9c055 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_1.png Binary file code-docs/inherit_graph_1.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_10.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_10.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_10.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_10.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +cdc6d883535df0f18b4ac88f3bd41d70 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_10.png Binary file code-docs/inherit_graph_10.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_11.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_11.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,4 @@ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_11.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_11.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +64cb6793b3cebd31d387c7f9355aadb1 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_11.png Binary file code-docs/inherit_graph_11.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_12.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_12.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_12.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_12.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +b837ebdb201a5eb6a00a6636f42c6d34 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_12.png Binary file code-docs/inherit_graph_12.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_13.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_13.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_13.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_13.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +f8f6047af365dc0bcf885485e34eebbb \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_13.png Binary file code-docs/inherit_graph_13.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_14.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_14.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_14.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_14.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +72ba5bcf1305b723cc32db4dd35d4fb3 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_14.png Binary file code-docs/inherit_graph_14.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_2.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_2.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_2.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_2.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +ce45ed563def7e43fa03be2317e86e48 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_2.png Binary file code-docs/inherit_graph_2.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_3.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_3.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_3.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_3.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +f2d978652b4684eb182d7bbabc2b4dce \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_3.png Binary file code-docs/inherit_graph_3.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_4.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_4.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_4.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_4.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +baa05f112f1dbc0cd2aa8e286542b377 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_4.png Binary file code-docs/inherit_graph_4.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_5.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_5.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_5.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_5.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +0c5931d55e7c373f16354c90ba7fdca8 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_5.png Binary file code-docs/inherit_graph_5.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_6.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_6.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_6.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_6.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +fd3fb59e738be3a41ae80c24fc610c10 \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_6.png Binary file code-docs/inherit_graph_6.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_7.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_7.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_7.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_7.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +1218436b52ea6fba1b4a8c1e95bf996b \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_7.png Binary file code-docs/inherit_graph_7.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_8.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_8.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_8.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_8.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +550823f6e90752dea152b9695cea8bce \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_8.png Binary file code-docs/inherit_graph_8.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_9.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_9.map Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,3 @@ + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_9.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherit_graph_9.md5 Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,1 @@ +8a399c8baa4b0365dfe67d776f6e439a \ No newline at end of file diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherit_graph_9.png Binary file code-docs/inherit_graph_9.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/inherits.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/inherits.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,156 @@ + + + + +VampPluginSDK: Class Hierarchy + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Class Hierarchy
+
+
+ + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/jquery.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/jquery.js Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,54 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0) +{I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function() +{G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); +/* + * jQuery UI 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* * jQuery UI Resizable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Resizables + * + * Depends: + * ui.core.js + */ +(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f
');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidthk.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)) +{s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);; +/** + * jQuery.ScrollTo - Easy element scrolling using jQuery. + * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com + * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php). + * Date: 2/8/2008 + * @author Ariel Flesler + * @version 1.3.2 + */ +;(function($){var o=$.scrollTo=function(a,b,c){o.window().scrollTo(a,b,c)};o.defaults={axis:'y',duration:1};o.window=function(){return $($.browser.safari?'body':'html')};$.fn.scrollTo=function(l,m,n){if(typeof m=='object'){n=m;m=0}n=$.extend({},o.defaults,n);m=m||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;if(n.queue)m/=2;n.offset=j(n.offset);n.over=j(n.over);return this.each(function(){var a=this,b=$(a),t=l,c,d={},w=b.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(t)){t=j(t);break}t=$(t,this);case'object':if(t.is||t.style)c=(t=$(t)).offset()}$.each(n.axis.split(''),function(i,f){var P=f=='x'?'Left':'Top',p=P.toLowerCase(),k='scroll'+P,e=a[k],D=f=='x'?'Width':'Height';if(c){d[k]=c[p]+(w?0:e-b.offset()[p]);if(n.margin){d[k]-=parseInt(t.css('margin'+P))||0;d[k]-=parseInt(t.css('border'+P+'Width'))||0}d[k]+=n.offset[p]||0;if(n.over[p])d[k]+=t[D.toLowerCase()]()*n.over[p]}else d[k]=t[p];if(/^\d+$/.test(d[k]))d[k]=d[k]<=0?0:Math.min(d[k],h(D));if(!i&&n.queue){if(e!=d[k])g(n.onAfterFirst);delete d[k]}});g(n.onAfter);function g(a){b.animate(d,m,n.easing,a&&function(){a.call(this,l)})};function h(D){var b=w?$.browser.opera?document.body:document.documentElement:a;return b['scroll'+D]-b['client'+D]}})};function j(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/namespaceVamp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/namespaceVamp.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,146 @@ + + + + +VampPluginSDK: Vamp Namespace Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp Namespace Reference
+
+
+ + + + + + + + + + + + + + + + + + +

+Namespaces

namespace  HostExt

+Classes

class  Plugin
 Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio or related data. More...
class  PluginAdapterBase
 PluginAdapter and PluginAdapterBase provide a wrapper class that a plugin library can use to make its C++ Vamp::Plugin objects available through the Vamp C API. More...
class  PluginAdapter
 PluginAdapter turns a PluginAdapterBase into a specific wrapper for a particular plugin implementation. More...
class  PluginBase
 A base class for plugins with optional configurable parameters, programs, etc. More...
class  RealTime
 RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conversion functions. More...
class  PluginHostAdapter
 PluginHostAdapter is a wrapper class that a Vamp host can use to make the C-language VampPluginDescriptor object appear as a C++ Vamp::Plugin object. More...

+Functions

std::ostream & operator<< (std::ostream &out, const RealTime &rt)
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
std::ostream& Vamp::operator<< (std::ostream & out,
const RealTime & rt 
)
+
+
+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/namespaceVamp_1_1HostExt.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/namespaceVamp_1_1HostExt.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,111 @@ + + + + +VampPluginSDK: Vamp::HostExt Namespace Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::HostExt Namespace Reference
+
+
+ + + + + + + + + + + + + + +

+Classes

class  PluginBufferingAdapter
 PluginBufferingAdapter is a Vamp plugin adapter that allows plugins to be used by a host supplying an audio stream in non-overlapping buffers of arbitrary size. More...
class  PluginChannelAdapter
 PluginChannelAdapter is a Vamp plugin adapter that implements a policy for management of plugins that expect a different number of input channels from the number actually available in the source audio data. More...
class  PluginInputDomainAdapter
 PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input into frequency-domain input for plugins that need it. More...
class  PluginLoader
 Vamp::HostExt::PluginLoader is a convenience class for discovering and loading Vamp plugins using the typical plugin-path, library naming, and categorisation conventions described in the Vamp SDK documentation. More...
class  PluginSummarisingAdapter
 PluginSummarisingAdapter is a Vamp plugin adapter that provides summarisation methods such as mean and median averages of output features, for use in any context where an available plugin produces individual values but the result that is actually needed is some sort of aggregate. More...
class  PluginWrapper
 PluginWrapper is a simple base class for adapter plugins. More...
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/namespacemembers.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/namespacemembers.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,98 @@ + + + + +VampPluginSDK: Namespace Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
    +
  • operator<<() +: Vamp +
  • +
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/namespacemembers_func.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/namespacemembers_func.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,98 @@ + + + + +VampPluginSDK: Namespace Members + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
    +
  • operator<<() +: Vamp +
  • +
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/namespaces.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/namespaces.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,95 @@ + + + + +VampPluginSDK: Namespace List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
Namespace List
+
+
+
Here is a list of all namespaces with brief descriptions:
+ + +
Vamp
Vamp::HostExt
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/nav_f.png Binary file code-docs/nav_f.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/nav_h.png Binary file code-docs/nav_h.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/navtree.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/navtree.css Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,123 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + padding:2px; + margin:0px; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 300px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background:url("ftv2splitbar.png") repeat scroll right center transparent; + cursor:e-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; +} + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/navtree.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/navtree.js Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,371 @@ +var NAVTREE = +[ + [ "VampPluginSDK", "index.html", [ + [ "Vamp Plugin SDK", "index.html", null ], + [ "Class List", "annotated.html", [ + [ "_VampFeature", "struct__VampFeature.html", null ], + [ "_VampFeatureList", "struct__VampFeatureList.html", null ], + [ "_VampFeatureUnion", "union__VampFeatureUnion.html", null ], + [ "_VampFeatureV2", "struct__VampFeatureV2.html", null ], + [ "_VampOutputDescriptor", "struct__VampOutputDescriptor.html", null ], + [ "_VampParameterDescriptor", "struct__VampParameterDescriptor.html", null ], + [ "_VampPluginDescriptor", "struct__VampPluginDescriptor.html", null ], + [ "AmplitudeFollower", "classAmplitudeFollower.html", null ], + [ "FixedTempoEstimator::D", "classFixedTempoEstimator_1_1D.html", null ], + [ "Vamp::Plugin::Feature", "structVamp_1_1Plugin_1_1Feature.html", null ], + [ "FixedTempoEstimator", "classFixedTempoEstimator.html", null ], + [ "Vamp::Plugin::OutputDescriptor", "structVamp_1_1Plugin_1_1OutputDescriptor.html", null ], + [ "Vamp::PluginBase::ParameterDescriptor", "structVamp_1_1PluginBase_1_1ParameterDescriptor.html", null ], + [ "PercussionOnsetDetector", "classPercussionOnsetDetector.html", null ], + [ "Vamp::Plugin", "classVamp_1_1Plugin.html", null ], + [ "Vamp::PluginAdapter< P >", "classVamp_1_1PluginAdapter.html", null ], + [ "Vamp::PluginAdapterBase", "classVamp_1_1PluginAdapterBase.html", null ], + [ "Vamp::PluginBase", "classVamp_1_1PluginBase.html", null ], + [ "Vamp::HostExt::PluginBufferingAdapter", "classVamp_1_1HostExt_1_1PluginBufferingAdapter.html", null ], + [ "Vamp::HostExt::PluginChannelAdapter", "classVamp_1_1HostExt_1_1PluginChannelAdapter.html", null ], + [ "Vamp::PluginHostAdapter", "classVamp_1_1PluginHostAdapter.html", null ], + [ "Vamp::HostExt::PluginInputDomainAdapter", "classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html", null ], + [ "Vamp::HostExt::PluginLoader", "classVamp_1_1HostExt_1_1PluginLoader.html", null ], + [ "Vamp::HostExt::PluginSummarisingAdapter", "classVamp_1_1HostExt_1_1PluginSummarisingAdapter.html", null ], + [ "Vamp::HostExt::PluginWrapper", "classVamp_1_1HostExt_1_1PluginWrapper.html", null ], + [ "PowerSpectrum", "classPowerSpectrum.html", null ], + [ "Vamp::RealTime", "structVamp_1_1RealTime.html", null ], + [ "SpectralCentroid", "classSpectralCentroid.html", null ], + [ "ZeroCrossing", "classZeroCrossing.html", null ] + ] ], + [ "Class Index", "classes.html", null ], + [ "Class Hierarchy", "hierarchy.html", [ + [ "_VampFeature", "struct__VampFeature.html", null ], + [ "_VampFeatureList", "struct__VampFeatureList.html", null ], + [ "_VampFeatureUnion", "union__VampFeatureUnion.html", null ], + [ "_VampFeatureV2", "struct__VampFeatureV2.html", null ], + [ "_VampOutputDescriptor", "struct__VampOutputDescriptor.html", null ], + [ "_VampParameterDescriptor", "struct__VampParameterDescriptor.html", null ], + [ "_VampPluginDescriptor", "struct__VampPluginDescriptor.html", null ], + [ "FixedTempoEstimator::D", "classFixedTempoEstimator_1_1D.html", null ], + [ "Vamp::Plugin::Feature", "structVamp_1_1Plugin_1_1Feature.html", null ], + [ "Vamp::Plugin::OutputDescriptor", "structVamp_1_1Plugin_1_1OutputDescriptor.html", null ], + [ "Vamp::PluginBase::ParameterDescriptor", "structVamp_1_1PluginBase_1_1ParameterDescriptor.html", null ], + [ "Vamp::PluginAdapterBase", "classVamp_1_1PluginAdapterBase.html", [ + [ "Vamp::PluginAdapter< P >", "classVamp_1_1PluginAdapter.html", null ] + ] ], + [ "Vamp::PluginBase", "classVamp_1_1PluginBase.html", [ + [ "Vamp::Plugin", "classVamp_1_1Plugin.html", [ + [ "AmplitudeFollower", "classAmplitudeFollower.html", null ], + [ "FixedTempoEstimator", "classFixedTempoEstimator.html", null ], + [ "PercussionOnsetDetector", "classPercussionOnsetDetector.html", null ], + [ "PowerSpectrum", "classPowerSpectrum.html", null ], + [ "SpectralCentroid", "classSpectralCentroid.html", null ], + [ "Vamp::HostExt::PluginWrapper", "classVamp_1_1HostExt_1_1PluginWrapper.html", [ + [ "Vamp::HostExt::PluginBufferingAdapter", "classVamp_1_1HostExt_1_1PluginBufferingAdapter.html", null ], + [ "Vamp::HostExt::PluginChannelAdapter", "classVamp_1_1HostExt_1_1PluginChannelAdapter.html", null ], + [ "Vamp::HostExt::PluginInputDomainAdapter", "classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html", null ], + [ "Vamp::HostExt::PluginSummarisingAdapter", "classVamp_1_1HostExt_1_1PluginSummarisingAdapter.html", null ] + ] ], + [ "Vamp::PluginHostAdapter", "classVamp_1_1PluginHostAdapter.html", null ], + [ "ZeroCrossing", "classZeroCrossing.html", null ] + ] ] + ] ], + [ "Vamp::HostExt::PluginLoader", "classVamp_1_1HostExt_1_1PluginLoader.html", null ], + [ "Vamp::RealTime", "structVamp_1_1RealTime.html", null ] + ] ], + [ "Class Members", "functions.html", null ], + [ "Namespace List", "namespaces.html", [ + [ "Vamp", "namespaceVamp.html", null ], + [ "Vamp::HostExt", "namespaceVamp_1_1HostExt.html", null ] + ] ], + [ "Namespace Members", "namespacemembers.html", null ], + [ "File List", "files.html", [ + [ "AmplitudeFollower.cpp", "AmplitudeFollower_8cpp.html", null ], + [ "AmplitudeFollower.h", "AmplitudeFollower_8h.html", null ], + [ "doc-overview", "doc-overview.html", null ], + [ "FixedTempoEstimator.cpp", "FixedTempoEstimator_8cpp.html", null ], + [ "FixedTempoEstimator.h", "FixedTempoEstimator_8h.html", null ], + [ "hostguard.h", "hostguard_8h.html", null ], + [ "PercussionOnsetDetector.cpp", "PercussionOnsetDetector_8cpp.html", null ], + [ "PercussionOnsetDetector.h", "PercussionOnsetDetector_8h.html", null ], + [ "plugguard.h", "plugguard_8h.html", null ], + [ "vamp-sdk/Plugin.h", "vamp-sdk_2Plugin_8h.html", null ], + [ "vamp-hostsdk/Plugin.h", "vamp-hostsdk_2Plugin_8h.html", null ], + [ "PluginAdapter.h", "PluginAdapter_8h.html", null ], + [ "vamp-sdk/PluginBase.h", "vamp-sdk_2PluginBase_8h.html", null ], + [ "vamp-hostsdk/PluginBase.h", "vamp-hostsdk_2PluginBase_8h.html", null ], + [ "PluginBufferingAdapter.h", "PluginBufferingAdapter_8h.html", null ], + [ "PluginChannelAdapter.h", "PluginChannelAdapter_8h.html", null ], + [ "PluginHostAdapter.h", "PluginHostAdapter_8h.html", null ], + [ "PluginInputDomainAdapter.h", "PluginInputDomainAdapter_8h.html", null ], + [ "PluginLoader.h", "PluginLoader_8h.html", null ], + [ "plugins.cpp", "plugins_8cpp.html", null ], + [ "PluginSummarisingAdapter.h", "PluginSummarisingAdapter_8h.html", null ], + [ "PluginWrapper.h", "PluginWrapper_8h.html", null ], + [ "PowerSpectrum.cpp", "PowerSpectrum_8cpp.html", null ], + [ "PowerSpectrum.h", "PowerSpectrum_8h.html", null ], + [ "vamp-sdk/RealTime.h", "vamp-sdk_2RealTime_8h.html", null ], + [ "vamp-hostsdk/RealTime.h", "vamp-hostsdk_2RealTime_8h.html", null ], + [ "SpectralCentroid.cpp", "SpectralCentroid_8cpp.html", null ], + [ "SpectralCentroid.h", "SpectralCentroid_8h.html", null ], + [ "system.h", "system_8h.html", null ], + [ "vamp-hostsdk.h", "vamp-hostsdk_8h.html", null ], + [ "vamp-sdk.h", "vamp-sdk_8h.html", null ], + [ "vamp-simple-host.cpp", "vamp-simple-host_8cpp.html", null ], + [ "vamp.h", "vamp_8h.html", null ], + [ "ZeroCrossing.cpp", "ZeroCrossing_8cpp.html", null ], + [ "ZeroCrossing.h", "ZeroCrossing_8h.html", null ] + ] ], + [ "Directories", "dirs.html", [ + [ "examples", "dir_4ec587bfce30b9b784fbf1cea7303b09.html", null ], + [ "host", "dir_6fbd4b7d3be43d486a3cce3231e92c53.html", null ], + [ "src", "dir_629e1dda0168f818e2ee3ab23f68039a.html", null ], + [ "vamp", "dir_09d7d2829940fe46b7bc0eab58bbbc83.html", null ], + [ "vamp-hostsdk", "dir_878d155c6c7dea35ce3fc23c898c55e3.html", null ], + [ "vamp-sdk", "dir_fc29d784de6894b015ce0522888485dd.html", null ] + ] ], + [ "File Members", "globals.html", null ] + ] ] +]; + +function createIndent(o,domNode,node,level) +{ + if (node.parentNode && node.parentNode.parentNode) + { + createIndent(o,domNode,node.parentNode,level+1); + } + var imgNode = document.createElement("img"); + if (level==0 && node.childrenData) + { + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() + { + if (node.expanded) + { + $(node.getChildrenUL()).slideUp("fast"); + if (node.isLast) + { + node.plus_img.src = node.relpath+"ftv2plastnode.png"; + } + else + { + node.plus_img.src = node.relpath+"ftv2pnode.png"; + } + node.expanded = false; + } + else + { + expandNode(o, node, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } + else + { + domNode.appendChild(imgNode); + } + if (level==0) + { + if (node.isLast) + { + if (node.childrenData) + { + imgNode.src = node.relpath+"ftv2plastnode.png"; + } + else + { + imgNode.src = node.relpath+"ftv2lastnode.png"; + domNode.appendChild(imgNode); + } + } + else + { + if (node.childrenData) + { + imgNode.src = node.relpath+"ftv2pnode.png"; + } + else + { + imgNode.src = node.relpath+"ftv2node.png"; + domNode.appendChild(imgNode); + } + } + } + else + { + if (node.isLast) + { + imgNode.src = node.relpath+"ftv2blank.png"; + } + else + { + imgNode.src = node.relpath+"ftv2vertline.png"; + } + } + imgNode.border = "0"; +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + a.appendChild(node.label); + if (link) + { + a.href = node.relpath+link; + } + else + { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + node.expanded = false; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() + { + if (!node.childrenUL) + { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); +} + +function expandNode(o, node, imm) +{ + if (node.childrenData && !node.expanded) + { + if (!node.childrenVisited) + { + getNode(o, node); + } + if (imm) + { + $(node.getChildrenUL()).show(); + } + else + { + $(node.getChildrenUL()).slideDown("fast",showRoot); + } + if (node.isLast) + { + node.plus_img.src = node.relpath+"ftv2mlastnode.png"; + } + else + { + node.plus_img.src = node.relpath+"ftv2mnode.png"; + } + node.expanded = true; + } +} + +function getNode(o, po) +{ + po.childrenVisited = true; + var l = po.childrenData.length-1; + for (var i in po.childrenData) + { + var nodeData = po.childrenData[i]; + po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], + i==l); + } +} + +function findNavTreePage(url, data) +{ + var nodes = data; + var result = null; + for (var i in nodes) + { + var d = nodes[i]; + if (d[1] == url) + { + return new Array(i); + } + else if (d[2] != null) // array of children + { + result = findNavTreePage(url, d[2]); + if (result != null) + { + return (new Array(i).concat(result)); + } + } + } + return null; +} + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + + getNode(o, o.node); + + o.breadcrumbs = findNavTreePage(toroot, NAVTREE); + if (o.breadcrumbs == null) + { + o.breadcrumbs = findNavTreePage("index.html",NAVTREE); + } + if (o.breadcrumbs != null && o.breadcrumbs.length>0) + { + var p = o.node; + for (var i in o.breadcrumbs) + { + var j = o.breadcrumbs[i]; + p = p.children[j]; + expandNode(o,p,true); + } + p.itemDiv.className = p.itemDiv.className + " selected"; + p.itemDiv.id = "selected"; + $(window).load(showRoot); + } +} + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/open.png Binary file code-docs/open.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/plugguard_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/plugguard_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,168 @@ + + + + +VampPluginSDK: plugguard.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
plugguard.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Defines

#define _VAMP_IN_PLUGINSDK   1
 Normal usage should be:
#define _VAMP_SDK_PLUGSPACE_BEGIN(h)
#define _VAMP_SDK_PLUGSPACE_END(h)
+

Define Documentation

+ +
+
+ + + + +
#define _VAMP_IN_PLUGINSDK   1
+
+
+ +

Normal usage should be:

+
    +
  • Plugins include vamp-sdk/Plugin.h or vamp-sdk/PluginBase.h. These files include this header, which specifies an appropriate namespace for the plugin classes to avoid any risk of conflict with non-plugin class implementations in the host on load.
  • +
+ +

Problems will occur when a host includes files directly from the vamp-sdk directory. There are two reasons this might happen: mistake, perhaps owing to ignorance of the fact that this isn't allowed (particularly since it was the normal mechanism in v1 of the SDK); and a wish to incorporate plugin code directly into the host rather than having to load it.

+

What if the host does include a vamp-sdk header by mistake? We can catch it if it's included before something from vamp-hostsdk. If it's included after something from vamp-hostsdk, it will work OK anyway. The remaining problem case is where nothing from vamp-hostsdk is included in the same file. We can't catch that.

+ +

Definition at line 72 of file plugguard.h.

+ +
+
+ +
+
+ + + + + + + + +
#define _VAMP_SDK_PLUGSPACE_BEGIN( h)
+
+
+ +

Definition at line 75 of file plugguard.h.

+ +
+
+ +
+
+ + + + + + + + +
#define _VAMP_SDK_PLUGSPACE_END( h)
+
+
+ +

Definition at line 76 of file plugguard.h.

+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/plugguard_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/plugguard_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,160 @@ + + + + +VampPluginSDK: plugguard.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
plugguard.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_SDK_PLUGGUARD_H_
+00038 #define _VAMP_SDK_PLUGGUARD_H_
+00039 
+00070 #ifndef _VAMP_IN_HOSTSDK
+00071 
+00072 #define _VAMP_IN_PLUGINSDK 1
+00073 
+00074 #ifdef _VAMP_NO_PLUGIN_NAMESPACE
+00075 #define _VAMP_SDK_PLUGSPACE_BEGIN(h)
+00076 #define _VAMP_SDK_PLUGSPACE_END(h)
+00077 #else
+00078 #ifdef _VAMP_PLUGIN_IN_HOST_NAMESPACE
+00079 #define _VAMP_SDK_PLUGSPACE_BEGIN(h) \
+00080         namespace _VampHost {
+00081 
+00082 #define _VAMP_SDK_PLUGSPACE_END(h) \
+00083         } \
+00084         using namespace _VampHost;
+00085 #else
+00086 #define _VAMP_SDK_PLUGSPACE_BEGIN(h) \
+00087         namespace _VampPlugin {
+00088 
+00089 #define _VAMP_SDK_PLUGSPACE_END(h) \
+00090         } \
+00091         using namespace _VampPlugin;
+00092 #endif
+00093 #endif
+00094 
+00095 #endif
+00096 
+00097 #endif
+00098 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/plugins_8cpp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/plugins_8cpp.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,245 @@ + + + + +VampPluginSDK: plugins.cpp File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
plugins.cpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

const VampPluginDescriptorvampGetPluginDescriptor (unsigned int version, unsigned int index)
 Get the descriptor for a given plugin index in this library.

+Variables

static Vamp::PluginAdapter
+< ZeroCrossing
zeroCrossingAdapter
static Vamp::PluginAdapter
+< SpectralCentroid
spectralCentroidAdapter
static Vamp::PluginAdapter
+< PercussionOnsetDetector
percussionOnsetAdapter
static Vamp::PluginAdapter
+< FixedTempoEstimator
fixedTempoAdapter
static Vamp::PluginAdapter
+< AmplitudeFollower
amplitudeAdapter
static Vamp::PluginAdapter
+< PowerSpectrum
powerSpectrum
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
const VampPluginDescriptor* vampGetPluginDescriptor (unsigned int hostApiVersion,
unsigned int index 
)
+
+
+ +

Get the descriptor for a given plugin index in this library.

+

Return NULL if the index is outside the range of valid indices for this plugin library.

+

The hostApiVersion argument tells the library code the highest Vamp API version supported by the host. The function should return a plugin descriptor compatible with the highest API version supported by the library that is no higher than that supported by the host. Provided the descriptor has the correct vampApiVersion field for its actual compatibility level, the host should be able to do the right thing with it: use it if possible, discard it otherwise.

+

This is the only symbol that a Vamp plugin actually needs to export from its shared object; all others can be hidden. See the accompanying documentation for notes on how to achieve this with certain compilers.

+ +

Definition at line 54 of file plugins.cpp.

+ +

References Vamp::PluginAdapterBase::getDescriptor().

+ +
+
+

Variable Documentation

+ +
+ +
+ +

Definition at line 47 of file plugins.cpp.

+ +
+
+ +
+ +
+ +

Definition at line 48 of file plugins.cpp.

+ +
+
+ +
+ +
+ +

Definition at line 49 of file plugins.cpp.

+ +
+
+ +
+ +
+ +

Definition at line 50 of file plugins.cpp.

+ +
+
+ +
+ +
+ +

Definition at line 51 of file plugins.cpp.

+ +
+
+ +
+ +
+ +

Definition at line 52 of file plugins.cpp.

+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/plugins_8cpp_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/plugins_8cpp_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,161 @@ + + + + +VampPluginSDK: plugins.cpp Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
plugins.cpp
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #include "vamp/vamp.h"
+00038 #include "vamp-sdk/PluginAdapter.h"
+00039 
+00040 #include "ZeroCrossing.h"
+00041 #include "SpectralCentroid.h"
+00042 #include "PercussionOnsetDetector.h"
+00043 #include "FixedTempoEstimator.h"
+00044 #include "AmplitudeFollower.h"
+00045 #include "PowerSpectrum.h"
+00046 
+00047 static Vamp::PluginAdapter<ZeroCrossing> zeroCrossingAdapter;
+00048 static Vamp::PluginAdapter<SpectralCentroid> spectralCentroidAdapter;
+00049 static Vamp::PluginAdapter<PercussionOnsetDetector> percussionOnsetAdapter;
+00050 static Vamp::PluginAdapter<FixedTempoEstimator> fixedTempoAdapter;
+00051 static Vamp::PluginAdapter<AmplitudeFollower> amplitudeAdapter;
+00052 static Vamp::PluginAdapter<PowerSpectrum> powerSpectrum;
+00053 
+00054 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int version,
+00055                                                     unsigned int index)
+00056 {
+00057     if (version < 1) return 0;
+00058 
+00059     switch (index) {
+00060     case  0: return zeroCrossingAdapter.getDescriptor();
+00061     case  1: return spectralCentroidAdapter.getDescriptor();
+00062     case  2: return percussionOnsetAdapter.getDescriptor();
+00063     case  3: return amplitudeAdapter.getDescriptor();
+00064     case  4: return fixedTempoAdapter.getDescriptor();
+00065     case  5: return powerSpectrum.getDescriptor();
+00066     default: return 0;
+00067     }
+00068 }
+00069 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/resize.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/resize.js Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,81 @@ +var cookie_namespace = 'doxygen'; +var sidenav,navtree,content,header; + +function readCookie(cookie) +{ + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) + { + var index = document.cookie.indexOf(myCookie); + if (index != -1) + { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) + { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + return 0; +} + +function writeCookie(cookie, val, expiration) +{ + if (val==undefined) return; + if (expiration == null) + { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + } + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; +} + +function resizeWidth() +{ + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).width(); + content.css({marginLeft:parseInt(sidenavWidth)+6+"px"}); //account for 6px-wide handle-bar + writeCookie('width',sidenavWidth, null); +} + +function restoreWidth(navWidth) +{ + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+6+"px"}); + sidenav.css({width:navWidth + "px"}); +} + +function resizeHeight() +{ + var headerHeight = header.height(); + var footerHeight = footer.height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + content.css({height:windowHeight + "px"}); + navtree.css({height:windowHeight + "px"}); + sidenav.css({height:windowHeight + "px",top: headerHeight+"px"}); +} + +function initResizable() +{ + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(window).resize(function() { resizeHeight(); }); + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); +} + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/structVamp_1_1PluginBase_1_1ParameterDescriptor-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/structVamp_1_1PluginBase_1_1ParameterDescriptor-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,104 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/structVamp_1_1PluginBase_1_1ParameterDescriptor.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/structVamp_1_1PluginBase_1_1ParameterDescriptor.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,347 @@ + + + + +VampPluginSDK: Vamp::PluginBase::ParameterDescriptor Struct Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::PluginBase::ParameterDescriptor Struct Reference
+
+
+ +

#include <PluginBase.h>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ParameterDescriptor ()

+Public Attributes

std::string identifier
 The name of the parameter, in computer-usable form.
std::string name
 The human-readable name of the parameter.
std::string description
 A human-readable short text describing the parameter.
std::string unit
 The unit of the parameter, in human-readable form.
float minValue
 The minimum value of the parameter.
float maxValue
 The maximum value of the parameter.
float defaultValue
 The default value of the parameter.
bool isQuantized
 True if the parameter values are quantized to a particular resolution.
float quantizeStep
 Quantization resolution of the parameter values (e.g.
std::vector< std::string > valueNames
 Names for the quantized values.
+

Detailed Description

+
+

Definition at line 130 of file vamp-sdk/PluginBase.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Vamp::PluginBase::ParameterDescriptor::ParameterDescriptor () [inline]
+
+
+ +

Definition at line 199 of file vamp-sdk/PluginBase.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

The name of the parameter, in computer-usable form.

+

Should be reasonably short, and may only contain the characters [a-zA-Z0-9_-].

+ +

Definition at line 137 of file vamp-sdk/PluginBase.h.

+ +

Referenced by FixedTempoEstimator::D::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

+ +
+
+ +
+ + +
+ +
+ +
+ +

A human-readable short text describing the parameter.

+

May be empty if the name has said it all already.

+ +

Definition at line 148 of file vamp-sdk/PluginBase.h.

+ +

Referenced by FixedTempoEstimator::D::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

+ +
+
+ +
+ +
+ +

The unit of the parameter, in human-readable form.

+ +

Definition at line 153 of file vamp-sdk/PluginBase.h.

+ +

Referenced by FixedTempoEstimator::D::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

+ +
+
+ + + + + +
+ +
+ +

The default value of the parameter.

+

The plugin should ensure that parameters have this value on initialisation (i.e. the host is not required to explicitly set parameters if it wants to use their default values).

+ +

Definition at line 171 of file vamp-sdk/PluginBase.h.

+ +

Referenced by FixedTempoEstimator::D::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

+ +
+
+ +
+ +
+ +

True if the parameter values are quantized to a particular resolution.

+ +

Definition at line 177 of file vamp-sdk/PluginBase.h.

+ +

Referenced by FixedTempoEstimator::D::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

+ +
+
+ +
+ +
+ +

Quantization resolution of the parameter values (e.g.

+

1.0 if they are all integers). Undefined if isQuantized is false.

+ +

Definition at line 184 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
std::vector<std::string> Vamp::PluginBase::ParameterDescriptor::valueNames
+
+
+ +

Names for the quantized values.

+

If isQuantized is true, this may either be empty or contain one string for each of the quantize steps from minValue up to maxValue inclusive. Undefined if isQuantized is false.

+

If these names are provided, they should be shown to the user in preference to the values themselves. The user may never see the actual numeric values unless they are also encoded in the names.

+ +

Definition at line 197 of file vamp-sdk/PluginBase.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/structVamp_1_1Plugin_1_1Feature-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/structVamp_1_1Plugin_1_1Feature-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,100 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/structVamp_1_1Plugin_1_1Feature.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/structVamp_1_1Plugin_1_1Feature.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,266 @@ + + + + +VampPluginSDK: Vamp::Plugin::Feature Struct Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::Plugin::Feature Struct Reference
+
+
+ +

#include <Plugin.h>

+ +

List of all members.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

 Feature ()

+Public Attributes

bool hasTimestamp
 True if an output feature has its own timestamp.
RealTime timestamp
 Timestamp of the output feature.
bool hasDuration
 True if an output feature has a specified duration.
RealTime duration
 Duration of the output feature.
std::vector< float > values
 Results for a single sample of this feature.
std::string label
 Label for the sample of this feature.
+

Detailed Description

+
+

Definition at line 336 of file vamp-sdk/Plugin.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Vamp::Plugin::Feature::Feature () [inline]
+
+
+ +

Definition at line 381 of file vamp-sdk/Plugin.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

True if an output feature has its own timestamp.

+

This is mandatory if the output has VariableSampleRate, optional if the output has FixedSampleRate, and unused if the output has OneSamplePerStep.

+ +

Definition at line 344 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures(), SpectralCentroid::process(), ZeroCrossing::process(), PowerSpectrum::process(), AmplitudeFollower::process(), and PercussionOnsetDetector::process().

+ +
+
+ +
+ +
+ +

Timestamp of the output feature.

+

This is mandatory if the output has VariableSampleRate or if the output has FixedSampleRate and hasTimestamp is true, and unused otherwise.

+ +

Definition at line 352 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures(), ZeroCrossing::process(), and PercussionOnsetDetector::process().

+ +
+
+ +
+ +
+ +

True if an output feature has a specified duration.

+

This is optional if the output has VariableSampleRate or FixedSampleRate, and and unused if the output has OneSamplePerStep.

+ +

Definition at line 360 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures().

+ +
+
+ +
+ +
+ +

Duration of the output feature.

+

This is mandatory if the output has VariableSampleRate or FixedSampleRate and hasDuration is true, and unused otherwise.

+ +

Definition at line 367 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures().

+ +
+
+ +
+
+ + + + +
std::vector<float> Vamp::Plugin::Feature::values
+
+
+ +

Results for a single sample of this feature.

+

If the output hasFixedBinCount, there must be the same number of values as the output's binCount count.

+ +

Definition at line 374 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures(), SpectralCentroid::process(), ZeroCrossing::process(), PowerSpectrum::process(), AmplitudeFollower::process(), and PercussionOnsetDetector::process().

+ +
+
+ +
+
+ + + + +
std::string Vamp::Plugin::Feature::label
+
+
+ +

Label for the sample of this feature.

+ +

Definition at line 379 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::assembleFeatures().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/structVamp_1_1Plugin_1_1OutputDescriptor-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/structVamp_1_1Plugin_1_1OutputDescriptor-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,113 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/structVamp_1_1Plugin_1_1OutputDescriptor.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/structVamp_1_1Plugin_1_1OutputDescriptor.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,497 @@ + + + + +VampPluginSDK: Vamp::Plugin::OutputDescriptor Struct Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
Vamp::Plugin::OutputDescriptor Struct Reference
+
+
+ +

#include <Plugin.h>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

enum  SampleType { OneSamplePerStep, +FixedSampleRate, +VariableSampleRate + }

+Public Member Functions

 OutputDescriptor ()

+Public Attributes

std::string identifier
 The name of the output, in computer-usable form.
std::string name
 The human-readable name of the output.
std::string description
 A human-readable short text describing the output.
std::string unit
 The unit of the output, in human-readable form.
bool hasFixedBinCount
 True if the output has the same number of values per sample for every output sample.
size_t binCount
 The number of values per result of the output.
std::vector< std::string > binNames
 The (human-readable) names of each of the bins, if appropriate.
bool hasKnownExtents
 True if the results in each output bin fall within a fixed numeric range (minimum and maximum values).
float minValue
 Minimum value of the results in the output.
float maxValue
 Maximum value of the results in the output.
bool isQuantized
 True if the output values are quantized to a particular resolution.
float quantizeStep
 Quantization resolution of the output values (e.g.
SampleType sampleType
 Positioning in time of the output results.
float sampleRate
 Sample rate of the output results, as samples per second.
bool hasDuration
 True if the returned results for this output are known to have a duration field.
+

Detailed Description

+
+

Definition at line 206 of file vamp-sdk/Plugin.h.

+

Member Enumeration Documentation

+ +
+ +
+
Enumerator:
+ + + +
OneSamplePerStep  +

Results from each process() align with that call's block start.

+
FixedSampleRate  +

Results are evenly spaced in time (sampleRate specified below)

+
VariableSampleRate  +

Results are unevenly spaced and have individual timestamps.

+
+
+
+ +

Definition at line 287 of file vamp-sdk/Plugin.h.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Vamp::Plugin::OutputDescriptor::OutputDescriptor () [inline]
+
+
+ +

Definition at line 322 of file vamp-sdk/Plugin.h.

+ +
+
+

Member Data Documentation

+ +
+ +
+ +

The name of the output, in computer-usable form.

+

Should be reasonably short and without whitespace or punctuation, using the characters [a-zA-Z0-9_-] only. Example: "zero_crossing_count"

+ +

Definition at line 214 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors(), AmplitudeFollower::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), ZeroCrossing::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), and PercussionOnsetDetector::getOutputDescriptors().

+ +
+
+ + + +
+ +
+ +

A human-readable short text describing the output.

+

May be empty if the name has said it all already. Example: "The number of zero crossing points per processing block"

+ +

Definition at line 227 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors(), AmplitudeFollower::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), ZeroCrossing::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), and PercussionOnsetDetector::getOutputDescriptors().

+ +
+
+ + + +
+ +
+ +

True if the output has the same number of values per sample for every output sample.

+

Outputs for which this is false are unlikely to be very useful in a general-purpose host.

+ +

Definition at line 239 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors(), AmplitudeFollower::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), ZeroCrossing::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), and PercussionOnsetDetector::getOutputDescriptors().

+ +
+
+ +
+ +
+ +

The number of values per result of the output.

+

Undefined if hasFixedBinCount is false. If this is zero, the output is point data (i.e. only the time of each output is of interest, the value list will be empty).

+ +

Definition at line 247 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors(), AmplitudeFollower::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), ZeroCrossing::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), and PercussionOnsetDetector::getOutputDescriptors().

+ +
+
+ +
+
+ + + + +
std::vector<std::string> Vamp::Plugin::OutputDescriptor::binNames
+
+
+ +

The (human-readable) names of each of the bins, if appropriate.

+

This is always optional.

+ +

Definition at line 253 of file vamp-sdk/Plugin.h.

+ +
+
+ +
+ +
+ +

True if the results in each output bin fall within a fixed numeric range (minimum and maximum values).

+

Undefined if binCount is zero.

+ +

Definition at line 260 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors(), AmplitudeFollower::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), ZeroCrossing::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), and PercussionOnsetDetector::getOutputDescriptors().

+ +
+
+ +
+ +
+ +

Minimum value of the results in the output.

+

Undefined if hasKnownExtents is false or binCount is zero.

+ +

Definition at line 266 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors().

+ +
+
+ +
+ +
+ +

Maximum value of the results in the output.

+

Undefined if hasKnownExtents is false or binCount is zero.

+ +

Definition at line 272 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors().

+ +
+
+ + + +
+ +
+ +

Quantization resolution of the output values (e.g.

+

1.0 if they are all integers). Undefined if isQuantized is false or binCount is zero.

+ +

Definition at line 285 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors(), ZeroCrossing::getOutputDescriptors(), and PercussionOnsetDetector::getOutputDescriptors().

+ +
+
+ + + +
+ +
+ +

Sample rate of the output results, as samples per second.

+

Undefined if sampleType is OneSamplePerStep.

+

If sampleType is VariableSampleRate and this value is non-zero, then it may be used to calculate a resolution for the output (i.e. the "duration" of each sample, in time, will be 1/sampleRate seconds). It's recommended to set this to zero if that behaviour is not desired.

+ +

Definition at line 314 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors(), ZeroCrossing::getOutputDescriptors(), and PercussionOnsetDetector::getOutputDescriptors().

+ +
+
+ +
+ +
+ +

True if the returned results for this output are known to have a duration field.

+ +

Definition at line 320 of file vamp-sdk/Plugin.h.

+ +

Referenced by FixedTempoEstimator::D::getOutputDescriptors().

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/structVamp_1_1RealTime.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/structVamp_1_1RealTime.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,698 @@ + + + + +VampPluginSDK: Vamp::RealTime Class Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+ +
+ +

RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conversion functions. + More...

+ +

#include <vamp-sdk/RealTime.h>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

int usec () const
int msec () const
 RealTime ()
 RealTime (int s, int n)
 RealTime (const RealTime &r)
RealTimeoperator= (const RealTime &r)
RealTime operator+ (const RealTime &r) const
RealTime operator- (const RealTime &r) const
RealTime operator- () const
bool operator< (const RealTime &r) const
bool operator> (const RealTime &r) const
bool operator== (const RealTime &r) const
bool operator!= (const RealTime &r) const
bool operator>= (const RealTime &r) const
bool operator<= (const RealTime &r) const
RealTime operator/ (int d) const
double operator/ (const RealTime &r) const
 Return the ratio of two times.
std::string toString () const
 Return a human-readable debug-type string to full precision (probably not a format to show to a user directly)
std::string toText (bool fixedDp=false) const
 Return a user-readable string to the nearest millisecond in a form like HH:MM:SS.mmm.

+Static Public Member Functions

static RealTime fromSeconds (double sec)
static RealTime fromMilliseconds (int msec)
static RealTime fromTimeval (const struct timeval &)
static long realTime2Frame (const RealTime &r, unsigned int sampleRate)
 Convert a RealTime into a sample frame at the given sample rate.
static RealTime frame2RealTime (long frame, unsigned int sampleRate)
 Convert a sample frame at the given sample rate into a RealTime.

+Public Attributes

int sec
int nsec

+Static Public Attributes

static const RealTime zeroTime
+

Detailed Description

+

RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conversion functions.

+ +

Definition at line 66 of file vamp-sdk/RealTime.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
Vamp::RealTime::RealTime () [inline]
+
+
+ +

Definition at line 74 of file vamp-sdk/RealTime.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Vamp::RealTime::RealTime (int s,
int n 
)
+
+
+ +
+
+ +
+
+ + + + + + + + +
Vamp::RealTime::RealTime (const RealTimer) [inline]
+
+
+ +

Definition at line 77 of file vamp-sdk/RealTime.h.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
int Vamp::RealTime::usec () const [inline]
+
+
+ +

Definition at line 71 of file vamp-sdk/RealTime.h.

+ +
+
+ +
+
+ + + + + + + +
int Vamp::RealTime::msec () const [inline]
+
+
+ +

Definition at line 72 of file vamp-sdk/RealTime.h.

+ +
+
+ +
+
+ + + + + + + + +
static RealTime Vamp::RealTime::fromSeconds (double sec) [static]
+
+
+ +
+
+ +
+
+ + + + + + + + +
static RealTime Vamp::RealTime::fromMilliseconds (int msec) [static]
+
+
+ +
+
+ +
+
+ + + + + + + + +
static RealTime Vamp::RealTime::fromTimeval (const struct timeval & ) [static]
+
+
+ +
+
+ +
+
+ + + + + + + + +
RealTime& Vamp::RealTime::operator= (const RealTimer) [inline]
+
+
+ +

Definition at line 87 of file vamp-sdk/RealTime.h.

+ +

References nsec, and sec.

+ +
+
+ +
+
+ + + + + + + + +
RealTime Vamp::RealTime::operator+ (const RealTimer) const [inline]
+
+
+ +

Definition at line 91 of file vamp-sdk/RealTime.h.

+ +

References nsec, and sec.

+ +
+
+ +
+
+ + + + + + + + +
RealTime Vamp::RealTime::operator- (const RealTimer) const [inline]
+
+
+ +

Definition at line 94 of file vamp-sdk/RealTime.h.

+ +

References nsec, and sec.

+ +
+
+ +
+
+ + + + + + + +
RealTime Vamp::RealTime::operator- () const [inline]
+
+
+ +

Definition at line 97 of file vamp-sdk/RealTime.h.

+ +
+
+ +
+
+ + + + + + + + +
bool Vamp::RealTime::operator< (const RealTimer) const [inline]
+
+
+ +

Definition at line 101 of file vamp-sdk/RealTime.h.

+ +

References nsec, and sec.

+ +
+
+ +
+
+ + + + + + + + +
bool Vamp::RealTime::operator> (const RealTimer) const [inline]
+
+
+ +

Definition at line 106 of file vamp-sdk/RealTime.h.

+ +

References nsec, and sec.

+ +
+
+ +
+
+ + + + + + + + +
bool Vamp::RealTime::operator== (const RealTimer) const [inline]
+
+
+ +

Definition at line 111 of file vamp-sdk/RealTime.h.

+ +

References nsec, and sec.

+ +
+
+ +
+
+ + + + + + + + +
bool Vamp::RealTime::operator!= (const RealTimer) const [inline]
+
+
+ +

Definition at line 115 of file vamp-sdk/RealTime.h.

+ +
+
+ +
+
+ + + + + + + + +
bool Vamp::RealTime::operator>= (const RealTimer) const [inline]
+
+
+ +

Definition at line 119 of file vamp-sdk/RealTime.h.

+ +

References nsec, and sec.

+ +
+
+ +
+
+ + + + + + + + +
bool Vamp::RealTime::operator<= (const RealTimer) const [inline]
+
+
+ +

Definition at line 124 of file vamp-sdk/RealTime.h.

+ +

References nsec, and sec.

+ +
+
+ +
+
+ + + + + + + + +
RealTime Vamp::RealTime::operator/ (int d) const
+
+
+ +
+
+ +
+
+ + + + + + + + +
double Vamp::RealTime::operator/ (const RealTimer) const
+
+
+ +

Return the ratio of two times.

+ +
+
+ +
+
+ + + + + + + +
std::string Vamp::RealTime::toString () const
+
+
+ +

Return a human-readable debug-type string to full precision (probably not a format to show to a user directly)

+ +

Referenced by printFeatures().

+ +
+
+ +
+
+ + + + + + + + +
std::string Vamp::RealTime::toText (bool fixedDp = false) const
+
+
+ +

Return a user-readable string to the nearest millisecond in a form like HH:MM:SS.mmm.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
static long Vamp::RealTime::realTime2Frame (const RealTimer,
unsigned int sampleRate 
) [static]
+
+
+ +

Convert a RealTime into a sample frame at the given sample rate.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
static RealTime Vamp::RealTime::frame2RealTime (long frame,
unsigned int sampleRate 
) [static]
+
+
+ +

Convert a sample frame at the given sample rate into a RealTime.

+ +

Referenced by ZeroCrossing::process(), and PercussionOnsetDetector::process().

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
int Vamp::RealTime::sec
+
+ +
+ +
+
+ + + + +
int Vamp::RealTime::nsec
+
+ +
+ +
+
+ + + + +
const RealTime Vamp::RealTime::zeroTime [static]
+
+
+ +

Definition at line 158 of file vamp-sdk/RealTime.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampFeature-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampFeature-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,99 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
_VampFeature Member List
+
+
+This is the complete list of members for _VampFeature, including all inherited members. + + + + + + +
hasTimestamp_VampFeature
label_VampFeature
nsec_VampFeature
sec_VampFeature
valueCount_VampFeature
values_VampFeature
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampFeature.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampFeature.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,227 @@ + + + + +VampPluginSDK: _VampFeature Struct Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
_VampFeature Struct Reference
+
+
+ +

#include <vamp.h>

+ +

List of all members.

+ + + + + + + + + + + + + + +

+Public Attributes

int hasTimestamp
 1 if the feature has a timestamp (i.e.
int sec
 Seconds component of timestamp.
int nsec
 Nanoseconds component of timestamp.
unsigned int valueCount
 Number of values.
float * values
 Values for this returned sample.
char * label
 Label for this returned sample.
+

Detailed Description

+
+

Definition at line 174 of file vamp.h.

+

Member Data Documentation

+ +
+ +
+ +

1 if the feature has a timestamp (i.e.

+

if vampVariableSampleRate).

+ +

Definition at line 177 of file vamp.h.

+ +
+
+ +
+
+ + + + +
int _VampFeature::sec
+
+
+ +

Seconds component of timestamp.

+ +

Definition at line 180 of file vamp.h.

+ +
+
+ +
+
+ + + + +
int _VampFeature::nsec
+
+
+ +

Nanoseconds component of timestamp.

+ +

Definition at line 183 of file vamp.h.

+ +
+
+ +
+
+ + + + +
unsigned int _VampFeature::valueCount
+
+
+ +

Number of values.

+

Must be binCount if hasFixedBinCount.

+ +

Definition at line 186 of file vamp.h.

+ +
+
+ +
+
+ + + + +
float* _VampFeature::values
+
+
+ +

Values for this returned sample.

+ +

Definition at line 189 of file vamp.h.

+ +
+
+ +
+
+ + + + +
char* _VampFeature::label
+
+
+ +

Label for this returned sample.

+

May be NULL.

+ +

Definition at line 192 of file vamp.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampFeatureList-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampFeatureList-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,95 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
_VampFeatureList Member List
+
+
+This is the complete list of members for _VampFeatureList, including all inherited members. + + +
featureCount_VampFeatureList
features_VampFeatureList
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampFeatureList.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampFeatureList.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,151 @@ + + + + +VampPluginSDK: _VampFeatureList Struct Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
_VampFeatureList Struct Reference
+
+
+ +

#include <vamp.h>

+ +

List of all members.

+ + + + + + +

+Public Attributes

unsigned int featureCount
 Number of features in this feature list.
VampFeatureUnionfeatures
 Features in this feature list.
+

Detailed Description

+
+

Definition at line 217 of file vamp.h.

+

Member Data Documentation

+ +
+
+ + + + +
unsigned int _VampFeatureList::featureCount
+
+
+ +

Number of features in this feature list.

+ +

Definition at line 220 of file vamp.h.

+ +
+
+ +
+ +
+ +

Features in this feature list.

+

May be NULL if featureCount is zero.

+

If present, this array must contain featureCount feature structures for a Vamp API version 1 plugin, or 2*featureCount feature unions for a Vamp API version 2 plugin.

+

The features returned by an API version 2 plugin must consist of the same feature structures as in API version 1 for the first featureCount array elements, followed by featureCount unions that contain VampFeatureV2 structures (or NULL pointers if no V2 feature structures are present).

+ +

Definition at line 235 of file vamp.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampFeatureV2-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampFeatureV2-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,96 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
_VampFeatureV2 Member List
+
+
+This is the complete list of members for _VampFeatureV2, including all inherited members. + + + +
durationNsec_VampFeatureV2
durationSec_VampFeatureV2
hasDuration_VampFeatureV2
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampFeatureV2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampFeatureV2.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,167 @@ + + + + +VampPluginSDK: _VampFeatureV2 Struct Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
_VampFeatureV2 Struct Reference
+
+
+ +

#include <vamp.h>

+ +

List of all members.

+ + + + + + + + +

+Public Attributes

int hasDuration
 1 if the feature has a duration.
int durationSec
 Seconds component of duratiion.
int durationNsec
 Nanoseconds component of duration.
+

Detailed Description

+
+

Definition at line 196 of file vamp.h.

+

Member Data Documentation

+ +
+ +
+ +

1 if the feature has a duration.

+ +

Definition at line 199 of file vamp.h.

+ +
+
+ +
+ +
+ +

Seconds component of duratiion.

+ +

Definition at line 202 of file vamp.h.

+ +
+
+ +
+ +
+ +

Nanoseconds component of duration.

+ +

Definition at line 205 of file vamp.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampOutputDescriptor-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampOutputDescriptor-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,108 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampOutputDescriptor.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampOutputDescriptor.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,401 @@ + + + + +VampPluginSDK: _VampOutputDescriptor Struct Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
_VampOutputDescriptor Struct Reference
+
+
+ +

#include <vamp.h>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

const char * identifier
 Computer-usable name of the output.
const char * name
 Human-readable name of the output.
const char * description
 Human-readable short text about the output.
const char * unit
 Human-readable name of the unit of the output.
int hasFixedBinCount
 1 if output has equal number of values for each returned result.
unsigned int binCount
 Number of values per result, if hasFixedBinCount.
const char ** binNames
 Names of returned value bins, if hasFixedBinCount.
int hasKnownExtents
 1 if each returned value falls within the same fixed min/max range.
float minValue
 Minimum value for a returned result in any bin, if hasKnownExtents.
float maxValue
 Maximum value for a returned result in any bin, if hasKnownExtents.
int isQuantized
 1 if returned results are quantized to a particular resolution.
float quantizeStep
 Quantization resolution for returned results, if isQuantized.
VampSampleType sampleType
 Time positioning method for returned results (see VampSampleType).
float sampleRate
 Sample rate of returned results, if sampleType is vampFixedSampleRate.
int hasDuration
 1 if the returned results for this output are known to have a duration field.
+

Detailed Description

+
+

Definition at line 118 of file vamp.h.

+

Member Data Documentation

+ +
+
+ + + + +
const char* _VampOutputDescriptor::identifier
+
+
+ +

Computer-usable name of the output.

+

Must not change. [a-zA-Z0-9_]

+ +

Definition at line 121 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampOutputDescriptor::name
+
+
+ +

Human-readable name of the output.

+

May be translatable.

+ +

Definition at line 124 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampOutputDescriptor::description
+
+
+ +

Human-readable short text about the output.

+

May be translatable.

+ +

Definition at line 127 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampOutputDescriptor::unit
+
+
+ +

Human-readable name of the unit of the output.

+ +

Definition at line 130 of file vamp.h.

+ +
+
+ +
+ +
+ +

1 if output has equal number of values for each returned result.

+ +

Definition at line 133 of file vamp.h.

+ +
+
+ +
+
+ + + + +
unsigned int _VampOutputDescriptor::binCount
+
+
+ +

Number of values per result, if hasFixedBinCount.

+ +

Definition at line 136 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char** _VampOutputDescriptor::binNames
+
+
+ +

Names of returned value bins, if hasFixedBinCount.

+

May be NULL.

+ +

Definition at line 139 of file vamp.h.

+ +
+
+ +
+ +
+ +

1 if each returned value falls within the same fixed min/max range.

+ +

Definition at line 142 of file vamp.h.

+ +
+
+ +
+ +
+ +

Minimum value for a returned result in any bin, if hasKnownExtents.

+ +

Definition at line 145 of file vamp.h.

+ +
+
+ +
+ +
+ +

Maximum value for a returned result in any bin, if hasKnownExtents.

+ +

Definition at line 148 of file vamp.h.

+ +
+
+ +
+ +
+ +

1 if returned results are quantized to a particular resolution.

+ +

Definition at line 151 of file vamp.h.

+ +
+
+ +
+ +
+ +

Quantization resolution for returned results, if isQuantized.

+ +

Definition at line 154 of file vamp.h.

+ +
+
+ +
+ +
+ +

Time positioning method for returned results (see VampSampleType).

+ +

Definition at line 157 of file vamp.h.

+ +
+
+ +
+ +
+ +

Sample rate of returned results, if sampleType is vampFixedSampleRate.

+

"Resolution" of result, if sampleType is vampVariableSampleRate.

+ +

Definition at line 161 of file vamp.h.

+ +
+
+ +
+ +
+ +

1 if the returned results for this output are known to have a duration field.

+

This field is new in Vamp API version 2; it must not be tested for plugins that report an older API version in their plugin descriptor.

+ +

Definition at line 170 of file vamp.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampParameterDescriptor-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampParameterDescriptor-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,103 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampParameterDescriptor.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampParameterDescriptor.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,311 @@ + + + + +VampPluginSDK: _VampParameterDescriptor Struct Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
_VampParameterDescriptor Struct Reference
+
+
+ +

C language API for Vamp plugins. + More...

+ +

#include <vamp.h>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

const char * identifier
 Computer-usable name of the parameter.
const char * name
 Human-readable name of the parameter.
const char * description
 Human-readable short text about the parameter.
const char * unit
 Human-readable unit of the parameter.
float minValue
 Minimum value.
float maxValue
 Maximum value.
float defaultValue
 Default value.
int isQuantized
 1 if parameter values are quantized to a particular resolution.
float quantizeStep
 Quantization resolution, if isQuantized.
const char ** valueNames
 Human-readable names of the values, if isQuantized.
+

Detailed Description

+

C language API for Vamp plugins.

+

This is the formal plugin API for Vamp. Plugin authors may prefer to use the C++ classes provided in the Vamp plugin SDK, instead of using this API directly. There is an adapter class provided that makes C++ plugins available using this C API with relatively little work, and the C++ headers are more thoroughly documented.

+

IMPORTANT: The comments in this file summarise the purpose of each of the declared fields and functions, but do not provide a complete guide to their permitted values and expected usage. Please refer to the C++ headers in the Vamp plugin SDK for further details and plugin lifecycle documentation.

+ +

Definition at line 71 of file vamp.h.

+

Member Data Documentation

+ +
+
+ + + + +
const char* _VampParameterDescriptor::identifier
+
+
+ +

Computer-usable name of the parameter.

+

Must not change. [a-zA-Z0-9_]

+ +

Definition at line 74 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampParameterDescriptor::name
+
+
+ +

Human-readable name of the parameter.

+

May be translatable.

+ +

Definition at line 77 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampParameterDescriptor::description
+
+
+ +

Human-readable short text about the parameter.

+

May be translatable.

+ +

Definition at line 80 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampParameterDescriptor::unit
+
+
+ +

Human-readable unit of the parameter.

+ +

Definition at line 83 of file vamp.h.

+ +
+
+ +
+ +
+ +

Minimum value.

+ +

Definition at line 86 of file vamp.h.

+ +
+
+ +
+ +
+ +

Maximum value.

+ +

Definition at line 89 of file vamp.h.

+ +
+
+ +
+ +
+ +

Default value.

+

Plugin is responsible for setting this on initialise.

+ +

Definition at line 92 of file vamp.h.

+ +
+
+ +
+ +
+ +

1 if parameter values are quantized to a particular resolution.

+ +

Definition at line 95 of file vamp.h.

+ +
+
+ +
+ +
+ +

Quantization resolution, if isQuantized.

+ +

Definition at line 98 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char** _VampParameterDescriptor::valueNames
+
+
+ +

Human-readable names of the values, if isQuantized.

+

May be NULL.

+ +

Definition at line 101 of file vamp.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampPluginDescriptor-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampPluginDescriptor-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,123 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ + + + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/struct__VampPluginDescriptor.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/struct__VampPluginDescriptor.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,687 @@ + + + + +VampPluginSDK: _VampPluginDescriptor Struct Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
_VampPluginDescriptor Struct Reference
+
+
+ +

#include <vamp.h>

+ +

List of all members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

unsigned int vampApiVersion
 API version with which this descriptor is compatible.
const char * identifier
 Computer-usable name of the plugin.
const char * name
 Human-readable name of the plugin.
const char * description
 Human-readable short text about the plugin.
const char * maker
 Human-readable name of plugin's author or vendor.
int pluginVersion
 Version number of the plugin.
const char * copyright
 Human-readable summary of copyright or licensing for plugin.
unsigned int parameterCount
 Number of parameter inputs.
const VampParameterDescriptor ** parameters
 Fixed descriptors for parameter inputs.
unsigned int programCount
 Number of programs.
const char ** programs
 Fixed names for programs.
VampInputDomain inputDomain
 Preferred input domain for audio input (time or frequency).
VampPluginHandle(* instantiate )(const struct _VampPluginDescriptor *, float inputSampleRate)
 Create and return a new instance of this plugin.
void(* cleanup )(VampPluginHandle)
 Destroy an instance of this plugin.
int(* initialise )(VampPluginHandle, unsigned int inputChannels, unsigned int stepSize, unsigned int blockSize)
 Initialise an instance following parameter configuration.
void(* reset )(VampPluginHandle)
 Reset an instance, ready to use again on new input data.
float(* getParameter )(VampPluginHandle, int)
 Get a parameter value.
void(* setParameter )(VampPluginHandle, int, float)
 Set a parameter value.
unsigned int(* getCurrentProgram )(VampPluginHandle)
 Get the current program (if programCount > 0).
void(* selectProgram )(VampPluginHandle, unsigned int)
 Set the current program.
unsigned int(* getPreferredStepSize )(VampPluginHandle)
 Get the plugin's preferred processing window increment in samples.
unsigned int(* getPreferredBlockSize )(VampPluginHandle)
 Get the plugin's preferred processing window size in samples.
unsigned int(* getMinChannelCount )(VampPluginHandle)
 Get the minimum number of input channels this plugin can handle.
unsigned int(* getMaxChannelCount )(VampPluginHandle)
 Get the maximum number of input channels this plugin can handle.
unsigned int(* getOutputCount )(VampPluginHandle)
 Get the number of feature outputs (distinct sets of results).
VampOutputDescriptor *(* getOutputDescriptor )(VampPluginHandle, unsigned int)
 Get a descriptor for a given feature output.
void(* releaseOutputDescriptor )(VampOutputDescriptor *)
 Destroy a descriptor for a feature output.
VampFeatureList *(* process )(VampPluginHandle, const float *const *inputBuffers, int sec, int nsec)
 Process an input block and return a set of features.
VampFeatureList *(* getRemainingFeatures )(VampPluginHandle)
 Return any remaining features at the end of processing.
void(* releaseFeatureSet )(VampFeatureList *)
 Release a feature set returned from process or getRemainingFeatures.
+

Detailed Description

+
+

Definition at line 248 of file vamp.h.

+

Member Data Documentation

+ +
+
+ + + + +
unsigned int _VampPluginDescriptor::vampApiVersion
+
+
+ +

API version with which this descriptor is compatible.

+ +

Definition at line 251 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampPluginDescriptor::identifier
+
+
+ +

Computer-usable name of the plugin.

+

Must not change. [a-zA-Z0-9_]

+ +

Definition at line 254 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampPluginDescriptor::name
+
+
+ +

Human-readable name of the plugin.

+

May be translatable.

+ +

Definition at line 257 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampPluginDescriptor::description
+
+
+ +

Human-readable short text about the plugin.

+

May be translatable.

+ +

Definition at line 260 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampPluginDescriptor::maker
+
+
+ +

Human-readable name of plugin's author or vendor.

+ +

Definition at line 263 of file vamp.h.

+ +
+
+ +
+ +
+ +

Version number of the plugin.

+ +

Definition at line 266 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char* _VampPluginDescriptor::copyright
+
+
+ +

Human-readable summary of copyright or licensing for plugin.

+ +

Definition at line 269 of file vamp.h.

+ +
+
+ +
+
+ + + + +
unsigned int _VampPluginDescriptor::parameterCount
+
+
+ +

Number of parameter inputs.

+ +

Definition at line 272 of file vamp.h.

+ +
+
+ +
+ +
+ +

Fixed descriptors for parameter inputs.

+ +

Definition at line 275 of file vamp.h.

+ +
+
+ +
+
+ + + + +
unsigned int _VampPluginDescriptor::programCount
+
+
+ +

Number of programs.

+ +

Definition at line 278 of file vamp.h.

+ +
+
+ +
+
+ + + + +
const char** _VampPluginDescriptor::programs
+
+
+ +

Fixed names for programs.

+ +

Definition at line 281 of file vamp.h.

+ +
+
+ +
+ +
+ +

Preferred input domain for audio input (time or frequency).

+ +

Definition at line 284 of file vamp.h.

+ +
+
+ +
+
+ + + + +
VampPluginHandle(* _VampPluginDescriptor::instantiate)(const struct _VampPluginDescriptor *, float inputSampleRate)
+
+
+ +

Create and return a new instance of this plugin.

+ +

Definition at line 287 of file vamp.h.

+ +
+
+ +
+ +
+ +

Destroy an instance of this plugin.

+ +

Definition at line 291 of file vamp.h.

+ +
+
+ +
+
+ + + + +
int(* _VampPluginDescriptor::initialise)(VampPluginHandle, unsigned int inputChannels, unsigned int stepSize, unsigned int blockSize)
+
+
+ +

Initialise an instance following parameter configuration.

+ +

Definition at line 294 of file vamp.h.

+ +
+
+ +
+ +
+ +

Reset an instance, ready to use again on new input data.

+ +

Definition at line 300 of file vamp.h.

+ +
+
+ +
+ +
+ +

Get a parameter value.

+ +

Definition at line 303 of file vamp.h.

+ +
+
+ +
+
+ + + + +
void(* _VampPluginDescriptor::setParameter)(VampPluginHandle, int, float)
+
+
+ +

Set a parameter value.

+

May only be called before initialise.

+ +

Definition at line 306 of file vamp.h.

+ +
+
+ +
+ +
+ +

Get the current program (if programCount > 0).

+ +

Definition at line 309 of file vamp.h.

+ +
+
+ +
+
+ + + + +
void(* _VampPluginDescriptor::selectProgram)(VampPluginHandle, unsigned int)
+
+
+ +

Set the current program.

+

May only be called before initialise.

+ +

Definition at line 312 of file vamp.h.

+ +
+
+ +
+ +
+ +

Get the plugin's preferred processing window increment in samples.

+ +

Definition at line 315 of file vamp.h.

+ +
+
+ +
+ +
+ +

Get the plugin's preferred processing window size in samples.

+ +

Definition at line 318 of file vamp.h.

+ +
+
+ +
+ +
+ +

Get the minimum number of input channels this plugin can handle.

+ +

Definition at line 321 of file vamp.h.

+ +
+
+ +
+ +
+ +

Get the maximum number of input channels this plugin can handle.

+ +

Definition at line 324 of file vamp.h.

+ +
+
+ +
+ +
+ +

Get the number of feature outputs (distinct sets of results).

+ +

Definition at line 327 of file vamp.h.

+ +
+
+ +
+ +
+ +

Get a descriptor for a given feature output.

+

Returned pointer is valid only until next call to getOutputDescriptor for this handle, or releaseOutputDescriptor for this descriptor. Host must call releaseOutputDescriptor after use.

+ +

Definition at line 333 of file vamp.h.

+ +
+
+ +
+ +
+ +

Destroy a descriptor for a feature output.

+ +

Definition at line 337 of file vamp.h.

+ +
+
+ +
+
+ + + + +
VampFeatureList*(* _VampPluginDescriptor::process)(VampPluginHandle, const float *const *inputBuffers, int sec, int nsec)
+
+
+ +

Process an input block and return a set of features.

+

Returned pointer is valid only until next call to process, getRemainingFeatures, or cleanup for this handle, or releaseFeatureSet for this feature set. Host must call releaseFeatureSet after use.

+ +

Definition at line 344 of file vamp.h.

+ +
+
+ +
+ +
+ +

Return any remaining features at the end of processing.

+ +

Definition at line 350 of file vamp.h.

+ +
+
+ +
+ +
+ +

Release a feature set returned from process or getRemainingFeatures.

+ +

Definition at line 353 of file vamp.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/system_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/system_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,234 @@ + + + + +VampPluginSDK: system.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
system.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Defines

#define DLOPEN(a, b)   dlopen((a).c_str(),(b))
#define DLSYM(a, b)   dlsym((a),(b))
#define DLCLOSE(a)   dlclose((a))
#define DLERROR()   dlerror()
#define PLUGIN_SUFFIX   "so"
#define HAVE_OPENDIR   1
+

Define Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define DLOPEN( a,
 
)   dlopen((a).c_str(),(b))
+
+
+ +

Definition at line 55 of file system.h.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define DLSYM( a,
 
)   dlsym((a),(b))
+
+
+ +

Definition at line 56 of file system.h.

+ +
+
+ +
+
+ + + + + + + + +
#define DLCLOSE( a)   dlclose((a))
+
+
+ +

Definition at line 57 of file system.h.

+ +
+
+ +
+
+ + + + + + + +
#define DLERROR()   dlerror()
+
+
+ +

Definition at line 58 of file system.h.

+ +
+
+ +
+
+ + + + +
#define PLUGIN_SUFFIX   "so"
+
+
+ +

Definition at line 67 of file system.h.

+ +

Referenced by usage().

+ +
+
+ +
+
+ + + + +
#define HAVE_OPENDIR   1
+
+
+ +

Definition at line 68 of file system.h.

+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/system_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/system_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,167 @@ + + + + +VampPluginSDK: system.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
system.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _SYSTEM_H_
+00038 #define _SYSTEM_H_
+00039 
+00040 #ifdef _WIN32
+00041 
+00042 #include <windows.h>
+00043 
+00044 #define DLOPEN(a,b)  LoadLibrary((a).c_str())
+00045 #define DLSYM(a,b)   GetProcAddress((HINSTANCE)(a),(b))
+00046 #define DLCLOSE(a)   FreeLibrary((HINSTANCE)(a))
+00047 #define DLERROR()    ""
+00048 
+00049 #define PLUGIN_SUFFIX "dll"
+00050 
+00051 #else
+00052 
+00053 #include <dlfcn.h>
+00054 
+00055 #define DLOPEN(a,b)  dlopen((a).c_str(),(b))
+00056 #define DLSYM(a,b)   dlsym((a),(b))
+00057 #define DLCLOSE(a)   dlclose((a))
+00058 #define DLERROR()    dlerror()
+00059 
+00060 #ifdef __APPLE__
+00061 
+00062 #define PLUGIN_SUFFIX  "dylib"
+00063 #define HAVE_OPENDIR 1
+00064 
+00065 #else 
+00066 
+00067 #define PLUGIN_SUFFIX  "so"
+00068 #define HAVE_OPENDIR 1
+00069 
+00070 #endif /* __APPLE__ */
+00071 
+00072 #endif /* ! _WIN32 */
+00073 
+00074 #endif
+00075 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/tab_a.png Binary file code-docs/tab_a.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/tab_b.png Binary file code-docs/tab_b.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/tab_h.png Binary file code-docs/tab_h.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/tab_s.png Binary file code-docs/tab_s.png has changed diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/tabs.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/tabs.css Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,59 @@ +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; +} + +.tabs2 { + font-size: 10px; +} +.tabs3 { + font-size: 9px; +} + +.tablist { + margin: 0; + padding: 0; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; +} + +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #283A5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding: 0 10px; +} + +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; +} + +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/union__VampFeatureUnion-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/union__VampFeatureUnion-members.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,95 @@ + + + + +VampPluginSDK: Member List + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
_VampFeatureUnion Member List
+
+
+This is the complete list of members for _VampFeatureUnion, including all inherited members. + + +
v1_VampFeatureUnion
v2_VampFeatureUnion
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/union__VampFeatureUnion.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/union__VampFeatureUnion.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,142 @@ + + + + +VampPluginSDK: _VampFeatureUnion Union Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
_VampFeatureUnion Union Reference
+
+
+ +

#include <vamp.h>

+ +

List of all members.

+ + + + +

+Public Attributes

VampFeature v1
VampFeatureV2 v2
+

Detailed Description

+
+

Definition at line 209 of file vamp.h.

+

Member Data Documentation

+ +
+ +
+ +

Definition at line 212 of file vamp.h.

+ +
+
+ +
+ +
+ +

Definition at line 213 of file vamp.h.

+ +
+
+
The documentation for this union was generated from the following file: +
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-hostsdk_2PluginBase_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-hostsdk_2PluginBase_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: PluginBase.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-hostsdk/PluginBase.h File Reference
+
+ +
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-hostsdk_2PluginBase_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-hostsdk_2PluginBase_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,139 @@ + + + + +VampPluginSDK: PluginBase.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-hostsdk/PluginBase.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_HOSTSDK_PLUGIN_BASE_H_
+00038 #define _VAMP_HOSTSDK_PLUGIN_BASE_H_
+00039 
+00040 // Do not include vamp-sdk/PluginBase.h directly from host code.
+00041 // Always use this header instead.
+00042 
+00043 #include "hostguard.h"
+00044 
+00045 #include <vamp-sdk/PluginBase.h>
+00046 
+00047 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-hostsdk_2Plugin_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-hostsdk_2Plugin_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: Plugin.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-hostsdk/Plugin.h File Reference
+
+ +
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-hostsdk_2Plugin_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-hostsdk_2Plugin_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,139 @@ + + + + +VampPluginSDK: Plugin.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-hostsdk/Plugin.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_HOSTSDK_PLUGIN_H_
+00038 #define _VAMP_HOSTSDK_PLUGIN_H_
+00039 
+00040 // Do not include vamp-sdk/Plugin.h directly from host code.  Always
+00041 // use this header instead.
+00042 
+00043 #include "hostguard.h"
+00044 
+00045 #include <vamp-sdk/Plugin.h>
+00046 
+00047 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-hostsdk_2RealTime_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-hostsdk_2RealTime_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: RealTime.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-hostsdk/RealTime.h File Reference
+
+ +
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-hostsdk_2RealTime_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-hostsdk_2RealTime_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,138 @@ + + + + +VampPluginSDK: RealTime.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-hostsdk/RealTime.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_HOSTSDK_REALTIME_H_
+00038 #define _VAMP_HOSTSDK_REALTIME_H_
+00039 
+00040 // Do not include vamp-sdk/RealTime.h directly from host code.  Always
+00041 // use this header instead.
+00042 
+00043 #include "hostguard.h"
+00044 #include <vamp-sdk/RealTime.h>
+00045 
+00046 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-hostsdk_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-hostsdk_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: vamp-hostsdk.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-hostsdk.h File Reference
+
+ +
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-hostsdk_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-hostsdk_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,145 @@ + + + + +VampPluginSDK: vamp-hostsdk.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-hostsdk.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_HOSTSDK_SINGLE_INCLUDE_H_
+00038 #define _VAMP_HOSTSDK_SINGLE_INCLUDE_H_
+00039 
+00040 #include "PluginBase.h"
+00041 #include "PluginBufferingAdapter.h"
+00042 #include "PluginChannelAdapter.h"
+00043 #include "Plugin.h"
+00044 #include "PluginHostAdapter.h"
+00045 #include "PluginInputDomainAdapter.h"
+00046 #include "PluginLoader.h"
+00047 #include "PluginSummarisingAdapter.h"
+00048 #include "PluginWrapper.h"
+00049 #include "RealTime.h"
+00050 
+00051 #endif
+00052 
+00053 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-sdk_2PluginBase_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-sdk_2PluginBase_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,161 @@ + + + + +VampPluginSDK: PluginBase.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
vamp-sdk/PluginBase.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

class  Vamp::PluginBase
 A base class for plugins with optional configurable parameters, programs, etc. More...
struct  Vamp::PluginBase::ParameterDescriptor

+Namespaces

namespace  Vamp

+Defines

#define VAMP_SDK_VERSION   "3.5"
#define VAMP_SDK_MAJOR_VERSION   2
#define VAMP_SDK_MINOR_VERSION   2
+

Define Documentation

+ +
+
+ + + + +
#define VAMP_SDK_VERSION   "3.5"
+
+
+ +

Definition at line 43 of file vamp-sdk/PluginBase.h.

+ +

Referenced by main().

+ +
+
+ +
+
+ + + + +
#define VAMP_SDK_MAJOR_VERSION   2
+
+
+ +

Definition at line 44 of file vamp-sdk/PluginBase.h.

+ +
+
+ +
+
+ + + + +
#define VAMP_SDK_MINOR_VERSION   2
+
+
+ +

Definition at line 45 of file vamp-sdk/PluginBase.h.

+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-sdk_2PluginBase_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-sdk_2PluginBase_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,216 @@ + + + + +VampPluginSDK: PluginBase.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-sdk/PluginBase.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_SDK_PLUGIN_BASE_H_
+00038 #define _VAMP_SDK_PLUGIN_BASE_H_
+00039 
+00040 #include <string>
+00041 #include <vector>
+00042 
+00043 #define VAMP_SDK_VERSION "3.5"
+00044 #define VAMP_SDK_MAJOR_VERSION 2
+00045 #define VAMP_SDK_MINOR_VERSION 2
+00046 
+00047 #include "plugguard.h"
+00048 _VAMP_SDK_PLUGSPACE_BEGIN(PluginBase.h)
+00049 
+00050 namespace Vamp {
+00051 
+00064 class PluginBase 
+00065 {
+00066 public:
+00067     virtual ~PluginBase() { }
+00068 
+00072     virtual unsigned int getVampApiVersion() const { return 2; }
+00073 
+00087     virtual std::string getIdentifier() const = 0;
+00088 
+00097     virtual std::string getName() const = 0;
+00098 
+00107     virtual std::string getDescription() const = 0;
+00108     
+00115     virtual std::string getMaker() const = 0;
+00116 
+00122     virtual std::string getCopyright() const = 0;
+00123 
+00127     virtual int getPluginVersion() const = 0;
+00128 
+00129 
+00130     struct ParameterDescriptor
+00131     {
+00137         std::string identifier;
+00138 
+00142         std::string name;
+00143 
+00148         std::string description;
+00149 
+00153         std::string unit;
+00154 
+00158         float minValue;
+00159 
+00163         float maxValue;
+00164 
+00171         float defaultValue;
+00172         
+00177         bool isQuantized;
+00178 
+00184         float quantizeStep;
+00185 
+00197         std::vector<std::string> valueNames;
+00198 
+00199         ParameterDescriptor() : // the defaults are invalid: you must set them
+00200             minValue(0), maxValue(0), defaultValue(0), isQuantized(false) { }
+00201     };
+00202 
+00203     typedef std::vector<ParameterDescriptor> ParameterList;
+00204 
+00208     virtual ParameterList getParameterDescriptors() const {
+00209         return ParameterList();
+00210     }
+00211 
+00216     virtual float getParameter(std::string) const { return 0.0; }
+00217 
+00222     virtual void setParameter(std::string, float) { } 
+00223 
+00224     
+00225     typedef std::vector<std::string> ProgramList;
+00226 
+00237     virtual ProgramList getPrograms() const { return ProgramList(); }
+00238 
+00242     virtual std::string getCurrentProgram() const { return ""; }
+00243 
+00248     virtual void selectProgram(std::string) { }
+00249 
+00255     virtual std::string getType() const = 0;
+00256 };
+00257 
+00258 }
+00259 
+00260 _VAMP_SDK_PLUGSPACE_END(PluginBase.h)
+00261 
+00262 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-sdk_2Plugin_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-sdk_2Plugin_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,108 @@ + + + + +VampPluginSDK: Plugin.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
vamp-sdk/Plugin.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Classes

class  Vamp::Plugin
 Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio or related data. More...
struct  Vamp::Plugin::OutputDescriptor
struct  Vamp::Plugin::Feature

+Namespaces

namespace  Vamp
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-sdk_2Plugin_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-sdk_2Plugin_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,260 @@ + + + + +VampPluginSDK: Plugin.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-sdk/Plugin.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_SDK_PLUGIN_H_
+00038 #define _VAMP_SDK_PLUGIN_H_
+00039 
+00040 #include <string>
+00041 #include <vector>
+00042 #include <map>
+00043 
+00044 #include "PluginBase.h"
+00045 #include "RealTime.h"
+00046 
+00047 #include "plugguard.h"
+00048 _VAMP_SDK_PLUGSPACE_BEGIN(Plugin.h)
+00049 
+00050 namespace Vamp {
+00051 
+00124 class Plugin : public PluginBase
+00125 {
+00126 public:
+00127     virtual ~Plugin() { }
+00128 
+00141     virtual bool initialise(size_t inputChannels,
+00142                             size_t stepSize,
+00143                             size_t blockSize) = 0;
+00144 
+00150     virtual void reset() = 0;
+00151 
+00152     enum InputDomain { TimeDomain, FrequencyDomain };
+00153     
+00169     virtual InputDomain getInputDomain() const = 0;
+00170 
+00179     virtual size_t getPreferredBlockSize() const { return 0; }
+00180 
+00194     virtual size_t getPreferredStepSize() const { return 0; }
+00195 
+00199     virtual size_t getMinChannelCount() const { return 1; }
+00200 
+00204     virtual size_t getMaxChannelCount() const { return 1; }
+00205 
+00206     struct OutputDescriptor
+00207     {
+00214         std::string identifier;
+00215 
+00220         std::string name;
+00221 
+00227         std::string description;
+00228 
+00232         std::string unit;
+00233 
+00239         bool hasFixedBinCount;
+00240 
+00247         size_t binCount;
+00248 
+00253         std::vector<std::string> binNames;
+00254 
+00260         bool hasKnownExtents;
+00261 
+00266         float minValue;
+00267 
+00272         float maxValue;
+00273 
+00278         bool isQuantized;
+00279 
+00285         float quantizeStep;
+00286 
+00287         enum SampleType {
+00288 
+00290             OneSamplePerStep,
+00291 
+00293             FixedSampleRate,
+00294 
+00296             VariableSampleRate
+00297         };
+00298 
+00302         SampleType sampleType;
+00303 
+00314         float sampleRate;
+00315 
+00320         bool hasDuration;
+00321 
+00322         OutputDescriptor() : // defaults for mandatory non-class-type members
+00323             hasFixedBinCount(false), hasKnownExtents(false), isQuantized(false),
+00324             sampleType(OneSamplePerStep), hasDuration(false) { }
+00325     };
+00326 
+00327     typedef std::vector<OutputDescriptor> OutputList;
+00328 
+00334     virtual OutputList getOutputDescriptors() const = 0;
+00335 
+00336     struct Feature
+00337     {
+00344         bool hasTimestamp;
+00345 
+00352         RealTime timestamp;
+00353 
+00360         bool hasDuration;
+00361 
+00367         RealTime duration;
+00368         
+00374         std::vector<float> values;
+00375 
+00379         std::string label;
+00380 
+00381         Feature() : // defaults for mandatory non-class-type members
+00382             hasTimestamp(false), hasDuration(false) { }
+00383     };
+00384 
+00385     typedef std::vector<Feature> FeatureList;
+00386 
+00387     typedef std::map<int, FeatureList> FeatureSet; // key is output no
+00388 
+00416     virtual FeatureSet process(const float *const *inputBuffers,
+00417                                RealTime timestamp) = 0;
+00418 
+00423     virtual FeatureSet getRemainingFeatures() = 0;
+00424 
+00430     virtual std::string getType() const { return "Feature Extraction Plugin"; }
+00431 
+00432 protected:
+00433     Plugin(float inputSampleRate) :
+00434         m_inputSampleRate(inputSampleRate) { }
+00435 
+00436     float m_inputSampleRate;
+00437 };
+00438 
+00439 }
+00440 
+00441 _VAMP_SDK_PLUGSPACE_END(Plugin.h)
+00442 
+00443 #endif
+00444 
+00445 
+00446 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-sdk_2RealTime_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-sdk_2RealTime_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,110 @@ + + + + +VampPluginSDK: RealTime.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
vamp-sdk/RealTime.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Classes

class  Vamp::RealTime
 RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conversion functions. More...

+Namespaces

namespace  Vamp

+Functions

std::ostream & Vamp::operator<< (std::ostream &out, const RealTime &rt)
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-sdk_2RealTime_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-sdk_2RealTime_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,235 @@ + + + + +VampPluginSDK: RealTime.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-sdk/RealTime.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 /*
+00038    This is a modified version of a source file from the 
+00039    Rosegarden MIDI and audio sequencer and notation editor.
+00040    This file copyright 2000-2006 Chris Cannam.
+00041    Relicensed by the author as detailed above.
+00042 */
+00043 
+00044 #ifndef _VAMP_REAL_TIME_H_
+00045 #define _VAMP_REAL_TIME_H_
+00046 
+00047 #include <iostream>
+00048 #include <string>
+00049 
+00050 #ifndef _WIN32
+00051 struct timeval;
+00052 #endif
+00053 
+00054 #include "plugguard.h"
+00055 _VAMP_SDK_PLUGSPACE_BEGIN(RealTime.h)
+00056 
+00057 namespace Vamp {
+00058 
+00066 struct RealTime
+00067 {
+00068     int sec;
+00069     int nsec;
+00070 
+00071     int usec() const { return nsec / 1000; }
+00072     int msec() const { return nsec / 1000000; }
+00073 
+00074     RealTime(): sec(0), nsec(0) {}
+00075     RealTime(int s, int n);
+00076 
+00077     RealTime(const RealTime &r) :
+00078         sec(r.sec), nsec(r.nsec) { }
+00079 
+00080     static RealTime fromSeconds(double sec);
+00081     static RealTime fromMilliseconds(int msec);
+00082 
+00083 #ifndef _WIN32
+00084     static RealTime fromTimeval(const struct timeval &);
+00085 #endif
+00086 
+00087     RealTime &operator=(const RealTime &r) {
+00088         sec = r.sec; nsec = r.nsec; return *this;
+00089     }
+00090 
+00091     RealTime operator+(const RealTime &r) const {
+00092         return RealTime(sec + r.sec, nsec + r.nsec);
+00093     }
+00094     RealTime operator-(const RealTime &r) const {
+00095         return RealTime(sec - r.sec, nsec - r.nsec);
+00096     }
+00097     RealTime operator-() const {
+00098         return RealTime(-sec, -nsec);
+00099     }
+00100 
+00101     bool operator <(const RealTime &r) const {
+00102         if (sec == r.sec) return nsec < r.nsec;
+00103         else return sec < r.sec;
+00104     }
+00105 
+00106     bool operator >(const RealTime &r) const {
+00107         if (sec == r.sec) return nsec > r.nsec;
+00108         else return sec > r.sec;
+00109     }
+00110 
+00111     bool operator==(const RealTime &r) const {
+00112         return (sec == r.sec && nsec == r.nsec);
+00113     }
+00114  
+00115     bool operator!=(const RealTime &r) const {
+00116         return !(r == *this);
+00117     }
+00118  
+00119     bool operator>=(const RealTime &r) const {
+00120         if (sec == r.sec) return nsec >= r.nsec;
+00121         else return sec >= r.sec;
+00122     }
+00123 
+00124     bool operator<=(const RealTime &r) const {
+00125         if (sec == r.sec) return nsec <= r.nsec;
+00126         else return sec <= r.sec;
+00127     }
+00128 
+00129     RealTime operator/(int d) const;
+00130 
+00134     double operator/(const RealTime &r) const;
+00135 
+00140     std::string toString() const;
+00141 
+00146     std::string toText(bool fixedDp = false) const;
+00147 
+00151     static long realTime2Frame(const RealTime &r, unsigned int sampleRate);
+00152 
+00156     static RealTime frame2RealTime(long frame, unsigned int sampleRate);
+00157 
+00158     static const RealTime zeroTime;
+00159 };
+00160 
+00161 std::ostream &operator<<(std::ostream &out, const RealTime &rt);
+00162 
+00163 }
+00164 
+00165 _VAMP_SDK_PLUGSPACE_END(RealTime.h)
+00166     
+00167 #endif
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-sdk_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-sdk_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,94 @@ + + + + +VampPluginSDK: vamp-sdk.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-sdk.h File Reference
+
+ +
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-sdk_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-sdk_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,138 @@ + + + + +VampPluginSDK: vamp-sdk.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-sdk.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef _VAMP_SDK_SINGLE_INCLUDE_H_
+00038 #define _VAMP_SDK_SINGLE_INCLUDE_H_
+00039 
+00040 #include "PluginBase.h"
+00041 #include "Plugin.h"
+00042 #include "RealTime.h"
+00043 
+00044 #endif
+00045 
+00046 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-simple-host_8cpp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-simple-host_8cpp.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,542 @@ + + + + +VampPluginSDK: vamp-simple-host.cpp File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
vamp-simple-host.cpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + +

+Defines

#define HOST_VERSION   "1.4"

+Enumerations

enum  Verbosity { PluginIds, +PluginOutputIds, +PluginInformation, +PluginInformationDetailed + }

+Functions

void printFeatures (int, int, int, Plugin::FeatureSet, ofstream *, bool frames)
void transformInput (float *, size_t)
void fft (unsigned int, bool, double *, double *, double *, double *)
void printPluginPath (bool verbose)
void printPluginCategoryList ()
void enumeratePlugins (Verbosity)
void listPluginsInLibrary (string soname)
int runPlugin (string myname, string soname, string id, string output, int outputNo, string inputFile, string outfilename, bool frames)
void usage (const char *name)
int main (int argc, char **argv)
static string header (string text, int level)
+

Define Documentation

+ +
+
+ + + + +
#define HOST_VERSION   "1.4"
+
+
+ +

Definition at line 74 of file vamp-simple-host.cpp.

+ +

Referenced by main().

+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
enum Verbosity
+
+
+
Enumerator:
+ + + + +
PluginIds  +
PluginOutputIds  +
PluginInformation  +
PluginInformationDetailed  +
+
+
+ +

Definition at line 76 of file vamp-simple-host.cpp.

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void printFeatures (int frame,
int sr,
int output,
Plugin::FeatureSet features,
ofstream * out,
bool frames 
)
+
+
+ +

Definition at line 495 of file vamp-simple-host.cpp.

+ +

References Vamp::RealTime::toString().

+ +

Referenced by runPlugin().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void transformInput (float * ,
size_t  
)
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void fft (unsigned int,
bool ,
double * ,
double * ,
double * ,
double *  
)
+
+
+ +
+
+ +
+
+ + + + + + + + +
void printPluginPath (bool verbose)
+
+
+ +

Definition at line 547 of file vamp-simple-host.cpp.

+ +

Referenced by main().

+ +
+
+ + + + + +
+
+ + + + + + + + +
void listPluginsInLibrary (string soname)
+
+
+ +
+
+ + + +
+
+ + + + + + + + +
void usage (const char * name)
+
+
+ +

Definition at line 93 of file vamp-simple-host.cpp.

+ +

References PLUGIN_SUFFIX.

+ +

Referenced by main().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int main (int argc,
char ** argv 
)
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
static string header (string text,
int level 
) [static]
+
+
+ +

Definition at line 567 of file vamp-simple-host.cpp.

+ +

Referenced by enumeratePlugins().

+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp-simple-host_8cpp_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp-simple-host_8cpp_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,924 @@ + + + + +VampPluginSDK: vamp-simple-host.cpp Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp-simple-host.cpp
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam, copyright 2007-2008 QMUL.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 
+00038 /*
+00039  * This "simple" Vamp plugin host is no longer as simple as it was; it
+00040  * now has a lot of options and includes a lot of code to handle the
+00041  * various useful listing modes it supports.
+00042  *
+00043  * However, the runPlugin function still contains a reasonable
+00044  * implementation of a fairly generic Vamp plugin host capable of
+00045  * evaluating a given output on a given plugin for a sound file read
+00046  * via libsndfile.
+00047  */
+00048 
+00049 #include <vamp-hostsdk/PluginHostAdapter.h>
+00050 #include <vamp-hostsdk/PluginInputDomainAdapter.h>
+00051 #include <vamp-hostsdk/PluginLoader.h>
+00052 
+00053 #include <iostream>
+00054 #include <fstream>
+00055 #include <set>
+00056 #include <sndfile.h>
+00057 
+00058 #include <cstring>
+00059 #include <cstdlib>
+00060 
+00061 #include "system.h"
+00062 
+00063 #include <cmath>
+00064 
+00065 using namespace std;
+00066 
+00067 using Vamp::Plugin;
+00068 using Vamp::PluginHostAdapter;
+00069 using Vamp::RealTime;
+00070 using Vamp::HostExt::PluginLoader;
+00071 using Vamp::HostExt::PluginWrapper;
+00072 using Vamp::HostExt::PluginInputDomainAdapter;
+00073 
+00074 #define HOST_VERSION "1.4"
+00075 
+00076 enum Verbosity {
+00077     PluginIds,
+00078     PluginOutputIds,
+00079     PluginInformation,
+00080     PluginInformationDetailed
+00081 };
+00082 
+00083 void printFeatures(int, int, int, Plugin::FeatureSet, ofstream *, bool frames);
+00084 void transformInput(float *, size_t);
+00085 void fft(unsigned int, bool, double *, double *, double *, double *);
+00086 void printPluginPath(bool verbose);
+00087 void printPluginCategoryList();
+00088 void enumeratePlugins(Verbosity);
+00089 void listPluginsInLibrary(string soname);
+00090 int runPlugin(string myname, string soname, string id, string output,
+00091               int outputNo, string inputFile, string outfilename, bool frames);
+00092 
+00093 void usage(const char *name)
+00094 {
+00095     cerr << "\n"
+00096          << name << ": A command-line host for Vamp audio analysis plugins.\n\n"
+00097         "Centre for Digital Music, Queen Mary, University of London.\n"
+00098         "Copyright 2006-2009 Chris Cannam and QMUL.\n"
+00099         "Freely redistributable; published under a BSD-style license.\n\n"
+00100         "Usage:\n\n"
+00101         "  " << name << " [-s] pluginlibrary[." << PLUGIN_SUFFIX << "]:plugin[:output] file.wav [-o out.txt]\n"
+00102         "  " << name << " [-s] pluginlibrary[." << PLUGIN_SUFFIX << "]:plugin file.wav [outputno] [-o out.txt]\n\n"
+00103         "    -- Load plugin id \"plugin\" from \"pluginlibrary\" and run it on the\n"
+00104         "       audio data in \"file.wav\", retrieving the named \"output\", or output\n"
+00105         "       number \"outputno\" (the first output by default) and dumping it to\n"
+00106         "       standard output, or to \"out.txt\" if the -o option is given.\n\n"
+00107         "       \"pluginlibrary\" should be a library name, not a file path; the\n"
+00108         "       standard Vamp library search path will be used to locate it.  If\n"
+00109         "       a file path is supplied, the directory part(s) will be ignored.\n\n"
+00110         "       If the -s option is given, results will be labelled with the audio\n"
+00111         "       sample frame at which they occur. Otherwise, they will be labelled\n"
+00112         "       with time in seconds.\n\n"
+00113         "  " << name << " -l\n"
+00114         "  " << name << " --list\n\n"
+00115         "    -- List the plugin libraries and Vamp plugins in the library search path\n"
+00116         "       in a verbose human-readable format.\n\n"
+00117         "  " << name << " --list-full\n\n"
+00118         "    -- List all data reported by all the Vamp plugins in the library search\n"
+00119         "       path in a very verbose human-readable format.\n\n"
+00120         "  " << name << " --list-ids\n\n"
+00121         "    -- List the plugins in the search path in a terse machine-readable format,\n"
+00122         "       in the form vamp:soname:identifier.\n\n"
+00123         "  " << name << " --list-outputs\n\n"
+00124         "    -- List the outputs for plugins in the search path in a machine-readable\n"
+00125         "       format, in the form vamp:soname:identifier:output.\n\n"
+00126         "  " << name << " --list-by-category\n\n"
+00127         "    -- List the plugins as a plugin index by category, in a machine-readable\n"
+00128         "       format.  The format may change in future releases.\n\n"
+00129         "  " << name << " -p\n\n"
+00130         "    -- Print out the Vamp library search path.\n\n"
+00131         "  " << name << " -v\n\n"
+00132         "    -- Display version information only.\n"
+00133          << endl;
+00134     exit(2);
+00135 }
+00136 
+00137 int main(int argc, char **argv)
+00138 {
+00139     char *scooter = argv[0];
+00140     char *name = 0;
+00141     while (scooter && *scooter) {
+00142         if (*scooter == '/' || *scooter == '\\') name = ++scooter;
+00143         else ++scooter;
+00144     }
+00145     if (!name || !*name) name = argv[0];
+00146     
+00147     if (argc < 2) usage(name);
+00148 
+00149     if (argc == 2) {
+00150 
+00151         if (!strcmp(argv[1], "-v")) {
+00152 
+00153             cout << "Simple Vamp plugin host version: " << HOST_VERSION << endl
+00154                  << "Vamp API version: " << VAMP_API_VERSION << endl
+00155                  << "Vamp SDK version: " << VAMP_SDK_VERSION << endl;
+00156             return 0;
+00157 
+00158         } else if (!strcmp(argv[1], "-l") || !strcmp(argv[1], "--list")) {
+00159 
+00160             printPluginPath(true);
+00161             enumeratePlugins(PluginInformation);
+00162             return 0;
+00163 
+00164         } else if (!strcmp(argv[1], "--list-full")) {
+00165 
+00166             enumeratePlugins(PluginInformationDetailed);
+00167             return 0;
+00168 
+00169         } else if (!strcmp(argv[1], "-p")) {
+00170 
+00171             printPluginPath(false);
+00172             return 0;
+00173 
+00174         } else if (!strcmp(argv[1], "--list-ids")) {
+00175 
+00176             enumeratePlugins(PluginIds);
+00177             return 0;
+00178 
+00179         } else if (!strcmp(argv[1], "--list-outputs")) {
+00180 
+00181             enumeratePlugins(PluginOutputIds);
+00182             return 0;
+00183 
+00184         } else if (!strcmp(argv[1], "--list-by-category")) {
+00185 
+00186             printPluginCategoryList();
+00187             return 0;
+00188 
+00189         } else usage(name);
+00190     }
+00191 
+00192     if (argc < 3) usage(name);
+00193 
+00194     bool useFrames = false;
+00195     
+00196     int base = 1;
+00197     if (!strcmp(argv[1], "-s")) {
+00198         useFrames = true;
+00199         base = 2;
+00200     }
+00201 
+00202     string soname = argv[base];
+00203     string wavname = argv[base+1];
+00204     string plugid = "";
+00205     string output = "";
+00206     int outputNo = -1;
+00207     string outfilename;
+00208 
+00209     if (argc >= base+3) {
+00210 
+00211         int idx = base+2;
+00212 
+00213         if (isdigit(*argv[idx])) {
+00214             outputNo = atoi(argv[idx++]);
+00215         }
+00216 
+00217         if (argc == idx + 2) {
+00218             if (!strcmp(argv[idx], "-o")) {
+00219                 outfilename = argv[idx+1];
+00220             } else usage(name);
+00221         } else if (argc != idx) {
+00222             (usage(name));
+00223         }
+00224     }
+00225 
+00226     cerr << endl << name << ": Running..." << endl;
+00227 
+00228     cerr << "Reading file: \"" << wavname << "\", writing to ";
+00229     if (outfilename == "") {
+00230         cerr << "standard output" << endl;
+00231     } else {
+00232         cerr << "\"" << outfilename << "\"" << endl;
+00233     }
+00234 
+00235     string::size_type sep = soname.find(':');
+00236 
+00237     if (sep != string::npos) {
+00238         plugid = soname.substr(sep + 1);
+00239         soname = soname.substr(0, sep);
+00240 
+00241         sep = plugid.find(':');
+00242         if (sep != string::npos) {
+00243             output = plugid.substr(sep + 1);
+00244             plugid = plugid.substr(0, sep);
+00245         }
+00246     }
+00247 
+00248     if (plugid == "") {
+00249         usage(name);
+00250     }
+00251 
+00252     if (output != "" && outputNo != -1) {
+00253         usage(name);
+00254     }
+00255 
+00256     if (output == "" && outputNo == -1) {
+00257         outputNo = 0;
+00258     }
+00259 
+00260     return runPlugin(name, soname, plugid, output, outputNo,
+00261                      wavname, outfilename, useFrames);
+00262 }
+00263 
+00264 
+00265 int runPlugin(string myname, string soname, string id,
+00266               string output, int outputNo, string wavname,
+00267               string outfilename, bool useFrames)
+00268 {
+00269     PluginLoader *loader = PluginLoader::getInstance();
+00270 
+00271     PluginLoader::PluginKey key = loader->composePluginKey(soname, id);
+00272     
+00273     SNDFILE *sndfile;
+00274     SF_INFO sfinfo;
+00275     memset(&sfinfo, 0, sizeof(SF_INFO));
+00276 
+00277     sndfile = sf_open(wavname.c_str(), SFM_READ, &sfinfo);
+00278     if (!sndfile) {
+00279         cerr << myname << ": ERROR: Failed to open input file \""
+00280              << wavname << "\": " << sf_strerror(sndfile) << endl;
+00281         return 1;
+00282     }
+00283 
+00284     ofstream *out = 0;
+00285     if (outfilename != "") {
+00286         out = new ofstream(outfilename.c_str(), ios::out);
+00287         if (!*out) {
+00288             cerr << myname << ": ERROR: Failed to open output file \""
+00289                  << outfilename << "\" for writing" << endl;
+00290             delete out;
+00291             return 1;
+00292         }
+00293     }
+00294 
+00295     Plugin *plugin = loader->loadPlugin
+00296         (key, sfinfo.samplerate, PluginLoader::ADAPT_ALL_SAFE);
+00297     if (!plugin) {
+00298         cerr << myname << ": ERROR: Failed to load plugin \"" << id
+00299              << "\" from library \"" << soname << "\"" << endl;
+00300         sf_close(sndfile);
+00301         if (out) {
+00302             out->close();
+00303             delete out;
+00304         }
+00305         return 1;
+00306     }
+00307 
+00308     cerr << "Running plugin: \"" << plugin->getIdentifier() << "\"..." << endl;
+00309 
+00310     // Note that the following would be much simpler if we used a
+00311     // PluginBufferingAdapter as well -- i.e. if we had passed
+00312     // PluginLoader::ADAPT_ALL to loader->loadPlugin() above, instead
+00313     // of ADAPT_ALL_SAFE.  Then we could simply specify our own block
+00314     // size, keep the step size equal to the block size, and ignore
+00315     // the plugin's bleatings.  However, there are some issues with
+00316     // using a PluginBufferingAdapter that make the results sometimes
+00317     // technically different from (if effectively the same as) the
+00318     // un-adapted plugin, so we aren't doing that here.  See the
+00319     // PluginBufferingAdapter documentation for details.
+00320 
+00321     int blockSize = plugin->getPreferredBlockSize();
+00322     int stepSize = plugin->getPreferredStepSize();
+00323 
+00324     if (blockSize == 0) {
+00325         blockSize = 1024;
+00326     }
+00327     if (stepSize == 0) {
+00328         if (plugin->getInputDomain() == Plugin::FrequencyDomain) {
+00329             stepSize = blockSize/2;
+00330         } else {
+00331             stepSize = blockSize;
+00332         }
+00333     } else if (stepSize > blockSize) {
+00334         cerr << "WARNING: stepSize " << stepSize << " > blockSize " << blockSize << ", resetting blockSize to ";
+00335         if (plugin->getInputDomain() == Plugin::FrequencyDomain) {
+00336             blockSize = stepSize * 2;
+00337         } else {
+00338             blockSize = stepSize;
+00339         }
+00340         cerr << blockSize << endl;
+00341     }
+00342     int overlapSize = blockSize - stepSize;
+00343     sf_count_t currentStep = 0;
+00344     int finalStepsRemaining = max(1, (blockSize / stepSize) - 1); // at end of file, this many part-silent frames needed after we hit EOF
+00345 
+00346     int channels = sfinfo.channels;
+00347 
+00348     float *filebuf = new float[blockSize * channels];
+00349     float **plugbuf = new float*[channels];
+00350     for (int c = 0; c < channels; ++c) plugbuf[c] = new float[blockSize + 2];
+00351 
+00352     cerr << "Using block size = " << blockSize << ", step size = "
+00353               << stepSize << endl;
+00354 
+00355     // The channel queries here are for informational purposes only --
+00356     // a PluginChannelAdapter is being used automatically behind the
+00357     // scenes, and it will take case of any channel mismatch
+00358 
+00359     int minch = plugin->getMinChannelCount();
+00360     int maxch = plugin->getMaxChannelCount();
+00361     cerr << "Plugin accepts " << minch << " -> " << maxch << " channel(s)" << endl;
+00362     cerr << "Sound file has " << channels << " (will mix/augment if necessary)" << endl;
+00363 
+00364     Plugin::OutputList outputs = plugin->getOutputDescriptors();
+00365     Plugin::OutputDescriptor od;
+00366 
+00367     int returnValue = 1;
+00368     int progress = 0;
+00369 
+00370     RealTime rt;
+00371     PluginWrapper *wrapper = 0;
+00372     RealTime adjustment = RealTime::zeroTime;
+00373 
+00374     if (outputs.empty()) {
+00375         cerr << "ERROR: Plugin has no outputs!" << endl;
+00376         goto done;
+00377     }
+00378 
+00379     if (outputNo < 0) {
+00380 
+00381         for (size_t oi = 0; oi < outputs.size(); ++oi) {
+00382             if (outputs[oi].identifier == output) {
+00383                 outputNo = oi;
+00384                 break;
+00385             }
+00386         }
+00387 
+00388         if (outputNo < 0) {
+00389             cerr << "ERROR: Non-existent output \"" << output << "\" requested" << endl;
+00390             goto done;
+00391         }
+00392 
+00393     } else {
+00394 
+00395         if (int(outputs.size()) <= outputNo) {
+00396             cerr << "ERROR: Output " << outputNo << " requested, but plugin has only " << outputs.size() << " output(s)" << endl;
+00397             goto done;
+00398         }        
+00399     }
+00400 
+00401     od = outputs[outputNo];
+00402     cerr << "Output is: \"" << od.identifier << "\"" << endl;
+00403 
+00404     if (!plugin->initialise(channels, stepSize, blockSize)) {
+00405         cerr << "ERROR: Plugin initialise (channels = " << channels
+00406              << ", stepSize = " << stepSize << ", blockSize = "
+00407              << blockSize << ") failed." << endl;
+00408         goto done;
+00409     }
+00410 
+00411     wrapper = dynamic_cast<PluginWrapper *>(plugin);
+00412     if (wrapper) {
+00413         // See documentation for
+00414         // PluginInputDomainAdapter::getTimestampAdjustment
+00415         PluginInputDomainAdapter *ida =
+00416             wrapper->getWrapper<PluginInputDomainAdapter>();
+00417         if (ida) adjustment = ida->getTimestampAdjustment();
+00418     }
+00419     
+00420     // Here we iterate over the frames, avoiding asking the numframes in case it's streaming input.
+00421     do {
+00422 
+00423         int count;
+00424 
+00425         if ((blockSize==stepSize) || (currentStep==0)) {
+00426             // read a full fresh block
+00427             if ((count = sf_readf_float(sndfile, filebuf, blockSize)) < 0) {
+00428                 cerr << "ERROR: sf_readf_float failed: " << sf_strerror(sndfile) << endl;
+00429                 break;
+00430             }
+00431             if (count != blockSize) --finalStepsRemaining;
+00432         } else {
+00433             //  otherwise shunt the existing data down and read the remainder.
+00434             memmove(filebuf, filebuf + (stepSize * channels), overlapSize * channels * sizeof(float));
+00435             if ((count = sf_readf_float(sndfile, filebuf + (overlapSize * channels), stepSize)) < 0) {
+00436                 cerr << "ERROR: sf_readf_float failed: " << sf_strerror(sndfile) << endl;
+00437                 break;
+00438             }
+00439             if (count != stepSize) --finalStepsRemaining;
+00440             count += overlapSize;
+00441         }
+00442 
+00443         for (int c = 0; c < channels; ++c) {
+00444             int j = 0;
+00445             while (j < count) {
+00446                 plugbuf[c][j] = filebuf[j * sfinfo.channels + c];
+00447                 ++j;
+00448             }
+00449             while (j < blockSize) {
+00450                 plugbuf[c][j] = 0.0f;
+00451                 ++j;
+00452             }
+00453         }
+00454 
+00455         rt = RealTime::frame2RealTime(currentStep * stepSize, sfinfo.samplerate);
+00456 
+00457         printFeatures
+00458             (RealTime::realTime2Frame(rt + adjustment, sfinfo.samplerate),
+00459              sfinfo.samplerate, outputNo, plugin->process(plugbuf, rt),
+00460              out, useFrames);
+00461 
+00462         if (sfinfo.frames > 0){
+00463             int pp = progress;
+00464             progress = lrintf((float(currentStep * stepSize) / sfinfo.frames) * 100.f);
+00465             if (progress != pp && out) {
+00466                 cerr << "\r" << progress << "%";
+00467             }
+00468         }
+00469 
+00470         ++currentStep;
+00471 
+00472     } while (finalStepsRemaining > 0);
+00473 
+00474     if (out) cerr << "\rDone" << endl;
+00475 
+00476     rt = RealTime::frame2RealTime(currentStep * stepSize, sfinfo.samplerate);
+00477 
+00478     printFeatures(RealTime::realTime2Frame(rt + adjustment, sfinfo.samplerate),
+00479                   sfinfo.samplerate, outputNo,
+00480                   plugin->getRemainingFeatures(), out, useFrames);
+00481 
+00482     returnValue = 0;
+00483 
+00484 done:
+00485     delete plugin;
+00486     if (out) {
+00487         out->close();
+00488         delete out;
+00489     }
+00490     sf_close(sndfile);
+00491     return returnValue;
+00492 }
+00493 
+00494 void
+00495 printFeatures(int frame, int sr, int output,
+00496               Plugin::FeatureSet features, ofstream *out, bool useFrames)
+00497 {
+00498     for (unsigned int i = 0; i < features[output].size(); ++i) {
+00499 
+00500         if (useFrames) {
+00501 
+00502             int displayFrame = frame;
+00503 
+00504             if (features[output][i].hasTimestamp) {
+00505                 displayFrame = RealTime::realTime2Frame
+00506                     (features[output][i].timestamp, sr);
+00507             }
+00508 
+00509             (out ? *out : cout) << displayFrame;
+00510 
+00511             if (features[output][i].hasDuration) {
+00512                 displayFrame = RealTime::realTime2Frame
+00513                     (features[output][i].duration, sr);
+00514                 (out ? *out : cout) << "," << displayFrame;
+00515             }
+00516 
+00517             (out ? *out : cout)  << ":";
+00518 
+00519         } else {
+00520 
+00521             RealTime rt = RealTime::frame2RealTime(frame, sr);
+00522 
+00523             if (features[output][i].hasTimestamp) {
+00524                 rt = features[output][i].timestamp;
+00525             }
+00526 
+00527             (out ? *out : cout) << rt.toString();
+00528 
+00529             if (features[output][i].hasDuration) {
+00530                 rt = features[output][i].duration;
+00531                 (out ? *out : cout) << "," << rt.toString();
+00532             }
+00533 
+00534             (out ? *out : cout) << ":";
+00535         }
+00536 
+00537         for (unsigned int j = 0; j < features[output][i].values.size(); ++j) {
+00538             (out ? *out : cout) << " " << features[output][i].values[j];
+00539         }
+00540         (out ? *out : cout) << " " << features[output][i].label;
+00541 
+00542         (out ? *out : cout) << endl;
+00543     }
+00544 }
+00545 
+00546 void
+00547 printPluginPath(bool verbose)
+00548 {
+00549     if (verbose) {
+00550         cout << "\nVamp plugin search path: ";
+00551     }
+00552 
+00553     vector<string> path = PluginHostAdapter::getPluginPath();
+00554     for (size_t i = 0; i < path.size(); ++i) {
+00555         if (verbose) {
+00556             cout << "[" << path[i] << "]";
+00557         } else {
+00558             cout << path[i] << endl;
+00559         }
+00560     }
+00561 
+00562     if (verbose) cout << endl;
+00563 }
+00564 
+00565 static
+00566 string
+00567 header(string text, int level)
+00568 {
+00569     string out = '\n' + text + '\n';
+00570     for (size_t i = 0; i < text.length(); ++i) {
+00571         out += (level == 1 ? '=' : level == 2 ? '-' : '~');
+00572     }
+00573     out += '\n';
+00574     return out;
+00575 }
+00576 
+00577 void
+00578 enumeratePlugins(Verbosity verbosity)
+00579 {
+00580     PluginLoader *loader = PluginLoader::getInstance();
+00581 
+00582     if (verbosity == PluginInformation) {
+00583         cout << "\nVamp plugin libraries found in search path:" << endl;
+00584     }
+00585 
+00586     vector<PluginLoader::PluginKey> plugins = loader->listPlugins();
+00587     typedef multimap<string, PluginLoader::PluginKey>
+00588         LibraryMap;
+00589     LibraryMap libraryMap;
+00590 
+00591     for (size_t i = 0; i < plugins.size(); ++i) {
+00592         string path = loader->getLibraryPathForPlugin(plugins[i]);
+00593         libraryMap.insert(LibraryMap::value_type(path, plugins[i]));
+00594     }
+00595 
+00596     string prevPath = "";
+00597     int index = 0;
+00598 
+00599     for (LibraryMap::iterator i = libraryMap.begin();
+00600          i != libraryMap.end(); ++i) {
+00601         
+00602         string path = i->first;
+00603         PluginLoader::PluginKey key = i->second;
+00604 
+00605         if (path != prevPath) {
+00606             prevPath = path;
+00607             index = 0;
+00608             if (verbosity == PluginInformation) {
+00609                 cout << "\n  " << path << ":" << endl;
+00610             } else if (verbosity == PluginInformationDetailed) {
+00611                 string::size_type ki = i->second.find(':');
+00612                 string text = "Library \"" + i->second.substr(0, ki) + "\"";
+00613                 cout << "\n" << header(text, 1);
+00614             }
+00615         }
+00616 
+00617         Plugin *plugin = loader->loadPlugin(key, 48000);
+00618         if (plugin) {
+00619 
+00620             char c = char('A' + index);
+00621             if (c > 'Z') c = char('a' + (index - 26));
+00622 
+00623             PluginLoader::PluginCategoryHierarchy category =
+00624                 loader->getPluginCategory(key);
+00625             string catstr;
+00626             if (!category.empty()) {
+00627                 for (size_t ci = 0; ci < category.size(); ++ci) {
+00628                     if (ci > 0) catstr += " > ";
+00629                         catstr += category[ci];
+00630                 }
+00631             }
+00632 
+00633             if (verbosity == PluginInformation) {
+00634 
+00635                 cout << "    [" << c << "] [v"
+00636                      << plugin->getVampApiVersion() << "] "
+00637                      << plugin->getName() << ", \""
+00638                      << plugin->getIdentifier() << "\"" << " ["
+00639                      << plugin->getMaker() << "]" << endl;
+00640                 
+00641                 if (catstr != "") {
+00642                     cout << "       > " << catstr << endl;
+00643                 }
+00644 
+00645                 if (plugin->getDescription() != "") {
+00646                     cout << "        - " << plugin->getDescription() << endl;
+00647                 }
+00648 
+00649             } else if (verbosity == PluginInformationDetailed) {
+00650 
+00651                 cout << header(plugin->getName(), 2);
+00652                 cout << " - Identifier:         "
+00653                      << key << endl;
+00654                 cout << " - Plugin Version:     " 
+00655                      << plugin->getPluginVersion() << endl;
+00656                 cout << " - Vamp API Version:   "
+00657                      << plugin->getVampApiVersion() << endl;
+00658                 cout << " - Maker:              \""
+00659                      << plugin->getMaker() << "\"" << endl;
+00660                 cout << " - Copyright:          \""
+00661                      << plugin->getCopyright() << "\"" << endl;
+00662                 cout << " - Description:        \""
+00663                      << plugin->getDescription() << "\"" << endl;
+00664                 cout << " - Input Domain:       "
+00665                      << (plugin->getInputDomain() == Vamp::Plugin::TimeDomain ?
+00666                          "Time Domain" : "Frequency Domain") << endl;
+00667                 cout << " - Default Step Size:  " 
+00668                      << plugin->getPreferredStepSize() << endl;
+00669                 cout << " - Default Block Size: " 
+00670                      << plugin->getPreferredBlockSize() << endl;
+00671                 cout << " - Minimum Channels:   " 
+00672                      << plugin->getMinChannelCount() << endl;
+00673                 cout << " - Maximum Channels:   " 
+00674                      << plugin->getMaxChannelCount() << endl;
+00675 
+00676             } else if (verbosity == PluginIds) {
+00677                 cout << "vamp:" << key << endl;
+00678             }
+00679             
+00680             Plugin::OutputList outputs =
+00681                 plugin->getOutputDescriptors();
+00682 
+00683             if (verbosity == PluginInformationDetailed) {
+00684 
+00685                 Plugin::ParameterList params = plugin->getParameterDescriptors();
+00686                 for (size_t j = 0; j < params.size(); ++j) {
+00687                     Plugin::ParameterDescriptor &pd(params[j]);
+00688                     cout << "\nParameter " << j+1 << ": \"" << pd.name << "\"" << endl;
+00689                     cout << " - Identifier:         " << pd.identifier << endl;
+00690                     cout << " - Description:        \"" << pd.description << "\"" << endl;
+00691                     if (pd.unit != "") {
+00692                         cout << " - Unit:               " << pd.unit << endl;
+00693                     }
+00694                     cout << " - Range:              ";
+00695                     cout << pd.minValue << " -> " << pd.maxValue << endl;
+00696                     cout << " - Default:            ";
+00697                     cout << pd.defaultValue << endl;
+00698                     if (pd.isQuantized) {
+00699                         cout << " - Quantize Step:      "
+00700                              << pd.quantizeStep << endl;
+00701                     }
+00702                     if (!pd.valueNames.empty()) {
+00703                         cout << " - Value Names:        ";
+00704                         for (size_t k = 0; k < pd.valueNames.size(); ++k) {
+00705                             if (k > 0) cout << ", ";
+00706                             cout << "\"" << pd.valueNames[k] << "\"";
+00707                         }
+00708                         cout << endl;
+00709                     }
+00710                 }
+00711 
+00712                 if (outputs.empty()) {
+00713                     cout << "\n** Note: This plugin reports no outputs!" << endl;
+00714                 }
+00715                 for (size_t j = 0; j < outputs.size(); ++j) {
+00716                     Plugin::OutputDescriptor &od(outputs[j]);
+00717                     cout << "\nOutput " << j+1 << ": \"" << od.name << "\"" << endl;
+00718                     cout << " - Identifier:         " << od.identifier << endl;
+00719                     cout << " - Description:        \"" << od.description << "\"" << endl;
+00720                     if (od.unit != "") {
+00721                         cout << " - Unit:               " << od.unit << endl;
+00722                     }
+00723                     if (od.hasFixedBinCount) {
+00724                         cout << " - Default Bin Count:  " << od.binCount << endl;
+00725                     }
+00726                     if (!od.binNames.empty()) {
+00727                         bool have = false;
+00728                         for (size_t k = 0; k < od.binNames.size(); ++k) {
+00729                             if (od.binNames[k] != "") {
+00730                                 have = true; break;
+00731                             }
+00732                         }
+00733                         if (have) {
+00734                             cout << " - Bin Names:          ";
+00735                             for (size_t k = 0; k < od.binNames.size(); ++k) {
+00736                                 if (k > 0) cout << ", ";
+00737                                 cout << "\"" << od.binNames[k] << "\"";
+00738                             }
+00739                             cout << endl;
+00740                         }
+00741                     }
+00742                     if (od.hasKnownExtents) {
+00743                         cout << " - Default Extents:    ";
+00744                         cout << od.minValue << " -> " << od.maxValue << endl;
+00745                     }
+00746                     if (od.isQuantized) {
+00747                         cout << " - Quantize Step:      "
+00748                              << od.quantizeStep << endl;
+00749                     }
+00750                     cout << " - Sample Type:        "
+00751                          << (od.sampleType ==
+00752                              Plugin::OutputDescriptor::OneSamplePerStep ?
+00753                              "One Sample Per Step" :
+00754                              od.sampleType ==
+00755                              Plugin::OutputDescriptor::FixedSampleRate ?
+00756                              "Fixed Sample Rate" :
+00757                              "Variable Sample Rate") << endl;
+00758                     if (od.sampleType !=
+00759                         Plugin::OutputDescriptor::OneSamplePerStep) {
+00760                         cout << " - Default Rate:       "
+00761                              << od.sampleRate << endl;
+00762                     }
+00763                     cout << " - Has Duration:       "
+00764                          << (od.hasDuration ? "Yes" : "No") << endl;
+00765                 }
+00766             }
+00767 
+00768             if (outputs.size() > 1 || verbosity == PluginOutputIds) {
+00769                 for (size_t j = 0; j < outputs.size(); ++j) {
+00770                     if (verbosity == PluginInformation) {
+00771                         cout << "         (" << j << ") "
+00772                              << outputs[j].name << ", \""
+00773                              << outputs[j].identifier << "\"" << endl;
+00774                         if (outputs[j].description != "") {
+00775                             cout << "             - " 
+00776                                  << outputs[j].description << endl;
+00777                         }
+00778                     } else if (verbosity == PluginOutputIds) {
+00779                         cout << "vamp:" << key << ":" << outputs[j].identifier << endl;
+00780                     }
+00781                 }
+00782             }
+00783 
+00784             ++index;
+00785 
+00786             delete plugin;
+00787         }
+00788     }
+00789 
+00790     if (verbosity == PluginInformation ||
+00791         verbosity == PluginInformationDetailed) {
+00792         cout << endl;
+00793     }
+00794 }
+00795 
+00796 void
+00797 printPluginCategoryList()
+00798 {
+00799     PluginLoader *loader = PluginLoader::getInstance();
+00800 
+00801     vector<PluginLoader::PluginKey> plugins = loader->listPlugins();
+00802 
+00803     set<string> printedcats;
+00804 
+00805     for (size_t i = 0; i < plugins.size(); ++i) {
+00806 
+00807         PluginLoader::PluginKey key = plugins[i];
+00808         
+00809         PluginLoader::PluginCategoryHierarchy category =
+00810             loader->getPluginCategory(key);
+00811 
+00812         Plugin *plugin = loader->loadPlugin(key, 48000);
+00813         if (!plugin) continue;
+00814 
+00815         string catstr = "";
+00816 
+00817         if (category.empty()) catstr = '|';
+00818         else {
+00819             for (size_t j = 0; j < category.size(); ++j) {
+00820                 catstr += category[j];
+00821                 catstr += '|';
+00822                 if (printedcats.find(catstr) == printedcats.end()) {
+00823                     std::cout << catstr << std::endl;
+00824                     printedcats.insert(catstr);
+00825                 }
+00826             }
+00827         }
+00828 
+00829         std::cout << catstr << key << ":::" << plugin->getName() << ":::" << plugin->getMaker() << ":::" << plugin->getDescription() << std::endl;
+00830     }
+00831 }
+00832 
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp_8h.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,385 @@ + + + + +VampPluginSDK: vamp.h File Reference + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+
vamp.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Classes

struct  _VampParameterDescriptor
 C language API for Vamp plugins. More...
struct  _VampOutputDescriptor
struct  _VampFeature
struct  _VampFeatureV2
union  _VampFeatureUnion
struct  _VampFeatureList
struct  _VampPluginDescriptor

+Defines

#define VAMP_API_VERSION   2
 Plugin API version.

+Typedefs

typedef struct
+_VampParameterDescriptor 
VampParameterDescriptor
 C language API for Vamp plugins.
typedef struct
+_VampOutputDescriptor 
VampOutputDescriptor
typedef struct _VampFeature VampFeature
typedef struct _VampFeatureV2 VampFeatureV2
typedef union _VampFeatureUnion VampFeatureUnion
typedef struct _VampFeatureList VampFeatureList
typedef void * VampPluginHandle
typedef struct
+_VampPluginDescriptor 
VampPluginDescriptor
typedef const
+VampPluginDescriptor *(* 
VampGetPluginDescriptorFunction )(unsigned int, unsigned int)
 Function pointer type for vampGetPluginDescriptor.

+Enumerations

enum  VampSampleType { vampOneSamplePerStep, +vampFixedSampleRate, +vampVariableSampleRate + }
enum  VampInputDomain { vampTimeDomain, +vampFrequencyDomain + }

+Functions

const VampPluginDescriptorvampGetPluginDescriptor (unsigned int hostApiVersion, unsigned int index)
 Get the descriptor for a given plugin index in this library.
+

Define Documentation

+ +
+
+ + + + +
#define VAMP_API_VERSION   2
+
+
+ +

Plugin API version.

+

This is incremented when a change is made that changes the binary layout of the descriptor records. When this happens, there should be a mechanism for retaining compatibility with older hosts and/or plugins.

+

See also the vampApiVersion field in the plugin descriptor, and the hostApiVersion argument to the vampGetPluginDescriptor function.

+ +

Definition at line 53 of file vamp.h.

+ +

Referenced by main().

+ +
+
+

Typedef Documentation

+ +
+ +
+ +

C language API for Vamp plugins.

+

This is the formal plugin API for Vamp. Plugin authors may prefer to use the C++ classes provided in the Vamp plugin SDK, instead of using this API directly. There is an adapter class provided that makes C++ plugins available using this C API with relatively little work, and the C++ headers are more thoroughly documented.

+

IMPORTANT: The comments in this file summarise the purpose of each of the declared fields and functions, but do not provide a complete guide to their permitted values and expected usage. Please refer to the C++ headers in the Vamp plugin SDK for further details and plugin lifecycle documentation.

+ +
+
+ +
+
+ + + + +
typedef struct _VampOutputDescriptor VampOutputDescriptor
+
+
+ +
+
+ +
+
+ + + + +
typedef struct _VampFeature VampFeature
+
+
+ +
+
+ +
+
+ + + + +
typedef struct _VampFeatureV2 VampFeatureV2
+
+
+ +
+
+ +
+
+ + + + +
typedef union _VampFeatureUnion VampFeatureUnion
+
+
+ +
+
+ +
+
+ + + + +
typedef struct _VampFeatureList VampFeatureList
+
+
+ +
+
+ +
+
+ + + + +
typedef void* VampPluginHandle
+
+
+ +

Definition at line 246 of file vamp.h.

+ +
+
+ +
+
+ + + + +
typedef struct _VampPluginDescriptor VampPluginDescriptor
+
+
+ +
+
+ +
+
+ + + + +
typedef const VampPluginDescriptor*(* VampGetPluginDescriptorFunction)(unsigned int, unsigned int)
+
+
+ +

Function pointer type for vampGetPluginDescriptor.

+ +

Definition at line 382 of file vamp.h.

+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
enum VampSampleType
+
+
+
Enumerator:
+ + + +
vampOneSamplePerStep  +

Each process call returns results aligned with call's block start.

+
vampFixedSampleRate  +

Returned results are evenly spaced at samplerate specified below.

+
vampVariableSampleRate  +

Returned results have their own individual timestamps.

+
+
+
+ +

Definition at line 105 of file vamp.h.

+ +
+
+ +
+
+ + + + +
enum VampInputDomain
+
+
+
Enumerator:
+ + +
vampTimeDomain  +
vampFrequencyDomain  +
+
+
+ +

Definition at line 239 of file vamp.h.

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
const VampPluginDescriptor* vampGetPluginDescriptor (unsigned int hostApiVersion,
unsigned int index 
)
+
+
+ +

Get the descriptor for a given plugin index in this library.

+

Return NULL if the index is outside the range of valid indices for this plugin library.

+

The hostApiVersion argument tells the library code the highest Vamp API version supported by the host. The function should return a plugin descriptor compatible with the highest API version supported by the library that is no higher than that supported by the host. Provided the descriptor has the correct vampApiVersion field for its actual compatibility level, the host should be able to do the right thing with it: use it if possible, discard it otherwise.

+

This is the only symbol that a Vamp plugin actually needs to export from its shared object; all others can be hidden. See the accompanying documentation for notes on how to achieve this with certain compilers.

+ +

Definition at line 54 of file plugins.cpp.

+ +

References Vamp::PluginAdapterBase::getDescriptor().

+ +
+
+
+
+ + + + + diff -r 895ae8fffdb7 -r 3c430ef1ed66 code-docs/vamp_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-docs/vamp_8h_source.html Tue Oct 04 14:56:07 2011 +0100 @@ -0,0 +1,341 @@ + + + + +VampPluginSDK: vamp.h Source File + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
VampPluginSDK +  2.1 +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+
+
vamp.h
+
+
+Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+00002 
+00003 /*
+00004     Vamp
+00005 
+00006     An API for audio analysis and feature extraction plugins.
+00007 
+00008     Centre for Digital Music, Queen Mary, University of London.
+00009     Copyright 2006 Chris Cannam.
+00010   
+00011     Permission is hereby granted, free of charge, to any person
+00012     obtaining a copy of this software and associated documentation
+00013     files (the "Software"), to deal in the Software without
+00014     restriction, including without limitation the rights to use, copy,
+00015     modify, merge, publish, distribute, sublicense, and/or sell copies
+00016     of the Software, and to permit persons to whom the Software is
+00017     furnished to do so, subject to the following conditions:
+00018 
+00019     The above copyright notice and this permission notice shall be
+00020     included in all copies or substantial portions of the Software.
+00021 
+00022     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+00023     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+00024     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+00025     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
+00026     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+00027     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+00028     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+00029 
+00030     Except as contained in this notice, the names of the Centre for
+00031     Digital Music; Queen Mary, University of London; and Chris Cannam
+00032     shall not be used in advertising or otherwise to promote the sale,
+00033     use or other dealings in this Software without prior written
+00034     authorization.
+00035 */
+00036 
+00037 #ifndef VAMP_HEADER_INCLUDED
+00038 #define VAMP_HEADER_INCLUDED
+00039 
+00040 #ifdef __cplusplus
+00041 extern "C" {
+00042 #endif
+00043 
+00053 #define VAMP_API_VERSION 2
+00054 
+00071 typedef struct _VampParameterDescriptor
+00072 {
+00074     const char *identifier;
+00075 
+00077     const char *name;
+00078 
+00080     const char *description;
+00081 
+00083     const char *unit;
+00084 
+00086     float minValue;
+00087 
+00089     float maxValue;
+00090 
+00092     float defaultValue;
+00093 
+00095     int isQuantized;
+00096 
+00098     float quantizeStep;
+00099 
+00101     const char **valueNames;
+00102 
+00103 } VampParameterDescriptor;
+00104 
+00105 typedef enum
+00106 {
+00108     vampOneSamplePerStep,
+00109 
+00111     vampFixedSampleRate,
+00112 
+00114     vampVariableSampleRate
+00115 
+00116 } VampSampleType;
+00117 
+00118 typedef struct _VampOutputDescriptor
+00119 {
+00121     const char *identifier;
+00122 
+00124     const char *name;
+00125 
+00127     const char *description;
+00128 
+00130     const char *unit;
+00131 
+00133     int hasFixedBinCount;
+00134 
+00136     unsigned int binCount;
+00137 
+00139     const char **binNames;
+00140 
+00142     int hasKnownExtents;
+00143     
+00145     float minValue;
+00146 
+00148     float maxValue;
+00149 
+00151     int isQuantized;
+00152 
+00154     float quantizeStep;
+00155 
+00157     VampSampleType sampleType;
+00158 
+00161     float sampleRate;
+00162 
+00170     int hasDuration;
+00171 
+00172 } VampOutputDescriptor;
+00173 
+00174 typedef struct _VampFeature
+00175 {
+00177     int hasTimestamp;
+00178 
+00180     int sec;
+00181 
+00183     int nsec;
+00184 
+00186     unsigned int valueCount;
+00187 
+00189     float *values;
+00190 
+00192     char *label;
+00193 
+00194 } VampFeature;
+00195 
+00196 typedef struct _VampFeatureV2
+00197 {
+00199     int hasDuration;
+00200 
+00202     int durationSec;
+00203 
+00205     int durationNsec;
+00206 
+00207 } VampFeatureV2;
+00208 
+00209 typedef union _VampFeatureUnion
+00210 {
+00211     // sizeof(featureV1) >= sizeof(featureV2) for backward compatibility
+00212     VampFeature   v1;
+00213     VampFeatureV2 v2;
+00214 
+00215 } VampFeatureUnion;
+00216 
+00217 typedef struct _VampFeatureList
+00218 {
+00220     unsigned int featureCount;
+00221 
+00235     VampFeatureUnion *features;
+00236 
+00237 } VampFeatureList;
+00238 
+00239 typedef enum
+00240 {
+00241     vampTimeDomain,
+00242     vampFrequencyDomain
+00243 
+00244 } VampInputDomain;
+00245 
+00246 typedef void *VampPluginHandle;
+00247 
+00248 typedef struct _VampPluginDescriptor
+00249 {
+00251     unsigned int vampApiVersion;
+00252 
+00254     const char *identifier;
+00255 
+00257     const char *name;
+00258 
+00260     const char *description;
+00261 
+00263     const char *maker;
+00264 
+00266     int pluginVersion;
+00267 
+00269     const char *copyright;
+00270 
+00272     unsigned int parameterCount;
+00273 
+00275     const VampParameterDescriptor **parameters;
+00276 
+00278     unsigned int programCount;
+00279 
+00281     const char **programs;
+00282 
+00284     VampInputDomain inputDomain;
+00285 
+00287     VampPluginHandle (*instantiate)(const struct _VampPluginDescriptor *,
+00288                                    float inputSampleRate);
+00289 
+00291     void (*cleanup)(VampPluginHandle);
+00292 
+00294     int (*initialise)(VampPluginHandle,
+00295                       unsigned int inputChannels,
+00296                       unsigned int stepSize, 
+00297                       unsigned int blockSize);
+00298 
+00300     void (*reset)(VampPluginHandle);
+00301 
+00303     float (*getParameter)(VampPluginHandle, int);
+00304 
+00306     void  (*setParameter)(VampPluginHandle, int, float);
+00307 
+00309     unsigned int (*getCurrentProgram)(VampPluginHandle);
+00310 
+00312     void  (*selectProgram)(VampPluginHandle, unsigned int);
+00313     
+00315     unsigned int (*getPreferredStepSize)(VampPluginHandle);
+00316 
+00318     unsigned int (*getPreferredBlockSize)(VampPluginHandle);
+00319 
+00321     unsigned int (*getMinChannelCount)(VampPluginHandle);
+00322 
+00324     unsigned int (*getMaxChannelCount)(VampPluginHandle);
+00325 
+00327     unsigned int (*getOutputCount)(VampPluginHandle);
+00328 
+00333     VampOutputDescriptor *(*getOutputDescriptor)(VampPluginHandle,
+00334                                                  unsigned int);
+00335 
+00337     void (*releaseOutputDescriptor)(VampOutputDescriptor *);
+00338 
+00344     VampFeatureList *(*process)(VampPluginHandle,
+00345                                 const float *const *inputBuffers,
+00346                                 int sec,
+00347                                 int nsec);
+00348 
+00350     VampFeatureList *(*getRemainingFeatures)(VampPluginHandle);
+00351 
+00353     void (*releaseFeatureSet)(VampFeatureList *);
+00354 
+00355 } VampPluginDescriptor;
+00356 
+00357 
+00376 const VampPluginDescriptor *vampGetPluginDescriptor
+00377     (unsigned int hostApiVersion, unsigned int index);
+00378 
+00379 
+00381 typedef const VampPluginDescriptor *(*VampGetPluginDescriptorFunction)
+00382     (unsigned int, unsigned int);
+00383 
+00384 #ifdef __cplusplus
+00385 }
+00386 #endif
+00387 
+00388 #endif
+
+
+ + + + +