# HG changeset patch # User cannam # Date 1228820577 0 # Node ID cc0be37dc9d3f9a932c3b1ea3b27a5e59ae8ca99 # Parent 34e7583558848014280395fcc3698f7528626b7d * Updates for 2.0 diff -r 34e758355884 -r cc0be37dc9d3 code-doc/AmplitudeFollower_8cpp-source.html --- a/code-doc/AmplitudeFollower_8cpp-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/AmplitudeFollower_8cpp-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

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 /*
@@ -262,8 +262,8 @@
 00246 }
 00247 
 
-
Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/AmplitudeFollower_8cpp.html --- a/code-doc/AmplitudeFollower_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/AmplitudeFollower_8cpp.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + -

PluginBufferingAdapter.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-2007 Chris Cannam and QMUL.
-00010     This file by Mark Levy and Chris Cannam.
-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 #include <vector>
-00039 #include <map>
-00040 
-00041 #include "PluginBufferingAdapter.h"
-00042 
-00043 using std::vector;
-00044 using std::map;
-00045 
-00046 namespace Vamp {
-00047         
-00048 namespace HostExt {
-00049                 
-00050 class PluginBufferingAdapter::Impl
-00051 {
-00052 public:
-00053     Impl(Plugin *plugin, float inputSampleRate);
-00054     ~Impl();
-00055                 
-00056     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
-00057 
-00058     OutputList getOutputDescriptors() const;
-00059 
-00060     void reset();
-00061 
-00062     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
-00063                 
-00064     FeatureSet getRemainingFeatures();
-00065                 
-00066 protected:
-00067     class RingBuffer
-00068     {
-00069     public:
-00070         RingBuffer(int n) :
-00071             m_buffer(new float[n+1]), m_writer(0), m_reader(0), m_size(n+1) { }
-00072         virtual ~RingBuffer() { delete[] m_buffer; }
-00073 
-00074         int getSize() const { return m_size-1; }
-00075         void reset() { m_writer = 0; m_reader = 0; }
-00076 
-00077         int getReadSpace() const {
-00078             int writer = m_writer, reader = m_reader, space;
-00079             if (writer > reader) space = writer - reader;
-00080             else if (writer < reader) space = (writer + m_size) - reader;
-00081             else space = 0;
-00082             return space;
-00083         }
-00084 
-00085         int getWriteSpace() const {
-00086             int writer = m_writer;
-00087             int reader = m_reader;
-00088             int space = (reader + m_size - writer - 1);
-00089             if (space >= m_size) space -= m_size;
-00090             return space;
-00091         }
-00092         
-00093         int peek(float *destination, int n) const {
-00094 
-00095             int available = getReadSpace();
-00096 
-00097             if (n > available) {
-00098                 for (int i = available; i < n; ++i) {
-00099                     destination[i] = 0.f;
-00100                 }
-00101                 n = available;
-00102             }
-00103             if (n == 0) return n;
-00104 
-00105             int reader = m_reader;
-00106             int here = m_size - reader;
-00107             const float *const bufbase = m_buffer + reader;
-00108 
-00109             if (here >= n) {
-00110                 for (int i = 0; i < n; ++i) {
-00111                     destination[i] = bufbase[i];
-00112                 }
-00113             } else {
-00114                 for (int i = 0; i < here; ++i) {
-00115                     destination[i] = bufbase[i];
-00116                 }
-00117                 float *const destbase = destination + here;
-00118                 const int nh = n - here;
-00119                 for (int i = 0; i < nh; ++i) {
-00120                     destbase[i] = m_buffer[i];
-00121                 }
-00122             }
-00123 
-00124             return n;
-00125         }
-00126 
-00127         int skip(int n) {
-00128             
-00129             int available = getReadSpace();
-00130             if (n > available) {
-00131                 n = available;
-00132             }
-00133             if (n == 0) return n;
-00134 
-00135             int reader = m_reader;
-00136             reader += n;
-00137             while (reader >= m_size) reader -= m_size;
-00138             m_reader = reader;
-00139             return n;
-00140         }
-00141         
-00142         int write(const float *source, int n) {
-00143 
-00144             int available = getWriteSpace();
-00145             if (n > available) {
-00146                 n = available;
-00147             }
-00148             if (n == 0) return n;
-00149 
-00150             int writer = m_writer;
-00151             int here = m_size - writer;
-00152             float *const bufbase = m_buffer + writer;
-00153             
-00154             if (here >= n) {
-00155                 for (int i = 0; i < n; ++i) {
-00156                     bufbase[i] = source[i];
-00157                 }
-00158             } else {
-00159                 for (int i = 0; i < here; ++i) {
-00160                     bufbase[i] = source[i];
-00161                 }
-00162                 const int nh = n - here;
-00163                 const float *const srcbase = source + here;
-00164                 float *const buf = m_buffer;
-00165                 for (int i = 0; i < nh; ++i) {
-00166                     buf[i] = srcbase[i];
-00167                 }
-00168             }
-00169 
-00170             writer += n;
-00171             while (writer >= m_size) writer -= m_size;
-00172             m_writer = writer;
-00173 
-00174             return n;
-00175         }
-00176 
-00177         int zero(int n) {
-00178             
-00179             int available = getWriteSpace();
-00180             if (n > available) {
-00181                 n = available;
-00182             }
-00183             if (n == 0) return n;
-00184 
-00185             int writer = m_writer;
-00186             int here = m_size - writer;
-00187             float *const bufbase = m_buffer + writer;
-00188 
-00189             if (here >= n) {
-00190                 for (int i = 0; i < n; ++i) {
-00191                     bufbase[i] = 0.f;
-00192                 }
-00193             } else {
-00194                 for (int i = 0; i < here; ++i) {
-00195                     bufbase[i] = 0.f;
-00196                 }
-00197                 const int nh = n - here;
-00198                 for (int i = 0; i < nh; ++i) {
-00199                     m_buffer[i] = 0.f;
-00200                 }
-00201             }
-00202             
-00203             writer += n;
-00204             while (writer >= m_size) writer -= m_size;
-00205             m_writer = writer;
-00206 
-00207             return n;
-00208         }
-00209 
-00210     protected:
-00211         float *m_buffer;
-00212         int    m_writer;
-00213         int    m_reader;
-00214         int    m_size;
-00215 
-00216     private:
-00217         RingBuffer(const RingBuffer &); // not provided
-00218         RingBuffer &operator=(const RingBuffer &); // not provided
-00219     };
-00220 
-00221     Plugin *m_plugin;
-00222     size_t m_inputStepSize;
-00223     size_t m_inputBlockSize;
-00224     size_t m_stepSize;
-00225     size_t m_blockSize;
-00226     size_t m_channels;
-00227     vector<RingBuffer *> m_queue;
-00228     float **m_buffers;
-00229     float m_inputSampleRate;
-00230     long m_frame;
-00231     bool m_unrun;
-00232     mutable OutputList m_outputs;
-00233     mutable std::map<int, bool> m_rewriteOutputTimes;
-00234                 
-00235     void processBlock(FeatureSet& allFeatureSets);
-00236 };
-00237                 
-00238 PluginBufferingAdapter::PluginBufferingAdapter(Plugin *plugin) :
-00239     PluginWrapper(plugin)
-00240 {
-00241     m_impl = new Impl(plugin, m_inputSampleRate);
-00242 }
-00243                 
-00244 PluginBufferingAdapter::~PluginBufferingAdapter()
-00245 {
-00246     delete m_impl;
-00247 }
-00248                 
-00249 bool
-00250 PluginBufferingAdapter::initialise(size_t channels, size_t stepSize, size_t blockSize)
-00251 {
-00252     return m_impl->initialise(channels, stepSize, blockSize);
-00253 }
-00254 
-00255 PluginBufferingAdapter::OutputList
-00256 PluginBufferingAdapter::getOutputDescriptors() const
-00257 {
-00258     return m_impl->getOutputDescriptors();
-00259 }
-00260 
-00261 void
-00262 PluginBufferingAdapter::reset()
-00263 {
-00264     m_impl->reset();
-00265 }
-00266                 
-00267 PluginBufferingAdapter::FeatureSet
-00268 PluginBufferingAdapter::process(const float *const *inputBuffers,
-00269                                 RealTime timestamp)
-00270 {
-00271     return m_impl->process(inputBuffers, timestamp);
-00272 }
-00273                 
-00274 PluginBufferingAdapter::FeatureSet
-00275 PluginBufferingAdapter::getRemainingFeatures()
-00276 {
-00277     return m_impl->getRemainingFeatures();
-00278 }
-00279                 
-00280 PluginBufferingAdapter::Impl::Impl(Plugin *plugin, float inputSampleRate) :
-00281     m_plugin(plugin),
-00282     m_inputStepSize(0),
-00283     m_inputBlockSize(0),
-00284     m_stepSize(0),
-00285     m_blockSize(0),
-00286     m_channels(0), 
-00287     m_queue(0),
-00288     m_buffers(0),
-00289     m_inputSampleRate(inputSampleRate),
-00290     m_frame(0),
-00291     m_unrun(true)
-00292 {
-00293     (void)getOutputDescriptors(); // set up m_outputs and m_rewriteOutputTimes
-00294 }
-00295                 
-00296 PluginBufferingAdapter::Impl::~Impl()
-00297 {
-00298     // the adapter will delete the plugin
-00299 
-00300     for (size_t i = 0; i < m_channels; ++i) {
-00301         delete m_queue[i];
-00302         delete[] m_buffers[i];
-00303     }
-00304     delete[] m_buffers;
-00305 }
-00306 
-00307 size_t
-00308 PluginBufferingAdapter::getPreferredStepSize() const
-00309 {
-00310     return getPreferredBlockSize();
-00311 }
-00312                 
-00313 bool
-00314 PluginBufferingAdapter::Impl::initialise(size_t channels, size_t stepSize, size_t blockSize)
-00315 {
-00316     if (stepSize != blockSize) {
-00317         std::cerr << "PluginBufferingAdapter::initialise: input stepSize must be equal to blockSize for this adapter (stepSize = " << stepSize << ", blockSize = " << blockSize << ")" << std::endl;
-00318         return false;
-00319     }
-00320 
-00321     m_channels = channels;      
-00322     m_inputStepSize = stepSize;
-00323     m_inputBlockSize = blockSize;
-00324     
-00325     // use the step and block sizes which the plugin prefers
-00326     m_stepSize = m_plugin->getPreferredStepSize();
-00327     m_blockSize = m_plugin->getPreferredBlockSize();
-00328     
-00329     // or sensible defaults if it has no preference
-00330     if (m_blockSize == 0) {
-00331         m_blockSize = 1024;
-00332     }
-00333     if (m_stepSize == 0) {
-00334         if (m_plugin->getInputDomain() == Vamp::Plugin::FrequencyDomain) {
-00335             m_stepSize = m_blockSize/2;
-00336         } else {
-00337             m_stepSize = m_blockSize;
-00338         }
-00339     } else if (m_stepSize > m_blockSize) {
-00340         if (m_plugin->getInputDomain() == Vamp::Plugin::FrequencyDomain) {
-00341             m_blockSize = m_stepSize * 2;
-00342         } else {
-00343             m_blockSize = m_stepSize;
-00344         }
-00345     }
-00346     
-00347     std::cerr << "PluginBufferingAdapter::initialise: stepSize " << m_inputStepSize << " -> " << m_stepSize 
-00348               << ", blockSize " << m_inputBlockSize << " -> " << m_blockSize << std::endl;                      
-00349     
-00350     // current implementation breaks if step is greater than block
-00351     if (m_stepSize > m_blockSize) {
-00352         std::cerr << "PluginBufferingAdapter::initialise: plugin's preferred stepSize greater than blockSize, giving up!" << std::endl;
-00353         return false;
-00354     }
-00355 
-00356     m_buffers = new float *[m_channels];
-00357 
-00358     for (size_t i = 0; i < m_channels; ++i) {
-00359         m_queue.push_back(new RingBuffer(m_blockSize + m_inputBlockSize));
-00360         m_buffers[i] = new float[m_blockSize];
-00361     }
-00362     
-00363     return m_plugin->initialise(m_channels, m_stepSize, m_blockSize);
-00364 }
-00365                 
-00366 PluginBufferingAdapter::OutputList
-00367 PluginBufferingAdapter::Impl::getOutputDescriptors() const
-00368 {
-00369     if (m_outputs.empty()) {
-00370         m_outputs = m_plugin->getOutputDescriptors();
-00371     }
-00372 
-00373     PluginBufferingAdapter::OutputList outs = m_outputs;
-00374 
-00375     for (size_t i = 0; i < outs.size(); ++i) {
-00376 
-00377         switch (outs[i].sampleType) {
-00378 
-00379         case OutputDescriptor::OneSamplePerStep:
-00380             outs[i].sampleType = OutputDescriptor::FixedSampleRate;
-00381             outs[i].sampleRate = (1.f / m_inputSampleRate) * m_stepSize;
-00382             m_rewriteOutputTimes[i] = true;
-00383             break;
-00384             
-00385         case OutputDescriptor::FixedSampleRate:
-00386             if (outs[i].sampleRate == 0.f) {
-00387                 outs[i].sampleRate = (1.f / m_inputSampleRate) * m_stepSize;
-00388             }
-00389             // We actually only need to rewrite output times for
-00390             // features that don't have timestamps already, but we
-00391             // can't tell from here whether our features will have
-00392             // timestamps or not
-00393             m_rewriteOutputTimes[i] = true;
-00394             break;
-00395 
-00396         case OutputDescriptor::VariableSampleRate:
-00397             m_rewriteOutputTimes[i] = false;
-00398             break;
-00399         }
-00400     }
-00401 
-00402     return outs;
-00403 }
-00404 
-00405 void
-00406 PluginBufferingAdapter::Impl::reset()
-00407 {
-00408     m_frame = 0;
-00409     m_unrun = true;
-00410 
-00411     for (size_t i = 0; i < m_queue.size(); ++i) {
-00412         m_queue[i]->reset();
-00413     }
-00414 }
-00415 
-00416 PluginBufferingAdapter::FeatureSet
-00417 PluginBufferingAdapter::Impl::process(const float *const *inputBuffers,
-00418                                       RealTime timestamp)
-00419 {
-00420     FeatureSet allFeatureSets;
-00421 
-00422     if (m_unrun) {
-00423         m_frame = RealTime::realTime2Frame(timestamp,
-00424                                            int(m_inputSampleRate + 0.5));
-00425         m_unrun = false;
-00426     }
-00427                         
-00428     // queue the new input
-00429     
-00430     for (size_t i = 0; i < m_channels; ++i) {
-00431         int written = m_queue[i]->write(inputBuffers[i], m_inputBlockSize);
-00432         if (written < int(m_inputBlockSize) && i == 0) {
-00433             std::cerr << "WARNING: PluginBufferingAdapter::Impl::process: "
-00434                       << "Buffer overflow: wrote " << written 
-00435                       << " of " << m_inputBlockSize 
-00436                       << " input samples (for plugin step size "
-00437                       << m_stepSize << ", block size " << m_blockSize << ")"
-00438                       << std::endl;
-00439         }
-00440     }    
-00441     
-00442     // process as much as we can
-00443 
-00444     while (m_queue[0]->getReadSpace() >= int(m_blockSize)) {
-00445         processBlock(allFeatureSets);
-00446     }   
-00447     
-00448     return allFeatureSets;
-00449 }
-00450     
-00451 PluginBufferingAdapter::FeatureSet
-00452 PluginBufferingAdapter::Impl::getRemainingFeatures() 
-00453 {
-00454     FeatureSet allFeatureSets;
-00455     
-00456     // process remaining samples in queue
-00457     while (m_queue[0]->getReadSpace() >= int(m_blockSize)) {
-00458         processBlock(allFeatureSets);
-00459     }
-00460     
-00461     // pad any last samples remaining and process
-00462     if (m_queue[0]->getReadSpace() > 0) {
-00463         for (size_t i = 0; i < m_channels; ++i) {
-00464             m_queue[i]->zero(m_blockSize - m_queue[i]->getReadSpace());
-00465         }
-00466         processBlock(allFeatureSets);
-00467     }                   
-00468     
-00469     // get remaining features                   
-00470 
-00471     FeatureSet featureSet = m_plugin->getRemainingFeatures();
-00472 
-00473     for (map<int, FeatureList>::iterator iter = featureSet.begin();
-00474          iter != featureSet.end(); ++iter) {
-00475         FeatureList featureList = iter->second;
-00476         for (size_t i = 0; i < featureList.size(); ++i) {
-00477             allFeatureSets[iter->first].push_back(featureList[i]);
-00478         }
-00479     }
-00480     
-00481     return allFeatureSets;
-00482 }
-00483     
-00484 void
-00485 PluginBufferingAdapter::Impl::processBlock(FeatureSet& allFeatureSets)
-00486 {
-00487     for (size_t i = 0; i < m_channels; ++i) {
-00488         m_queue[i]->peek(m_buffers[i], m_blockSize);
-00489     }
-00490 
-00491     long frame = m_frame;
-00492     RealTime timestamp = RealTime::frame2RealTime
-00493         (frame, int(m_inputSampleRate + 0.5));
-00494 
-00495     FeatureSet featureSet = m_plugin->process(m_buffers, timestamp);
-00496     
-00497     for (FeatureSet::iterator iter = featureSet.begin();
-00498          iter != featureSet.end(); ++iter) {
-00499 
-00500         int outputNo = iter->first;
-00501 
-00502         if (m_rewriteOutputTimes[outputNo]) {
-00503             
-00504             FeatureList featureList = iter->second;
-00505         
-00506             for (size_t i = 0; i < featureList.size(); ++i) {
-00507 
-00508                 switch (m_outputs[outputNo].sampleType) {
-00509 
-00510                 case OutputDescriptor::OneSamplePerStep:
-00511                     // use our internal timestamp, always
-00512                     featureList[i].timestamp = timestamp;
-00513                     featureList[i].hasTimestamp = true;
-00514                     break;
-00515 
-00516                 case OutputDescriptor::FixedSampleRate:
-00517                     // use our internal timestamp if feature lacks one
-00518                     if (!featureList[i].hasTimestamp) {
-00519                         featureList[i].timestamp = timestamp;
-00520                         featureList[i].hasTimestamp = true;
-00521                     }
-00522                     break;
-00523 
-00524                 case OutputDescriptor::VariableSampleRate:
-00525                     break;              // plugin must set timestamp
-00526 
-00527                 default:
-00528                     break;
-00529                 }
-00530             
-00531                 allFeatureSets[outputNo].push_back(featureList[i]);
-00532             }
-00533         } else {
-00534             for (size_t i = 0; i < iter->second.size(); ++i) {
-00535                 allFeatureSets[outputNo].push_back(iter->second[i]);
-00536             }
-00537         }
-00538     }
-00539     
-00540     // step forward
-00541 
-00542     for (size_t i = 0; i < m_channels; ++i) {
-00543         m_queue[i]->skip(m_stepSize);
-00544     }
-00545     
-00546     // increment internal frame counter each time we step forward
-00547     m_frame += m_stepSize;
-00548 }
-00549 
-00550 }
-00551         
-00552 }
-00553 
-00554 
-
-
Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginBufferingAdapter_8cpp.html --- a/code-doc/PluginBufferingAdapter_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ - - -VampPluginSDK: PluginBufferingAdapter.cpp File Reference - - - - - -
-

PluginBufferingAdapter.cpp File Reference

-

- -

-Go to the source code of this file. - - - - - - - - - - - -

Namespaces

namespace  Vamp
namespace  Vamp::HostExt

Classes

class  Vamp::HostExt::PluginBufferingAdapter::Impl
class  Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer
-

-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginBufferingAdapter_8h-source.html --- a/code-doc/PluginBufferingAdapter_8h-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginBufferingAdapter_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

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 /*
@@ -28,7 +28,7 @@
 00007 
 00008     Centre for Digital Music, Queen Mary, University of London.
 00009     Copyright 2006-2007 Chris Cannam and QMUL.
-00010     This file by Mark Levy, Copyright 2007 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
@@ -59,43 +59,63 @@
 00038 #ifndef _VAMP_PLUGIN_BUFFERING_ADAPTER_H_
 00039 #define _VAMP_PLUGIN_BUFFERING_ADAPTER_H_
 00040 
-00041 #include "PluginWrapper.h"
-00042 
-00043 namespace Vamp {
-00044         
-00045 namespace HostExt {
-00046                 
-00072 class PluginBufferingAdapter : public PluginWrapper
-00073 {
-00074 public:
-00075     PluginBufferingAdapter(Plugin *plugin); // I take ownership of plugin
-00076     virtual ~PluginBufferingAdapter();
-00077     
-00078     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
-00079 
-00080     size_t getPreferredStepSize() const;
-00081     
-00082     OutputList getOutputDescriptors() const;
-00083 
-00084     void reset();
+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 
-00086     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
-00087     
-00088     FeatureSet getRemainingFeatures();
-00089     
-00090 protected:
-00091     class Impl;
-00092     Impl *m_impl;
-00093 };
-00094     
-00095 }
+00095     size_t getPreferredStepSize() const;
 00096 
-00097 }
-00098 
-00099 #endif
+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
 
-
Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginBufferingAdapter_8h.html --- a/code-doc/PluginBufferingAdapter_8h.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginBufferingAdapter_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + -

PluginChannelAdapter.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-2007 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 "PluginChannelAdapter.h"
-00038 
-00039 namespace Vamp {
-00040 
-00041 namespace HostExt {
-00042 
-00043 class PluginChannelAdapter::Impl
-00044 {
-00045 public:
-00046     Impl(Plugin *plugin);
-00047     ~Impl();
-00048 
-00049     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
-00050 
-00051     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
-00052 
-00053 protected:
-00054     Plugin *m_plugin;
-00055     size_t m_blockSize;
-00056     size_t m_inputChannels;
-00057     size_t m_pluginChannels;
-00058     float **m_buffer;
-00059     const float **m_forwardPtrs;
-00060 };
-00061 
-00062 PluginChannelAdapter::PluginChannelAdapter(Plugin *plugin) :
-00063     PluginWrapper(plugin)
-00064 {
-00065     m_impl = new Impl(plugin);
-00066 }
-00067 
-00068 PluginChannelAdapter::~PluginChannelAdapter()
-00069 {
-00070     delete m_impl;
-00071 }
-00072 
-00073 bool
-00074 PluginChannelAdapter::initialise(size_t channels, size_t stepSize, size_t blockSize)
-00075 {
-00076     return m_impl->initialise(channels, stepSize, blockSize);
-00077 }
-00078 
-00079 PluginChannelAdapter::FeatureSet
-00080 PluginChannelAdapter::process(const float *const *inputBuffers,
-00081                               RealTime timestamp)
-00082 {
-00083     return m_impl->process(inputBuffers, timestamp);
-00084 }
-00085 
-00086 PluginChannelAdapter::Impl::Impl(Plugin *plugin) :
-00087     m_plugin(plugin),
-00088     m_blockSize(0),
-00089     m_inputChannels(0),
-00090     m_pluginChannels(0),
-00091     m_buffer(0),
-00092     m_forwardPtrs(0)
-00093 {
-00094 }
-00095 
-00096 PluginChannelAdapter::Impl::~Impl()
-00097 {
-00098     // the adapter will delete the plugin
-00099 
-00100     if (m_buffer) {
-00101         if (m_inputChannels > m_pluginChannels) {
-00102             delete[] m_buffer[0];
-00103         } else {
-00104             for (size_t i = 0; i < m_pluginChannels - m_inputChannels; ++i) {
-00105                 delete[] m_buffer[i];
-00106             }
-00107         }
-00108         delete[] m_buffer;
-00109         m_buffer = 0;
-00110     }
-00111 
-00112     if (m_forwardPtrs) {
-00113         delete[] m_forwardPtrs;
-00114         m_forwardPtrs = 0;
-00115     }
-00116 }
-00117 
-00118 bool
-00119 PluginChannelAdapter::Impl::initialise(size_t channels, size_t stepSize, size_t blockSize)
-00120 {
-00121     m_blockSize = blockSize;
-00122 
-00123     size_t minch = m_plugin->getMinChannelCount();
-00124     size_t maxch = m_plugin->getMaxChannelCount();
-00125 
-00126     m_inputChannels = channels;
-00127 
-00128     if (m_inputChannels < minch) {
-00129 
-00130         m_forwardPtrs = new const float *[minch];
-00131 
-00132         if (m_inputChannels > 1) {
-00133             // We need a set of zero-valued buffers to add to the
-00134             // forwarded pointers
-00135             m_buffer = new float*[minch - channels];
-00136             for (size_t i = 0; i < minch; ++i) {
-00137                 m_buffer[i] = new float[blockSize];
-00138                 for (size_t j = 0; j < blockSize; ++j) {
-00139                     m_buffer[i][j] = 0.f;
-00140                 }
-00141             }
-00142         }
-00143 
-00144         m_pluginChannels = minch;
-00145 
-00146         std::cerr << "PluginChannelAdapter::initialise: expanding " << m_inputChannels << " to " << m_pluginChannels << " for plugin" << std::endl;
-00147 
-00148     } else if (m_inputChannels > maxch) {
-00149 
-00150         // We only need m_buffer if we are mixing down to a single
-00151         // channel -- otherwise we can just forward the same float* as
-00152         // passed in to process(), expecting the excess to be ignored
-00153 
-00154         if (maxch == 1) {
-00155             m_buffer = new float *[1];
-00156             m_buffer[0] = new float[blockSize];
-00157 
-00158             std::cerr << "PluginChannelAdapter::initialise: mixing " << m_inputChannels << " to mono for plugin" << std::endl;
-00159 
-00160         } else {
-00161             
-00162             std::cerr << "PluginChannelAdapter::initialise: reducing " << m_inputChannels << " to " << m_pluginChannels << " for plugin" << std::endl;
-00163         }
-00164 
-00165         m_pluginChannels = maxch;
-00166 
-00167     } else {
-00168  
-00169         std::cerr << "PluginChannelAdapter::initialise: accepting given number of channels (" << m_inputChannels << ")" << std::endl;
-00170         m_pluginChannels = m_inputChannels;
-00171     }
-00172 
-00173     return m_plugin->initialise(m_pluginChannels, stepSize, blockSize);
-00174 }
-00175 
-00176 PluginChannelAdapter::FeatureSet
-00177 PluginChannelAdapter::Impl::process(const float *const *inputBuffers,
-00178                                     RealTime timestamp)
-00179 {
-00180 //    std::cerr << "PluginChannelAdapter::process: " << m_inputChannels << " -> " << m_pluginChannels << " channels" << std::endl;
-00181 
-00182     if (m_inputChannels < m_pluginChannels) {
-00183 
-00184         if (m_inputChannels == 1) {
-00185             for (size_t i = 0; i < m_pluginChannels; ++i) {
-00186                 m_forwardPtrs[i] = inputBuffers[0];
-00187             }
-00188         } else {
-00189             for (size_t i = 0; i < m_inputChannels; ++i) {
-00190                 m_forwardPtrs[i] = inputBuffers[i];
-00191             }
-00192             for (size_t i = m_inputChannels; i < m_pluginChannels; ++i) {
-00193                 m_forwardPtrs[i] = m_buffer[i - m_inputChannels];
-00194             }
-00195         }
-00196 
-00197         return m_plugin->process(m_forwardPtrs, timestamp);
-00198 
-00199     } else if (m_inputChannels > m_pluginChannels) {
-00200 
-00201         if (m_pluginChannels == 1) {
-00202             for (size_t j = 0; j < m_blockSize; ++j) {
-00203                 m_buffer[0][j] = inputBuffers[0][j];
-00204             }
-00205             for (size_t i = 1; i < m_inputChannels; ++i) {
-00206                 for (size_t j = 0; j < m_blockSize; ++j) {
-00207                     m_buffer[0][j] += inputBuffers[i][j];
-00208                 }
-00209             }
-00210             for (size_t j = 0; j < m_blockSize; ++j) {
-00211                 m_buffer[0][j] /= m_inputChannels;
-00212             }
-00213             return m_plugin->process(m_buffer, timestamp);
-00214         } else {
-00215             return m_plugin->process(inputBuffers, timestamp);
-00216         }
-00217 
-00218     } else {
-00219 
-00220         return m_plugin->process(inputBuffers, timestamp);
-00221     }
-00222 }
-00223 
-00224 }
-00225 
-00226 }
-00227 
-00228 
-
-
Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginChannelAdapter_8cpp.html --- a/code-doc/PluginChannelAdapter_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ - - -VampPluginSDK: PluginChannelAdapter.cpp File Reference - - - - - -
-

PluginChannelAdapter.cpp File Reference

-

- -

-Go to the source code of this file. - - - - - - - - - -

Namespaces

namespace  Vamp
namespace  Vamp::HostExt

Classes

class  Vamp::HostExt::PluginChannelAdapter::Impl
-

-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginChannelAdapter_8h-source.html --- a/code-doc/PluginChannelAdapter_8h-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginChannelAdapter_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

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 /*
@@ -58,35 +58,42 @@
 00037 #ifndef _VAMP_PLUGIN_CHANNEL_ADAPTER_H_
 00038 #define _VAMP_PLUGIN_CHANNEL_ADAPTER_H_
 00039 
-00040 #include "PluginWrapper.h"
-00041 
-00042 namespace Vamp {
-00043 
-00044 namespace HostExt {
-00045 
-00109 class PluginChannelAdapter : public PluginWrapper
-00110 {
-00111 public:
-00112     PluginChannelAdapter(Plugin *plugin); // I take ownership of plugin
-00113     virtual ~PluginChannelAdapter();
-00114 
-00115     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
-00116 
-00117     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
-00118 
-00119 protected:
-00120     class Impl;
-00121     Impl *m_impl;
-00122 };
-00123 
-00124 }
-00125 
-00126 }
-00127 
-00128 #endif
+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
 
-
Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginChannelAdapter_8h.html --- a/code-doc/PluginChannelAdapter_8h.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginChannelAdapter_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + -

PluginHostAdapter.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 "PluginHostAdapter.h"
-00038 #include <cstdlib>
-00039 
-00040 namespace Vamp
-00041 {
-00042 
-00043 PluginHostAdapter::PluginHostAdapter(const VampPluginDescriptor *descriptor,
-00044                                      float inputSampleRate) :
-00045     Plugin(inputSampleRate),
-00046     m_descriptor(descriptor)
-00047 {
-00048 //    std::cerr << "PluginHostAdapter::PluginHostAdapter (plugin = " << descriptor->name << ")" << std::endl;
-00049     m_handle = m_descriptor->instantiate(m_descriptor, inputSampleRate);
-00050     if (!m_handle) {
-00051 //        std::cerr << "WARNING: PluginHostAdapter: Plugin instantiation failed for plugin " << m_descriptor->name << std::endl;
-00052     }
-00053 }
-00054 
-00055 PluginHostAdapter::~PluginHostAdapter()
-00056 {
-00057 //    std::cerr << "PluginHostAdapter::~PluginHostAdapter (plugin = " << m_descriptor->name << ")" << std::endl;
-00058     if (m_handle) m_descriptor->cleanup(m_handle);
-00059 }
-00060 
-00061 std::vector<std::string>
-00062 PluginHostAdapter::getPluginPath()
-00063 {
-00064     std::vector<std::string> path;
-00065     std::string envPath;
-00066 
-00067     char *cpath = getenv("VAMP_PATH");
-00068     if (cpath) envPath = cpath;
-00069 
-00070 #ifdef _WIN32
-00071 #define PATH_SEPARATOR ';'
-00072 #define DEFAULT_VAMP_PATH "%ProgramFiles%\\Vamp Plugins"
-00073 #else
-00074 #define PATH_SEPARATOR ':'
-00075 #ifdef __APPLE__
-00076 #define DEFAULT_VAMP_PATH "$HOME/Library/Audio/Plug-Ins/Vamp:/Library/Audio/Plug-Ins/Vamp"
-00077 #else
-00078 #define DEFAULT_VAMP_PATH "$HOME/vamp:$HOME/.vamp:/usr/local/lib/vamp:/usr/lib/vamp"
-00079 #endif
-00080 #endif
-00081 
-00082     if (envPath == "") {
-00083         envPath = DEFAULT_VAMP_PATH;
-00084         char *chome = getenv("HOME");
-00085         if (chome) {
-00086             std::string home(chome);
-00087             std::string::size_type f;
-00088             while ((f = envPath.find("$HOME")) != std::string::npos &&
-00089                     f < envPath.length()) {
-00090                 envPath.replace(f, 5, home);
-00091             }
-00092         }
-00093 #ifdef _WIN32
-00094         char *cpfiles = getenv("ProgramFiles");
-00095         if (!cpfiles) cpfiles = "C:\\Program Files";
-00096         std::string pfiles(cpfiles);
-00097         std::string::size_type f;
-00098         while ((f = envPath.find("%ProgramFiles%")) != std::string::npos &&
-00099                f < envPath.length()) {
-00100             envPath.replace(f, 14, pfiles);
-00101         }
-00102 #endif
-00103     }
-00104 
-00105     std::string::size_type index = 0, newindex = 0;
-00106 
-00107     while ((newindex = envPath.find(PATH_SEPARATOR, index)) < envPath.size()) {
-00108         path.push_back(envPath.substr(index, newindex - index));
-00109         index = newindex + 1;
-00110     }
-00111     
-00112     path.push_back(envPath.substr(index));
-00113 
-00114     return path;
-00115 }
-00116 
-00117 bool
-00118 PluginHostAdapter::initialise(size_t channels,
-00119                               size_t stepSize,
-00120                               size_t blockSize)
-00121 {
-00122     if (!m_handle) return false;
-00123     return m_descriptor->initialise(m_handle, channels, stepSize, blockSize) ?
-00124         true : false;
-00125 }
-00126 
-00127 void
-00128 PluginHostAdapter::reset()
-00129 {
-00130     if (!m_handle) return;
-00131     m_descriptor->reset(m_handle);
-00132 }
-00133 
-00134 PluginHostAdapter::InputDomain
-00135 PluginHostAdapter::getInputDomain() const
-00136 {
-00137     if (m_descriptor->inputDomain == vampFrequencyDomain) {
-00138         return FrequencyDomain;
-00139     } else {
-00140         return TimeDomain;
-00141     }
-00142 }
-00143 
-00144 unsigned int
-00145 PluginHostAdapter::getVampApiVersion() const
-00146 {
-00147     return m_descriptor->vampApiVersion;
-00148 }
-00149 
-00150 std::string
-00151 PluginHostAdapter::getIdentifier() const
-00152 {
-00153     return m_descriptor->identifier;
-00154 }
-00155 
-00156 std::string
-00157 PluginHostAdapter::getName() const
-00158 {
-00159     return m_descriptor->name;
-00160 }
-00161 
-00162 std::string
-00163 PluginHostAdapter::getDescription() const
-00164 {
-00165     return m_descriptor->description;
-00166 }
-00167 
-00168 std::string
-00169 PluginHostAdapter::getMaker() const
-00170 {
-00171     return m_descriptor->maker;
-00172 }
-00173 
-00174 int
-00175 PluginHostAdapter::getPluginVersion() const
-00176 {
-00177     return m_descriptor->pluginVersion;
-00178 }
-00179 
-00180 std::string
-00181 PluginHostAdapter::getCopyright() const
-00182 {
-00183     return m_descriptor->copyright;
-00184 }
-00185 
-00186 PluginHostAdapter::ParameterList
-00187 PluginHostAdapter::getParameterDescriptors() const
-00188 {
-00189     ParameterList list;
-00190     for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) {
-00191         const VampParameterDescriptor *spd = m_descriptor->parameters[i];
-00192         ParameterDescriptor pd;
-00193         pd.identifier = spd->identifier;
-00194         pd.name = spd->name;
-00195         pd.description = spd->description;
-00196         pd.unit = spd->unit;
-00197         pd.minValue = spd->minValue;
-00198         pd.maxValue = spd->maxValue;
-00199         pd.defaultValue = spd->defaultValue;
-00200         pd.isQuantized = spd->isQuantized;
-00201         pd.quantizeStep = spd->quantizeStep;
-00202         if (pd.isQuantized && spd->valueNames) {
-00203             for (unsigned int j = 0; spd->valueNames[j]; ++j) {
-00204                 pd.valueNames.push_back(spd->valueNames[j]);
-00205             }
-00206         }
-00207         list.push_back(pd);
-00208     }
-00209     return list;
-00210 }
-00211 
-00212 float
-00213 PluginHostAdapter::getParameter(std::string param) const
-00214 {
-00215     if (!m_handle) return 0.0;
-00216 
-00217     for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) {
-00218         if (param == m_descriptor->parameters[i]->identifier) {
-00219             return m_descriptor->getParameter(m_handle, i);
-00220         }
-00221     }
-00222 
-00223     return 0.0;
-00224 }
-00225 
-00226 void
-00227 PluginHostAdapter::setParameter(std::string param, 
-00228                                 float value)
-00229 {
-00230     if (!m_handle) return;
-00231 
-00232     for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) {
-00233         if (param == m_descriptor->parameters[i]->identifier) {
-00234             m_descriptor->setParameter(m_handle, i, value);
-00235             return;
-00236         }
-00237     }
-00238 }
-00239 
-00240 PluginHostAdapter::ProgramList
-00241 PluginHostAdapter::getPrograms() const
-00242 {
-00243     ProgramList list;
-00244     
-00245     for (unsigned int i = 0; i < m_descriptor->programCount; ++i) {
-00246         list.push_back(m_descriptor->programs[i]);
-00247     }
-00248     
-00249     return list;
-00250 }
-00251 
-00252 std::string
-00253 PluginHostAdapter::getCurrentProgram() const
-00254 {
-00255     if (!m_handle) return "";
-00256 
-00257     int pn = m_descriptor->getCurrentProgram(m_handle);
-00258     return m_descriptor->programs[pn];
-00259 }
-00260 
-00261 void
-00262 PluginHostAdapter::selectProgram(std::string program)
-00263 {
-00264     if (!m_handle) return;
-00265 
-00266     for (unsigned int i = 0; i < m_descriptor->programCount; ++i) {
-00267         if (program == m_descriptor->programs[i]) {
-00268             m_descriptor->selectProgram(m_handle, i);
-00269             return;
-00270         }
-00271     }
-00272 }
-00273 
-00274 size_t
-00275 PluginHostAdapter::getPreferredStepSize() const
-00276 {
-00277     if (!m_handle) return 0;
-00278     return m_descriptor->getPreferredStepSize(m_handle);
-00279 }
-00280 
-00281 size_t
-00282 PluginHostAdapter::getPreferredBlockSize() const
-00283 {
-00284     if (!m_handle) return 0;
-00285     return m_descriptor->getPreferredBlockSize(m_handle);
-00286 }
-00287 
-00288 size_t
-00289 PluginHostAdapter::getMinChannelCount() const
-00290 {
-00291     if (!m_handle) return 0;
-00292     return m_descriptor->getMinChannelCount(m_handle);
-00293 }
-00294 
-00295 size_t
-00296 PluginHostAdapter::getMaxChannelCount() const
-00297 {
-00298     if (!m_handle) return 0;
-00299     return m_descriptor->getMaxChannelCount(m_handle);
-00300 }
-00301 
-00302 PluginHostAdapter::OutputList
-00303 PluginHostAdapter::getOutputDescriptors() const
-00304 {
-00305     OutputList list;
-00306     if (!m_handle) {
-00307 //        std::cerr << "PluginHostAdapter::getOutputDescriptors: no handle " << std::endl;
-00308         return list;
-00309     }
-00310 
-00311     unsigned int count = m_descriptor->getOutputCount(m_handle);
-00312 
-00313     for (unsigned int i = 0; i < count; ++i) {
-00314         VampOutputDescriptor *sd = m_descriptor->getOutputDescriptor(m_handle, i);
-00315         OutputDescriptor d;
-00316         d.identifier = sd->identifier;
-00317         d.name = sd->name;
-00318         d.description = sd->description;
-00319         d.unit = sd->unit;
-00320         d.hasFixedBinCount = sd->hasFixedBinCount;
-00321         d.binCount = sd->binCount;
-00322         if (d.hasFixedBinCount) {
-00323             for (unsigned int j = 0; j < sd->binCount; ++j) {
-00324                 d.binNames.push_back(sd->binNames[j] ? sd->binNames[j] : "");
-00325             }
-00326         }
-00327         d.hasKnownExtents = sd->hasKnownExtents;
-00328         d.minValue = sd->minValue;
-00329         d.maxValue = sd->maxValue;
-00330         d.isQuantized = sd->isQuantized;
-00331         d.quantizeStep = sd->quantizeStep;
-00332 
-00333         switch (sd->sampleType) {
-00334         case vampOneSamplePerStep:
-00335             d.sampleType = OutputDescriptor::OneSamplePerStep; break;
-00336         case vampFixedSampleRate:
-00337             d.sampleType = OutputDescriptor::FixedSampleRate; break;
-00338         case vampVariableSampleRate:
-00339             d.sampleType = OutputDescriptor::VariableSampleRate; break;
-00340         }
-00341 
-00342         d.sampleRate = sd->sampleRate;
-00343 
-00344         list.push_back(d);
-00345 
-00346         m_descriptor->releaseOutputDescriptor(sd);
-00347     }
-00348 
-00349     return list;
-00350 }
-00351 
-00352 PluginHostAdapter::FeatureSet
-00353 PluginHostAdapter::process(const float *const *inputBuffers,
-00354                            RealTime timestamp)
-00355 {
-00356     FeatureSet fs;
-00357     if (!m_handle) return fs;
-00358 
-00359     int sec = timestamp.sec;
-00360     int nsec = timestamp.nsec;
-00361     
-00362     VampFeatureList *features = m_descriptor->process(m_handle,
-00363                                                       inputBuffers,
-00364                                                       sec, nsec);
-00365     
-00366     convertFeatures(features, fs);
-00367     m_descriptor->releaseFeatureSet(features);
-00368     return fs;
-00369 }
-00370 
-00371 PluginHostAdapter::FeatureSet
-00372 PluginHostAdapter::getRemainingFeatures()
-00373 {
-00374     FeatureSet fs;
-00375     if (!m_handle) return fs;
-00376     
-00377     VampFeatureList *features = m_descriptor->getRemainingFeatures(m_handle); 
-00378 
-00379     convertFeatures(features, fs);
-00380     m_descriptor->releaseFeatureSet(features);
-00381     return fs;
-00382 }
-00383 
-00384 void
-00385 PluginHostAdapter::convertFeatures(VampFeatureList *features,
-00386                                    FeatureSet &fs)
-00387 {
-00388     if (!features) return;
-00389 
-00390     unsigned int outputs = m_descriptor->getOutputCount(m_handle);
-00391 
-00392     for (unsigned int i = 0; i < outputs; ++i) {
-00393         
-00394         VampFeatureList &list = features[i];
-00395 
-00396         if (list.featureCount > 0) {
-00397 
-00398             Feature feature;
-00399             feature.values.reserve(list.features[0].valueCount);
-00400 
-00401             for (unsigned int j = 0; j < list.featureCount; ++j) {
-00402 
-00403                 feature.hasTimestamp = list.features[j].hasTimestamp;
-00404                 feature.timestamp = RealTime(list.features[j].sec,
-00405                                              list.features[j].nsec);
-00406 
-00407                 for (unsigned int k = 0; k < list.features[j].valueCount; ++k) {
-00408                     feature.values.push_back(list.features[j].values[k]);
-00409                 }
-00410 
-00411                 if (list.features[j].label) {
-00412                     feature.label = list.features[j].label;
-00413                 }
-00414 
-00415                 fs[i].push_back(feature);
-00416 
-00417                 if (list.features[j].valueCount > 0) {
-00418                     feature.values.clear();
-00419                 }
-00420 
-00421                 if (list.features[j].label) {
-00422                     feature.label = "";
-00423                 }
-00424             }
-00425         }
-00426     }
-00427 }
-00428 
-00429 }
-
-
Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginHostAdapter_8cpp.html --- a/code-doc/PluginHostAdapter_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ - - -VampPluginSDK: PluginHostAdapter.cpp File Reference - - - - - -
-

PluginHostAdapter.cpp File Reference

-

- -

-Go to the source code of this file. - - - - - - - - - -

Namespaces

namespace  Vamp

Defines

#define PATH_SEPARATOR   ':'
#define DEFAULT_VAMP_PATH   "$HOME/vamp:$HOME/.vamp:/usr/local/lib/vamp:/usr/lib/vamp"
-


Define Documentation

- -
-
- - - - -
#define PATH_SEPARATOR   ':'
-
-
- -

- -

Referenced by Vamp::PluginHostAdapter::getPluginPath().

- -
-

- -

-
- - - - -
#define DEFAULT_VAMP_PATH   "$HOME/vamp:$HOME/.vamp:/usr/local/lib/vamp:/usr/lib/vamp"
-
-
- -

- -

Referenced by Vamp::PluginHostAdapter::getPluginPath().

- -
-

-

-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginHostAdapter_8h-source.html --- a/code-doc/PluginHostAdapter_8h-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginHostAdapter_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

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 /*
@@ -58,70 +58,76 @@
 00037 #ifndef _VAMP_PLUGIN_HOST_ADAPTER_H_
 00038 #define _VAMP_PLUGIN_HOST_ADAPTER_H_
 00039 
-00040 #include <vamp/vamp.h>
-00041 #include <vamp-sdk/Plugin.h>
+00040 #include "hostguard.h"
+00041 #include "Plugin.h"
 00042 
-00043 #include <vector>
+00043 #include <vamp/vamp.h>
 00044 
-00045 namespace Vamp {
+00045 #include <vector>
 00046 
-00064 class PluginHostAdapter : public Plugin
-00065 {
-00066 public:
-00067     PluginHostAdapter(const VampPluginDescriptor *descriptor,
-00068                       float inputSampleRate);
-00069     virtual ~PluginHostAdapter();
-00070     
-00071     static std::vector<std::string> getPluginPath();
-00072 
-00073     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
-00074     void reset();
-00075 
-00076     InputDomain getInputDomain() const;
-00077 
-00078     unsigned int getVampApiVersion() const;
-00079     std::string getIdentifier() const;
-00080     std::string getName() const;
-00081     std::string getDescription() const;
-00082     std::string getMaker() const;
-00083     int getPluginVersion() const;
-00084     std::string getCopyright() const;
-00085 
-00086     ParameterList getParameterDescriptors() const;
-00087     float getParameter(std::string) const;
-00088     void setParameter(std::string, float);
+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     ProgramList getPrograms() const;
-00091     std::string getCurrentProgram() const;
-00092     void selectProgram(std::string);
+00090     ParameterList getParameterDescriptors() const;
+00091     float getParameter(std::string) const;
+00092     void setParameter(std::string, float);
 00093 
-00094     size_t getPreferredStepSize() const;
-00095     size_t getPreferredBlockSize() const;
-00096 
-00097     size_t getMinChannelCount() const;
-00098     size_t getMaxChannelCount() const;
-00099 
-00100     OutputList getOutputDescriptors() const;
-00101 
-00102     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
+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     FeatureSet getRemainingFeatures();
+00104     OutputList getOutputDescriptors() const;
 00105 
-00106 protected:
-00107     void convertFeatures(VampFeatureList *, FeatureSet &);
-00108 
-00109     const VampPluginDescriptor *m_descriptor;
-00110     VampPluginHandle m_handle;
-00111 };
+00106     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
+00107 
+00108     FeatureSet getRemainingFeatures();
+00109 
+00110 protected:
+00111     void convertFeatures(VampFeatureList *, FeatureSet &);
 00112 
-00113 }
-00114 
-00115 #endif
-00116 
-00117 
+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 
 
-
Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginHostAdapter_8h.html --- a/code-doc/PluginHostAdapter_8h.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginHostAdapter_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + -

PluginInputDomainAdapter.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-2007 Chris Cannam and QMUL.
-00010   
-00011     This file is based in part on Don Cross's public domain FFT
-00012     implementation.
-00013 
-00014     Permission is hereby granted, free of charge, to any person
-00015     obtaining a copy of this software and associated documentation
-00016     files (the "Software"), to deal in the Software without
-00017     restriction, including without limitation the rights to use, copy,
-00018     modify, merge, publish, distribute, sublicense, and/or sell copies
-00019     of the Software, and to permit persons to whom the Software is
-00020     furnished to do so, subject to the following conditions:
-00021 
-00022     The above copyright notice and this permission notice shall be
-00023     included in all copies or substantial portions of the Software.
-00024 
-00025     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-00026     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-00027     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-00028     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
-00029     ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-00030     CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-00031     WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-00032 
-00033     Except as contained in this notice, the names of the Centre for
-00034     Digital Music; Queen Mary, University of London; and Chris Cannam
-00035     shall not be used in advertising or otherwise to promote the sale,
-00036     use or other dealings in this Software without prior written
-00037     authorization.
-00038 */
-00039 
-00040 #include "PluginInputDomainAdapter.h"
-00041 
-00042 #include <cmath>
-00043 
-00044 
-00068 #ifdef HAVE_FFTW3
-00069 #include <fftw3.h>
-00070 #endif
-00071 
-00072 
-00073 namespace Vamp {
-00074 
-00075 namespace HostExt {
-00076 
-00077 class PluginInputDomainAdapter::Impl
-00078 {
-00079 public:
-00080     Impl(Plugin *plugin, float inputSampleRate);
-00081     ~Impl();
-00082     
-00083     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
-00084 
-00085     size_t getPreferredStepSize() const;
-00086     size_t getPreferredBlockSize() const;
-00087 
-00088     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
-00089 
-00090 protected:
-00091     Plugin *m_plugin;
-00092     float m_inputSampleRate;
-00093     int m_channels;
-00094     int m_blockSize;
-00095     float **m_freqbuf;
-00096 
-00097     double *m_ri;
-00098     double *m_window;
-00099 
-00100 #ifdef HAVE_FFTW3
-00101     fftw_plan m_plan;
-00102     fftw_complex *m_cbuf;
-00103 #else
-00104     double *m_ro;
-00105     double *m_io;
-00106     void fft(unsigned int n, bool inverse,
-00107              double *ri, double *ii, double *ro, double *io);
-00108 #endif
-00109 
-00110     size_t makeBlockSizeAcceptable(size_t) const;
-00111 };
-00112 
-00113 PluginInputDomainAdapter::PluginInputDomainAdapter(Plugin *plugin) :
-00114     PluginWrapper(plugin)
-00115 {
-00116     m_impl = new Impl(plugin, m_inputSampleRate);
-00117 }
-00118 
-00119 PluginInputDomainAdapter::~PluginInputDomainAdapter()
-00120 {
-00121     delete m_impl;
-00122 }
-00123   
-00124 bool
-00125 PluginInputDomainAdapter::initialise(size_t channels, size_t stepSize, size_t blockSize)
-00126 {
-00127     return m_impl->initialise(channels, stepSize, blockSize);
-00128 }
-00129 
-00130 Plugin::InputDomain
-00131 PluginInputDomainAdapter::getInputDomain() const
-00132 {
-00133     return TimeDomain;
-00134 }
-00135 
-00136 size_t
-00137 PluginInputDomainAdapter::getPreferredStepSize() const
-00138 {
-00139     return m_impl->getPreferredStepSize();
-00140 }
-00141 
-00142 size_t
-00143 PluginInputDomainAdapter::getPreferredBlockSize() const
-00144 {
-00145     return m_impl->getPreferredBlockSize();
-00146 }
-00147 
-00148 Plugin::FeatureSet
-00149 PluginInputDomainAdapter::process(const float *const *inputBuffers, RealTime timestamp)
-00150 {
-00151     return m_impl->process(inputBuffers, timestamp);
-00152 }
-00153 
-00154 PluginInputDomainAdapter::Impl::Impl(Plugin *plugin, float inputSampleRate) :
-00155     m_plugin(plugin),
-00156     m_inputSampleRate(inputSampleRate),
-00157     m_channels(0),
-00158     m_blockSize(0),
-00159     m_freqbuf(0),
-00160     m_ri(0),
-00161     m_window(0),
-00162 #ifdef HAVE_FFTW3
-00163     m_plan(0),
-00164     m_cbuf(0)
-00165 #else
-00166     m_ro(0),
-00167     m_io(0)
-00168 #endif
-00169 {
-00170 }
-00171 
-00172 PluginInputDomainAdapter::Impl::~Impl()
-00173 {
-00174     // the adapter will delete the plugin
-00175 
-00176     if (m_channels > 0) {
-00177         for (int c = 0; c < m_channels; ++c) {
-00178             delete[] m_freqbuf[c];
-00179         }
-00180         delete[] m_freqbuf;
-00181 #ifdef HAVE_FFTW3
-00182         if (m_plan) {
-00183             fftw_destroy_plan(m_plan);
-00184             fftw_free(m_ri);
-00185             fftw_free(m_cbuf);
-00186             m_plan = 0;
-00187         }
-00188 #else
-00189         delete[] m_ri;
-00190         delete[] m_ro;
-00191         delete[] m_io;
-00192 #endif
-00193         delete[] m_window;
-00194     }
-00195 }
-00196 
-00197 // for some visual studii apparently
-00198 #ifndef M_PI
-00199 #define M_PI 3.14159265358979232846
-00200 #endif
-00201     
-00202 bool
-00203 PluginInputDomainAdapter::Impl::initialise(size_t channels, size_t stepSize, size_t blockSize)
-00204 {
-00205     if (m_plugin->getInputDomain() == TimeDomain) {
-00206 
-00207         m_blockSize = int(blockSize);
-00208         m_channels = int(channels);
-00209 
-00210         return m_plugin->initialise(channels, stepSize, blockSize);
-00211     }
-00212 
-00213     if (blockSize < 2) {
-00214         std::cerr << "ERROR: Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise: blocksize < 2 not supported" << std::endl;
-00215         return false;
-00216     }                
-00217         
-00218     if (blockSize & (blockSize-1)) {
-00219         std::cerr << "ERROR: Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise: non-power-of-two\nblocksize " << blockSize << " not supported" << std::endl;
-00220         return false;
-00221     }
-00222 
-00223     if (m_channels > 0) {
-00224         for (int c = 0; c < m_channels; ++c) {
-00225             delete[] m_freqbuf[c];
-00226         }
-00227         delete[] m_freqbuf;
-00228 #ifdef HAVE_FFTW3
-00229         if (m_plan) {
-00230             fftw_destroy_plan(m_plan);
-00231             fftw_free(m_ri);
-00232             fftw_free(m_cbuf);
-00233             m_plan = 0;
-00234         }
-00235 #else
-00236         delete[] m_ri;
-00237         delete[] m_ro;
-00238         delete[] m_io;
-00239 #endif
-00240         delete[] m_window;
-00241     }
-00242 
-00243     m_blockSize = int(blockSize);
-00244     m_channels = int(channels);
-00245 
-00246     m_freqbuf = new float *[m_channels];
-00247     for (int c = 0; c < m_channels; ++c) {
-00248         m_freqbuf[c] = new float[m_blockSize + 2];
-00249     }
-00250     m_window = new double[m_blockSize];
-00251 
-00252     for (int i = 0; i < m_blockSize; ++i) {
-00253         // Hanning window
-00254         m_window[i] = (0.50 - 0.50 * cos((2.0 * M_PI * i) / m_blockSize));
-00255     }
-00256 
-00257 #ifdef HAVE_FFTW3
-00258     m_ri = (double *)fftw_malloc(blockSize * sizeof(double));
-00259     m_cbuf = (fftw_complex *)fftw_malloc((blockSize/2 + 1) * sizeof(fftw_complex));
-00260     m_plan = fftw_plan_dft_r2c_1d(blockSize, m_ri, m_cbuf, FFTW_MEASURE);
-00261 #else
-00262     m_ri = new double[m_blockSize];
-00263     m_ro = new double[m_blockSize];
-00264     m_io = new double[m_blockSize];
-00265 #endif
-00266 
-00267     return m_plugin->initialise(channels, stepSize, blockSize);
-00268 }
-00269 
-00270 size_t
-00271 PluginInputDomainAdapter::Impl::getPreferredStepSize() const
-00272 {
-00273     size_t step = m_plugin->getPreferredStepSize();
-00274 
-00275     if (step == 0 && (m_plugin->getInputDomain() == FrequencyDomain)) {
-00276         step = getPreferredBlockSize() / 2;
-00277     }
-00278 
-00279     return step;
-00280 }
-00281 
-00282 size_t
-00283 PluginInputDomainAdapter::Impl::getPreferredBlockSize() const
-00284 {
-00285     size_t block = m_plugin->getPreferredBlockSize();
-00286 
-00287     if (m_plugin->getInputDomain() == FrequencyDomain) {
-00288         if (block == 0) {
-00289             block = 1024;
-00290         } else {
-00291             block = makeBlockSizeAcceptable(block);
-00292         }
-00293     }
-00294 
-00295     return block;
-00296 }
-00297 
-00298 size_t
-00299 PluginInputDomainAdapter::Impl::makeBlockSizeAcceptable(size_t blockSize) const
-00300 {
-00301     if (blockSize < 2) {
-00302 
-00303         std::cerr << "WARNING: Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise: blocksize < 2 not" << std::endl
-00304                   << "supported, increasing from " << blockSize << " to 2" << std::endl;
-00305         blockSize = 2;
-00306         
-00307     } else if (blockSize & (blockSize-1)) {
-00308             
-00309 #ifdef HAVE_FFTW3
-00310         // not an issue with FFTW
-00311 #else
-00312 
-00313         // not a power of two, can't handle that with our built-in FFT
-00314         // implementation
-00315 
-00316         size_t nearest = blockSize;
-00317         size_t power = 0;
-00318         while (nearest > 1) {
-00319             nearest >>= 1;
-00320             ++power;
-00321         }
-00322         nearest = 1;
-00323         while (power) {
-00324             nearest <<= 1;
-00325             --power;
-00326         }
-00327         
-00328         if (blockSize - nearest > (nearest*2) - blockSize) {
-00329             nearest = nearest*2;
-00330         }
-00331         
-00332         std::cerr << "WARNING: Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise: non-power-of-two\nblocksize " << blockSize << " not supported, using blocksize " << nearest << " instead" << std::endl;
-00333         blockSize = nearest;
-00334 
-00335 #endif
-00336     }
-00337 
-00338     return blockSize;
-00339 }
-00340 
-00341 Plugin::FeatureSet
-00342 PluginInputDomainAdapter::Impl::process(const float *const *inputBuffers,
-00343                                         RealTime timestamp)
-00344 {
-00345     if (m_plugin->getInputDomain() == TimeDomain) {
-00346         return m_plugin->process(inputBuffers, timestamp);
-00347     }
-00348 
-00349     // The timestamp supplied should be (according to the Vamp::Plugin
-00350     // spec) the time of the start of the time-domain input block.
-00351     // However, we want to pass to the plugin an FFT output calculated
-00352     // from the block of samples _centred_ on that timestamp.
-00353     // 
-00354     // We have two options:
-00355     // 
-00356     // 1. Buffer the input, calculating the fft of the values at the
-00357     // passed-in block minus blockSize/2 rather than starting at the
-00358     // passed-in block.  So each time we call process on the plugin,
-00359     // we are passing in the same timestamp as was passed to our own
-00360     // process plugin, but not (the frequency domain representation
-00361     // of) the same set of samples.  Advantages: avoids confusion in
-00362     // the host by ensuring the returned values have timestamps
-00363     // comparable with that passed in to this function (in fact this
-00364     // is pretty much essential for one-value-per-block outputs);
-00365     // consistent with hosts such as SV that deal with the
-00366     // frequency-domain transform themselves.  Disadvantages: means
-00367     // making the not necessarily correct assumption that the samples
-00368     // preceding the first official block are all zero (or some other
-00369     // known value).
-00370     //
-00371     // 2. Increase the passed-in timestamps by half the blocksize.  So
-00372     // when we call process, we are passing in the frequency domain
-00373     // representation of the same set of samples as passed to us, but
-00374     // with a different timestamp.  Advantages: simplicity; avoids
-00375     // iffy assumption mentioned above.  Disadvantages: inconsistency
-00376     // with SV in cases where stepSize != blockSize/2; potential
-00377     // confusion arising from returned timestamps being calculated
-00378     // from the adjusted input timestamps rather than the original
-00379     // ones (and inaccuracy where the returned timestamp is implied,
-00380     // as in one-value-per-block).
-00381     //
-00382     // Neither way is ideal, but I don't think either is strictly
-00383     // incorrect either.  I think this is just a case where the same
-00384     // plugin can legitimately produce differing results from the same
-00385     // input data, depending on how that data is packaged.
-00386     // 
-00387     // We'll go for option 2, adjusting the timestamps.  Note in
-00388     // particular that this means some results can differ from those
-00389     // produced by SV.
-00390 
-00391 //    std::cerr << "PluginInputDomainAdapter: sampleRate " << m_inputSampleRate << ", blocksize " << m_blockSize << ", adjusting time from " << timestamp;
-00392 
-00393     timestamp = timestamp + RealTime::frame2RealTime
-00394         (m_blockSize/2, int(m_inputSampleRate + 0.5));
-00395 
-00396 //    std::cerr << " to " << timestamp << std::endl;
-00397 
-00398     for (int c = 0; c < m_channels; ++c) {
-00399 
-00400         for (int i = 0; i < m_blockSize; ++i) {
-00401             m_ri[i] = double(inputBuffers[c][i]) * m_window[i];
-00402         }
-00403 
-00404         for (int i = 0; i < m_blockSize/2; ++i) {
-00405             // FFT shift
-00406             double value = m_ri[i];
-00407             m_ri[i] = m_ri[i + m_blockSize/2];
-00408             m_ri[i + m_blockSize/2] = value;
-00409         }
-00410 
-00411 #ifdef HAVE_FFTW3
-00412 
-00413         fftw_execute(m_plan);
-00414 
-00415         for (int i = 0; i <= m_blockSize/2; ++i) {
-00416             m_freqbuf[c][i * 2] = float(m_cbuf[i][0]);
-00417             m_freqbuf[c][i * 2 + 1] = float(m_cbuf[i][1]);
-00418         }
-00419 
-00420 #else
-00421 
-00422         fft(m_blockSize, false, m_ri, 0, m_ro, m_io);
-00423 
-00424         for (int i = 0; i <= m_blockSize/2; ++i) {
-00425             m_freqbuf[c][i * 2] = float(m_ro[i]);
-00426             m_freqbuf[c][i * 2 + 1] = float(m_io[i]);
-00427         }
-00428 
-00429 #endif
-00430     }
-00431 
-00432     return m_plugin->process(m_freqbuf, timestamp);
-00433 }
-00434 
-00435 #ifndef HAVE_FFTW3
-00436 
-00437 void
-00438 PluginInputDomainAdapter::Impl::fft(unsigned int n, bool inverse,
-00439                                     double *ri, double *ii, double *ro, double *io)
-00440 {
-00441     if (!ri || !ro || !io) return;
-00442 
-00443     unsigned int bits;
-00444     unsigned int i, j, k, m;
-00445     unsigned int blockSize, blockEnd;
-00446 
-00447     double tr, ti;
-00448 
-00449     if (n < 2) return;
-00450     if (n & (n-1)) return;
-00451 
-00452     double angle = 2.0 * M_PI;
-00453     if (inverse) angle = -angle;
-00454 
-00455     for (i = 0; ; ++i) {
-00456         if (n & (1 << i)) {
-00457             bits = i;
-00458             break;
-00459         }
-00460     }
-00461 
-00462     static unsigned int tableSize = 0;
-00463     static int *table = 0;
-00464 
-00465     if (tableSize != n) {
-00466 
-00467         delete[] table;
-00468 
-00469         table = new int[n];
-00470 
-00471         for (i = 0; i < n; ++i) {
-00472         
-00473             m = i;
-00474 
-00475             for (j = k = 0; j < bits; ++j) {
-00476                 k = (k << 1) | (m & 1);
-00477                 m >>= 1;
-00478             }
-00479 
-00480             table[i] = k;
-00481         }
-00482 
-00483         tableSize = n;
-00484     }
-00485 
-00486     if (ii) {
-00487         for (i = 0; i < n; ++i) {
-00488             ro[table[i]] = ri[i];
-00489             io[table[i]] = ii[i];
-00490         }
-00491     } else {
-00492         for (i = 0; i < n; ++i) {
-00493             ro[table[i]] = ri[i];
-00494             io[table[i]] = 0.0;
-00495         }
-00496     }
-00497 
-00498     blockEnd = 1;
-00499 
-00500     for (blockSize = 2; blockSize <= n; blockSize <<= 1) {
-00501 
-00502         double delta = angle / (double)blockSize;
-00503         double sm2 = -sin(-2 * delta);
-00504         double sm1 = -sin(-delta);
-00505         double cm2 = cos(-2 * delta);
-00506         double cm1 = cos(-delta);
-00507         double w = 2 * cm1;
-00508         double ar[3], ai[3];
-00509 
-00510         for (i = 0; i < n; i += blockSize) {
-00511 
-00512             ar[2] = cm2;
-00513             ar[1] = cm1;
-00514 
-00515             ai[2] = sm2;
-00516             ai[1] = sm1;
-00517 
-00518             for (j = i, m = 0; m < blockEnd; j++, m++) {
-00519 
-00520                 ar[0] = w * ar[1] - ar[2];
-00521                 ar[2] = ar[1];
-00522                 ar[1] = ar[0];
-00523 
-00524                 ai[0] = w * ai[1] - ai[2];
-00525                 ai[2] = ai[1];
-00526                 ai[1] = ai[0];
-00527 
-00528                 k = j + blockEnd;
-00529                 tr = ar[0] * ro[k] - ai[0] * io[k];
-00530                 ti = ar[0] * io[k] + ai[0] * ro[k];
-00531 
-00532                 ro[k] = ro[j] - tr;
-00533                 io[k] = io[j] - ti;
-00534 
-00535                 ro[j] += tr;
-00536                 io[j] += ti;
-00537             }
-00538         }
-00539 
-00540         blockEnd = blockSize;
-00541     }
-00542 
-00543     if (inverse) {
-00544 
-00545         double denom = (double)n;
-00546 
-00547         for (i = 0; i < n; i++) {
-00548             ro[i] /= denom;
-00549             io[i] /= denom;
-00550         }
-00551     }
-00552 }
-00553 
-00554 #endif
-00555 
-00556 }
-00557         
-00558 }
-00559 
-
-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginInputDomainAdapter_8cpp.html --- a/code-doc/PluginInputDomainAdapter_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ - - -VampPluginSDK: PluginInputDomainAdapter.cpp File Reference - - - - - -
-

PluginInputDomainAdapter.cpp File Reference

-

- -

-Go to the source code of this file. - - - - - - - - - - - - -

Namespaces

namespace  Vamp
namespace  Vamp::HostExt

Classes

class  Vamp::HostExt::PluginInputDomainAdapter::Impl

Defines

#define M_PI   3.14159265358979232846
-


Define Documentation

- -
-
- - - - -
#define M_PI   3.14159265358979232846
-
- -

-

-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginInputDomainAdapter_8h-source.html --- a/code-doc/PluginInputDomainAdapter_8h-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginInputDomainAdapter_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

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 /*
@@ -58,40 +58,47 @@
 00037 #ifndef _VAMP_PLUGIN_INPUT_DOMAIN_ADAPTER_H_
 00038 #define _VAMP_PLUGIN_INPUT_DOMAIN_ADAPTER_H_
 00039 
-00040 #include "PluginWrapper.h"
-00041 
-00042 namespace Vamp {
-00043 
-00044 namespace HostExt {
-00045 
-00079 class PluginInputDomainAdapter : public PluginWrapper
-00080 {
-00081 public:
-00082     PluginInputDomainAdapter(Plugin *plugin); // I take ownership of plugin
-00083     virtual ~PluginInputDomainAdapter();
-00084     
-00085     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
-00086 
-00087     InputDomain getInputDomain() const;
-00088 
-00089     size_t getPreferredStepSize() const;
-00090     size_t getPreferredBlockSize() const;
-00091 
-00092     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
-00093 
-00094 protected:
-00095     class Impl;
-00096     Impl *m_impl;
-00097 };
-00098 
-00099 }
-00100 
-00101 }
-00102 
-00103 #endif
+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 
+00082 class PluginInputDomainAdapter : public PluginWrapper
+00083 {
+00084 public:
+00090     PluginInputDomainAdapter(Plugin *plugin);
+00091     virtual ~PluginInputDomainAdapter();
+00092     
+00093     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+00094 
+00095     InputDomain getInputDomain() const;
+00096 
+00097     size_t getPreferredStepSize() const;
+00098     size_t getPreferredBlockSize() const;
+00099 
+00100     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
+00101 
+00123     RealTime getTimestampAdjustment() const;
+00124 
+00125 protected:
+00126     class Impl;
+00127     Impl *m_impl;
+00128 };
+00129 
+00130 }
+00131 
+00132 }
+00133 
+00134 _VAMP_SDK_HOSTSPACE_END(PluginInputDomainAdapter.h)
+00135 
+00136 #endif
 
-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginInputDomainAdapter_8h.html --- a/code-doc/PluginInputDomainAdapter_8h.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginInputDomainAdapter_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + -

PluginLoader.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-2007 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 "vamp-sdk/PluginHostAdapter.h"
-00038 #include "PluginLoader.h"
-00039 #include "PluginInputDomainAdapter.h"
-00040 #include "PluginChannelAdapter.h"
-00041 #include "PluginBufferingAdapter.h"
-00042 
-00043 #include <fstream>
-00044 #include <cctype> // tolower
-00045 
-00046 #include <cstring>
-00047 
-00048 #ifdef _WIN32
-00049 
-00050 #include <windows.h>
-00051 #include <tchar.h>
-00052 #define PLUGIN_SUFFIX "dll"
-00053 
-00054 #else /* ! _WIN32 */
-00055 
-00056 #include <dirent.h>
-00057 #include <dlfcn.h>
-00058 
-00059 #ifdef __APPLE__
-00060 #define PLUGIN_SUFFIX "dylib"
-00061 #else /* ! __APPLE__ */
-00062 #define PLUGIN_SUFFIX "so"
-00063 #endif /* ! __APPLE__ */
-00064 
-00065 #endif /* ! _WIN32 */
-00066 
-00067 using namespace std;
-00068 
-00069 namespace Vamp {
-00070         
-00071 namespace HostExt {
-00072 
-00073 class PluginLoader::Impl
-00074 {
-00075 public:
-00076     Impl();
-00077     virtual ~Impl();
-00078 
-00079     PluginKeyList listPlugins();
-00080 
-00081     Plugin *loadPlugin(PluginKey key,
-00082                        float inputSampleRate,
-00083                        int adapterFlags);
-00084 
-00085     PluginKey composePluginKey(string libraryName, string identifier);
-00086 
-00087     PluginCategoryHierarchy getPluginCategory(PluginKey key);
-00088 
-00089     string getLibraryPathForPlugin(PluginKey key);
-00090 
-00091     static void setInstanceToClean(PluginLoader *instance);
-00092 
-00093 protected:
-00094     class PluginDeletionNotifyAdapter : public PluginWrapper {
-00095     public:
-00096         PluginDeletionNotifyAdapter(Plugin *plugin, Impl *loader);
-00097         virtual ~PluginDeletionNotifyAdapter();
-00098     protected:
-00099         Impl *m_loader;
-00100     };
-00101 
-00102     class InstanceCleaner {
-00103     public:
-00104         InstanceCleaner() : m_instance(0) { }
-00105         ~InstanceCleaner() { delete m_instance; }
-00106         void setInstance(PluginLoader *instance) { m_instance = instance; }
-00107     protected:
-00108         PluginLoader *m_instance;
-00109     };
-00110 
-00111     virtual void pluginDeleted(PluginDeletionNotifyAdapter *adapter);
-00112 
-00113     map<PluginKey, string> m_pluginLibraryNameMap;
-00114     bool m_allPluginsEnumerated;
-00115     void enumeratePlugins(PluginKey forPlugin = "");
-00116 
-00117     map<PluginKey, PluginCategoryHierarchy> m_taxonomy;
-00118     void generateTaxonomy();
-00119 
-00120     map<Plugin *, void *> m_pluginLibraryHandleMap;
-00121 
-00122     bool decomposePluginKey(PluginKey key,
-00123                             string &libraryName, string &identifier);
-00124 
-00125     void *loadLibrary(string path);
-00126     void unloadLibrary(void *handle);
-00127     void *lookupInLibrary(void *handle, const char *symbol);
-00128 
-00129     string splicePath(string a, string b);
-00130     vector<string> listFiles(string dir, string ext);
-00131     
-00132     static InstanceCleaner m_cleaner;
-00133 };
-00134 
-00135 PluginLoader *
-00136 PluginLoader::m_instance = 0;
-00137 
-00138 PluginLoader::Impl::InstanceCleaner
-00139 PluginLoader::Impl::m_cleaner;
-00140 
-00141 PluginLoader::PluginLoader()
-00142 {
-00143     m_impl = new Impl();
-00144 }
-00145 
-00146 PluginLoader::~PluginLoader()
-00147 {
-00148     delete m_impl;
-00149 }
-00150 
-00151 PluginLoader *
-00152 PluginLoader::getInstance()
-00153 {
-00154     if (!m_instance) {
-00155         // The cleaner doesn't own the instance, because we leave the
-00156         // instance pointer in the base class for binary backwards
-00157         // compatibility reasons and to avoid waste
-00158         m_instance = new PluginLoader();
-00159         Impl::setInstanceToClean(m_instance);
-00160     }
-00161     return m_instance;
-00162 }
-00163 
-00164 vector<PluginLoader::PluginKey>
-00165 PluginLoader::listPlugins() 
-00166 {
-00167     return m_impl->listPlugins();
-00168 }
-00169 
-00170 Plugin *
-00171 PluginLoader::loadPlugin(PluginKey key,
-00172                          float inputSampleRate,
-00173                          int adapterFlags)
-00174 {
-00175     return m_impl->loadPlugin(key, inputSampleRate, adapterFlags);
-00176 }
-00177 
-00178 PluginLoader::PluginKey
-00179 PluginLoader::composePluginKey(string libraryName, string identifier) 
-00180 {
-00181     return m_impl->composePluginKey(libraryName, identifier);
-00182 }
-00183 
-00184 PluginLoader::PluginCategoryHierarchy
-00185 PluginLoader::getPluginCategory(PluginKey key)
-00186 {
-00187     return m_impl->getPluginCategory(key);
-00188 }
-00189 
-00190 string
-00191 PluginLoader::getLibraryPathForPlugin(PluginKey key)
-00192 {
-00193     return m_impl->getLibraryPathForPlugin(key);
-00194 }
-00195  
-00196 PluginLoader::Impl::Impl() :
-00197     m_allPluginsEnumerated(false)
-00198 {
-00199 }
-00200 
-00201 PluginLoader::Impl::~Impl()
-00202 {
-00203 }
-00204 
-00205 void
-00206 PluginLoader::Impl::setInstanceToClean(PluginLoader *instance)
-00207 {
-00208     m_cleaner.setInstance(instance);
-00209 }
-00210 
-00211 vector<PluginLoader::PluginKey>
-00212 PluginLoader::Impl::listPlugins() 
-00213 {
-00214     if (!m_allPluginsEnumerated) enumeratePlugins();
-00215 
-00216     vector<PluginKey> plugins;
-00217     for (map<PluginKey, string>::iterator mi = m_pluginLibraryNameMap.begin();
-00218          mi != m_pluginLibraryNameMap.end(); ++mi) {
-00219         plugins.push_back(mi->first);
-00220     }
-00221 
-00222     return plugins;
-00223 }
-00224 
-00225 void
-00226 PluginLoader::Impl::enumeratePlugins(PluginKey forPlugin)
-00227 {
-00228     vector<string> path = PluginHostAdapter::getPluginPath();
-00229 
-00230     string libraryName, identifier;
-00231     if (forPlugin != "") {
-00232         if (!decomposePluginKey(forPlugin, libraryName, identifier)) {
-00233             std::cerr << "WARNING: Vamp::HostExt::PluginLoader: Invalid plugin key \""
-00234                       << forPlugin << "\" in enumerate" << std::endl;
-00235             return;
-00236         }
-00237     }
-00238 
-00239     for (size_t i = 0; i < path.size(); ++i) {
-00240         
-00241         vector<string> files = listFiles(path[i], PLUGIN_SUFFIX);
-00242 
-00243         for (vector<string>::iterator fi = files.begin();
-00244              fi != files.end(); ++fi) {
-00245             
-00246             if (libraryName != "") {
-00247                 // libraryName is lowercased and lacking an extension,
-00248                 // as it came from the plugin key
-00249                 string temp = *fi;
-00250                 for (size_t i = 0; i < temp.length(); ++i) {
-00251                     temp[i] = tolower(temp[i]);
-00252                 }
-00253                 string::size_type pi = temp.find('.');
-00254                 if (pi == string::npos) {
-00255                     if (libraryName != temp) continue;
-00256                 } else {
-00257                     if (libraryName != temp.substr(0, pi)) continue;
-00258                 }
-00259             }
-00260 
-00261             string fullPath = path[i];
-00262             fullPath = splicePath(fullPath, *fi);
-00263             void *handle = loadLibrary(fullPath);
-00264             if (!handle) continue;
-00265             
-00266             VampGetPluginDescriptorFunction fn =
-00267                 (VampGetPluginDescriptorFunction)lookupInLibrary
-00268                 (handle, "vampGetPluginDescriptor");
-00269             
-00270             if (!fn) {
-00271                 unloadLibrary(handle);
-00272                 continue;
-00273             }
-00274             
-00275             int index = 0;
-00276             const VampPluginDescriptor *descriptor = 0;
-00277             
-00278             while ((descriptor = fn(VAMP_API_VERSION, index))) {
-00279                 ++index;
-00280                 if (identifier != "") {
-00281                     if (descriptor->identifier != identifier) continue;
-00282                 }
-00283                 PluginKey key = composePluginKey(*fi, descriptor->identifier);
-00284 //                std::cerr << "enumerate: " << key << " (path: " << fullPath << ")" << std::endl;
-00285                 if (m_pluginLibraryNameMap.find(key) ==
-00286                     m_pluginLibraryNameMap.end()) {
-00287                     m_pluginLibraryNameMap[key] = fullPath;
-00288                 }
-00289             }
-00290             
-00291             unloadLibrary(handle);
-00292         }
-00293     }
-00294 
-00295     if (forPlugin == "") m_allPluginsEnumerated = true;
-00296 }
-00297 
-00298 PluginLoader::PluginKey
-00299 PluginLoader::Impl::composePluginKey(string libraryName, string identifier)
-00300 {
-00301     string basename = libraryName;
-00302 
-00303     string::size_type li = basename.rfind('/');
-00304     if (li != string::npos) basename = basename.substr(li + 1);
-00305 
-00306     li = basename.find('.');
-00307     if (li != string::npos) basename = basename.substr(0, li);
-00308 
-00309     for (size_t i = 0; i < basename.length(); ++i) {
-00310         basename[i] = tolower(basename[i]);
-00311     }
-00312 
-00313     return basename + ":" + identifier;
-00314 }
-00315 
-00316 bool
-00317 PluginLoader::Impl::decomposePluginKey(PluginKey key,
-00318                                        string &libraryName,
-00319                                        string &identifier)
-00320 {
-00321     string::size_type ki = key.find(':');
-00322     if (ki == string::npos) {
-00323         return false;
-00324     }
-00325 
-00326     libraryName = key.substr(0, ki);
-00327     identifier = key.substr(ki + 1);
-00328     return true;
-00329 }
-00330 
-00331 PluginLoader::PluginCategoryHierarchy
-00332 PluginLoader::Impl::getPluginCategory(PluginKey plugin)
-00333 {
-00334     if (m_taxonomy.empty()) generateTaxonomy();
-00335     if (m_taxonomy.find(plugin) == m_taxonomy.end()) {
-00336         return PluginCategoryHierarchy();
-00337     }
-00338     return m_taxonomy[plugin];
-00339 }
-00340 
-00341 string
-00342 PluginLoader::Impl::getLibraryPathForPlugin(PluginKey plugin)
-00343 {
-00344     if (m_pluginLibraryNameMap.find(plugin) == m_pluginLibraryNameMap.end()) {
-00345         if (m_allPluginsEnumerated) return "";
-00346         enumeratePlugins(plugin);
-00347     }
-00348     if (m_pluginLibraryNameMap.find(plugin) == m_pluginLibraryNameMap.end()) {
-00349         return "";
-00350     }
-00351     return m_pluginLibraryNameMap[plugin];
-00352 }    
-00353 
-00354 Plugin *
-00355 PluginLoader::Impl::loadPlugin(PluginKey key,
-00356                                float inputSampleRate, int adapterFlags)
-00357 {
-00358     string libname, identifier;
-00359     if (!decomposePluginKey(key, libname, identifier)) {
-00360         std::cerr << "Vamp::HostExt::PluginLoader: Invalid plugin key \""
-00361                   << key << "\" in loadPlugin" << std::endl;
-00362         return 0;
-00363     }
-00364         
-00365     string fullPath = getLibraryPathForPlugin(key);
-00366     if (fullPath == "") return 0;
-00367     
-00368     void *handle = loadLibrary(fullPath);
-00369     if (!handle) return 0;
-00370     
-00371     VampGetPluginDescriptorFunction fn =
-00372         (VampGetPluginDescriptorFunction)lookupInLibrary
-00373         (handle, "vampGetPluginDescriptor");
-00374 
-00375     if (!fn) {
-00376         unloadLibrary(handle);
-00377         return 0;
-00378     }
-00379 
-00380     int index = 0;
-00381     const VampPluginDescriptor *descriptor = 0;
-00382 
-00383     while ((descriptor = fn(VAMP_API_VERSION, index))) {
-00384 
-00385         if (string(descriptor->identifier) == identifier) {
-00386 
-00387             Vamp::PluginHostAdapter *plugin =
-00388                 new Vamp::PluginHostAdapter(descriptor, inputSampleRate);
-00389 
-00390             Plugin *adapter = new PluginDeletionNotifyAdapter(plugin, this);
-00391 
-00392             m_pluginLibraryHandleMap[adapter] = handle;
-00393 
-00394             if (adapterFlags & ADAPT_INPUT_DOMAIN) {
-00395                 if (adapter->getInputDomain() == Plugin::FrequencyDomain) {
-00396                     adapter = new PluginInputDomainAdapter(adapter);
-00397                 }
-00398             }
-00399 
-00400             if (adapterFlags & ADAPT_BUFFER_SIZE) {
-00401                 adapter = new PluginBufferingAdapter(adapter);
-00402             }
-00403 
-00404             if (adapterFlags & ADAPT_CHANNEL_COUNT) {
-00405                 adapter = new PluginChannelAdapter(adapter);
-00406             }
-00407 
-00408             return adapter;
-00409         }
-00410 
-00411         ++index;
-00412     }
-00413 
-00414     cerr << "Vamp::HostExt::PluginLoader: Plugin \""
-00415          << identifier << "\" not found in library \""
-00416          << fullPath << "\"" << endl;
-00417 
-00418     return 0;
-00419 }
-00420 
-00421 void
-00422 PluginLoader::Impl::generateTaxonomy()
-00423 {
-00424 //    cerr << "PluginLoader::Impl::generateTaxonomy" << endl;
-00425 
-00426     vector<string> path = PluginHostAdapter::getPluginPath();
-00427     string libfragment = "/lib/";
-00428     vector<string> catpath;
-00429 
-00430     string suffix = "cat";
-00431 
-00432     for (vector<string>::iterator i = path.begin();
-00433          i != path.end(); ++i) {
-00434 
-00435         // It doesn't matter that we're using literal forward-slash in
-00436         // this bit, as it's only relevant if the path contains
-00437         // "/lib/", which is only meaningful and only plausible on
-00438         // systems with forward-slash delimiters
-00439         
-00440         string dir = *i;
-00441         string::size_type li = dir.find(libfragment);
-00442 
-00443         if (li != string::npos) {
-00444             catpath.push_back
-00445                 (dir.substr(0, li)
-00446                  + "/share/"
-00447                  + dir.substr(li + libfragment.length()));
-00448         }
-00449 
-00450         catpath.push_back(dir);
-00451     }
-00452 
-00453     char buffer[1024];
-00454 
-00455     for (vector<string>::iterator i = catpath.begin();
-00456          i != catpath.end(); ++i) {
-00457         
-00458         vector<string> files = listFiles(*i, suffix);
-00459 
-00460         for (vector<string>::iterator fi = files.begin();
-00461              fi != files.end(); ++fi) {
-00462 
-00463             string filepath = splicePath(*i, *fi);
-00464             ifstream is(filepath.c_str(), ifstream::in | ifstream::binary);
-00465 
-00466             if (is.fail()) {
-00467 //                cerr << "failed to open: " << filepath << endl;
-00468                 continue;
-00469             }
-00470 
-00471 //            cerr << "opened: " << filepath << endl;
-00472 
-00473             while (!!is.getline(buffer, 1024)) {
-00474 
-00475                 string line(buffer);
-00476 
-00477 //                cerr << "line = " << line << endl;
-00478 
-00479                 string::size_type di = line.find("::");
-00480                 if (di == string::npos) continue;
-00481 
-00482                 string id = line.substr(0, di);
-00483                 string encodedCat = line.substr(di + 2);
-00484 
-00485                 if (id.substr(0, 5) != "vamp:") continue;
-00486                 id = id.substr(5);
-00487 
-00488                 while (encodedCat.length() >= 1 &&
-00489                        encodedCat[encodedCat.length()-1] == '\r') {
-00490                     encodedCat = encodedCat.substr(0, encodedCat.length()-1);
-00491                 }
-00492 
-00493 //                cerr << "id = " << id << ", cat = " << encodedCat << endl;
-00494 
-00495                 PluginCategoryHierarchy category;
-00496                 string::size_type ai;
-00497                 while ((ai = encodedCat.find(" > ")) != string::npos) {
-00498                     category.push_back(encodedCat.substr(0, ai));
-00499                     encodedCat = encodedCat.substr(ai + 3);
-00500                 }
-00501                 if (encodedCat != "") category.push_back(encodedCat);
-00502 
-00503                 m_taxonomy[id] = category;
-00504             }
-00505         }
-00506     }
-00507 }    
-00508 
-00509 void *
-00510 PluginLoader::Impl::loadLibrary(string path)
-00511 {
-00512     void *handle = 0;
-00513 #ifdef _WIN32
-00514     handle = LoadLibrary(path.c_str());
-00515     if (!handle) {
-00516         cerr << "Vamp::HostExt::PluginLoader: Unable to load library \""
-00517              << path << "\"" << endl;
-00518     }
-00519 #else
-00520     handle = dlopen(path.c_str(), RTLD_LAZY | RTLD_LOCAL);
-00521     if (!handle) {
-00522         cerr << "Vamp::HostExt::PluginLoader: Unable to load library \""
-00523              << path << "\": " << dlerror() << endl;
-00524     }
-00525 #endif
-00526     return handle;
-00527 }
-00528 
-00529 void
-00530 PluginLoader::Impl::unloadLibrary(void *handle)
-00531 {
-00532 #ifdef _WIN32
-00533     FreeLibrary((HINSTANCE)handle);
-00534 #else
-00535     dlclose(handle);
-00536 #endif
-00537 }
-00538 
-00539 void *
-00540 PluginLoader::Impl::lookupInLibrary(void *handle, const char *symbol)
-00541 {
-00542 #ifdef _WIN32
-00543     return (void *)GetProcAddress((HINSTANCE)handle, symbol);
-00544 #else
-00545     return (void *)dlsym(handle, symbol);
-00546 #endif
-00547 }
-00548 
-00549 string
-00550 PluginLoader::Impl::splicePath(string a, string b)
-00551 {
-00552 #ifdef _WIN32
-00553     return a + "\\" + b;
-00554 #else
-00555     return a + "/" + b;
-00556 #endif
-00557 }
-00558 
-00559 vector<string>
-00560 PluginLoader::Impl::listFiles(string dir, string extension)
-00561 {
-00562     vector<string> files;
-00563 
-00564 #ifdef _WIN32
-00565 
-00566     string expression = dir + "\\*." + extension;
-00567     WIN32_FIND_DATA data;
-00568     HANDLE fh = FindFirstFile(expression.c_str(), &data);
-00569     if (fh == INVALID_HANDLE_VALUE) return files;
-00570 
-00571     bool ok = true;
-00572     while (ok) {
-00573         files.push_back(data.cFileName);
-00574         ok = FindNextFile(fh, &data);
-00575     }
-00576 
-00577     FindClose(fh);
-00578 
-00579 #else
-00580 
-00581     size_t extlen = extension.length();
-00582     DIR *d = opendir(dir.c_str());
-00583     if (!d) return files;
-00584             
-00585     struct dirent *e = 0;
-00586     while ((e = readdir(d))) {
-00587  
-00588         if (!e->d_name) continue;
-00589        
-00590         size_t len = strlen(e->d_name);
-00591         if (len < extlen + 2 ||
-00592             e->d_name + len - extlen - 1 != "." + extension) {
-00593             continue;
-00594         }
-00595 
-00596         files.push_back(e->d_name);
-00597     }
-00598 
-00599     closedir(d);
-00600 #endif
-00601 
-00602     return files;
-00603 }
-00604 
-00605 void
-00606 PluginLoader::Impl::pluginDeleted(PluginDeletionNotifyAdapter *adapter)
-00607 {
-00608     void *handle = m_pluginLibraryHandleMap[adapter];
-00609     if (handle) unloadLibrary(handle);
-00610     m_pluginLibraryHandleMap.erase(adapter);
-00611 }
-00612 
-00613 PluginLoader::Impl::PluginDeletionNotifyAdapter::PluginDeletionNotifyAdapter(Plugin *plugin,
-00614                                                                              Impl *loader) :
-00615     PluginWrapper(plugin),
-00616     m_loader(loader)
-00617 {
-00618 }
-00619 
-00620 PluginLoader::Impl::PluginDeletionNotifyAdapter::~PluginDeletionNotifyAdapter()
-00621 {
-00622     // We need to delete the plugin before calling pluginDeleted, as
-00623     // the delete call may require calling through to the descriptor
-00624     // (for e.g. cleanup) but pluginDeleted may unload the required
-00625     // library for the call.  To prevent a double deletion when our
-00626     // parent's destructor runs (after this one), be sure to set
-00627     // m_plugin to 0 after deletion.
-00628     delete m_plugin;
-00629     m_plugin = 0;
-00630 
-00631     if (m_loader) m_loader->pluginDeleted(this);
-00632 }
-00633 
-00634 }
-00635 
-00636 }
-
-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginLoader_8cpp.html --- a/code-doc/PluginLoader_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ - - -VampPluginSDK: PluginLoader.cpp File Reference - - - - - -
-

PluginLoader.cpp File Reference

-

- -

-Go to the source code of this file. - - - - - - - - - - - - - - - - -

Namespaces

namespace  Vamp
namespace  Vamp::HostExt

Classes

class  Vamp::HostExt::PluginLoader::Impl
class  Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter
class  Vamp::HostExt::PluginLoader::Impl::InstanceCleaner

Defines

#define PLUGIN_SUFFIX   "so"
-


Define Documentation

- -
-
- - - - -
#define PLUGIN_SUFFIX   "so"
-
-
- -

- -

Definition at line 62 of file PluginLoader.cpp.

- -

Referenced by Vamp::HostExt::PluginLoader::Impl::enumeratePlugins(), and usage().

- -
-

-

-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginLoader_8h-source.html --- a/code-doc/PluginLoader_8h-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginLoader_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

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 /*
@@ -62,68 +62,73 @@
 00041 #include <string>
 00042 #include <map>
 00043 
-00044 #include "PluginWrapper.h"
-00045 
-00046 namespace Vamp {
-00047 
-00048 class Plugin;
-00049 
-00050 namespace HostExt {
-00051 
-00069 class PluginLoader
-00070 {
-00071 public:
-00076     static PluginLoader *getInstance();
-00077 
-00098     typedef std::string PluginKey;
-00099 
-00104     typedef std::vector<PluginKey> PluginKeyList;
-00105 
-00116     typedef std::vector<std::string> PluginCategoryHierarchy;
-00117 
-00122     PluginKeyList listPlugins();
-00123 
-00166     enum AdapterFlags {
-00167 
-00168         ADAPT_INPUT_DOMAIN  = 0x01,
-00169         ADAPT_CHANNEL_COUNT = 0x02,
-00170         ADAPT_BUFFER_SIZE   = 0x04,
-00171 
-00172         ADAPT_ALL_SAFE      = 0x03,
-00173 
-00174         ADAPT_ALL           = 0xff
-00175     };
+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 
-00194     Plugin *loadPlugin(PluginKey key,
-00195                        float inputSampleRate,
-00196                        int adapterFlags = 0);
-00197 
-00203     PluginKey composePluginKey(std::string libraryName,
-00204                                std::string identifier);
-00205 
-00215     PluginCategoryHierarchy getPluginCategory(PluginKey plugin);
-00216 
-00221     std::string getLibraryPathForPlugin(PluginKey plugin);
-00222 
-00223 protected:
-00224     PluginLoader();
-00225     virtual ~PluginLoader();
-00226 
-00227     class Impl;
-00228     Impl *m_impl;
+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     static PluginLoader *m_instance;
-00231 };
+00230     class Impl;
+00231     Impl *m_impl;
 00232 
-00233 }
-00234 
-00235 }
-00236 
-00237 #endif
-00238 
+00233     static PluginLoader *m_instance;
+00234 };
+00235 
+00236 }
+00237 
+00238 }
+00239 
+00240 _VAMP_SDK_HOSTSPACE_END(PluginLoader.h)
+00241 
+00242 #endif
+00243 
 
-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginLoader_8h.html --- a/code-doc/PluginLoader_8h.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginLoader_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + -

PluginWrapper.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-2007 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 "PluginWrapper.h"
-00038 
-00039 namespace Vamp {
-00040 
-00041 namespace HostExt {
-00042 
-00043 class PluginRateExtractor : public Plugin
-00044 {
-00045 public:
-00046     PluginRateExtractor() : Plugin(0) { }
-00047     float getRate() const { return m_inputSampleRate; }
-00048 };
-00049 
-00050 PluginWrapper::PluginWrapper(Plugin *plugin) :
-00051     Plugin(((PluginRateExtractor *)plugin)->getRate()),
-00052     m_plugin(plugin)
-00053 {
-00054 }
-00055 
-00056 PluginWrapper::~PluginWrapper()
-00057 {
-00058     delete m_plugin;
-00059 }
-00060 
-00061 bool
-00062 PluginWrapper::initialise(size_t channels, size_t stepSize, size_t blockSize)
-00063 {
-00064     return m_plugin->initialise(channels, stepSize, blockSize);
-00065 }
-00066 
-00067 void
-00068 PluginWrapper::reset()
-00069 {
-00070     m_plugin->reset();
-00071 }
-00072 
-00073 Plugin::InputDomain
-00074 PluginWrapper::getInputDomain() const
-00075 {
-00076     return m_plugin->getInputDomain();
-00077 }
-00078 
-00079 unsigned int
-00080 PluginWrapper::getVampApiVersion() const
-00081 {
-00082     return m_plugin->getVampApiVersion();
-00083 }
-00084 
-00085 std::string
-00086 PluginWrapper::getIdentifier() const
-00087 {
-00088     return m_plugin->getIdentifier();
-00089 }
-00090 
-00091 std::string
-00092 PluginWrapper::getName() const
-00093 {
-00094     return m_plugin->getName();
-00095 }
-00096 
-00097 std::string
-00098 PluginWrapper::getDescription() const
-00099 {
-00100     return m_plugin->getDescription();
-00101 }
-00102 
-00103 std::string
-00104 PluginWrapper::getMaker() const
-00105 {
-00106     return m_plugin->getMaker();
-00107 }
-00108 
-00109 int
-00110 PluginWrapper::getPluginVersion() const
-00111 {
-00112     return m_plugin->getPluginVersion();
-00113 }
-00114 
-00115 std::string
-00116 PluginWrapper::getCopyright() const
-00117 {
-00118     return m_plugin->getCopyright();
-00119 }
-00120 
-00121 PluginBase::ParameterList
-00122 PluginWrapper::getParameterDescriptors() const
-00123 {
-00124     return m_plugin->getParameterDescriptors();
-00125 }
-00126 
-00127 float
-00128 PluginWrapper::getParameter(std::string parameter) const
-00129 {
-00130     return m_plugin->getParameter(parameter);
-00131 }
-00132 
-00133 void
-00134 PluginWrapper::setParameter(std::string parameter, float value)
-00135 {
-00136     m_plugin->setParameter(parameter, value);
-00137 }
-00138 
-00139 PluginBase::ProgramList
-00140 PluginWrapper::getPrograms() const
-00141 {
-00142     return m_plugin->getPrograms();
-00143 }
-00144 
-00145 std::string
-00146 PluginWrapper::getCurrentProgram() const
-00147 {
-00148     return m_plugin->getCurrentProgram();
-00149 }
-00150 
-00151 void
-00152 PluginWrapper::selectProgram(std::string program)
-00153 {
-00154     m_plugin->selectProgram(program);
-00155 }
-00156 
-00157 size_t
-00158 PluginWrapper::getPreferredStepSize() const
-00159 {
-00160     return m_plugin->getPreferredStepSize();
-00161 }
-00162 
-00163 size_t
-00164 PluginWrapper::getPreferredBlockSize() const
-00165 {
-00166     return m_plugin->getPreferredBlockSize();
-00167 }
-00168 
-00169 size_t
-00170 PluginWrapper::getMinChannelCount() const
-00171 {
-00172     return m_plugin->getMinChannelCount();
-00173 }
-00174 
-00175 size_t PluginWrapper::getMaxChannelCount() const
-00176 {
-00177     return m_plugin->getMaxChannelCount();
-00178 }
-00179 
-00180 Plugin::OutputList
-00181 PluginWrapper::getOutputDescriptors() const
-00182 {
-00183     return m_plugin->getOutputDescriptors();
-00184 }
-00185 
-00186 Plugin::FeatureSet
-00187 PluginWrapper::process(const float *const *inputBuffers, RealTime timestamp)
-00188 {
-00189     return m_plugin->process(inputBuffers, timestamp);
-00190 }
-00191 
-00192 Plugin::FeatureSet
-00193 PluginWrapper::getRemainingFeatures()
-00194 {
-00195     return m_plugin->getRemainingFeatures();
-00196 }
-00197 
-00198 }
-00199 
-00200 }
-00201 
-
-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginWrapper_8cpp.html --- a/code-doc/PluginWrapper_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ - - -VampPluginSDK: PluginWrapper.cpp File Reference - - - - - -
-

PluginWrapper.cpp File Reference

-

- -

-Go to the source code of this file. - - - - - - - - - -

Namespaces

namespace  Vamp
namespace  Vamp::HostExt

Classes

class  Vamp::HostExt::PluginRateExtractor
-

-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginWrapper_8h-source.html --- a/code-doc/PluginWrapper_8h-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginWrapper_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

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 /*
@@ -58,63 +58,77 @@
 00037 #ifndef _VAMP_PLUGIN_WRAPPER_H_
 00038 #define _VAMP_PLUGIN_WRAPPER_H_
 00039 
-00040 #include "vamp-sdk/Plugin.h"
-00041 
-00042 namespace Vamp {
-00043 
-00044 namespace HostExt {
-00045 
-00059 class PluginWrapper : public Plugin
-00060 {
-00061 public:
-00062     virtual ~PluginWrapper();
-00063     
-00064     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
-00065     void reset();
-00066 
-00067     InputDomain getInputDomain() const;
-00068 
-00069     unsigned int getVampApiVersion() const;
-00070     std::string getIdentifier() const;
-00071     std::string getName() const;
-00072     std::string getDescription() const;
-00073     std::string getMaker() const;
-00074     int getPluginVersion() const;
-00075     std::string getCopyright() const;
-00076 
-00077     ParameterList getParameterDescriptors() const;
-00078     float getParameter(std::string) const;
-00079     void setParameter(std::string, float);
-00080 
-00081     ProgramList getPrograms() const;
-00082     std::string getCurrentProgram() const;
-00083     void selectProgram(std::string);
-00084 
-00085     size_t getPreferredStepSize() const;
-00086     size_t getPreferredBlockSize() const;
+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 getMinChannelCount() const;
-00089     size_t getMaxChannelCount() const;
+00088     size_t getPreferredStepSize() const;
+00089     size_t getPreferredBlockSize() const;
 00090 
-00091     OutputList getOutputDescriptors() const;
-00092 
-00093     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
-00094 
-00095     FeatureSet getRemainingFeatures();
-00096 
-00097 protected:
-00098     PluginWrapper(Plugin *plugin); // I take ownership of plugin
-00099     Plugin *m_plugin;
-00100 };
-00101 
-00102 }
-00103 
-00104 }
-00105 
-00106 #endif
+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
 
-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PluginWrapper_8h.html --- a/code-doc/PluginWrapper_8h.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/PluginWrapper_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + -

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_PLUGIN_H_
-00038 #define _VAMP_PLUGIN_H_
-00039 
-00040 #include "PluginBase.h"
-00041 #include "RealTime.h"
-00042 
-00043 #include <string>
-00044 #include <vector>
-00045 #include <map>
-00046 
-00047 namespace Vamp {
-00048 
-00121 class Plugin : public PluginBase
-00122 {
-00123 public:
-00124     virtual ~Plugin() { }
-00125 
-00138     virtual bool initialise(size_t inputChannels,
-00139                             size_t stepSize,
-00140                             size_t blockSize) = 0;
-00141 
-00147     virtual void reset() = 0;
-00148 
-00149     enum InputDomain { TimeDomain, FrequencyDomain };
-00150     
-00161     virtual InputDomain getInputDomain() const = 0;
-00162 
-00171     virtual size_t getPreferredBlockSize() const { return 0; }
-00172 
-00186     virtual size_t getPreferredStepSize() const { return 0; }
-00187 
-00191     virtual size_t getMinChannelCount() const { return 1; }
-00192 
-00196     virtual size_t getMaxChannelCount() const { return 1; }
-00197 
-00198     struct OutputDescriptor
-00199     {
-00206         std::string identifier;
-00207 
-00212         std::string name;
-00213 
-00219         std::string description;
-00220 
-00224         std::string unit;
-00225 
-00231         bool hasFixedBinCount;
-00232 
-00239         size_t binCount;
-00240 
-00245         std::vector<std::string> binNames;
-00246 
-00252         bool hasKnownExtents;
-00253 
-00258         float minValue;
-00259 
-00264         float maxValue;
-00265 
-00270         bool isQuantized;
-00271 
-00277         float quantizeStep;
-00278 
-00279         enum SampleType {
-00280 
-00282             OneSamplePerStep,
-00283 
-00285             FixedSampleRate,
-00286 
-00288             VariableSampleRate
-00289         };
-00290 
-00294         SampleType sampleType;
-00295 
-00306         float sampleRate;
-00307     };
-00308 
-00309     typedef std::vector<OutputDescriptor> OutputList;
-00310 
-00316     virtual OutputList getOutputDescriptors() const = 0;
-00317 
-00318     struct Feature
-00319     {
-00325         bool hasTimestamp;
-00326 
-00332         RealTime timestamp;
-00333         
-00339         std::vector<float> values;
-00340 
-00344         std::string label;
-00345     };
-00346 
-00347     typedef std::vector<Feature> FeatureList;
-00348     typedef std::map<int, FeatureList> FeatureSet; // key is output no
-00349 
-00377     virtual FeatureSet process(const float *const *inputBuffers,
-00378                                RealTime timestamp) = 0;
-00379 
-00384     virtual FeatureSet getRemainingFeatures() = 0;
-00385 
-00391     virtual std::string getType() const { return "Feature Extraction Plugin"; }
-00392 
-00393 protected:
-00394     Plugin(float inputSampleRate) :
-00395         m_inputSampleRate(inputSampleRate) { }
-00396 
-00397     float m_inputSampleRate;
-00398 };
-00399 
-00400 }
-00401 
-00402 #endif
-00403 
-00404 
-00405 
-
-
Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/Plugin_8h.html --- a/code-doc/Plugin_8h.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ - - -VampPluginSDK: Plugin.h File Reference - - - - - -
-

Plugin.h File Reference

-

- -

-Go to the source code of this file. - - - - - - - - - - - - -

Namespaces

namespace  Vamp

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
-

-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PowerSpectrum_8cpp-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/PowerSpectrum_8cpp-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,197 @@ + + +VampPluginSDK: PowerSpectrum.cpp Source File + + + + + +
+

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 
+
+
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PowerSpectrum_8cpp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/PowerSpectrum_8cpp.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,34 @@ + + +VampPluginSDK: PowerSpectrum.cpp File Reference + + + + + +
+

PowerSpectrum.cpp File Reference

+

+ +

+Go to the source code of this file. + +
+

+
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PowerSpectrum_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/PowerSpectrum_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,99 @@ + + +VampPluginSDK: PowerSpectrum.h Source File + + + + + +
+

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
+
+
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/PowerSpectrum_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/PowerSpectrum_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,38 @@ + + +VampPluginSDK: PowerSpectrum.h File Reference + + + + + +
+

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...
+

+
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/RealTime_8cpp-source.html --- a/code-doc/RealTime_8cpp-source.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,272 +0,0 @@ - - -VampPluginSDK: RealTime.cpp Source File - - - - - - -

RealTime.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 /*
-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 #include <iostream>
-00045 
-00046 #if (__GNUC__ < 3)
-00047 #include <strstream>
-00048 #define stringstream strstream
-00049 #else
-00050 #include <sstream>
-00051 #endif
-00052 
-00053 using std::cerr;
-00054 using std::endl;
-00055 
-00056 #include "RealTime.h"
-00057 
-00058 #ifndef _WIN32
-00059 #include <sys/time.h>
-00060 #endif
-00061 
-00062 namespace Vamp {
-00063 
-00064 // A RealTime consists of two ints that must be at least 32 bits each.
-00065 // A signed 32-bit int can store values exceeding +/- 2 billion.  This
-00066 // means we can safely use our lower int for nanoseconds, as there are
-00067 // 1 billion nanoseconds in a second and we need to handle double that
-00068 // because of the implementations of addition etc that we use.
-00069 //
-00070 // The maximum valid RealTime on a 32-bit system is somewhere around
-00071 // 68 years: 999999999 nanoseconds longer than the classic Unix epoch.
-00072 
-00073 #define ONE_BILLION 1000000000
-00074 
-00075 RealTime::RealTime(int s, int n) :
-00076     sec(s), nsec(n)
-00077 {
-00078     if (sec == 0) {
-00079         while (nsec <= -ONE_BILLION) { nsec += ONE_BILLION; --sec; }
-00080         while (nsec >=  ONE_BILLION) { nsec -= ONE_BILLION; ++sec; }
-00081     } else if (sec < 0) {
-00082         while (nsec <= -ONE_BILLION) { nsec += ONE_BILLION; --sec; }
-00083         while (nsec > 0)             { nsec -= ONE_BILLION; ++sec; }
-00084     } else { 
-00085         while (nsec >=  ONE_BILLION) { nsec -= ONE_BILLION; ++sec; }
-00086         while (nsec < 0)             { nsec += ONE_BILLION; --sec; }
-00087     }
-00088 }
-00089 
-00090 RealTime
-00091 RealTime::fromSeconds(double sec)
-00092 {
-00093     return RealTime(int(sec), int((sec - int(sec)) * ONE_BILLION + 0.5));
-00094 }
-00095 
-00096 RealTime
-00097 RealTime::fromMilliseconds(int msec)
-00098 {
-00099     return RealTime(msec / 1000, (msec % 1000) * 1000000);
-00100 }
-00101 
-00102 #ifndef _WIN32
-00103 RealTime
-00104 RealTime::fromTimeval(const struct timeval &tv)
-00105 {
-00106     return RealTime(tv.tv_sec, tv.tv_usec * 1000);
-00107 }
-00108 #endif
-00109 
-00110 std::ostream &operator<<(std::ostream &out, const RealTime &rt)
-00111 {
-00112     if (rt < RealTime::zeroTime) {
-00113         out << "-";
-00114     } else {
-00115         out << " ";
-00116     }
-00117 
-00118     int s = (rt.sec < 0 ? -rt.sec : rt.sec);
-00119     int n = (rt.nsec < 0 ? -rt.nsec : rt.nsec);
-00120 
-00121     out << s << ".";
-00122 
-00123     int nn(n);
-00124     if (nn == 0) out << "00000000";
-00125     else while (nn < (ONE_BILLION / 10)) {
-00126         out << "0";
-00127         nn *= 10;
-00128     }
-00129     
-00130     out << n << "R";
-00131     return out;
-00132 }
-00133 
-00134 std::string
-00135 RealTime::toString() const
-00136 {
-00137     std::stringstream out;
-00138     out << *this;
-00139     
-00140 #if (__GNUC__ < 3)
-00141     out << std::ends;
-00142 #endif
-00143 
-00144     std::string s = out.str();
-00145 
-00146     // remove trailing R
-00147     return s.substr(0, s.length() - 1);
-00148 }
-00149 
-00150 std::string
-00151 RealTime::toText(bool fixedDp) const
-00152 {
-00153     if (*this < RealTime::zeroTime) return "-" + (-*this).toText();
-00154 
-00155     std::stringstream out;
-00156 
-00157     if (sec >= 3600) {
-00158         out << (sec / 3600) << ":";
-00159     }
-00160 
-00161     if (sec >= 60) {
-00162         out << (sec % 3600) / 60 << ":";
-00163     }
-00164 
-00165     if (sec >= 10) {
-00166         out << ((sec % 60) / 10);
-00167     }
-00168 
-00169     out << (sec % 10);
-00170     
-00171     int ms = msec();
-00172 
-00173     if (ms != 0) {
-00174         out << ".";
-00175         out << (ms / 100);
-00176         ms = ms % 100;
-00177         if (ms != 0) {
-00178             out << (ms / 10);
-00179             ms = ms % 10;
-00180         } else if (fixedDp) {
-00181             out << "0";
-00182         }
-00183         if (ms != 0) {
-00184             out << ms;
-00185         } else if (fixedDp) {
-00186             out << "0";
-00187         }
-00188     } else if (fixedDp) {
-00189         out << ".000";
-00190     }
-00191         
-00192 #if (__GNUC__ < 3)
-00193     out << std::ends;
-00194 #endif
-00195 
-00196     std::string s = out.str();
-00197 
-00198     return s;
-00199 }
-00200 
-00201 
-00202 RealTime
-00203 RealTime::operator/(int d) const
-00204 {
-00205     int secdiv = sec / d;
-00206     int secrem = sec % d;
-00207 
-00208     double nsecdiv = (double(nsec) + ONE_BILLION * double(secrem)) / d;
-00209     
-00210     return RealTime(secdiv, int(nsecdiv + 0.5));
-00211 }
-00212 
-00213 double 
-00214 RealTime::operator/(const RealTime &r) const
-00215 {
-00216     double lTotal = double(sec) * ONE_BILLION + double(nsec);
-00217     double rTotal = double(r.sec) * ONE_BILLION + double(r.nsec);
-00218     
-00219     if (rTotal == 0) return 0.0;
-00220     else return lTotal/rTotal;
-00221 }
-00222 
-00223 long
-00224 RealTime::realTime2Frame(const RealTime &time, unsigned int sampleRate)
-00225 {
-00226     if (time < zeroTime) return -realTime2Frame(-time, sampleRate);
-00227     double s = time.sec + double(time.nsec + 1) / 1000000000.0;
-00228     return long(s * sampleRate);
-00229 }
-00230 
-00231 RealTime
-00232 RealTime::frame2RealTime(long frame, unsigned int sampleRate)
-00233 {
-00234     if (frame < 0) return -frame2RealTime(-frame, sampleRate);
-00235 
-00236     RealTime rt;
-00237     rt.sec = frame / long(sampleRate);
-00238     frame -= rt.sec * long(sampleRate);
-00239     rt.nsec = (int)(((double(frame) * 1000000.0) / sampleRate) * 1000.0);
-00240     return rt;
-00241 }
-00242 
-00243 const RealTime RealTime::zeroTime(0,0);
-00244 
-00245 }
-
-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/RealTime_8cpp.html --- a/code-doc/RealTime_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ - - -VampPluginSDK: RealTime.cpp File Reference - - - - - -
-

RealTime.cpp File Reference

-

- -

-Go to the source code of this file. - - - - - - - - - - - - -

Namespaces

namespace  Vamp

Defines

#define stringstream   strstream
#define ONE_BILLION   1000000000

Functions

std::ostream & Vamp::operator<< (std::ostream &out, const RealTime &rt)
-


Define Documentation

- -
-
- - - - -
#define stringstream   strstream
-
-
- -

- -

Definition at line 48 of file RealTime.cpp.

- -

Referenced by Vamp::RealTime::toString(), and Vamp::RealTime::toText().

- -
-

- -

-
- - - - -
#define ONE_BILLION   1000000000
-
- -

-

-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/RealTime_8h-source.html --- a/code-doc/RealTime_8h-source.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ - - -VampPluginSDK: RealTime.h Source File - - - - - - -

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 namespace Vamp {
-00055 
-00063 struct RealTime
-00064 {
-00065     int sec;
-00066     int nsec;
-00067 
-00068     int usec() const { return nsec / 1000; }
-00069     int msec() const { return nsec / 1000000; }
-00070 
-00071     RealTime(): sec(0), nsec(0) {}
-00072     RealTime(int s, int n);
-00073 
-00074     RealTime(const RealTime &r) :
-00075         sec(r.sec), nsec(r.nsec) { }
-00076 
-00077     static RealTime fromSeconds(double sec);
-00078     static RealTime fromMilliseconds(int msec);
-00079 
-00080 #ifndef _WIN32
-00081     static RealTime fromTimeval(const struct timeval &);
-00082 #endif
-00083 
-00084     RealTime &operator=(const RealTime &r) {
-00085         sec = r.sec; nsec = r.nsec; return *this;
-00086     }
-00087 
-00088     RealTime operator+(const RealTime &r) const {
-00089         return RealTime(sec + r.sec, nsec + r.nsec);
-00090     }
-00091     RealTime operator-(const RealTime &r) const {
-00092         return RealTime(sec - r.sec, nsec - r.nsec);
-00093     }
-00094     RealTime operator-() const {
-00095         return RealTime(-sec, -nsec);
-00096     }
-00097 
-00098     bool operator <(const RealTime &r) const {
-00099         if (sec == r.sec) return nsec < r.nsec;
-00100         else return sec < r.sec;
-00101     }
-00102 
-00103     bool operator >(const RealTime &r) const {
-00104         if (sec == r.sec) return nsec > r.nsec;
-00105         else return sec > r.sec;
-00106     }
-00107 
-00108     bool operator==(const RealTime &r) const {
-00109         return (sec == r.sec && nsec == r.nsec);
-00110     }
-00111  
-00112     bool operator!=(const RealTime &r) const {
-00113         return !(r == *this);
-00114     }
-00115  
-00116     bool operator>=(const RealTime &r) const {
-00117         if (sec == r.sec) return nsec >= r.nsec;
-00118         else return sec >= r.sec;
-00119     }
-00120 
-00121     bool operator<=(const RealTime &r) const {
-00122         if (sec == r.sec) return nsec <= r.nsec;
-00123         else return sec <= r.sec;
-00124     }
-00125 
-00126     RealTime operator/(int d) const;
-00127 
-00131     double operator/(const RealTime &r) const;
-00132 
-00137     std::string toString() const;
-00138 
-00143     std::string toText(bool fixedDp = false) const;
-00144 
-00148     static long realTime2Frame(const RealTime &r, unsigned int sampleRate);
-00149 
-00153     static RealTime frame2RealTime(long frame, unsigned int sampleRate);
-00154 
-00155     static const RealTime zeroTime;
-00156 };
-00157 
-00158 std::ostream &operator<<(std::ostream &out, const RealTime &rt);
-00159 
-00160 }
-00161     
-00162 #endif
-
-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/RealTime_8h.html --- a/code-doc/RealTime_8h.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ - - -VampPluginSDK: RealTime.h File Reference - - - - - -
-

RealTime.h File Reference

-

- -

-Go to the source code of this file. - - - - - - - - - - - -

Namespaces

namespace  Vamp

Classes

class  Vamp::RealTime
 RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conversion functions. More...

Functions

std::ostream & Vamp::operator<< (std::ostream &out, const RealTime &rt)
-

-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/SpectralCentroid_8cpp-source.html --- a/code-doc/SpectralCentroid_8cpp-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/SpectralCentroid_8cpp-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

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 /*
@@ -62,154 +62,157 @@
 00041 using std::cerr;
 00042 using std::endl;
 00043 
-00044 #include <cmath>
+00044 #include <math.h>
 00045 
-00046 
-00047 SpectralCentroid::SpectralCentroid(float inputSampleRate) :
-00048     Plugin(inputSampleRate),
-00049     m_stepSize(0),
-00050     m_blockSize(0)
-00051 {
-00052 }
-00053 
-00054 SpectralCentroid::~SpectralCentroid()
+00046 #ifdef WIN32
+00047 #define isnan(x) false
+00048 #define isinf(x) false
+00049 #endif
+00050 
+00051 SpectralCentroid::SpectralCentroid(float inputSampleRate) :
+00052     Plugin(inputSampleRate),
+00053     m_stepSize(0),
+00054     m_blockSize(0)
 00055 {
 00056 }
 00057 
-00058 string
-00059 SpectralCentroid::getIdentifier() const
-00060 {
-00061     return "spectralcentroid";
-00062 }
-00063 
-00064 string
-00065 SpectralCentroid::getName() const
-00066 {
-00067     return "Spectral Centroid";
-00068 }
-00069 
-00070 string
-00071 SpectralCentroid::getDescription() const
-00072 {
-00073     return "Calculate the centroid frequency of the spectrum of the input signal";
-00074 }
-00075 
-00076 string
-00077 SpectralCentroid::getMaker() const
-00078 {
-00079     return "Vamp SDK Example Plugins";
-00080 }
-00081 
-00082 int
-00083 SpectralCentroid::getPluginVersion() const
-00084 {
-00085     return 2;
-00086 }
-00087 
-00088 string
-00089 SpectralCentroid::getCopyright() const
-00090 {
-00091     return "Freely redistributable (BSD license)";
-00092 }
-00093 
-00094 bool
-00095 SpectralCentroid::initialise(size_t channels, size_t stepSize, size_t blockSize)
-00096 {
-00097     if (channels < getMinChannelCount() ||
-00098         channels > getMaxChannelCount()) return false;
-00099 
-00100     m_stepSize = stepSize;
-00101     m_blockSize = blockSize;
-00102 
-00103     return true;
-00104 }
-00105 
-00106 void
-00107 SpectralCentroid::reset()
-00108 {
-00109 }
-00110 
-00111 SpectralCentroid::OutputList
-00112 SpectralCentroid::getOutputDescriptors() const
-00113 {
-00114     OutputList list;
-00115 
-00116     OutputDescriptor d;
-00117     d.identifier = "logcentroid";
-00118     d.name = "Log Frequency Centroid";
-00119     d.description = "Centroid of the log weighted frequency spectrum";
-00120     d.unit = "Hz";
-00121     d.hasFixedBinCount = true;
-00122     d.binCount = 1;
-00123     d.hasKnownExtents = false;
-00124     d.isQuantized = false;
-00125     d.sampleType = OutputDescriptor::OneSamplePerStep;
-00126     list.push_back(d);
-00127 
-00128     d.identifier = "linearcentroid";
-00129     d.name = "Linear Frequency Centroid";
-00130     d.description = "Centroid of the linear frequency spectrum";
-00131     list.push_back(d);
-00132 
-00133     return list;
-00134 }
-00135 
-00136 SpectralCentroid::FeatureSet
-00137 SpectralCentroid::process(const float *const *inputBuffers, Vamp::RealTime)
-00138 {
-00139     if (m_stepSize == 0) {
-00140         cerr << "ERROR: SpectralCentroid::process: "
-00141              << "SpectralCentroid has not been initialised"
-00142              << endl;
-00143         return FeatureSet();
-00144     }
-00145 
-00146     double numLin = 0.0, numLog = 0.0, denom = 0.0;
-00147 
-00148     for (size_t i = 1; i <= m_blockSize/2; ++i) {
-00149         double freq = (double(i) * m_inputSampleRate) / m_blockSize;
-00150         double real = inputBuffers[0][i*2];
-00151         double imag = inputBuffers[0][i*2 + 1];
-00152         double power = sqrt(real * real + imag * imag) / (m_blockSize/2);
-00153         numLin += freq * power;
-00154         numLog += log10f(freq) * power;
-00155         denom += power;
-00156     }
-00157 
-00158     FeatureSet returnFeatures;
-00159 
-00160 //    std::cerr << "power " << denom << ", block size " << m_blockSize << std::endl;
+00058 SpectralCentroid::~SpectralCentroid()
+00059 {
+00060 }
+00061 
+00062 string
+00063 SpectralCentroid::getIdentifier() const
+00064 {
+00065     return "spectralcentroid";
+00066 }
+00067 
+00068 string
+00069 SpectralCentroid::getName() const
+00070 {
+00071     return "Spectral Centroid";
+00072 }
+00073 
+00074 string
+00075 SpectralCentroid::getDescription() const
+00076 {
+00077     return "Calculate the centroid frequency of the spectrum of the input signal";
+00078 }
+00079 
+00080 string
+00081 SpectralCentroid::getMaker() const
+00082 {
+00083     return "Vamp SDK Example Plugins";
+00084 }
+00085 
+00086 int
+00087 SpectralCentroid::getPluginVersion() const
+00088 {
+00089     return 2;
+00090 }
+00091 
+00092 string
+00093 SpectralCentroid::getCopyright() const
+00094 {
+00095     return "Freely redistributable (BSD license)";
+00096 }
+00097 
+00098 bool
+00099 SpectralCentroid::initialise(size_t channels, size_t stepSize, size_t blockSize)
+00100 {
+00101     if (channels < getMinChannelCount() ||
+00102         channels > getMaxChannelCount()) return false;
+00103 
+00104     m_stepSize = stepSize;
+00105     m_blockSize = blockSize;
+00106 
+00107     return true;
+00108 }
+00109 
+00110 void
+00111 SpectralCentroid::reset()
+00112 {
+00113 }
+00114 
+00115 SpectralCentroid::OutputList
+00116 SpectralCentroid::getOutputDescriptors() const
+00117 {
+00118     OutputList list;
+00119 
+00120     OutputDescriptor d;
+00121     d.identifier = "logcentroid";
+00122     d.name = "Log Frequency Centroid";
+00123     d.description = "Centroid of the log weighted frequency spectrum";
+00124     d.unit = "Hz";
+00125     d.hasFixedBinCount = true;
+00126     d.binCount = 1;
+00127     d.hasKnownExtents = false;
+00128     d.isQuantized = false;
+00129     d.sampleType = OutputDescriptor::OneSamplePerStep;
+00130     list.push_back(d);
+00131 
+00132     d.identifier = "linearcentroid";
+00133     d.name = "Linear Frequency Centroid";
+00134     d.description = "Centroid of the linear frequency spectrum";
+00135     list.push_back(d);
+00136 
+00137     return list;
+00138 }
+00139 
+00140 SpectralCentroid::FeatureSet
+00141 SpectralCentroid::process(const float *const *inputBuffers, Vamp::RealTime timestamp)
+00142 {
+00143     if (m_stepSize == 0) {
+00144         cerr << "ERROR: SpectralCentroid::process: "
+00145              << "SpectralCentroid has not been initialised"
+00146              << endl;
+00147         return FeatureSet();
+00148     }
+00149 
+00150     double numLin = 0.0, numLog = 0.0, denom = 0.0;
+00151 
+00152     for (size_t i = 1; i <= m_blockSize/2; ++i) {
+00153         double freq = (double(i) * m_inputSampleRate) / m_blockSize;
+00154         double real = inputBuffers[0][i*2];
+00155         double imag = inputBuffers[0][i*2 + 1];
+00156         double scalemag = sqrt(real * real + imag * imag) / (m_blockSize/2);
+00157         numLin += freq * scalemag;
+00158         numLog += log10f(freq) * scalemag;
+00159         denom += scalemag;
+00160     }
 00161 
-00162     if (denom != 0.0) {
-00163         float centroidLin = float(numLin / denom);
-00164         float centroidLog = powf(10, float(numLog / denom));
-00165 
-00166         Feature feature;
-00167         feature.hasTimestamp = false;
-00168         if (!std::isnan(centroidLog) && !std::isinf(centroidLog)) {
-00169             feature.values.push_back(centroidLog);
-00170         }
-00171         returnFeatures[0].push_back(feature);
-00172 
-00173         feature.values.clear();
-00174         if (!std::isnan(centroidLin) && !std::isinf(centroidLin)) {
-00175             feature.values.push_back(centroidLin);
-00176         }
-00177         returnFeatures[1].push_back(feature);
-00178     }
-00179 
-00180     return returnFeatures;
-00181 }
+00162     FeatureSet returnFeatures;
+00163 
+00164     if (denom != 0.0) {
+00165         float centroidLin = float(numLin / denom);
+00166         float centroidLog = powf(10, float(numLog / denom));
+00167 
+00168         Feature feature;
+00169         feature.hasTimestamp = false;
+00170 
+00171         if (!isnan(centroidLog) && !isinf(centroidLog)) {
+00172             feature.values.push_back(centroidLog);
+00173         }
+00174         returnFeatures[0].push_back(feature);
+00175 
+00176         feature.values.clear();
+00177         if (!isnan(centroidLin) && !isinf(centroidLin)) {
+00178             feature.values.push_back(centroidLin);
+00179         }
+00180         returnFeatures[1].push_back(feature);
+00181     }
 00182 
-00183 SpectralCentroid::FeatureSet
-00184 SpectralCentroid::getRemainingFeatures()
-00185 {
-00186     return FeatureSet();
-00187 }
-00188 
+00183     return returnFeatures;
+00184 }
+00185 
+00186 SpectralCentroid::FeatureSet
+00187 SpectralCentroid::getRemainingFeatures()
+00188 {
+00189     return FeatureSet();
+00190 }
+00191 
 
-
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/SpectralCentroid_8cpp.html --- a/code-doc/SpectralCentroid_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/SpectralCentroid_8cpp.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

@@ -230,7 +230,7 @@

-

Definition at line 217 of file PluginBase.h.

+

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

@@ -256,7 +256,7 @@ -

Definition at line 149 of file Plugin.h.

+

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

@@ -271,14 +271,14 @@ float  inputSampleRate  )  - +

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

Definition at line 55 of file AmplitudeFollower.cpp.

@@ -294,7 +294,7 @@ (  )  - [virtual] + [virtual]
@@ -332,7 +332,7 @@ ) - [virtual] + [virtual] @@ -347,7 +347,7 @@

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.

+

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

@@ -360,7 +360,7 @@ (  )  - [virtual] + [virtual] @@ -387,7 +387,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -401,7 +401,7 @@

Definition at line 56 of file AmplitudeFollower.h.

-

References Vamp::Plugin::TimeDomain.

+

References Vamp::Plugin::TimeDomain.

@@ -414,7 +414,7 @@ (  )  - const [virtual] + const [virtual] @@ -441,7 +441,7 @@ (  )  - const [virtual] + const [virtual] @@ -467,7 +467,7 @@ (  )  - const [virtual] + const [virtual] @@ -493,7 +493,7 @@ (  )  - const [virtual] + const [virtual] @@ -518,7 +518,7 @@ (  )  - const [virtual] + const [virtual] @@ -543,7 +543,7 @@ (  )  - const [virtual] + const [virtual] @@ -568,7 +568,7 @@ (  )  - const [virtual] + const [virtual] @@ -582,7 +582,7 @@

Definition at line 128 of file AmplitudeFollower.cpp.

-

References Vamp::Plugin::OutputDescriptor::binCount, Vamp::Plugin::OutputDescriptor::description, Vamp::Plugin::OutputDescriptor::hasFixedBinCount, Vamp::Plugin::OutputDescriptor::hasKnownExtents, Vamp::Plugin::OutputDescriptor::identifier, Vamp::Plugin::OutputDescriptor::isQuantized, Vamp::Plugin::OutputDescriptor::name, Vamp::Plugin::OutputDescriptor::OneSamplePerStep, Vamp::Plugin::OutputDescriptor::sampleType, and Vamp::Plugin::OutputDescriptor::unit.

+

References Vamp::Plugin::OutputDescriptor::binCount, Vamp::Plugin::OutputDescriptor::description, Vamp::Plugin::OutputDescriptor::hasFixedBinCount, Vamp::Plugin::OutputDescriptor::hasKnownExtents, Vamp::Plugin::OutputDescriptor::identifier, Vamp::Plugin::OutputDescriptor::isQuantized, Vamp::Plugin::OutputDescriptor::name, Vamp::Plugin::OutputDescriptor::OneSamplePerStep, Vamp::Plugin::OutputDescriptor::sampleType, and Vamp::Plugin::OutputDescriptor::unit.

@@ -595,7 +595,7 @@ (  )  - const [virtual] + const [virtual] @@ -609,7 +609,7 @@

Definition at line 148 of file AmplitudeFollower.cpp.

-

References Vamp::PluginBase::ParameterDescriptor::defaultValue, Vamp::PluginBase::ParameterDescriptor::description, Vamp::PluginBase::ParameterDescriptor::identifier, Vamp::PluginBase::ParameterDescriptor::isQuantized, Vamp::PluginBase::ParameterDescriptor::maxValue, Vamp::PluginBase::ParameterDescriptor::minValue, Vamp::PluginBase::ParameterDescriptor::name, and Vamp::PluginBase::ParameterDescriptor::unit.

+

References Vamp::PluginBase::ParameterDescriptor::defaultValue, Vamp::PluginBase::ParameterDescriptor::description, Vamp::PluginBase::ParameterDescriptor::identifier, Vamp::PluginBase::ParameterDescriptor::isQuantized, Vamp::PluginBase::ParameterDescriptor::maxValue, Vamp::PluginBase::ParameterDescriptor::minValue, Vamp::PluginBase::ParameterDescriptor::name, and Vamp::PluginBase::ParameterDescriptor::unit.

@@ -623,7 +623,7 @@ std::string   )  - const [virtual] + const [virtual] @@ -660,7 +660,7 @@ ) - [virtual] + [virtual] @@ -697,7 +697,7 @@ ) - [virtual] + [virtual] @@ -706,14 +706,14 @@

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 will be the real time in seconds of the start of the supplied block of samples.

+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.

+

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

@@ -726,7 +726,7 @@ (  )  - [virtual] + [virtual] @@ -751,7 +751,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -762,11 +762,11 @@

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::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

+

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

-

Definition at line 171 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getPreferredBlockSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredBlockSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), and runPlugin().

@@ -779,7 +779,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -790,11 +790,11 @@

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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

+

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

-

Definition at line 186 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getPreferredStepSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredStepSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), and runPlugin().

@@ -807,7 +807,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -819,9 +819,9 @@

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

-

Definition at line 191 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getMinChannelCount(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), PercussionOnsetDetector::initialise(), initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), PowerSpectrum::initialise(), PercussionOnsetDetector::initialise(), FixedTempoEstimator::initialise(), initialise(), and runPlugin().

@@ -834,7 +834,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -846,9 +846,9 @@

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

-

Definition at line 196 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getMaxChannelCount(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), PercussionOnsetDetector::initialise(), initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), PowerSpectrum::initialise(), PercussionOnsetDetector::initialise(), FixedTempoEstimator::initialise(), initialise(), and runPlugin().

@@ -861,7 +861,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -873,7 +873,7 @@ Do not reimplement this function in your subclass.

Implements Vamp::PluginBase.

-

Definition at line 391 of file Plugin.h.

+

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

@@ -886,21 +886,21 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited]

-Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

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

-

Definition at line 67 of file PluginBase.h.

+

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

-

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getVampApiVersion().

+

Referenced by enumeratePlugins().

@@ -913,7 +913,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -924,11 +924,9 @@

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.

+

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

-

Definition at line 229 of file PluginBase.h.

- -

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getPrograms().

+

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

@@ -941,7 +939,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -953,9 +951,7 @@

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

-

Definition at line 234 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getCurrentProgram().

+

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

@@ -969,7 +965,7 @@ std::string   )  - [inline, virtual, inherited] + [inline, virtual, inherited] @@ -979,11 +975,9 @@ Select a program.

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

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

+

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

-

Definition at line 240 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::selectProgram().

+

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

@@ -1077,17 +1071,17 @@

-

Definition at line 397 of file Plugin.h.

+

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

-

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), initialise(), Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter(), Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

+

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), initialise(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().


The documentation for this class was generated from the following files: -
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classAmplitudeFollower__inherit__graph.map --- a/code-doc/classAmplitudeFollower__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classAmplitudeFollower__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,2 +1,2 @@ - - + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classAmplitudeFollower__inherit__graph.png Binary file code-doc/classAmplitudeFollower__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classFixedTempoEstimator-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classFixedTempoEstimator-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,72 @@ + + +VampPluginSDK: Member List + + + + + +
+

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]

+
Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classFixedTempoEstimator.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classFixedTempoEstimator.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,1028 @@ + + +VampPluginSDK: FixedTempoEstimator Class Reference + + + + + +
+

FixedTempoEstimator Class Reference

#include <FixedTempoEstimator.h> +

+

+Inheritance diagram for FixedTempoEstimator:
+
+

Inheritance graph
+ + +
[legend]
+ +

+List of all members.


Detailed Description

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

Definition at line 46 of file FixedTempoEstimator.h.

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

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

Classes

class  D
+

Member Typedef Documentation

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

+ +

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

+ +
+

+ +

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

+ +

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

+ +
+

+ +

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

+ +

Definition at line 382 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 616 of file FixedTempoEstimator.cpp.

+ +
+

+ +

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

+ +

Definition at line 622 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 676 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 685 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 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 628 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 634 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 640 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 646 of file FixedTempoEstimator.cpp.

+ +
+

+ +

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

+Get the version number of the plugin. +

+ +

Implements Vamp::PluginBase.

+ +

Definition at line 652 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 658 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 664 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 670 of file FixedTempoEstimator.cpp.

+ +

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

+ +
+

+ +

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

+Get the controllable parameters of this plugin. +

+ +

Reimplemented from Vamp::PluginBase.

+ +

Definition at line 691 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 697 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 703 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 709 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 715 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 721 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 425 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

+ +
+
+ + + + +
D* FixedTempoEstimator::m_d [protected]
+
+ +

+ +

+
+ + + + +
float Vamp::Plugin::m_inputSampleRate [protected, inherited]
+
+ +

+


The documentation for this class was generated from the following files: +
+
Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classFixedTempoEstimator_1_1D-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classFixedTempoEstimator_1_1D-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,64 @@ + + +VampPluginSDK: Member List + + + + + +
+

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

+
Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classFixedTempoEstimator_1_1D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classFixedTempoEstimator_1_1D.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,827 @@ + + +VampPluginSDK: FixedTempoEstimator::D Class Reference + + + + + +
+

FixedTempoEstimator::D Class Reference

+

+List of all members.


Detailed Description

+ +

Definition at line 49 of file FixedTempoEstimator.cpp.

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

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
+

Constructor & Destructor Documentation

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

+ +

Definition at line 98 of file FixedTempoEstimator.cpp.

+ +
+

+ +

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

+ +

Definition at line 114 of file FixedTempoEstimator.cpp.

+ +

References m_df, m_fr, m_priorMagnitudes, m_r, and m_t.

+ +
+

+


Member Function Documentation

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

+ +

Definition at line 56 of file FixedTempoEstimator.cpp.

+ +

Referenced by FixedTempoEstimator::getPreferredStepSize().

+ +
+

+ +

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

+ +

Definition at line 57 of file FixedTempoEstimator.cpp.

+ +

Referenced by getOutputDescriptors(), and FixedTempoEstimator::getPreferredBlockSize().

+ +
+

+ +

+
+ + + + + + + + +
FixedTempoEstimator::ParameterList FixedTempoEstimator::D::getParameterDescriptors (  )  const
+
+ +

+ +

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

+ +

Definition at line 158 of file FixedTempoEstimator.cpp.

+ +

References m_maxbpm, m_maxdflen, and m_minbpm.

+ +

Referenced by FixedTempoEstimator::getParameter().

+ +
+

+ +

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

+ +

Definition at line 171 of file FixedTempoEstimator.cpp.

+ +

References m_maxbpm, m_maxdflen, and m_minbpm.

+ +

Referenced by FixedTempoEstimator::setParameter().

+ +
+

+ +

+
+ + + + + + + + +
FixedTempoEstimator::OutputList FixedTempoEstimator::D::getOutputDescriptors (  )  const
+
+ +

+ +

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

+ +

Definition at line 251 of file FixedTempoEstimator.cpp.

+ +

References m_blockSize, m_df, m_dfsize, m_inputSampleRate, m_maxdflen, m_n, m_priorMagnitudes, and m_stepSize.

+ +

Referenced by FixedTempoEstimator::initialise().

+ +
+

+ +

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

+ +

Definition at line 275 of file FixedTempoEstimator.cpp.

+ +

References m_blockSize, m_df, m_dfsize, m_fr, m_lasttime, m_n, m_priorMagnitudes, m_r, m_start, and m_t.

+ +

Referenced by FixedTempoEstimator::reset().

+ +
+

+ +

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

+ +

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

+ +

Definition at line 351 of file FixedTempoEstimator.cpp.

+ +

References assembleFeatures(), calculate(), m_dfsize, and m_n.

+ +

Referenced by FixedTempoEstimator::getRemainingFeatures().

+ +
+

+ +

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

+ +

Definition at line 374 of file FixedTempoEstimator.cpp.

+ +

References lag2tempo(), m_df, m_dfsize, m_fr, m_inputSampleRate, m_n, m_r, m_stepSize, and m_t.

+ +

Referenced by getRemainingFeatures(), and process().

+ +
+

+ +

+
+ + + + + + + + +
FixedTempoEstimator::FeatureSet FixedTempoEstimator::D::assembleFeatures (  )  [private]
+
+ +

+ +

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

+ +

Definition at line 362 of file FixedTempoEstimator.cpp.

+ +

References m_inputSampleRate, and m_stepSize.

+ +

Referenced by assembleFeatures(), and calculate().

+ +
+

+ +

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

+ +

Definition at line 368 of file FixedTempoEstimator.cpp.

+ +

References m_inputSampleRate, and m_stepSize.

+ +

Referenced by assembleFeatures().

+ +
+

+


Member Data Documentation

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

+ +

Definition at line 77 of file FixedTempoEstimator.cpp.

+ +

Referenced by assembleFeatures(), calculate(), getOutputDescriptors(), initialise(), lag2tempo(), and tempo2lag().

+ +
+

+ +

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

+ +

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

+ +

Definition at line 79 of file FixedTempoEstimator.cpp.

+ +

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

+ +
+

+ +

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

+ +

Definition at line 81 of file FixedTempoEstimator.cpp.

+ +

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

+ +
+

+ +

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

+ +

Definition at line 82 of file FixedTempoEstimator.cpp.

+ +

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

+ +
+

+ +

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

+ +

Definition at line 83 of file FixedTempoEstimator.cpp.

+ +

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

+ +
+

+ +

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

+ +

Definition at line 85 of file FixedTempoEstimator.cpp.

+ +

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

+ +
+

+ +

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

+ +

Definition at line 87 of file FixedTempoEstimator.cpp.

+ +

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

+ +
+

+ +

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

+ +

Definition at line 88 of file FixedTempoEstimator.cpp.

+ +

Referenced by assembleFeatures(), calculate(), initialise(), process(), reset(), and ~D().

+ +
+

+ +

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

+ +

Definition at line 89 of file FixedTempoEstimator.cpp.

+ +

Referenced by assembleFeatures(), calculate(), reset(), and ~D().

+ +
+

+ +

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

+ +

Definition at line 90 of file FixedTempoEstimator.cpp.

+ +

Referenced by assembleFeatures(), calculate(), reset(), and ~D().

+ +
+

+ +

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

+ +

Definition at line 91 of file FixedTempoEstimator.cpp.

+ +

Referenced by assembleFeatures(), calculate(), reset(), and ~D().

+ +
+

+ +

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

+ +

Definition at line 92 of file FixedTempoEstimator.cpp.

+ +

Referenced by assembleFeatures(), calculate(), getRemainingFeatures(), initialise(), process(), and reset().

+ +
+

+ +

+ +
+ +

+ +

Definition at line 94 of file FixedTempoEstimator.cpp.

+ +

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

+ +
+

+ +

+ +
+ +

+ +

Definition at line 95 of file FixedTempoEstimator.cpp.

+ +

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

+ +
+

+


The documentation for this class was generated from the following file: +
+
Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classFixedTempoEstimator__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classFixedTempoEstimator__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,2 @@ + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classFixedTempoEstimator__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classFixedTempoEstimator__inherit__graph.md5 Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,1 @@ +521938a88f49ac027eca4d6cf9d9b54b \ No newline at end of file diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classFixedTempoEstimator__inherit__graph.png Binary file code-doc/classFixedTempoEstimator__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classPercussionOnsetDetector-members.html --- a/code-doc/classPercussionOnsetDetector-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classPercussionOnsetDetector-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

@@ -201,7 +201,7 @@

-

Definition at line 348 of file Plugin.h.

+

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

@@ -218,7 +218,7 @@

-

Definition at line 195 of file PluginBase.h.

+

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

@@ -235,7 +235,7 @@

-

Definition at line 217 of file PluginBase.h.

+

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

@@ -261,7 +261,7 @@ -

Definition at line 149 of file Plugin.h.

+

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

@@ -276,7 +276,7 @@ float  inputSampleRate  )  - + @@ -297,7 +297,7 @@ (  )  - [virtual] + [virtual] @@ -337,7 +337,7 @@ ) - [virtual] + [virtual] @@ -352,7 +352,7 @@

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.

+

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

@@ -365,7 +365,7 @@ (  )  - [virtual] + [virtual] @@ -392,7 +392,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -406,7 +406,7 @@

Definition at line 55 of file PercussionOnsetDetector.h.

-

References Vamp::Plugin::FrequencyDomain.

+

References Vamp::Plugin::FrequencyDomain.

@@ -419,7 +419,7 @@ (  )  - const [virtual] + const [virtual] @@ -446,7 +446,7 @@ (  )  - const [virtual] + const [virtual] @@ -472,7 +472,7 @@ (  )  - const [virtual] + const [virtual] @@ -498,7 +498,7 @@ (  )  - const [virtual] + const [virtual] @@ -523,7 +523,7 @@ (  )  - const [virtual] + const [virtual] @@ -548,7 +548,7 @@ (  )  - const [virtual] + const [virtual] @@ -573,7 +573,7 @@ (  )  - const [virtual] + const [virtual] @@ -599,7 +599,7 @@ (  )  - const [virtual] + const [virtual] @@ -625,7 +625,7 @@ (  )  - const [virtual] + const [virtual] @@ -639,7 +639,7 @@

Definition at line 145 of file PercussionOnsetDetector.cpp.

-

References Vamp::PluginBase::ParameterDescriptor::defaultValue, Vamp::PluginBase::ParameterDescriptor::description, Vamp::PluginBase::ParameterDescriptor::identifier, Vamp::PluginBase::ParameterDescriptor::isQuantized, Vamp::PluginBase::ParameterDescriptor::maxValue, Vamp::PluginBase::ParameterDescriptor::minValue, Vamp::PluginBase::ParameterDescriptor::name, and Vamp::PluginBase::ParameterDescriptor::unit.

+

References Vamp::PluginBase::ParameterDescriptor::defaultValue, Vamp::PluginBase::ParameterDescriptor::description, Vamp::PluginBase::ParameterDescriptor::identifier, Vamp::PluginBase::ParameterDescriptor::isQuantized, Vamp::PluginBase::ParameterDescriptor::maxValue, Vamp::PluginBase::ParameterDescriptor::minValue, Vamp::PluginBase::ParameterDescriptor::name, and Vamp::PluginBase::ParameterDescriptor::unit.

@@ -653,7 +653,7 @@ std::string   )  - const [virtual] + const [virtual] @@ -690,7 +690,7 @@ ) - [virtual] + [virtual] @@ -717,7 +717,7 @@ (  )  - const [virtual] + const [virtual] @@ -731,7 +731,7 @@

Definition at line 196 of file PercussionOnsetDetector.cpp.

-

References Vamp::Plugin::OutputDescriptor::binCount, Vamp::Plugin::OutputDescriptor::description, Vamp::Plugin::OutputDescriptor::hasFixedBinCount, Vamp::Plugin::OutputDescriptor::hasKnownExtents, Vamp::Plugin::OutputDescriptor::identifier, Vamp::Plugin::OutputDescriptor::isQuantized, Vamp::Plugin::m_inputSampleRate, Vamp::Plugin::OutputDescriptor::name, Vamp::Plugin::OutputDescriptor::OneSamplePerStep, Vamp::Plugin::OutputDescriptor::quantizeStep, Vamp::Plugin::OutputDescriptor::sampleRate, Vamp::Plugin::OutputDescriptor::sampleType, Vamp::Plugin::OutputDescriptor::unit, and Vamp::Plugin::OutputDescriptor::VariableSampleRate.

+

References Vamp::Plugin::OutputDescriptor::binCount, Vamp::Plugin::OutputDescriptor::description, Vamp::Plugin::OutputDescriptor::hasFixedBinCount, Vamp::Plugin::OutputDescriptor::hasKnownExtents, Vamp::Plugin::OutputDescriptor::identifier, Vamp::Plugin::OutputDescriptor::isQuantized, Vamp::Plugin::m_inputSampleRate, Vamp::Plugin::OutputDescriptor::name, Vamp::Plugin::OutputDescriptor::OneSamplePerStep, Vamp::Plugin::OutputDescriptor::quantizeStep, Vamp::Plugin::OutputDescriptor::sampleRate, Vamp::Plugin::OutputDescriptor::sampleType, Vamp::Plugin::OutputDescriptor::unit, and Vamp::Plugin::OutputDescriptor::VariableSampleRate.

@@ -754,7 +754,7 @@ ) - [virtual] + [virtual] @@ -763,14 +763,14 @@

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 will be the real time in seconds of the start of the supplied block of samples.

+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.

+

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.

@@ -783,7 +783,7 @@ (  )  - [virtual] + [virtual] @@ -795,7 +795,7 @@

Implements Vamp::Plugin.

-

Definition at line 281 of file PercussionOnsetDetector.cpp.

+

Definition at line 283 of file PercussionOnsetDetector.cpp.

@@ -808,7 +808,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -820,9 +820,9 @@

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

-

Definition at line 191 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getMinChannelCount(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), initialise(), AmplitudeFollower::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), PowerSpectrum::initialise(), initialise(), FixedTempoEstimator::initialise(), AmplitudeFollower::initialise(), and runPlugin().

@@ -835,7 +835,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -847,9 +847,9 @@

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

-

Definition at line 196 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getMaxChannelCount(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), initialise(), AmplitudeFollower::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), PowerSpectrum::initialise(), initialise(), FixedTempoEstimator::initialise(), AmplitudeFollower::initialise(), and runPlugin().

@@ -862,7 +862,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -874,7 +874,7 @@ Do not reimplement this function in your subclass.

Implements Vamp::PluginBase.

-

Definition at line 391 of file Plugin.h.

+

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

@@ -887,21 +887,21 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited]

-Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

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

-

Definition at line 67 of file PluginBase.h.

+

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

-

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getVampApiVersion().

+

Referenced by enumeratePlugins().

@@ -914,7 +914,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -925,11 +925,9 @@

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.

+

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

-

Definition at line 229 of file PluginBase.h.

- -

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getPrograms().

+

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

@@ -942,7 +940,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -954,9 +952,7 @@

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

-

Definition at line 234 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getCurrentProgram().

+

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

@@ -970,7 +966,7 @@ std::string   )  - [inline, virtual, inherited] + [inline, virtual, inherited] @@ -980,11 +976,9 @@ Select a program.

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

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

+

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

-

Definition at line 240 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::selectProgram().

+

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

@@ -1135,17 +1129,17 @@

-

Definition at line 397 of file Plugin.h.

+

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

-

Referenced by ZeroCrossing::getOutputDescriptors(), getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), AmplitudeFollower::initialise(), Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter(), Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter(), ZeroCrossing::process(), SpectralCentroid::process(), and process().

+

Referenced by ZeroCrossing::getOutputDescriptors(), getOutputDescriptors(), AmplitudeFollower::initialise(), ZeroCrossing::process(), SpectralCentroid::process(), and process().


The documentation for this class was generated from the following files: -
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classPercussionOnsetDetector__inherit__graph.map --- a/code-doc/classPercussionOnsetDetector__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classPercussionOnsetDetector__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,2 +1,2 @@ - - + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classPercussionOnsetDetector__inherit__graph.png Binary file code-doc/classPercussionOnsetDetector__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classPowerSpectrum-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classPowerSpectrum-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,72 @@ + + +VampPluginSDK: Member List + + + + + +
+

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]

+
Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classPowerSpectrum.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classPowerSpectrum.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,1017 @@ + + +VampPluginSDK: PowerSpectrum Class Reference + + + + + +
+

PowerSpectrum Class Reference

#include <PowerSpectrum.h> +

+

+Inheritance diagram for PowerSpectrum:
+
+

Inheritance graph
+ + +
[legend]
+ +

+List of all members.


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.

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

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
+

Member Typedef Documentation

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

+ +

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

+ +
+

+ +

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

+ +

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

+ +
+

+ +

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

+ +

Definition at line 382 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 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::OutputList PowerSpectrum::getOutputDescriptors (  )  const [virtual]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
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::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 174 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::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, and PercussionOnsetDetector.

+ +

Definition at line 189 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 425 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().

+ +
+

+ +

+
+ + + + +
float Vamp::Plugin::m_inputSampleRate [protected, inherited]
+
+ +

+


The documentation for this class was generated from the following files: +
+
Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classPowerSpectrum__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classPowerSpectrum__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,2 @@ + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classPowerSpectrum__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classPowerSpectrum__inherit__graph.md5 Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,1 @@ +7b6c37765986280671c8a1abfe3bbbf1 \ No newline at end of file diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classPowerSpectrum__inherit__graph.png Binary file code-doc/classPowerSpectrum__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classSpectralCentroid-members.html --- a/code-doc/classSpectralCentroid-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classSpectralCentroid-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

@@ -191,7 +191,7 @@

-

Definition at line 348 of file Plugin.h.

+

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

@@ -208,7 +208,7 @@

-

Definition at line 195 of file PluginBase.h.

+

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

@@ -225,7 +225,7 @@

-

Definition at line 217 of file PluginBase.h.

+

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

@@ -251,7 +251,7 @@ -

Definition at line 149 of file Plugin.h.

+

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

@@ -266,7 +266,7 @@ float  inputSampleRate  )  - + @@ -274,7 +274,7 @@

-

Definition at line 47 of file SpectralCentroid.cpp.

+

Definition at line 51 of file SpectralCentroid.cpp.

@@ -287,7 +287,7 @@ (  )  - [virtual] + [virtual] @@ -295,7 +295,7 @@

-

Definition at line 54 of file SpectralCentroid.cpp.

+

Definition at line 58 of file SpectralCentroid.cpp.

@@ -325,7 +325,7 @@ ) - [virtual] + [virtual] @@ -338,9 +338,9 @@ 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 95 of file SpectralCentroid.cpp.

+

Definition at line 99 of file SpectralCentroid.cpp.

-

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

+

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

@@ -353,7 +353,7 @@ (  )  - [virtual] + [virtual] @@ -365,7 +365,7 @@ Not called for the first initialisation (i.e. initialise must also do a reset).

Implements Vamp::Plugin.

-

Definition at line 107 of file SpectralCentroid.cpp.

+

Definition at line 111 of file SpectralCentroid.cpp.

@@ -378,7 +378,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -392,7 +392,7 @@

Definition at line 56 of file SpectralCentroid.h.

-

References Vamp::Plugin::FrequencyDomain.

+

References Vamp::Plugin::FrequencyDomain.

@@ -405,7 +405,7 @@ (  )  - const [virtual] + const [virtual] @@ -419,7 +419,7 @@ Example: "zero_crossings"

Implements Vamp::PluginBase.

-

Definition at line 59 of file SpectralCentroid.cpp.

+

Definition at line 63 of file SpectralCentroid.cpp.

@@ -432,7 +432,7 @@ (  )  - const [virtual] + const [virtual] @@ -445,7 +445,7 @@ Example: "Zero Crossings"

Implements Vamp::PluginBase.

-

Definition at line 65 of file SpectralCentroid.cpp.

+

Definition at line 69 of file SpectralCentroid.cpp.

@@ -458,7 +458,7 @@ (  )  - const [virtual] + const [virtual] @@ -471,7 +471,7 @@ Example: "Detect and count zero crossing points"

Implements Vamp::PluginBase.

-

Definition at line 71 of file SpectralCentroid.cpp.

+

Definition at line 75 of file SpectralCentroid.cpp.

@@ -484,7 +484,7 @@ (  )  - const [virtual] + const [virtual] @@ -496,7 +496,7 @@ 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 77 of file SpectralCentroid.cpp.

+

Definition at line 81 of file SpectralCentroid.cpp.

@@ -509,7 +509,7 @@ (  )  - const [virtual] + const [virtual] @@ -521,7 +521,7 @@

Implements Vamp::PluginBase.

-

Definition at line 83 of file SpectralCentroid.cpp.

+

Definition at line 87 of file SpectralCentroid.cpp.

@@ -534,7 +534,7 @@ (  )  - const [virtual] + const [virtual] @@ -546,7 +546,7 @@ This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

Implements Vamp::PluginBase.

-

Definition at line 89 of file SpectralCentroid.cpp.

+

Definition at line 93 of file SpectralCentroid.cpp.

@@ -559,7 +559,7 @@ (  )  - const [virtual] + const [virtual] @@ -571,9 +571,9 @@ 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 112 of file SpectralCentroid.cpp.

+

Definition at line 116 of file SpectralCentroid.cpp.

-

References Vamp::Plugin::OutputDescriptor::binCount, Vamp::Plugin::OutputDescriptor::description, Vamp::Plugin::OutputDescriptor::hasFixedBinCount, Vamp::Plugin::OutputDescriptor::hasKnownExtents, Vamp::Plugin::OutputDescriptor::identifier, Vamp::Plugin::OutputDescriptor::isQuantized, Vamp::Plugin::OutputDescriptor::name, Vamp::Plugin::OutputDescriptor::OneSamplePerStep, Vamp::Plugin::OutputDescriptor::sampleType, and Vamp::Plugin::OutputDescriptor::unit.

+

References Vamp::Plugin::OutputDescriptor::binCount, Vamp::Plugin::OutputDescriptor::description, Vamp::Plugin::OutputDescriptor::hasFixedBinCount, Vamp::Plugin::OutputDescriptor::hasKnownExtents, Vamp::Plugin::OutputDescriptor::identifier, Vamp::Plugin::OutputDescriptor::isQuantized, Vamp::Plugin::OutputDescriptor::name, Vamp::Plugin::OutputDescriptor::OneSamplePerStep, Vamp::Plugin::OutputDescriptor::sampleType, and Vamp::Plugin::OutputDescriptor::unit.

@@ -596,7 +596,7 @@ ) - [virtual] + [virtual] @@ -605,14 +605,14 @@

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 will be the real time in seconds of the start of the supplied block of samples.

+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 137 of file SpectralCentroid.cpp.

+

Definition at line 141 of file SpectralCentroid.cpp.

-

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

+

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

@@ -625,7 +625,7 @@ (  )  - [virtual] + [virtual] @@ -637,7 +637,7 @@

Implements Vamp::Plugin.

-

Definition at line 184 of file SpectralCentroid.cpp.

+

Definition at line 187 of file SpectralCentroid.cpp.

@@ -650,7 +650,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -661,11 +661,11 @@

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::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

+

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

-

Definition at line 171 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getPreferredBlockSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredBlockSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), and runPlugin().

@@ -678,7 +678,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -689,11 +689,11 @@

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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

+

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

-

Definition at line 186 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getPreferredStepSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredStepSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), and runPlugin().

@@ -706,7 +706,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -718,9 +718,9 @@

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

-

Definition at line 191 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getMinChannelCount(), ZeroCrossing::initialise(), initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), PercussionOnsetDetector::initialise(), AmplitudeFollower::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), ZeroCrossing::initialise(), initialise(), PowerSpectrum::initialise(), PercussionOnsetDetector::initialise(), FixedTempoEstimator::initialise(), AmplitudeFollower::initialise(), and runPlugin().

@@ -733,7 +733,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -745,9 +745,9 @@

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

-

Definition at line 196 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getMaxChannelCount(), ZeroCrossing::initialise(), initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), PercussionOnsetDetector::initialise(), AmplitudeFollower::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), ZeroCrossing::initialise(), initialise(), PowerSpectrum::initialise(), PercussionOnsetDetector::initialise(), FixedTempoEstimator::initialise(), AmplitudeFollower::initialise(), and runPlugin().

@@ -760,7 +760,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -772,7 +772,7 @@ Do not reimplement this function in your subclass.

Implements Vamp::PluginBase.

-

Definition at line 391 of file Plugin.h.

+

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

@@ -785,21 +785,21 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited]

-Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

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

-

Definition at line 67 of file PluginBase.h.

+

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

-

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getVampApiVersion().

+

Referenced by enumeratePlugins().

@@ -812,7 +812,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -822,11 +822,11 @@ Get the controllable parameters of this plugin.

-

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

+

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

-

Definition at line 200 of file PluginBase.h.

+

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

-

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getParameterDescriptors().

+

Referenced by enumeratePlugins().

@@ -840,7 +840,7 @@ std::string   )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -850,11 +850,9 @@ 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, and PercussionOnsetDetector.

+

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

-

Definition at line 208 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getParameter().

+

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

@@ -877,7 +875,7 @@ ) - [inline, virtual, inherited] + [inline, virtual, inherited] @@ -887,11 +885,9 @@ Set a named parameter.

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

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

+

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

-

Definition at line 214 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::setParameter().

+

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

@@ -904,7 +900,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -915,11 +911,9 @@

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.

+

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

-

Definition at line 229 of file PluginBase.h.

- -

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getPrograms().

+

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

@@ -932,7 +926,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -944,9 +938,7 @@

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

-

Definition at line 234 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getCurrentProgram().

+

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

@@ -960,7 +952,7 @@ std::string   )  - [inline, virtual, inherited] + [inline, virtual, inherited] @@ -970,11 +962,9 @@ Select a program.

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

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

+

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

-

Definition at line 240 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::selectProgram().

+

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

@@ -994,7 +984,7 @@

Definition at line 73 of file SpectralCentroid.h.

-

Referenced by initialise(), and process().

+

Referenced by initialise(), and process().

@@ -1013,7 +1003,7 @@

Definition at line 74 of file SpectralCentroid.h.

-

Referenced by initialise(), and process().

+

Referenced by initialise(), and process().

@@ -1030,17 +1020,17 @@

-

Definition at line 397 of file Plugin.h.

+

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

-

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), AmplitudeFollower::initialise(), Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter(), Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter(), ZeroCrossing::process(), process(), and PercussionOnsetDetector::process().

+

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), AmplitudeFollower::initialise(), ZeroCrossing::process(), process(), and PercussionOnsetDetector::process().


The documentation for this class was generated from the following files: -
Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classSpectralCentroid__inherit__graph.map --- a/code-doc/classSpectralCentroid__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classSpectralCentroid__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,2 +1,2 @@ - - + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classSpectralCentroid__inherit__graph.png Binary file code-doc/classSpectralCentroid__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

@@ -183,7 +200,7 @@

-

Definition at line 347 of file Plugin.h.

+

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

@@ -200,7 +217,7 @@

-

Definition at line 348 of file Plugin.h.

+

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

@@ -217,7 +234,7 @@

-

Definition at line 195 of file PluginBase.h.

+

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

@@ -234,7 +251,7 @@

-

Definition at line 217 of file PluginBase.h.

+

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

@@ -260,7 +277,7 @@ -

Definition at line 149 of file Plugin.h.

+

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

@@ -275,7 +292,28 @@ 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]
@@ -283,36 +321,56 @@

-

Definition at line 238 of file PluginBufferingAdapter.cpp.

- -

References m_impl, and Vamp::Plugin::m_inputSampleRate.

-

- +


Member Function Documentation

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

- -

Definition at line 244 of file PluginBufferingAdapter.cpp.

- -

References m_impl.

+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.

-


Member Function Documentation

+ +
+
+ + + + + + + + +
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.

+ +
+

@@ -321,7 +379,7 @@ bool Vamp::HostExt::PluginBufferingAdapter::initialise ( size_t  - inputChannels, + channels, @@ -338,63 +396,205 @@ ) - [virtual] + [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). +Initialise the adapter (and therefore the plugin) for the given number of channels.

-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. +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.

-

Definition at line 250 of file PluginBufferingAdapter.cpp.

- -

References Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and m_impl.

-

- +

- + - +
size_t Vamp::HostExt::PluginBufferingAdapter::getPreferredStepSize size_t Vamp::HostExt::PluginBufferingAdapter::getPluginPreferredStepSize (  )  const [virtual] 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. +Return the preferred step size of the plugin wrapped by this adapter.

-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.

- -

Definition at line 308 of file PluginBufferingAdapter.cpp.

- -

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

- +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).

- +

- + - + + +
PluginBufferingAdapter::OutputList Vamp::HostExt::PluginBufferingAdapter::getOutputDescriptors size_t Vamp::HostExt::PluginBufferingAdapter::getPluginPreferredBlockSize (  )  const [virtual] 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]
@@ -403,12 +603,8 @@

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.

- -

Definition at line 256 of file PluginBufferingAdapter.cpp.

- -

References Vamp::HostExt::PluginBufferingAdapter::Impl::getOutputDescriptors(), and m_impl.

+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.

@@ -421,7 +617,7 @@ (  )  - [virtual] + [virtual] @@ -433,18 +629,14 @@ Not called for the first initialisation (i.e. initialise must also do a reset).

Reimplemented from Vamp::HostExt::PluginWrapper.

-

Definition at line 262 of file PluginBufferingAdapter.cpp.

- -

References m_impl, and Vamp::HostExt::PluginBufferingAdapter::Impl::reset().

-

- +

- + @@ -458,7 +650,7 @@ - +
PluginBufferingAdapter::FeatureSet Vamp::HostExt::PluginBufferingAdapter::process FeatureSet Vamp::HostExt::PluginBufferingAdapter::process ( const float *const *  inputBuffers,
) [virtual] [virtual]
@@ -467,27 +659,23 @@

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 will be the real time in seconds of the start of the supplied block of samples.

+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.

- -

Definition at line 268 of file PluginBufferingAdapter.cpp.

- -

References m_impl, and Vamp::HostExt::PluginBufferingAdapter::Impl::process().

+

Reimplemented from Vamp::HostExt::PluginWrapper.

- +

- + - +
PluginBufferingAdapter::FeatureSet Vamp::HostExt::PluginBufferingAdapter::getRemainingFeatures FeatureSet Vamp::HostExt::PluginBufferingAdapter::getRemainingFeatures (  )  [virtual] [virtual]
@@ -497,24 +685,20 @@ After all blocks have been processed, calculate and return any remaining features derived from the complete input.

-

Reimplemented from Vamp::HostExt::PluginWrapper.

- -

Definition at line 275 of file PluginBufferingAdapter.cpp.

- -

References Vamp::HostExt::PluginBufferingAdapter::Impl::getRemainingFeatures(), and m_impl.

+

Reimplemented from Vamp::HostExt::PluginWrapper.

- +

- + - +
Plugin::InputDomain Vamp::HostExt::PluginWrapper::getInputDomain InputDomain Vamp::HostExt::PluginWrapper::getInputDomain (  )  const [virtual, inherited] const [virtual, inherited]
@@ -523,14 +707,10 @@

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 plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window. +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 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.

- -

Definition at line 74 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getInputDomain(), and Vamp::HostExt::PluginWrapper::m_plugin.

+

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter.

@@ -543,22 +723,18 @@ (  )  - const [virtual, inherited] + const [virtual, inherited]

-Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

Reimplemented from Vamp::PluginBase.

-

Definition at line 80 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getVampApiVersion(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -570,7 +746,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -584,10 +760,6 @@ Example: "zero_crossings"

Implements Vamp::PluginBase.

-

Definition at line 86 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getIdentifier(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -599,7 +771,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -612,10 +784,6 @@ Example: "Zero Crossings"

Implements Vamp::PluginBase.

-

Definition at line 92 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getName(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -627,7 +795,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -640,10 +808,6 @@ Example: "Detect and count zero crossing points"

Implements Vamp::PluginBase.

-

Definition at line 98 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getDescription(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -655,7 +819,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -667,10 +831,6 @@ 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 104 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getMaker(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -682,7 +842,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -694,10 +854,6 @@

Implements Vamp::PluginBase.

-

Definition at line 110 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPluginVersion(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -709,7 +865,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -721,22 +877,18 @@ This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

Implements Vamp::PluginBase.

-

Definition at line 116 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCopyright(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

- +

- + - +
PluginBase::ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors (  )  const [virtual, inherited] const [virtual, inherited]
@@ -748,10 +900,6 @@

Reimplemented from Vamp::PluginBase.

-

Definition at line 122 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameterDescriptors(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -764,7 +912,7 @@ std::string   )  - const [virtual, inherited] + const [virtual, inherited] @@ -776,59 +924,18 @@ The argument is the identifier field from that parameter's descriptor.

Reimplemented from Vamp::PluginBase.

-

Definition at line 128 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameter(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

- +

- - - - - - - - - - - - - - - - -
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.

- -

Definition at line 134 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::PluginBase::setParameter().

- -
-

- -

-
- - - + - +
PluginBase::ProgramList Vamp::HostExt::PluginWrapper::getPrograms ProgramList Vamp::HostExt::PluginWrapper::getPrograms (  )  const [virtual, inherited] const [virtual, inherited]
@@ -841,10 +948,6 @@ The programs must have unique names.

Reimplemented from Vamp::PluginBase.

-

Definition at line 140 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPrograms(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -856,7 +959,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -868,70 +971,6 @@

Reimplemented from Vamp::PluginBase.

-

Definition at line 146 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCurrentProgram(), and Vamp::HostExt::PluginWrapper::m_plugin.

- - -

- -

-
- - - - - - - - - -
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.

- -

Definition at line 152 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::PluginBase::selectProgram().

- -
-

- -

-
- - - - - - - - -
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::PluginInputDomainAdapter.

- -

Definition at line 164 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getPreferredBlockSize(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -

Referenced by getPreferredStepSize().

-

@@ -943,7 +982,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -955,10 +994,6 @@

Reimplemented from Vamp::Plugin.

-

Definition at line 170 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getMinChannelCount(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -970,7 +1005,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -982,9 +1017,34 @@

Reimplemented from Vamp::Plugin.

-

Definition at line 175 of file PluginWrapper.cpp.

+ +

+ +

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

References Vamp::Plugin::getMaxChannelCount(), and Vamp::HostExt::PluginWrapper::m_plugin.

+

+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().

@@ -997,7 +1057,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -1009,7 +1069,7 @@ Do not reimplement this function in your subclass.

Implements Vamp::PluginBase.

-

Definition at line 391 of file Plugin.h.

+

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

@@ -1019,7 +1079,7 @@

- +
Impl* Vamp::HostExt::PluginBufferingAdapter::m_impl [protected] Impl* Vamp::HostExt::PluginBufferingAdapter::m_impl [protected]
@@ -1027,9 +1087,7 @@

-

Definition at line 91 of file PluginBufferingAdapter.h.

- -

Referenced by getOutputDescriptors(), getRemainingFeatures(), initialise(), PluginBufferingAdapter(), process(), reset(), and ~PluginBufferingAdapter().

+

Definition at line 184 of file PluginBufferingAdapter.h.

@@ -1046,9 +1104,7 @@

-

Definition at line 99 of file PluginWrapper.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getCopyright(), Vamp::HostExt::PluginWrapper::getCurrentProgram(), Vamp::HostExt::PluginWrapper::getDescription(), Vamp::HostExt::PluginWrapper::getIdentifier(), Vamp::HostExt::PluginWrapper::getInputDomain(), Vamp::HostExt::PluginWrapper::getMaker(), Vamp::HostExt::PluginWrapper::getMaxChannelCount(), Vamp::HostExt::PluginWrapper::getMinChannelCount(), Vamp::HostExt::PluginWrapper::getName(), Vamp::HostExt::PluginWrapper::getOutputDescriptors(), Vamp::HostExt::PluginWrapper::getParameter(), Vamp::HostExt::PluginWrapper::getParameterDescriptors(), Vamp::HostExt::PluginWrapper::getPluginVersion(), Vamp::HostExt::PluginWrapper::getPreferredBlockSize(), Vamp::HostExt::PluginWrapper::getPreferredStepSize(), Vamp::HostExt::PluginWrapper::getPrograms(), Vamp::HostExt::PluginWrapper::getRemainingFeatures(), Vamp::HostExt::PluginWrapper::getVampApiVersion(), Vamp::HostExt::PluginWrapper::initialise(), Vamp::HostExt::PluginWrapper::process(), Vamp::HostExt::PluginWrapper::reset(), Vamp::HostExt::PluginWrapper::selectProgram(), Vamp::HostExt::PluginWrapper::setParameter(), Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter::~PluginDeletionNotifyAdapter(), and Vamp::HostExt::PluginWrapper::~PluginWrapper().

+

Definition at line 126 of file PluginWrapper.h.

@@ -1065,17 +1121,17 @@

-

Definition at line 397 of file Plugin.h.

+

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

-

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), AmplitudeFollower::initialise(), PluginBufferingAdapter(), Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

+

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), AmplitudeFollower::initialise(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

-


The documentation for this class was generated from the following files: +
The documentation for this class was generated from the following file: -
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter_1_1Impl-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter_1_1Impl-members.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ - - -VampPluginSDK: Member List - - - - - -
-

Vamp::HostExt::PluginBufferingAdapter::Impl Member List

This is the complete list of members for Vamp::HostExt::PluginBufferingAdapter::Impl, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - -
getOutputDescriptors() const Vamp::HostExt::PluginBufferingAdapter::Impl
getRemainingFeatures()Vamp::HostExt::PluginBufferingAdapter::Impl
Impl(Plugin *plugin, float inputSampleRate)Vamp::HostExt::PluginBufferingAdapter::Impl
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::HostExt::PluginBufferingAdapter::Impl
m_blockSizeVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_buffersVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_channelsVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_frameVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_inputBlockSizeVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_inputSampleRateVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_inputStepSizeVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_outputsVamp::HostExt::PluginBufferingAdapter::Impl [mutable, protected]
m_pluginVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_queueVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_rewriteOutputTimesVamp::HostExt::PluginBufferingAdapter::Impl [mutable, protected]
m_stepSizeVamp::HostExt::PluginBufferingAdapter::Impl [protected]
m_unrunVamp::HostExt::PluginBufferingAdapter::Impl [protected]
process(const float *const *inputBuffers, RealTime timestamp)Vamp::HostExt::PluginBufferingAdapter::Impl
processBlock(FeatureSet &allFeatureSets)Vamp::HostExt::PluginBufferingAdapter::Impl [protected]
reset()Vamp::HostExt::PluginBufferingAdapter::Impl
~Impl()Vamp::HostExt::PluginBufferingAdapter::Impl

-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter_1_1Impl.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter_1_1Impl.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,575 +0,0 @@ - - -VampPluginSDK: Vamp::HostExt::PluginBufferingAdapter::Impl Class Reference - - - - - -
-

Vamp::HostExt::PluginBufferingAdapter::Impl Class Reference

-

-List of all members.


Detailed Description

- -

Definition at line 50 of file PluginBufferingAdapter.cpp.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

 Impl (Plugin *plugin, float inputSampleRate)
 ~Impl ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
OutputList getOutputDescriptors () const
void reset ()
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)
FeatureSet getRemainingFeatures ()

Protected Member Functions

void processBlock (FeatureSet &allFeatureSets)

Protected Attributes

Pluginm_plugin
size_t m_inputStepSize
size_t m_inputBlockSize
size_t m_stepSize
size_t m_blockSize
size_t m_channels
vector< RingBuffer * > m_queue
float ** m_buffers
float m_inputSampleRate
long m_frame
bool m_unrun
OutputList m_outputs
std::map< int, bool > m_rewriteOutputTimes

Classes

class  RingBuffer
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
Vamp::HostExt::PluginBufferingAdapter::Impl::Impl (Plugin plugin,
float  inputSampleRate 
)
-
-
- -

- -

Definition at line 280 of file PluginBufferingAdapter.cpp.

- -

References getOutputDescriptors().

- -
-

- -

-
- - - - - - - - -
Vamp::HostExt::PluginBufferingAdapter::Impl::~Impl (  ) 
-
-
- -

- -

Definition at line 296 of file PluginBufferingAdapter.cpp.

- -

References m_buffers, m_channels, and m_queue.

- -
-

-


Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool Vamp::HostExt::PluginBufferingAdapter::Impl::initialise (size_t  channels,
size_t  stepSize,
size_t  blockSize 
)
-
- -

- -

-
- - - - - - - - -
PluginBufferingAdapter::OutputList Vamp::HostExt::PluginBufferingAdapter::Impl::getOutputDescriptors (  )  const
-
- -

- -

-
- - - - - - - - -
void Vamp::HostExt::PluginBufferingAdapter::Impl::reset (  ) 
-
-
- -

- -

Definition at line 406 of file PluginBufferingAdapter.cpp.

- -

References m_frame, m_queue, and m_unrun.

- -

Referenced by Vamp::HostExt::PluginBufferingAdapter::reset().

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
PluginBufferingAdapter::FeatureSet Vamp::HostExt::PluginBufferingAdapter::Impl::process (const float *const *  inputBuffers,
RealTime  timestamp 
)
-
- -

- -

-
- - - - - - - - -
PluginBufferingAdapter::FeatureSet Vamp::HostExt::PluginBufferingAdapter::Impl::getRemainingFeatures (  ) 
-
- -

- -

-
- - - - - - - - - -
void Vamp::HostExt::PluginBufferingAdapter::Impl::processBlock (FeatureSet allFeatureSets  )  [protected]
-
- -

-


Member Data Documentation

- -
- -
- -

- -

Definition at line 221 of file PluginBufferingAdapter.cpp.

- -

Referenced by getOutputDescriptors(), getRemainingFeatures(), initialise(), and processBlock().

- -
-

- -

- -
- -

- -

Definition at line 222 of file PluginBufferingAdapter.cpp.

- -

Referenced by initialise().

- -
-

- -

- -
- -

- -

Definition at line 223 of file PluginBufferingAdapter.cpp.

- -

Referenced by initialise(), and process().

- -
-

- -

- -
- -

- -

Definition at line 224 of file PluginBufferingAdapter.cpp.

- -

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

- -
-

- -

- -
- -

- -

Definition at line 225 of file PluginBufferingAdapter.cpp.

- -

Referenced by getRemainingFeatures(), initialise(), process(), and processBlock().

- -
-

- -

- -
- -

- -

Definition at line 226 of file PluginBufferingAdapter.cpp.

- -

Referenced by getRemainingFeatures(), initialise(), process(), processBlock(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 227 of file PluginBufferingAdapter.cpp.

- -

Referenced by getRemainingFeatures(), initialise(), process(), processBlock(), reset(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 228 of file PluginBufferingAdapter.cpp.

- -

Referenced by initialise(), processBlock(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 229 of file PluginBufferingAdapter.cpp.

- -

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

- -
-

- -

- -
- -

- -

Definition at line 230 of file PluginBufferingAdapter.cpp.

- -

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

- -
-

- -

- -
- -

- -

Definition at line 231 of file PluginBufferingAdapter.cpp.

- -

Referenced by process(), and reset().

- -
-

- -

- -
- -

- -

Definition at line 232 of file PluginBufferingAdapter.cpp.

- -

Referenced by getOutputDescriptors(), and processBlock().

- -
-

- -

-
- - - - -
std::map<int, bool> Vamp::HostExt::PluginBufferingAdapter::Impl::m_rewriteOutputTimes [mutable, protected]
-
-
- -

- -

Definition at line 233 of file PluginBufferingAdapter.cpp.

- -

Referenced by getOutputDescriptors(), and processBlock().

- -
-

-


The documentation for this class was generated from the following file: -
-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter_1_1Impl_1_1RingBuffer-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter_1_1Impl_1_1RingBuffer-members.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - - -VampPluginSDK: Member List - - - - - -
-

Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer Member List

This is the complete list of members for Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer, including all inherited members.

- - - - - - - - - - - - - - - - -
getReadSpace() const Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline]
getSize() const Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline]
getWriteSpace() const Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline]
m_bufferVamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [protected]
m_readerVamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [protected]
m_sizeVamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [protected]
m_writerVamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [protected]
operator=(const RingBuffer &)Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [private]
peek(float *destination, int n) const Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline]
reset()Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline]
RingBuffer(int n)Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline]
RingBuffer(const RingBuffer &)Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [private]
skip(int n)Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline]
write(const float *source, int n)Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline]
zero(int n)Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline]
~RingBuffer()Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer [inline, virtual]

-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter_1_1Impl_1_1RingBuffer.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter_1_1Impl_1_1RingBuffer.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,453 +0,0 @@ - - -VampPluginSDK: Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer Class Reference - - - - - -
-

Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer Class Reference

-

-List of all members.


Detailed Description

- -

Definition at line 67 of file PluginBufferingAdapter.cpp.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

 RingBuffer (int n)
virtual ~RingBuffer ()
int getSize () const
void reset ()
int getReadSpace () const
int getWriteSpace () const
int peek (float *destination, int n) const
int skip (int n)
int write (const float *source, int n)
int zero (int n)

Protected Attributes

float * m_buffer
int m_writer
int m_reader
int m_size

Private Member Functions

 RingBuffer (const RingBuffer &)
RingBufferoperator= (const RingBuffer &)
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - -
Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::RingBuffer (int  n  )  [inline]
-
-
- -

- -

Definition at line 70 of file PluginBufferingAdapter.cpp.

- -
-

- -

-
- - - - - - - - -
virtual Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::~RingBuffer (  )  [inline, virtual]
-
-
- -

- -

Definition at line 72 of file PluginBufferingAdapter.cpp.

- -

References m_buffer.

- -
-

- -

-
- - - - - - - - - -
Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::RingBuffer (const RingBuffer  )  [private]
-
-
- -

- -

-

-


Member Function Documentation

- -
-
- - - - - - - - -
int Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::getSize (  )  const [inline]
-
-
- -

- -

Definition at line 74 of file PluginBufferingAdapter.cpp.

- -

References m_size.

- -
-

- -

-
- - - - - - - - -
void Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::reset (  )  [inline]
-
-
- -

- -

Definition at line 75 of file PluginBufferingAdapter.cpp.

- -

References m_reader, and m_writer.

- -
-

- -

-
- - - - - - - - -
int Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::getReadSpace (  )  const [inline]
-
-
- -

- -

Definition at line 77 of file PluginBufferingAdapter.cpp.

- -

References m_reader, m_size, and m_writer.

- -

Referenced by peek(), and skip().

- -
-

- -

-
- - - - - - - - -
int Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::getWriteSpace (  )  const [inline]
-
-
- -

- -

Definition at line 85 of file PluginBufferingAdapter.cpp.

- -

References m_reader, m_size, and m_writer.

- -

Referenced by write(), and zero().

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::peek (float *  destination,
int  n 
) const [inline]
-
-
- -

- -

Definition at line 93 of file PluginBufferingAdapter.cpp.

- -

References getReadSpace(), m_buffer, m_reader, and m_size.

- -
-

- -

-
- - - - - - - - - -
int Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::skip (int  n  )  [inline]
-
-
- -

- -

Definition at line 127 of file PluginBufferingAdapter.cpp.

- -

References getReadSpace(), m_reader, and m_size.

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::write (const float *  source,
int  n 
) [inline]
-
-
- -

- -

Definition at line 142 of file PluginBufferingAdapter.cpp.

- -

References getWriteSpace(), m_buffer, m_size, and m_writer.

- -
-

- -

-
- - - - - - - - - -
int Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::zero (int  n  )  [inline]
-
-
- -

- -

Definition at line 177 of file PluginBufferingAdapter.cpp.

- -

References getWriteSpace(), m_buffer, m_size, and m_writer.

- -
-

- -

-
- - - - - - - - - -
RingBuffer& Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer::operator= (const RingBuffer  )  [private]
-
-
- -

- -

-

-


Member Data Documentation

- -
- -
- -

- -

Definition at line 211 of file PluginBufferingAdapter.cpp.

- -

Referenced by peek(), write(), zero(), and ~RingBuffer().

- -
-

- -

- -
- -

- -

Definition at line 212 of file PluginBufferingAdapter.cpp.

- -

Referenced by getReadSpace(), getWriteSpace(), reset(), write(), and zero().

- -
-

- -

- -
- -

- -

Definition at line 213 of file PluginBufferingAdapter.cpp.

- -

Referenced by getReadSpace(), getWriteSpace(), peek(), reset(), and skip().

- -
-

- -

- -
- -

- -

Definition at line 214 of file PluginBufferingAdapter.cpp.

- -

Referenced by getReadSpace(), getSize(), getWriteSpace(), peek(), skip(), write(), and zero().

- -
-

-


The documentation for this class was generated from the following file: -
-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.map --- a/code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,3 +1,3 @@ - - - + + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.png Binary file code-doc/classVamp_1_1HostExt_1_1PluginBufferingAdapter__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

@@ -204,7 +209,7 @@

-

Definition at line 347 of file Plugin.h.

+

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

@@ -221,7 +226,7 @@

-

Definition at line 348 of file Plugin.h.

+

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

@@ -238,7 +243,7 @@

-

Definition at line 195 of file PluginBase.h.

+

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

@@ -255,7 +260,7 @@

-

Definition at line 217 of file PluginBase.h.

+

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

@@ -281,7 +286,7 @@ -

Definition at line 149 of file Plugin.h.

+

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

@@ -296,30 +301,28 @@ Pluginplugin  )  - +

- -

Definition at line 62 of file PluginChannelAdapter.cpp.

- -

References m_impl.

- +Construct a PluginChannelAdapter wrapping the given plugin. +

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

- +

- + - +
Vamp::HostExt::PluginChannelAdapter::~PluginChannelAdapter virtual Vamp::HostExt::PluginChannelAdapter::~PluginChannelAdapter (  )  [virtual] [virtual]
@@ -327,10 +330,6 @@

-

Definition at line 68 of file PluginChannelAdapter.cpp.

- -

References m_impl.

-


Member Function Documentation

@@ -359,7 +358,7 @@ ) - [virtual] + [virtual] @@ -372,18 +371,14 @@ 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.

-

Definition at line 74 of file PluginChannelAdapter.cpp.

- -

References Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), and m_impl.

-

- +

- + @@ -397,7 +392,7 @@ - +
PluginChannelAdapter::FeatureSet Vamp::HostExt::PluginChannelAdapter::process FeatureSet Vamp::HostExt::PluginChannelAdapter::process ( const float *const *  inputBuffers,
) [virtual] [virtual]
@@ -406,14 +401,43 @@

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 will be the real time in seconds of the start of the supplied block of samples.

+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.

+

Reimplemented from Vamp::HostExt::PluginWrapper.

-

Definition at line 80 of file PluginChannelAdapter.cpp.

+
+

+ +

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

References m_impl, and Vamp::HostExt::PluginChannelAdapter::Impl::process().

+

+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.

@@ -426,7 +450,7 @@ (  )  - [virtual, inherited] + [virtual, inherited] @@ -440,22 +464,18 @@

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

-

Definition at line 68 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::Plugin::reset().

-

- +

- + - +
Plugin::InputDomain Vamp::HostExt::PluginWrapper::getInputDomain InputDomain Vamp::HostExt::PluginWrapper::getInputDomain (  )  const [virtual, inherited] const [virtual, inherited]
@@ -464,14 +484,10 @@

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 plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window. +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 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.

- -

Definition at line 74 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getInputDomain(), and Vamp::HostExt::PluginWrapper::m_plugin.

+

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter.

@@ -484,22 +500,18 @@ (  )  - const [virtual, inherited] + const [virtual, inherited]

-Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

Reimplemented from Vamp::PluginBase.

-

Definition at line 80 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getVampApiVersion(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -511,7 +523,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -525,10 +537,6 @@ Example: "zero_crossings"

Implements Vamp::PluginBase.

-

Definition at line 86 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getIdentifier(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -540,7 +548,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -553,10 +561,6 @@ Example: "Zero Crossings"

Implements Vamp::PluginBase.

-

Definition at line 92 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getName(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -568,7 +572,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -581,10 +585,6 @@ Example: "Detect and count zero crossing points"

Implements Vamp::PluginBase.

-

Definition at line 98 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getDescription(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -596,7 +596,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -608,10 +608,6 @@ 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 104 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getMaker(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -623,7 +619,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -635,10 +631,6 @@

Implements Vamp::PluginBase.

-

Definition at line 110 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPluginVersion(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -650,7 +642,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -662,22 +654,18 @@ This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

Implements Vamp::PluginBase.

-

Definition at line 116 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCopyright(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

- +

- + - +
PluginBase::ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors (  )  const [virtual, inherited] const [virtual, inherited]
@@ -689,10 +677,6 @@

Reimplemented from Vamp::PluginBase.

-

Definition at line 122 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameterDescriptors(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -705,7 +689,7 @@ std::string   )  - const [virtual, inherited] + const [virtual, inherited] @@ -717,10 +701,6 @@ The argument is the identifier field from that parameter's descriptor.

Reimplemented from Vamp::PluginBase.

-

Definition at line 128 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameter(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -742,7 +722,7 @@ ) - [virtual, inherited] + [virtual, inherited] @@ -754,22 +734,20 @@ The first argument is the identifier field from that parameter's descriptor.

Reimplemented from Vamp::PluginBase.

-

Definition at line 134 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::PluginBase::setParameter().

+

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

- +

- + - +
PluginBase::ProgramList Vamp::HostExt::PluginWrapper::getPrograms ProgramList Vamp::HostExt::PluginWrapper::getPrograms (  )  const [virtual, inherited] const [virtual, inherited]
@@ -782,10 +760,6 @@ The programs must have unique names.

Reimplemented from Vamp::PluginBase.

-

Definition at line 140 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPrograms(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -797,7 +771,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -809,10 +783,6 @@

Reimplemented from Vamp::PluginBase.

-

Definition at line 146 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCurrentProgram(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -825,7 +795,7 @@ std::string   )  - [virtual, inherited] + [virtual, inherited] @@ -837,9 +807,7 @@ (If the given program name is not one of the available programs, do nothing.)

Reimplemented from Vamp::PluginBase.

-

Definition at line 152 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::PluginBase::selectProgram().

+

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

@@ -852,14 +820,14 @@ (  )  - const [virtual, inherited] + 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. +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. @@ -867,10 +835,6 @@

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

-

Definition at line 158 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getPreferredStepSize(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -882,26 +846,20 @@ (  )  - const [virtual, inherited] + const [virtual, inherited]

-Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function). +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::PluginInputDomainAdapter.

- -

Definition at line 164 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getPreferredBlockSize(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -

Referenced by Vamp::HostExt::PluginBufferingAdapter::getPreferredStepSize().

+

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

@@ -914,7 +872,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -926,10 +884,6 @@

Reimplemented from Vamp::Plugin.

-

Definition at line 170 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getMinChannelCount(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -941,7 +895,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -953,22 +907,18 @@

Reimplemented from Vamp::Plugin.

-

Definition at line 175 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getMaxChannelCount(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

- +

- + - +
Plugin::OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors (  )  const [virtual, inherited] const [virtual, inherited]
@@ -977,27 +927,23 @@

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. +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.

- -

Definition at line 181 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getOutputDescriptors(), and Vamp::HostExt::PluginWrapper::m_plugin.

+

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

- +

- + - +
Plugin::FeatureSet Vamp::HostExt::PluginWrapper::getRemainingFeatures FeatureSet Vamp::HostExt::PluginWrapper::getRemainingFeatures (  )  [virtual, inherited] [virtual, inherited]
@@ -1009,11 +955,36 @@

Implements Vamp::Plugin.

-

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+

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

-

Definition at line 193 of file PluginWrapper.cpp.

+
+

+ +

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

References Vamp::Plugin::getRemainingFeatures(), and Vamp::HostExt::PluginWrapper::m_plugin.

+

+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().

@@ -1026,7 +997,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -1038,7 +1009,7 @@ Do not reimplement this function in your subclass.

Implements Vamp::PluginBase.

-

Definition at line 391 of file Plugin.h.

+

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

@@ -1048,7 +1019,7 @@

- +
Impl* Vamp::HostExt::PluginChannelAdapter::m_impl [protected] Impl* Vamp::HostExt::PluginChannelAdapter::m_impl [protected]
@@ -1056,9 +1027,7 @@

-

Definition at line 120 of file PluginChannelAdapter.h.

- -

Referenced by initialise(), PluginChannelAdapter(), process(), and ~PluginChannelAdapter().

+

Definition at line 139 of file PluginChannelAdapter.h.

@@ -1075,9 +1044,7 @@

-

Definition at line 99 of file PluginWrapper.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getCopyright(), Vamp::HostExt::PluginWrapper::getCurrentProgram(), Vamp::HostExt::PluginWrapper::getDescription(), Vamp::HostExt::PluginWrapper::getIdentifier(), Vamp::HostExt::PluginWrapper::getInputDomain(), Vamp::HostExt::PluginWrapper::getMaker(), Vamp::HostExt::PluginWrapper::getMaxChannelCount(), Vamp::HostExt::PluginWrapper::getMinChannelCount(), Vamp::HostExt::PluginWrapper::getName(), Vamp::HostExt::PluginWrapper::getOutputDescriptors(), Vamp::HostExt::PluginWrapper::getParameter(), Vamp::HostExt::PluginWrapper::getParameterDescriptors(), Vamp::HostExt::PluginWrapper::getPluginVersion(), Vamp::HostExt::PluginWrapper::getPreferredBlockSize(), Vamp::HostExt::PluginWrapper::getPreferredStepSize(), Vamp::HostExt::PluginWrapper::getPrograms(), Vamp::HostExt::PluginWrapper::getRemainingFeatures(), Vamp::HostExt::PluginWrapper::getVampApiVersion(), Vamp::HostExt::PluginWrapper::initialise(), Vamp::HostExt::PluginWrapper::process(), Vamp::HostExt::PluginWrapper::reset(), Vamp::HostExt::PluginWrapper::selectProgram(), Vamp::HostExt::PluginWrapper::setParameter(), Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter::~PluginDeletionNotifyAdapter(), and Vamp::HostExt::PluginWrapper::~PluginWrapper().

+

Definition at line 126 of file PluginWrapper.h.

@@ -1094,17 +1061,17 @@

-

Definition at line 397 of file Plugin.h.

+

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

-

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), AmplitudeFollower::initialise(), Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter(), Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

+

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), AmplitudeFollower::initialise(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

-


The documentation for this class was generated from the following files: +
The documentation for this class was generated from the following file: -
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter_1_1Impl-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter_1_1Impl-members.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - - -VampPluginSDK: Member List - - - - - -
-

Vamp::HostExt::PluginChannelAdapter::Impl Member List

This is the complete list of members for Vamp::HostExt::PluginChannelAdapter::Impl, including all inherited members.

- - - - - - - - - - -
Impl(Plugin *plugin)Vamp::HostExt::PluginChannelAdapter::Impl
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::HostExt::PluginChannelAdapter::Impl
m_blockSizeVamp::HostExt::PluginChannelAdapter::Impl [protected]
m_bufferVamp::HostExt::PluginChannelAdapter::Impl [protected]
m_forwardPtrsVamp::HostExt::PluginChannelAdapter::Impl [protected]
m_inputChannelsVamp::HostExt::PluginChannelAdapter::Impl [protected]
m_pluginVamp::HostExt::PluginChannelAdapter::Impl [protected]
m_pluginChannelsVamp::HostExt::PluginChannelAdapter::Impl [protected]
process(const float *const *inputBuffers, RealTime timestamp)Vamp::HostExt::PluginChannelAdapter::Impl
~Impl()Vamp::HostExt::PluginChannelAdapter::Impl

-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter_1_1Impl.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter_1_1Impl.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,304 +0,0 @@ - - -VampPluginSDK: Vamp::HostExt::PluginChannelAdapter::Impl Class Reference - - - - - -
-

Vamp::HostExt::PluginChannelAdapter::Impl Class Reference

-

-List of all members.


Detailed Description

- -

Definition at line 43 of file PluginChannelAdapter.cpp.

- - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

 Impl (Plugin *plugin)
 ~Impl ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)

Protected Attributes

Pluginm_plugin
size_t m_blockSize
size_t m_inputChannels
size_t m_pluginChannels
float ** m_buffer
const float ** m_forwardPtrs
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - -
Vamp::HostExt::PluginChannelAdapter::Impl::Impl (Plugin plugin  ) 
-
-
- -

- -

Definition at line 86 of file PluginChannelAdapter.cpp.

- -
-

- -

-
- - - - - - - - -
Vamp::HostExt::PluginChannelAdapter::Impl::~Impl (  ) 
-
-
- -

- -

Definition at line 96 of file PluginChannelAdapter.cpp.

- -

References m_buffer, m_forwardPtrs, m_inputChannels, and m_pluginChannels.

- -
-

-


Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool Vamp::HostExt::PluginChannelAdapter::Impl::initialise (size_t  channels,
size_t  stepSize,
size_t  blockSize 
)
-
- -

- -

-
- - - - - - - - - - - - - - - - - - -
PluginChannelAdapter::FeatureSet Vamp::HostExt::PluginChannelAdapter::Impl::process (const float *const *  inputBuffers,
RealTime  timestamp 
)
-
- -

-


Member Data Documentation

- -
- -
- -

- -

Definition at line 54 of file PluginChannelAdapter.cpp.

- -

Referenced by initialise(), and process().

- -
-

- -

- -
- -

- -

Definition at line 55 of file PluginChannelAdapter.cpp.

- -

Referenced by initialise(), and process().

- -
-

- -

- -
- -

- -

Definition at line 56 of file PluginChannelAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 57 of file PluginChannelAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 58 of file PluginChannelAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

- -

-
- - - - -
const float** Vamp::HostExt::PluginChannelAdapter::Impl::m_forwardPtrs [protected]
-
-
- -

- -

Definition at line 59 of file PluginChannelAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

-


The documentation for this class was generated from the following file: -
-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.map --- a/code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,3 +1,3 @@ - - - + + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.png Binary file code-doc/classVamp_1_1HostExt_1_1PluginChannelAdapter__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

@@ -187,7 +192,7 @@

-

Definition at line 347 of file Plugin.h.

+

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

@@ -204,7 +209,7 @@

-

Definition at line 348 of file Plugin.h.

+

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

@@ -221,7 +226,7 @@

-

Definition at line 195 of file PluginBase.h.

+

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

@@ -238,7 +243,7 @@

-

Definition at line 217 of file PluginBase.h.

+

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

@@ -264,7 +269,7 @@ -

Definition at line 149 of file Plugin.h.

+

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

@@ -279,30 +284,28 @@ Pluginplugin  )  - +

- -

Definition at line 113 of file PluginInputDomainAdapter.cpp.

- -

References m_impl, and Vamp::Plugin::m_inputSampleRate.

- +Construct a PluginInputDomainAdapter wrapping the given plugin. +

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

- +

- + - +
Vamp::HostExt::PluginInputDomainAdapter::~PluginInputDomainAdapter virtual Vamp::HostExt::PluginInputDomainAdapter::~PluginInputDomainAdapter (  )  [virtual] [virtual]
@@ -310,10 +313,6 @@

-

Definition at line 119 of file PluginInputDomainAdapter.cpp.

- -

References m_impl.

-


Member Function Documentation

@@ -342,7 +341,7 @@ ) - [virtual] + [virtual] @@ -355,22 +354,18 @@ 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.

-

Definition at line 125 of file PluginInputDomainAdapter.cpp.

- -

References Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise(), and m_impl.

-

- +

- + - +
Plugin::InputDomain Vamp::HostExt::PluginInputDomainAdapter::getInputDomain InputDomain Vamp::HostExt::PluginInputDomainAdapter::getInputDomain (  )  const [virtual] const [virtual]
@@ -379,12 +374,8 @@

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 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.

- -

Definition at line 131 of file PluginInputDomainAdapter.cpp.

- -

References Vamp::Plugin::TimeDomain.

+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 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.

@@ -397,23 +388,19 @@ (  )  - const [virtual] + 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. +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.

-

Definition at line 137 of file PluginInputDomainAdapter.cpp.

- -

References Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredStepSize(), and m_impl.

-

@@ -425,31 +412,27 @@ (  )  - const [virtual] + const [virtual]

-Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function). +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.

-

Definition at line 143 of file PluginInputDomainAdapter.cpp.

- -

References Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredBlockSize(), and m_impl.

-

- +

- + @@ -463,7 +446,7 @@ - +
Plugin::FeatureSet Vamp::HostExt::PluginInputDomainAdapter::process FeatureSet Vamp::HostExt::PluginInputDomainAdapter::process ( const float *const *  inputBuffers,
) [virtual] [virtual]
@@ -472,14 +455,35 @@

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 will be the real time in seconds of the start of the supplied block of samples.

+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.

+

Reimplemented from Vamp::HostExt::PluginWrapper.

-

Definition at line 149 of file PluginInputDomainAdapter.cpp.

+
+

+ +

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

References m_impl, and Vamp::HostExt::PluginInputDomainAdapter::Impl::process().

+

+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, this function will return zero. The result of calling this function before initialise() has been called is undefined. +

Referenced by runPlugin().

@@ -492,7 +496,7 @@ (  )  - [virtual, inherited] + [virtual, inherited] @@ -506,10 +510,6 @@

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

-

Definition at line 68 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::Plugin::reset().

-

@@ -521,22 +521,18 @@ (  )  - const [virtual, inherited] + const [virtual, inherited]

-Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

Reimplemented from Vamp::PluginBase.

-

Definition at line 80 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getVampApiVersion(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -548,7 +544,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -562,10 +558,6 @@ Example: "zero_crossings"

Implements Vamp::PluginBase.

-

Definition at line 86 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getIdentifier(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -577,7 +569,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -590,10 +582,6 @@ Example: "Zero Crossings"

Implements Vamp::PluginBase.

-

Definition at line 92 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getName(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -605,7 +593,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -618,10 +606,6 @@ Example: "Detect and count zero crossing points"

Implements Vamp::PluginBase.

-

Definition at line 98 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getDescription(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -633,7 +617,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -645,10 +629,6 @@ 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 104 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getMaker(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -660,7 +640,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -672,10 +652,6 @@

Implements Vamp::PluginBase.

-

Definition at line 110 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPluginVersion(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -687,7 +663,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -699,22 +675,18 @@ This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

Implements Vamp::PluginBase.

-

Definition at line 116 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCopyright(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

- +

- + - +
PluginBase::ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors (  )  const [virtual, inherited] const [virtual, inherited]
@@ -726,10 +698,6 @@

Reimplemented from Vamp::PluginBase.

-

Definition at line 122 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameterDescriptors(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -742,7 +710,7 @@ std::string   )  - const [virtual, inherited] + const [virtual, inherited] @@ -754,10 +722,6 @@ The argument is the identifier field from that parameter's descriptor.

Reimplemented from Vamp::PluginBase.

-

Definition at line 128 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameter(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -779,7 +743,7 @@ ) - [virtual, inherited] + [virtual, inherited] @@ -791,22 +755,20 @@ The first argument is the identifier field from that parameter's descriptor.

Reimplemented from Vamp::PluginBase.

-

Definition at line 134 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::PluginBase::setParameter().

+

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

- +

- + - +
PluginBase::ProgramList Vamp::HostExt::PluginWrapper::getPrograms ProgramList Vamp::HostExt::PluginWrapper::getPrograms (  )  const [virtual, inherited] const [virtual, inherited]
@@ -819,10 +781,6 @@ The programs must have unique names.

Reimplemented from Vamp::PluginBase.

-

Definition at line 140 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPrograms(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -834,7 +792,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -846,10 +804,6 @@

Reimplemented from Vamp::PluginBase.

-

Definition at line 146 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCurrentProgram(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -862,7 +816,7 @@ std::string   )  - [virtual, inherited] + [virtual, inherited] @@ -874,9 +828,7 @@ (If the given program name is not one of the available programs, do nothing.)

Reimplemented from Vamp::PluginBase.

-

Definition at line 152 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::PluginBase::selectProgram().

+

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

@@ -889,7 +841,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -901,10 +853,6 @@

Reimplemented from Vamp::Plugin.

-

Definition at line 170 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getMinChannelCount(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

@@ -916,7 +864,7 @@ (  )  - const [virtual, inherited] + const [virtual, inherited] @@ -928,22 +876,18 @@

Reimplemented from Vamp::Plugin.

-

Definition at line 175 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getMaxChannelCount(), and Vamp::HostExt::PluginWrapper::m_plugin.

-

- +

- + - +
Plugin::OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors (  )  const [virtual, inherited] const [virtual, inherited]
@@ -952,27 +896,23 @@

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. +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.

- -

Definition at line 181 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getOutputDescriptors(), and Vamp::HostExt::PluginWrapper::m_plugin.

+

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

- +

- + - +
Plugin::FeatureSet Vamp::HostExt::PluginWrapper::getRemainingFeatures FeatureSet Vamp::HostExt::PluginWrapper::getRemainingFeatures (  )  [virtual, inherited] [virtual, inherited]
@@ -984,11 +924,36 @@

Implements Vamp::Plugin.

-

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+

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

-

Definition at line 193 of file PluginWrapper.cpp.

+
+

+ +

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

References Vamp::Plugin::getRemainingFeatures(), and Vamp::HostExt::PluginWrapper::m_plugin.

+

+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().

@@ -1001,7 +966,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -1013,7 +978,7 @@ Do not reimplement this function in your subclass.

Implements Vamp::PluginBase.

-

Definition at line 391 of file Plugin.h.

+

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

@@ -1023,7 +988,7 @@

- +
Impl* Vamp::HostExt::PluginInputDomainAdapter::m_impl [protected] Impl* Vamp::HostExt::PluginInputDomainAdapter::m_impl [protected]
@@ -1031,9 +996,7 @@

-

Definition at line 95 of file PluginInputDomainAdapter.h.

- -

Referenced by getPreferredBlockSize(), getPreferredStepSize(), initialise(), PluginInputDomainAdapter(), process(), and ~PluginInputDomainAdapter().

+

Definition at line 126 of file PluginInputDomainAdapter.h.

@@ -1050,9 +1013,7 @@

-

Definition at line 99 of file PluginWrapper.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getCopyright(), Vamp::HostExt::PluginWrapper::getCurrentProgram(), Vamp::HostExt::PluginWrapper::getDescription(), Vamp::HostExt::PluginWrapper::getIdentifier(), Vamp::HostExt::PluginWrapper::getInputDomain(), Vamp::HostExt::PluginWrapper::getMaker(), Vamp::HostExt::PluginWrapper::getMaxChannelCount(), Vamp::HostExt::PluginWrapper::getMinChannelCount(), Vamp::HostExt::PluginWrapper::getName(), Vamp::HostExt::PluginWrapper::getOutputDescriptors(), Vamp::HostExt::PluginWrapper::getParameter(), Vamp::HostExt::PluginWrapper::getParameterDescriptors(), Vamp::HostExt::PluginWrapper::getPluginVersion(), Vamp::HostExt::PluginWrapper::getPreferredBlockSize(), Vamp::HostExt::PluginWrapper::getPreferredStepSize(), Vamp::HostExt::PluginWrapper::getPrograms(), Vamp::HostExt::PluginWrapper::getRemainingFeatures(), Vamp::HostExt::PluginWrapper::getVampApiVersion(), Vamp::HostExt::PluginWrapper::initialise(), Vamp::HostExt::PluginWrapper::process(), Vamp::HostExt::PluginWrapper::reset(), Vamp::HostExt::PluginWrapper::selectProgram(), Vamp::HostExt::PluginWrapper::setParameter(), Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter::~PluginDeletionNotifyAdapter(), and Vamp::HostExt::PluginWrapper::~PluginWrapper().

+

Definition at line 126 of file PluginWrapper.h.

@@ -1069,17 +1030,17 @@

-

Definition at line 397 of file Plugin.h.

+

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

-

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), AmplitudeFollower::initialise(), Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter(), PluginInputDomainAdapter(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

+

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), AmplitudeFollower::initialise(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

-


The documentation for this class was generated from the following files: +
The documentation for this class was generated from the following file: -
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter_1_1Impl-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter_1_1Impl-members.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - -VampPluginSDK: Member List - - - - - -
-

Vamp::HostExt::PluginInputDomainAdapter::Impl Member List

This is the complete list of members for Vamp::HostExt::PluginInputDomainAdapter::Impl, including all inherited members.

- - - - - - - - - - - - - - - - - -
fft(unsigned int n, bool inverse, double *ri, double *ii, double *ro, double *io)Vamp::HostExt::PluginInputDomainAdapter::Impl [protected]
getPreferredBlockSize() const Vamp::HostExt::PluginInputDomainAdapter::Impl
getPreferredStepSize() const Vamp::HostExt::PluginInputDomainAdapter::Impl
Impl(Plugin *plugin, float inputSampleRate)Vamp::HostExt::PluginInputDomainAdapter::Impl
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::HostExt::PluginInputDomainAdapter::Impl
m_blockSizeVamp::HostExt::PluginInputDomainAdapter::Impl [protected]
m_channelsVamp::HostExt::PluginInputDomainAdapter::Impl [protected]
m_freqbufVamp::HostExt::PluginInputDomainAdapter::Impl [protected]
m_inputSampleRateVamp::HostExt::PluginInputDomainAdapter::Impl [protected]
m_ioVamp::HostExt::PluginInputDomainAdapter::Impl [protected]
m_pluginVamp::HostExt::PluginInputDomainAdapter::Impl [protected]
m_riVamp::HostExt::PluginInputDomainAdapter::Impl [protected]
m_roVamp::HostExt::PluginInputDomainAdapter::Impl [protected]
m_windowVamp::HostExt::PluginInputDomainAdapter::Impl [protected]
makeBlockSizeAcceptable(size_t) const Vamp::HostExt::PluginInputDomainAdapter::Impl [protected]
process(const float *const *inputBuffers, RealTime timestamp)Vamp::HostExt::PluginInputDomainAdapter::Impl
~Impl()Vamp::HostExt::PluginInputDomainAdapter::Impl

-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter_1_1Impl.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter_1_1Impl.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,518 +0,0 @@ - - -VampPluginSDK: Vamp::HostExt::PluginInputDomainAdapter::Impl Class Reference - - - - - -
-

Vamp::HostExt::PluginInputDomainAdapter::Impl Class Reference

-

-List of all members.


Detailed Description

- -

Definition at line 77 of file PluginInputDomainAdapter.cpp.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

 Impl (Plugin *plugin, float inputSampleRate)
 ~Impl ()
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
size_t getPreferredStepSize () const
size_t getPreferredBlockSize () const
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)

Protected Member Functions

void fft (unsigned int n, bool inverse, double *ri, double *ii, double *ro, double *io)
size_t makeBlockSizeAcceptable (size_t) const

Protected Attributes

Pluginm_plugin
float m_inputSampleRate
int m_channels
int m_blockSize
float ** m_freqbuf
double * m_ri
double * m_window
double * m_ro
double * m_io
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
Vamp::HostExt::PluginInputDomainAdapter::Impl::Impl (Plugin plugin,
float  inputSampleRate 
)
-
-
- -

- -

Definition at line 154 of file PluginInputDomainAdapter.cpp.

- -
-

- -

-
- - - - - - - - -
Vamp::HostExt::PluginInputDomainAdapter::Impl::~Impl (  ) 
-
-
- -

- -

Definition at line 172 of file PluginInputDomainAdapter.cpp.

- -

References m_channels, m_freqbuf, m_io, m_ri, m_ro, and m_window.

- -
-

-


Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise (size_t  channels,
size_t  stepSize,
size_t  blockSize 
)
-
- -

- -

-
- - - - - - - - -
size_t Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredStepSize (  )  const
-
- -

- -

-
- - - - - - - - -
size_t Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredBlockSize (  )  const
-
- -

- -

-
- - - - - - - - - - - - - - - - - - -
Plugin::FeatureSet Vamp::HostExt::PluginInputDomainAdapter::Impl::process (const float *const *  inputBuffers,
RealTime  timestamp 
)
-
- -

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Vamp::HostExt::PluginInputDomainAdapter::Impl::fft (unsigned int  n,
bool  inverse,
double *  ri,
double *  ii,
double *  ro,
double *  io 
) [protected]
-
-
- -

- -

Definition at line 438 of file PluginInputDomainAdapter.cpp.

- -

References M_PI.

- -

Referenced by process().

- -
-

- -

-
- - - - - - - - - -
size_t Vamp::HostExt::PluginInputDomainAdapter::Impl::makeBlockSizeAcceptable (size_t  blockSize  )  const [protected]
-
-
- -

- -

Definition at line 299 of file PluginInputDomainAdapter.cpp.

- -

Referenced by getPreferredBlockSize().

- -
-

-


Member Data Documentation

- -
- -
- -

- -

Definition at line 91 of file PluginInputDomainAdapter.cpp.

- -

Referenced by getPreferredBlockSize(), getPreferredStepSize(), initialise(), and process().

- -
-

- -

- -
- -

- -

Definition at line 92 of file PluginInputDomainAdapter.cpp.

- -

Referenced by process().

- -
-

- -

- -
- -

- -

Definition at line 93 of file PluginInputDomainAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 94 of file PluginInputDomainAdapter.cpp.

- -

Referenced by initialise(), and process().

- -
-

- -

- -
- -

- -

Definition at line 95 of file PluginInputDomainAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 97 of file PluginInputDomainAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 98 of file PluginInputDomainAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 104 of file PluginInputDomainAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

- -

- -
- -

- -

Definition at line 105 of file PluginInputDomainAdapter.cpp.

- -

Referenced by initialise(), process(), and ~Impl().

- -
-

-


The documentation for this class was generated from the following file: -
-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.map --- a/code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,3 +1,3 @@ - - - + + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.png Binary file code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginLoader-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginLoader-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

@@ -130,10 +127,10 @@

-PluginKeyList is a sequence of plugin keys, such as returned by listPlugins(). +PluginKeyList is a sequence of plugin keys, such as returned by listPlugins().

-

Definition at line 104 of file PluginLoader.h.

+

Definition at line 107 of file PluginLoader.h.

@@ -152,9 +149,9 @@ 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()
+
See also:
getPluginCategory()
-

Definition at line 116 of file PluginLoader.h.

+

Definition at line 119 of file PluginLoader.h.

@@ -194,7 +191,7 @@ -

Definition at line 166 of file PluginLoader.h.

+

Definition at line 169 of file PluginLoader.h.

@@ -208,7 +205,7 @@ (  )  - [protected] + [protected] @@ -216,24 +213,18 @@

-

Definition at line 141 of file PluginLoader.cpp.

- -

References m_impl.

- -

Referenced by getInstance().

-

- +

- + - +
Vamp::HostExt::PluginLoader::~PluginLoader virtual Vamp::HostExt::PluginLoader::~PluginLoader (  )  [protected, virtual] [protected, virtual]
@@ -241,23 +232,19 @@

-

Definition at line 146 of file PluginLoader.cpp.

- -

References m_impl.

-


Member Function Documentation

- +
- + - +
PluginLoader * Vamp::HostExt::PluginLoader::getInstance static PluginLoader* Vamp::HostExt::PluginLoader::getInstance (  )  [static] [static]
@@ -267,45 +254,37 @@ Obtain a pointer to the singleton instance of PluginLoader.

Use this to obtain your loader object. -

Definition at line 152 of file PluginLoader.cpp.

- -

References m_instance, PluginLoader(), and Vamp::HostExt::PluginLoader::Impl::setInstanceToClean().

-

- +

- + - +
vector< PluginLoader::PluginKey > Vamp::HostExt::PluginLoader::listPlugins 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. +Search for all available Vamp plugins, and return a list of them in the order in which they were found.

-

Definition at line 165 of file PluginLoader.cpp.

- -

References Vamp::HostExt::PluginLoader::Impl::listPlugins(), and m_impl.

- -

Referenced by enumeratePlugins(), and printPluginCategoryList().

+

Referenced by enumeratePlugins(), and printPluginCategoryList().

- +

- + @@ -325,14 +304,14 @@ - +
Plugin * Vamp::HostExt::PluginLoader::loadPlugin Plugin* Vamp::HostExt::PluginLoader::loadPlugin ( PluginKey  key,
)

-Load a Vamp plugin, given its identifying key. +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.

@@ -343,11 +322,7 @@

See also:
AdapterFlags, PluginInputDomainAdapter, PluginChannelAdapter
-

Definition at line 171 of file PluginLoader.cpp.

- -

References Vamp::HostExt::PluginLoader::Impl::loadPlugin(), and m_impl.

- -

Referenced by enumeratePlugins(), printPluginCategoryList(), and runPlugin().

+

Referenced by enumeratePlugins(), printPluginCategoryList(), and runPlugin().

@@ -370,61 +345,57 @@ ) - +

-Given a Vamp plugin library name and plugin identifier, return the corresponding plugin key in a form suitable for passing in to loadPlugin(). +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().

+

Referenced by runPlugin().

- +

- + - +
PluginLoader::PluginCategoryHierarchy Vamp::HostExt::PluginLoader::getPluginCategory PluginCategoryHierarchy Vamp::HostExt::PluginLoader::getPluginCategory ( PluginKey  plugin  ) 

-Return the category hierarchy for a Vamp plugin, given its identifying key. +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
-

Definition at line 185 of file PluginLoader.cpp.

- -

References Vamp::HostExt::PluginLoader::Impl::getPluginCategory(), and m_impl.

- -

Referenced by enumeratePlugins(), and printPluginCategoryList().

+

Referenced by enumeratePlugins(), and printPluginCategoryList().

- +

- + - +
string Vamp::HostExt::PluginLoader::getLibraryPathForPlugin std::string Vamp::HostExt::PluginLoader::getLibraryPathForPlugin ( PluginKey  plugin  ) 
@@ -434,11 +405,7 @@ Return the file path of the dynamic library from which the given plugin will be loaded (if available).

-

Definition at line 191 of file PluginLoader.cpp.

- -

References Vamp::HostExt::PluginLoader::Impl::getLibraryPathForPlugin(), and m_impl.

- -

Referenced by enumeratePlugins().

+

Referenced by enumeratePlugins().

@@ -448,26 +415,7 @@

- - -
Impl* Vamp::HostExt::PluginLoader::m_impl [protected]
-
-
- -

- -

Definition at line 227 of file PluginLoader.h.

- -

Referenced by getLibraryPathForPlugin(), getPluginCategory(), listPlugins(), loadPlugin(), PluginLoader(), and ~PluginLoader().

- -
-

- -

-
- - - +
PluginLoader * Vamp::HostExt::PluginLoader::m_instance = 0 [static, protected] Impl* Vamp::HostExt::PluginLoader::m_impl [protected]
@@ -477,15 +425,30 @@

Definition at line 230 of file PluginLoader.h.

-

Referenced by getInstance().

+
+

+ +

+
+ + + + +
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 files: +
The documentation for this class was generated from the following file: -
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl-members.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ - - -VampPluginSDK: Member List - - - - - -
-

Vamp::HostExt::PluginLoader::Impl Member List

This is the complete list of members for Vamp::HostExt::PluginLoader::Impl, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - -
composePluginKey(string libraryName, string identifier)Vamp::HostExt::PluginLoader::Impl
decomposePluginKey(PluginKey key, string &libraryName, string &identifier)Vamp::HostExt::PluginLoader::Impl [protected]
enumeratePlugins(PluginKey forPlugin="")Vamp::HostExt::PluginLoader::Impl [protected]
generateTaxonomy()Vamp::HostExt::PluginLoader::Impl [protected]
getLibraryPathForPlugin(PluginKey key)Vamp::HostExt::PluginLoader::Impl
getPluginCategory(PluginKey key)Vamp::HostExt::PluginLoader::Impl
Impl()Vamp::HostExt::PluginLoader::Impl
listFiles(string dir, string ext)Vamp::HostExt::PluginLoader::Impl [protected]
listPlugins()Vamp::HostExt::PluginLoader::Impl
loadLibrary(string path)Vamp::HostExt::PluginLoader::Impl [protected]
loadPlugin(PluginKey key, float inputSampleRate, int adapterFlags)Vamp::HostExt::PluginLoader::Impl
lookupInLibrary(void *handle, const char *symbol)Vamp::HostExt::PluginLoader::Impl [protected]
m_allPluginsEnumeratedVamp::HostExt::PluginLoader::Impl [protected]
m_cleanerVamp::HostExt::PluginLoader::Impl [protected, static]
m_pluginLibraryHandleMapVamp::HostExt::PluginLoader::Impl [protected]
m_pluginLibraryNameMapVamp::HostExt::PluginLoader::Impl [protected]
m_taxonomyVamp::HostExt::PluginLoader::Impl [protected]
pluginDeleted(PluginDeletionNotifyAdapter *adapter)Vamp::HostExt::PluginLoader::Impl [protected, virtual]
setInstanceToClean(PluginLoader *instance)Vamp::HostExt::PluginLoader::Impl [static]
splicePath(string a, string b)Vamp::HostExt::PluginLoader::Impl [protected]
unloadLibrary(void *handle)Vamp::HostExt::PluginLoader::Impl [protected]
~Impl()Vamp::HostExt::PluginLoader::Impl [virtual]

-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,679 +0,0 @@ - - -VampPluginSDK: Vamp::HostExt::PluginLoader::Impl Class Reference - - - - - -
-

Vamp::HostExt::PluginLoader::Impl Class Reference

-

-List of all members.


Detailed Description

- -

Definition at line 73 of file PluginLoader.cpp.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

 Impl ()
virtual ~Impl ()
PluginKeyList listPlugins ()
PluginloadPlugin (PluginKey key, float inputSampleRate, int adapterFlags)
PluginKey composePluginKey (string libraryName, string identifier)
PluginCategoryHierarchy getPluginCategory (PluginKey key)
string getLibraryPathForPlugin (PluginKey key)

Static Public Member Functions

static void setInstanceToClean (PluginLoader *instance)

Protected Member Functions

virtual void pluginDeleted (PluginDeletionNotifyAdapter *adapter)
void enumeratePlugins (PluginKey forPlugin="")
void generateTaxonomy ()
bool decomposePluginKey (PluginKey key, string &libraryName, string &identifier)
void * loadLibrary (string path)
void unloadLibrary (void *handle)
void * lookupInLibrary (void *handle, const char *symbol)
string splicePath (string a, string b)
vector< string > listFiles (string dir, string ext)

Protected Attributes

map< PluginKey, string > m_pluginLibraryNameMap
bool m_allPluginsEnumerated
map< PluginKey,
-PluginCategoryHierarchy
m_taxonomy
map< Plugin *, void * > m_pluginLibraryHandleMap

Static Protected Attributes

static InstanceCleaner m_cleaner

Classes

class  InstanceCleaner
class  PluginDeletionNotifyAdapter
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
Vamp::HostExt::PluginLoader::Impl::Impl (  ) 
-
-
- -

- -

Definition at line 196 of file PluginLoader.cpp.

- -
-

- -

-
- - - - - - - - -
Vamp::HostExt::PluginLoader::Impl::~Impl (  )  [virtual]
-
-
- -

- -

Definition at line 201 of file PluginLoader.cpp.

- -
-

-


Member Function Documentation

- -
-
- - - - - - - - -
vector< PluginLoader::PluginKey > Vamp::HostExt::PluginLoader::Impl::listPlugins (  ) 
-
-
- -

- -

Definition at line 212 of file PluginLoader.cpp.

- -

References enumeratePlugins(), m_allPluginsEnumerated, and m_pluginLibraryNameMap.

- -

Referenced by Vamp::HostExt::PluginLoader::listPlugins().

- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
Plugin * Vamp::HostExt::PluginLoader::Impl::loadPlugin (PluginKey  key,
float  inputSampleRate,
int  adapterFlags 
)
-
- -

- -

-
- - - - - - - - - - - - - - - - - - -
PluginLoader::PluginKey Vamp::HostExt::PluginLoader::Impl::composePluginKey (string  libraryName,
string  identifier 
)
-
-
- -

- -

Definition at line 299 of file PluginLoader.cpp.

- -

Referenced by enumeratePlugins().

- -
-

- -

-
- - - - - - - - - -
PluginLoader::PluginCategoryHierarchy Vamp::HostExt::PluginLoader::Impl::getPluginCategory (PluginKey  key  ) 
-
-
- -

- -

Definition at line 332 of file PluginLoader.cpp.

- -

References generateTaxonomy(), and m_taxonomy.

- -

Referenced by Vamp::HostExt::PluginLoader::getPluginCategory().

- -
-

- -

-
- - - - - - - - - -
string Vamp::HostExt::PluginLoader::Impl::getLibraryPathForPlugin (PluginKey  key  ) 
-
- -

- -

-
- - - - - - - - - -
void Vamp::HostExt::PluginLoader::Impl::setInstanceToClean (PluginLoader instance  )  [static]
-
- -

- -

-
- - - - - - - - - -
void Vamp::HostExt::PluginLoader::Impl::pluginDeleted (PluginDeletionNotifyAdapter adapter  )  [protected, virtual]
-
- -

- -

-
- - - - - - - - - -
void Vamp::HostExt::PluginLoader::Impl::enumeratePlugins (PluginKey  forPlugin = ""  )  [protected]
-
- -

- -

-
- - - - - - - - -
void Vamp::HostExt::PluginLoader::Impl::generateTaxonomy (  )  [protected]
-
-
- -

- -

Definition at line 422 of file PluginLoader.cpp.

- -

References Vamp::PluginHostAdapter::getPluginPath(), listFiles(), m_taxonomy, and splicePath().

- -

Referenced by getPluginCategory().

- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool Vamp::HostExt::PluginLoader::Impl::decomposePluginKey (PluginKey  key,
string &  libraryName,
string &  identifier 
) [protected]
-
-
- -

- -

Definition at line 317 of file PluginLoader.cpp.

- -

Referenced by enumeratePlugins(), and loadPlugin().

- -
-

- -

-
- - - - - - - - - -
void * Vamp::HostExt::PluginLoader::Impl::loadLibrary (string  path  )  [protected]
-
-
- -

- -

Definition at line 510 of file PluginLoader.cpp.

- -

Referenced by enumeratePlugins(), and loadPlugin().

- -
-

- -

-
- - - - - - - - - -
void Vamp::HostExt::PluginLoader::Impl::unloadLibrary (void *  handle  )  [protected]
-
-
- -

- -

Definition at line 530 of file PluginLoader.cpp.

- -

Referenced by enumeratePlugins(), loadPlugin(), and pluginDeleted().

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void * Vamp::HostExt::PluginLoader::Impl::lookupInLibrary (void *  handle,
const char *  symbol 
) [protected]
-
-
- -

- -

Definition at line 540 of file PluginLoader.cpp.

- -

Referenced by enumeratePlugins(), and loadPlugin().

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
string Vamp::HostExt::PluginLoader::Impl::splicePath (string  a,
string  b 
) [protected]
-
-
- -

- -

Definition at line 550 of file PluginLoader.cpp.

- -

Referenced by enumeratePlugins(), and generateTaxonomy().

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
vector< string > Vamp::HostExt::PluginLoader::Impl::listFiles (string  dir,
string  ext 
) [protected]
-
-
- -

- -

Definition at line 560 of file PluginLoader.cpp.

- -

Referenced by enumeratePlugins(), and generateTaxonomy().

- -
-

-


Member Data Documentation

- -
- -
- -

- -

Definition at line 113 of file PluginLoader.cpp.

- -

Referenced by enumeratePlugins(), getLibraryPathForPlugin(), and listPlugins().

- -
-

- -

- -
- -

- -

Definition at line 114 of file PluginLoader.cpp.

- -

Referenced by enumeratePlugins(), getLibraryPathForPlugin(), and listPlugins().

- -
-

- -

- -
- -

- -

Definition at line 117 of file PluginLoader.cpp.

- -

Referenced by generateTaxonomy(), and getPluginCategory().

- -
-

- -

- -
- -

- -

Definition at line 120 of file PluginLoader.cpp.

- -

Referenced by loadPlugin(), and pluginDeleted().

- -
-

- -

- -
- -

- -

Definition at line 132 of file PluginLoader.cpp.

- -

Referenced by setInstanceToClean().

- -
-

-


The documentation for this class was generated from the following file: -
-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1InstanceCleaner-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1InstanceCleaner-members.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ - - -VampPluginSDK: Member List - - - - - -
-

Vamp::HostExt::PluginLoader::Impl::InstanceCleaner Member List

This is the complete list of members for Vamp::HostExt::PluginLoader::Impl::InstanceCleaner, including all inherited members.

- - - - -
InstanceCleaner()Vamp::HostExt::PluginLoader::Impl::InstanceCleaner [inline]
m_instanceVamp::HostExt::PluginLoader::Impl::InstanceCleaner [protected]
setInstance(PluginLoader *instance)Vamp::HostExt::PluginLoader::Impl::InstanceCleaner [inline]
~InstanceCleaner()Vamp::HostExt::PluginLoader::Impl::InstanceCleaner [inline]

-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1InstanceCleaner.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1InstanceCleaner.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ - - -VampPluginSDK: Vamp::HostExt::PluginLoader::Impl::InstanceCleaner Class Reference - - - - - -
-

Vamp::HostExt::PluginLoader::Impl::InstanceCleaner Class Reference

-

-List of all members.


Detailed Description

- -

Definition at line 102 of file PluginLoader.cpp.

- - - - - - - - - - - - -

Public Member Functions

 InstanceCleaner ()
 ~InstanceCleaner ()
void setInstance (PluginLoader *instance)

Protected Attributes

PluginLoaderm_instance
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
Vamp::HostExt::PluginLoader::Impl::InstanceCleaner::InstanceCleaner (  )  [inline]
-
-
- -

- -

Definition at line 104 of file PluginLoader.cpp.

- -
-

- -

-
- - - - - - - - -
Vamp::HostExt::PluginLoader::Impl::InstanceCleaner::~InstanceCleaner (  )  [inline]
-
-
- -

- -

Definition at line 105 of file PluginLoader.cpp.

- -

References m_instance.

- -
-

-


Member Function Documentation

- -
-
- - - - - - - - - -
void Vamp::HostExt::PluginLoader::Impl::InstanceCleaner::setInstance (PluginLoader instance  )  [inline]
-
-
- -

- -

Definition at line 106 of file PluginLoader.cpp.

- -

References m_instance.

- -

Referenced by Vamp::HostExt::PluginLoader::Impl::setInstanceToClean().

- -
-

-


Member Data Documentation

- -
- -
- -

- -

Definition at line 108 of file PluginLoader.cpp.

- -

Referenced by setInstance(), and ~InstanceCleaner().

- -
-

-


The documentation for this class was generated from the following file: -
-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter-members.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ - - -VampPluginSDK: Member List - - - - - -
-

Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter Member List

This is the complete list of members for Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter, 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]
initialise(size_t channels, size_t stepSize, size_t blockSize)Vamp::HostExt::PluginWrapper [virtual]
InputDomain enum nameVamp::Plugin
m_inputSampleRateVamp::Plugin [protected]
m_loaderVamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter [protected]
m_pluginVamp::HostExt::PluginWrapper [protected]
OutputList typedefVamp::Plugin
ParameterList typedefVamp::PluginBase
Plugin(float inputSampleRate)Vamp::Plugin [inline, protected]
PluginDeletionNotifyAdapter(Plugin *plugin, Impl *loader)Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter
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]
~PluginDeletionNotifyAdapter()Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter [virtual]
~PluginWrapper()Vamp::HostExt::PluginWrapper [virtual]

-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1091 +0,0 @@ - - -VampPluginSDK: Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter Class Reference - - - - - -
-

Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter Class Reference

-Inheritance diagram for Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter:
-
-

Inheritance graph
- - -
[legend]
- -

-List of all members.


Detailed Description

- -

Definition at line 94 of file PluginLoader.cpp.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

 PluginDeletionNotifyAdapter (Plugin *plugin, Impl *loader)
virtual ~PluginDeletionNotifyAdapter ()
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.

Protected Attributes

Implm_loader
Pluginm_plugin
float m_inputSampleRate
-

Member Typedef Documentation

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

- -

Definition at line 309 of file Plugin.h.

- -
-

- -

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

- -

Definition at line 347 of file Plugin.h.

- -
-

- -

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

- -

Definition at line 348 of file Plugin.h.

- -
-

- -

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

- -

Definition at line 195 of file PluginBase.h.

- -
-

- -

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

- -

Definition at line 217 of file PluginBase.h.

- -
-

-


Member Enumeration Documentation

- -
-
- - - - -
enum Vamp::Plugin::InputDomain [inherited]
-
-
- -

-

Enumerator:
- - - -
TimeDomain  -
FrequencyDomain  -
-
- -

Definition at line 149 of file Plugin.h.

- -
-

-


Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter::PluginDeletionNotifyAdapter (Plugin plugin,
Impl loader 
)
-
-
- -

- -

Definition at line 613 of file PluginLoader.cpp.

- -
-

- -

-
- - - - - - - - -
Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter::~PluginDeletionNotifyAdapter (  )  [virtual]
-
- -

-


Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
bool Vamp::HostExt::PluginWrapper::initialise (size_t  inputChannels,
size_t  stepSize,
size_t  blockSize 
) [virtual, inherited]
-
-
- -

-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::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, and Vamp::HostExt::PluginInputDomainAdapter.

- -

Definition at line 62 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::initialise(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - -
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.

- -

Definition at line 68 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::Plugin::reset().

- -
-

- -

-
- - - - - - - - -
Plugin::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 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.

- -

Definition at line 74 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getInputDomain(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

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

-Get the Vamp API compatibility level of the plugin. -

- -

Reimplemented from Vamp::PluginBase.

- -

Definition at line 80 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getVampApiVersion(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - -
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.

- -

Definition at line 86 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getIdentifier(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - -
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.

- -

Definition at line 92 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getName(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - -
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.

- -

Definition at line 98 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getDescription(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - -
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.

- -

Definition at line 104 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getMaker(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

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

-Get the version number of the plugin. -

- -

Implements Vamp::PluginBase.

- -

Definition at line 110 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPluginVersion(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - -
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.

- -

Definition at line 116 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCopyright(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

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

-Get the controllable parameters of this plugin. -

- -

Reimplemented from Vamp::PluginBase.

- -

Definition at line 122 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameterDescriptors(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - - -
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.

- -

Definition at line 128 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameter(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
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.

- -

Definition at line 134 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::PluginBase::setParameter().

- -
-

- -

-
- - - - - - - - -
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.

- -

Definition at line 140 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPrograms(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

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

-Get the current program. -

- -

Reimplemented from Vamp::PluginBase.

- -

Definition at line 146 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCurrentProgram(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - - -
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.

- -

Definition at line 152 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::PluginBase::selectProgram().

- -
-

- -

-
- - - - - - - - -
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::PluginBufferingAdapter, and Vamp::HostExt::PluginInputDomainAdapter.

- -

Definition at line 158 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getPreferredStepSize(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - -
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::PluginInputDomainAdapter.

- -

Definition at line 164 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getPreferredBlockSize(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -

Referenced by Vamp::HostExt::PluginBufferingAdapter::getPreferredStepSize().

- -
-

- -

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

-Get the minimum supported number of input channels. -

- -

Reimplemented from Vamp::Plugin.

- -

Definition at line 170 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getMinChannelCount(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

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

-Get the maximum supported number of input channels. -

- -

Reimplemented from Vamp::Plugin.

- -

Definition at line 175 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getMaxChannelCount(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - -
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.

- -

Definition at line 181 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getOutputDescriptors(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
Plugin::FeatureSet Vamp::HostExt::PluginWrapper::process (const float *const *  inputBuffers,
RealTime  timestamp 
) [virtual, inherited]
-
-
- -

-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 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, and Vamp::HostExt::PluginInputDomainAdapter.

- -

Definition at line 187 of file PluginWrapper.cpp.

- -

References Vamp::HostExt::PluginWrapper::m_plugin, and Vamp::Plugin::process().

- -
-

- -

-
- - - - - - - - -
Plugin::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.

- -

Definition at line 193 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getRemainingFeatures(), and Vamp::HostExt::PluginWrapper::m_plugin.

- -
-

- -

-
- - - - - - - - -
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 391 of file Plugin.h.

- -
-

-


Member Data Documentation

- -
- -
- -

- -

Definition at line 99 of file PluginLoader.cpp.

- -

Referenced by ~PluginDeletionNotifyAdapter().

- -
-

- -

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

- -

-
- - - - -
float Vamp::Plugin::m_inputSampleRate [protected, inherited]
-
- -

-


The documentation for this class was generated from the following file: -
-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter__inherit__graph.map --- a/code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ - - - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter__inherit__graph.md5 --- a/code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter__inherit__graph.md5 Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -c7eba68e8345b6e9e6f05c0d9b5d4650 \ No newline at end of file diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter__inherit__graph.png Binary file code-doc/classVamp_1_1HostExt_1_1PluginLoader_1_1Impl_1_1PluginDeletionNotifyAdapter__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor-members.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ - - -VampPluginSDK: Member List - - - - - -
-

Vamp::HostExt::PluginRateExtractor Member List

This is the complete list of members for Vamp::HostExt::PluginRateExtractor, 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]
getRate() const Vamp::HostExt::PluginRateExtractor [inline]
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]
PluginRateExtractor()Vamp::HostExt::PluginRateExtractor [inline]
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]

-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,997 +0,0 @@ - - -VampPluginSDK: Vamp::HostExt::PluginRateExtractor Class Reference - - - - - -
-

Vamp::HostExt::PluginRateExtractor Class Reference

-Inheritance diagram for Vamp::HostExt::PluginRateExtractor:
-
-

Inheritance graph
- - -
[legend]
- -

-List of all members.


Detailed Description

- -

Definition at line 43 of file PluginWrapper.cpp.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

 PluginRateExtractor ()
float getRate () const
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 Attributes

float m_inputSampleRate
-

Member Typedef Documentation

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

- -

Definition at line 309 of file Plugin.h.

- -
-

- -

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

- -

Definition at line 347 of file Plugin.h.

- -
-

- -

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

- -

Definition at line 348 of file Plugin.h.

- -
-

- -

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

- -

Definition at line 195 of file PluginBase.h.

- -
-

- -

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

- -

Definition at line 217 of file PluginBase.h.

- -
-

-


Member Enumeration Documentation

- -
-
- - - - -
enum Vamp::Plugin::InputDomain [inherited]
-
-
- -

-

Enumerator:
- - - -
TimeDomain  -
FrequencyDomain  -
-
- -

Definition at line 149 of file Plugin.h.

- -
-

-


Constructor & Destructor Documentation

- -
-
- - - - - - - - -
Vamp::HostExt::PluginRateExtractor::PluginRateExtractor (  )  [inline]
-
-
- -

- -

Definition at line 46 of file PluginWrapper.cpp.

- -
-

-


Member Function Documentation

- -
-
- - - - - - - - -
float Vamp::HostExt::PluginRateExtractor::getRate (  )  const [inline]
-
-
- -

- -

Definition at line 47 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::m_inputSampleRate.

- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
virtual bool Vamp::Plugin::initialise (size_t  inputChannels,
size_t  stepSize,
size_t  blockSize 
) [pure virtual, inherited]
-
-
- -

-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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by Vamp::HostExt::PluginWrapper::initialise(), Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

- -
-

- -

-
- - - - - - - - -
virtual void Vamp::Plugin::reset (  )  [pure 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). -

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by Vamp::HostExt::PluginWrapper::reset().

- -
-

- -

-
- - - - - - - - -
virtual InputDomain Vamp::Plugin::getInputDomain (  )  const [pure 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 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::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getInputDomain(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredBlockSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredStepSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), Vamp::HostExt::PluginLoader::Impl::loadPlugin(), Vamp::HostExt::PluginInputDomainAdapter::Impl::process(), and runPlugin().

- -
-

- -

-
- - - - - - - - -
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::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

- -

Definition at line 171 of file Plugin.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getPreferredBlockSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredBlockSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), 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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

- -

Definition at line 186 of file Plugin.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getPreferredStepSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredStepSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

- -
-

- -

-
- - - - - - - - -
virtual size_t Vamp::Plugin::getMinChannelCount (  )  const [inline, virtual, inherited]
-
- -

- -

-
- - - - - - - - -
virtual size_t Vamp::Plugin::getMaxChannelCount (  )  const [inline, virtual, inherited]
-
- -

- -

-
- - - - - - - - -
virtual OutputList Vamp::Plugin::getOutputDescriptors (  )  const [pure virtual, inherited]
-
- -

- -

-
- - - - - - - - - - - - - - - - - - -
virtual FeatureSet Vamp::Plugin::process (const float *const *  inputBuffers,
RealTime  timestamp 
) [pure virtual, inherited]
-
-
- -

-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 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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by Vamp::HostExt::PluginWrapper::process(), Vamp::HostExt::PluginInputDomainAdapter::Impl::process(), Vamp::HostExt::PluginChannelAdapter::Impl::process(), Vamp::PluginAdapterBase::Impl::process(), Vamp::HostExt::PluginBufferingAdapter::Impl::processBlock(), and runPlugin().

- -
-

- -

-
- - - - - - - - -
virtual FeatureSet Vamp::Plugin::getRemainingFeatures (  )  [pure 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 391 of file 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 67 of file PluginBase.h.

- -

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getVampApiVersion().

- -
-

- -

-
- - - - - - - - -
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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getIdentifier(), 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getName(), 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by enumeratePlugins(), Vamp::HostExt::PluginWrapper::getDescription(), Vamp::PluginAdapterBase::Impl::getDescriptor(), 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getMaker(), 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by Vamp::HostExt::PluginWrapper::getCopyright(), and Vamp::PluginAdapterBase::Impl::getDescriptor().

- -
-

- -

-
- - - - - - - - -
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, and PercussionOnsetDetector.

- -

Definition at line 200 of file PluginBase.h.

- -

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getParameterDescriptors().

- -
-

- -

-
- - - - - - - - - -
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, and PercussionOnsetDetector.

- -

Definition at line 208 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getParameter().

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
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::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, and PercussionOnsetDetector.

- -

Definition at line 214 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::setParameter().

- -
-

- -

-
- - - - - - - - -
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 229 of file PluginBase.h.

- -

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getPrograms().

- -
-

- -

-
- - - - - - - - -
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 234 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getCurrentProgram().

- -
-

- -

-
- - - - - - - - - -
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::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.

- -

Definition at line 240 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::selectProgram().

- -
-

-


Member Data Documentation

- -
-
- - - - -
float Vamp::Plugin::m_inputSampleRate [protected, inherited]
-
- -

-


The documentation for this class was generated from the following file: -
-
Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  - -doxygen 1.5.5
- - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor__inherit__graph.map --- a/code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ - - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor__inherit__graph.md5 --- a/code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor__inherit__graph.md5 Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -61ba944fa583567e3491e7f68e1e0a9e \ No newline at end of file diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor__inherit__graph.png Binary file code-doc/classVamp_1_1HostExt_1_1PluginRateExtractor__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,94 @@ + + +VampPluginSDK: Member List + + + + + +
+

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::PluginWrapper [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]

+
Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,1230 @@ + + +VampPluginSDK: Vamp::HostExt::PluginSummarisingAdapter Class Reference + + + + + +
+

Vamp::HostExt::PluginSummarisingAdapter Class Reference

#include <vamp-hostsdk/PluginSummarisingAdapter.h> +

+

+Inheritance diagram for Vamp::HostExt::PluginSummarisingAdapter:
+
+

Inheritance graph
+ + +
[legend]
+ +

+List of all members.


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.

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

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).
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.
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.
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
+

Member Typedef Documentation

+ +
+ +
+ +

+ +

Definition at line 102 of file PluginSummarisingAdapter.h.

+ +
+

+ +

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

+ +

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

+ +
+

+ +

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

+ +

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

+ +
+

+ +

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

+ +

Definition at line 382 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 119 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 155 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 (Plugin plugin  ) 
+
+
+ +

+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.

+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
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. +

+

+ +

+
+ + + + + + + + +
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.

+ +
+

+ +

+
+ + + + + + + + +
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 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::PluginBufferingAdapter, and Vamp::HostExt::PluginInputDomainAdapter.

+ +
+

+ +

+
+ + + + + + + + +
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 425 of file vamp-sdk/Plugin.h.

+ +
+

+


Member Data Documentation

+ +
+ +
+ +

+ +

Definition at line 185 of file PluginSummarisingAdapter.h.

+ +
+

+ +

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

+ +

Definition at line 126 of file PluginWrapper.h.

+ +
+

+ +

+
+ + + + +
float Vamp::Plugin::m_inputSampleRate [protected, inherited]
+
+ +

+


The documentation for this class was generated from the following file: +
+
Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  + +doxygen 1.5.6
+ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,3 @@ + + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.md5 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.md5 Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,1 @@ +524cd5a5d3a0eab71129f2ae42f2bc43 \ No newline at end of file diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.png Binary file code-doc/classVamp_1_1HostExt_1_1PluginSummarisingAdapter__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginWrapper-members.html --- a/code-doc/classVamp_1_1HostExt_1_1PluginWrapper-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginWrapper-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +


Constructor & Destructor Documentation

- +
- + - +
Vamp::HostExt::PluginWrapper::~PluginWrapper virtual Vamp::HostExt::PluginWrapper::~PluginWrapper (  )  [virtual] [virtual]
@@ -278,10 +282,6 @@

-

Definition at line 56 of file PluginWrapper.cpp.

- -

References m_plugin.

-

@@ -294,7 +294,7 @@ Pluginplugin  )  - [protected] + [protected] @@ -302,8 +302,6 @@

-

Definition at line 50 of file PluginWrapper.cpp.

-


Member Function Documentation

@@ -332,7 +330,7 @@ ) - [virtual] + [virtual] @@ -345,11 +343,7 @@ 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::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, and Vamp::HostExt::PluginInputDomainAdapter.

- -

Definition at line 62 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::initialise(), and m_plugin.

+

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

@@ -362,7 +356,7 @@ (  )  - [virtual] + [virtual] @@ -376,22 +370,18 @@

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

-

Definition at line 68 of file PluginWrapper.cpp.

- -

References m_plugin, and Vamp::Plugin::reset().

-

- +

- + - +
Plugin::InputDomain Vamp::HostExt::PluginWrapper::getInputDomain InputDomain Vamp::HostExt::PluginWrapper::getInputDomain (  )  const [virtual] const [virtual]
@@ -400,14 +390,10 @@

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 plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window. +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 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.

- -

Definition at line 74 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getInputDomain(), and m_plugin.

+

Reimplemented in Vamp::HostExt::PluginInputDomainAdapter.

@@ -420,22 +406,18 @@ (  )  - const [virtual] + const [virtual]

-Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

Reimplemented from Vamp::PluginBase.

-

Definition at line 80 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getVampApiVersion(), and m_plugin.

-

@@ -447,7 +429,7 @@ (  )  - const [virtual] + const [virtual] @@ -461,10 +443,6 @@ Example: "zero_crossings"

Implements Vamp::PluginBase.

-

Definition at line 86 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getIdentifier(), and m_plugin.

-

@@ -476,7 +454,7 @@ (  )  - const [virtual] + const [virtual] @@ -489,10 +467,6 @@ Example: "Zero Crossings"

Implements Vamp::PluginBase.

-

Definition at line 92 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getName(), and m_plugin.

-

@@ -504,7 +478,7 @@ (  )  - const [virtual] + const [virtual] @@ -517,10 +491,6 @@ Example: "Detect and count zero crossing points"

Implements Vamp::PluginBase.

-

Definition at line 98 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getDescription(), and m_plugin.

-

@@ -532,7 +502,7 @@ (  )  - const [virtual] + const [virtual] @@ -544,10 +514,6 @@ 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 104 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getMaker(), and m_plugin.

-

@@ -559,7 +525,7 @@ (  )  - const [virtual] + const [virtual] @@ -571,10 +537,6 @@

Implements Vamp::PluginBase.

-

Definition at line 110 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPluginVersion(), and m_plugin.

-

@@ -586,7 +548,7 @@ (  )  - const [virtual] + const [virtual] @@ -598,22 +560,18 @@ This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

Implements Vamp::PluginBase.

-

Definition at line 116 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCopyright(), and m_plugin.

-

- +

- + - +
PluginBase::ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors ParameterList Vamp::HostExt::PluginWrapper::getParameterDescriptors (  )  const [virtual] const [virtual]
@@ -625,10 +583,6 @@

Reimplemented from Vamp::PluginBase.

-

Definition at line 122 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameterDescriptors(), and m_plugin.

-

@@ -641,7 +595,7 @@ std::string   )  - const [virtual] + const [virtual] @@ -653,10 +607,6 @@ The argument is the identifier field from that parameter's descriptor.

Reimplemented from Vamp::PluginBase.

-

Definition at line 128 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getParameter(), and m_plugin.

-

@@ -678,7 +628,7 @@ ) - [virtual] + [virtual] @@ -690,22 +640,20 @@ The first argument is the identifier field from that parameter's descriptor.

Reimplemented from Vamp::PluginBase.

-

Definition at line 134 of file PluginWrapper.cpp.

- -

References m_plugin, and Vamp::PluginBase::setParameter().

+

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

- +

- + - +
PluginBase::ProgramList Vamp::HostExt::PluginWrapper::getPrograms ProgramList Vamp::HostExt::PluginWrapper::getPrograms (  )  const [virtual] const [virtual]
@@ -718,10 +666,6 @@ The programs must have unique names.

Reimplemented from Vamp::PluginBase.

-

Definition at line 140 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getPrograms(), and m_plugin.

-

@@ -733,7 +677,7 @@ (  )  - const [virtual] + const [virtual] @@ -745,10 +689,6 @@

Reimplemented from Vamp::PluginBase.

-

Definition at line 146 of file PluginWrapper.cpp.

- -

References Vamp::PluginBase::getCurrentProgram(), and m_plugin.

-

@@ -761,7 +701,7 @@ std::string   )  - [virtual] + [virtual] @@ -773,9 +713,7 @@ (If the given program name is not one of the available programs, do nothing.)

Reimplemented from Vamp::PluginBase.

-

Definition at line 152 of file PluginWrapper.cpp.

- -

References m_plugin, and Vamp::PluginBase::selectProgram().

+

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

@@ -788,14 +726,14 @@ (  )  - const [virtual] + 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. +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. @@ -803,10 +741,6 @@

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

-

Definition at line 158 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getPreferredStepSize(), and m_plugin.

-

@@ -818,26 +752,20 @@ (  )  - const [virtual] + const [virtual]

-Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function). +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::PluginInputDomainAdapter.

- -

Definition at line 164 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getPreferredBlockSize(), and m_plugin.

- -

Referenced by Vamp::HostExt::PluginBufferingAdapter::getPreferredStepSize().

+

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

@@ -850,7 +778,7 @@ (  )  - const [virtual] + const [virtual] @@ -862,10 +790,6 @@

Reimplemented from Vamp::Plugin.

-

Definition at line 170 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getMinChannelCount(), and m_plugin.

-

@@ -877,7 +801,7 @@ (  )  - const [virtual] + const [virtual] @@ -889,22 +813,18 @@

Reimplemented from Vamp::Plugin.

-

Definition at line 175 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getMaxChannelCount(), and m_plugin.

-

- +

- + - +
Plugin::OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors OutputList Vamp::HostExt::PluginWrapper::getOutputDescriptors (  )  const [virtual] const [virtual]
@@ -913,23 +833,19 @@

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. +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.

- -

Definition at line 181 of file PluginWrapper.cpp.

- -

References Vamp::Plugin::getOutputDescriptors(), and m_plugin.

+

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

- +

- + @@ -943,7 +859,7 @@ - +
Plugin::FeatureSet Vamp::HostExt::PluginWrapper::process FeatureSet Vamp::HostExt::PluginWrapper::process ( const float *const *  inputBuffers,
) [virtual] [virtual]
@@ -952,29 +868,25 @@

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 will be the real time in seconds of the start of the supplied block of samples.

+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, and Vamp::HostExt::PluginInputDomainAdapter.

- -

Definition at line 187 of file PluginWrapper.cpp.

- -

References m_plugin, and Vamp::Plugin::process().

+

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

- +

- + - +
Plugin::FeatureSet Vamp::HostExt::PluginWrapper::getRemainingFeatures FeatureSet Vamp::HostExt::PluginWrapper::getRemainingFeatures (  )  [virtual] [virtual]
@@ -986,11 +898,36 @@

Implements Vamp::Plugin.

-

Reimplemented in Vamp::HostExt::PluginBufferingAdapter.

+

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

-

Definition at line 193 of file PluginWrapper.cpp.

+
+

+ +

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

References Vamp::Plugin::getRemainingFeatures(), and m_plugin.

+

+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().

@@ -1003,7 +940,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -1015,7 +952,7 @@ Do not reimplement this function in your subclass.

Implements Vamp::PluginBase.

-

Definition at line 391 of file Plugin.h.

+

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

@@ -1033,9 +970,7 @@

-

Definition at line 99 of file PluginWrapper.h.

- -

Referenced by getCopyright(), getCurrentProgram(), getDescription(), getIdentifier(), getInputDomain(), getMaker(), getMaxChannelCount(), getMinChannelCount(), getName(), getOutputDescriptors(), getParameter(), getParameterDescriptors(), getPluginVersion(), getPreferredBlockSize(), getPreferredStepSize(), getPrograms(), getRemainingFeatures(), getVampApiVersion(), initialise(), process(), reset(), selectProgram(), setParameter(), Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter::~PluginDeletionNotifyAdapter(), and ~PluginWrapper().

+

Definition at line 126 of file PluginWrapper.h.

@@ -1052,17 +987,17 @@

-

Definition at line 397 of file Plugin.h.

+

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

-

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), AmplitudeFollower::initialise(), Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter(), Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

+

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), AmplitudeFollower::initialise(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

-


The documentation for this class was generated from the following files: +
The documentation for this class was generated from the following file: -
Generated on Wed Jul 9 11:36:11 2008 for VampPluginSDK by  +
Generated on Mon Dec 8 14:37:22 2008 for VampPluginSDK by  -doxygen 1.5.5
+doxygen 1.5.6
diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.map --- a/code-doc/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,6 +1,6 @@ - - - - - - + + + + + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.md5 --- a/code-doc/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.md5 Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.md5 Tue Dec 09 11:02:57 2008 +0000 @@ -1,1 +1,1 @@ -0debc54b8d79aeb1dbbe5a52c0d0a0fb \ No newline at end of file +26c90b25b2428a766de6c40900a6c338 \ No newline at end of file diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.png Binary file code-doc/classVamp_1_1HostExt_1_1PluginWrapper__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1Plugin-members.html --- a/code-doc/classVamp_1_1Plugin-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1Plugin-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

@@ -284,7 +284,7 @@ (  )  - [inline, virtual] + [inline, virtual] @@ -292,7 +292,7 @@

-

Definition at line 124 of file Plugin.h.

+

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

@@ -306,7 +306,7 @@ float  inputSampleRate  )  - [inline, protected] + [inline, protected] @@ -314,7 +314,7 @@

-

Definition at line 394 of file Plugin.h.

+

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

@@ -344,7 +344,7 @@ ) - [pure virtual] + [pure virtual] @@ -355,9 +355,9 @@

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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by Vamp::HostExt::PluginWrapper::initialise(), Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

+

Referenced by runPlugin().

@@ -370,7 +370,7 @@ (  )  - [pure virtual] + [pure virtual] @@ -380,9 +380,7 @@ 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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

- -

Referenced by Vamp::HostExt::PluginWrapper::reset().

+

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

@@ -395,7 +393,7 @@ (  )  - const [pure virtual] + const [pure virtual] @@ -405,9 +403,9 @@ 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 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::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getInputDomain(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredBlockSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredStepSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::initialise(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), Vamp::HostExt::PluginLoader::Impl::loadPlugin(), Vamp::HostExt::PluginInputDomainAdapter::Impl::process(), and runPlugin().

+

Referenced by enumeratePlugins(), and runPlugin().

@@ -420,7 +418,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -431,11 +429,11 @@

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::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

+

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

-

Definition at line 171 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getPreferredBlockSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredBlockSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), and runPlugin().

@@ -448,7 +446,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -459,11 +457,11 @@

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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

+

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

-

Definition at line 186 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getPreferredStepSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredStepSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), and runPlugin().

@@ -476,7 +474,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -488,9 +486,9 @@

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

-

Definition at line 191 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getMinChannelCount(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), PercussionOnsetDetector::initialise(), AmplitudeFollower::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), PowerSpectrum::initialise(), PercussionOnsetDetector::initialise(), FixedTempoEstimator::initialise(), AmplitudeFollower::initialise(), and runPlugin().

@@ -503,7 +501,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -515,9 +513,9 @@

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

-

Definition at line 196 of file Plugin.h.

+

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

-

Referenced by Vamp::HostExt::PluginWrapper::getMaxChannelCount(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), PercussionOnsetDetector::initialise(), AmplitudeFollower::initialise(), and runPlugin().

+

Referenced by enumeratePlugins(), ZeroCrossing::initialise(), SpectralCentroid::initialise(), PowerSpectrum::initialise(), PercussionOnsetDetector::initialise(), FixedTempoEstimator::initialise(), AmplitudeFollower::initialise(), and runPlugin().

@@ -530,7 +528,7 @@ (  )  - const [pure virtual] + const [pure virtual] @@ -540,9 +538,9 @@ 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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by Vamp::PluginAdapterBase::Impl::checkOutputMap(), enumeratePlugins(), Vamp::HostExt::PluginWrapper::getOutputDescriptors(), Vamp::HostExt::PluginBufferingAdapter::Impl::getOutputDescriptors(), and runPlugin().

+

Referenced by enumeratePlugins(), and runPlugin().

@@ -565,7 +563,7 @@ ) - [pure virtual] + [pure virtual] @@ -574,12 +572,12 @@

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 will be the real time in seconds of the start of the supplied block of samples.

+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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by Vamp::HostExt::PluginWrapper::process(), Vamp::HostExt::PluginInputDomainAdapter::Impl::process(), Vamp::HostExt::PluginChannelAdapter::Impl::process(), Vamp::PluginAdapterBase::Impl::process(), Vamp::HostExt::PluginBufferingAdapter::Impl::processBlock(), and runPlugin().

+

Referenced by runPlugin().

@@ -592,7 +590,7 @@ (  )  - [pure virtual] + [pure virtual] @@ -602,9 +600,9 @@ After all blocks have been processed, calculate and return any remaining features derived from the complete input.

-

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by Vamp::HostExt::PluginWrapper::getRemainingFeatures(), Vamp::HostExt::PluginBufferingAdapter::Impl::getRemainingFeatures(), Vamp::PluginAdapterBase::Impl::getRemainingFeatures(), and runPlugin().

+

Referenced by runPlugin().

@@ -617,7 +615,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -629,7 +627,7 @@ Do not reimplement this function in your subclass.

Implements Vamp::PluginBase.

-

Definition at line 391 of file Plugin.h.

+

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

@@ -642,21 +640,21 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited]

-Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

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

-

Definition at line 67 of file PluginBase.h.

+

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

-

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getVampApiVersion().

+

Referenced by enumeratePlugins().

@@ -669,7 +667,7 @@ (  )  - const [pure virtual, inherited] + const [pure virtual, inherited] @@ -681,9 +679,9 @@ 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getIdentifier(), and runPlugin().

+

Referenced by enumeratePlugins(), and runPlugin().

@@ -696,7 +694,7 @@ (  )  - const [pure virtual, inherited] + const [pure virtual, inherited] @@ -707,9 +705,9 @@

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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getName(), and printPluginCategoryList().

+

Referenced by enumeratePlugins(), and printPluginCategoryList().

@@ -722,7 +720,7 @@ (  )  - const [pure virtual, inherited] + const [pure virtual, inherited] @@ -733,9 +731,9 @@

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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by enumeratePlugins(), Vamp::HostExt::PluginWrapper::getDescription(), Vamp::PluginAdapterBase::Impl::getDescriptor(), and printPluginCategoryList().

+

Referenced by enumeratePlugins(), and printPluginCategoryList().

@@ -748,7 +746,7 @@ (  )  - const [pure virtual, inherited] + const [pure virtual, inherited] @@ -758,9 +756,9 @@ 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getMaker(), and printPluginCategoryList().

+

Referenced by enumeratePlugins(), and printPluginCategoryList().

@@ -773,7 +771,7 @@ (  )  - const [pure virtual, inherited] + const [pure virtual, inherited] @@ -783,9 +781,9 @@ 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by Vamp::HostExt::PluginWrapper::getCopyright(), and Vamp::PluginAdapterBase::Impl::getDescriptor().

+

Referenced by enumeratePlugins().

@@ -798,7 +796,7 @@ (  )  - const [pure virtual, inherited] + const [pure virtual, inherited] @@ -808,9 +806,9 @@ Get the version number of the plugin.

-

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

+

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

-

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getPluginVersion().

+

Referenced by enumeratePlugins().

@@ -823,7 +821,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -833,11 +831,11 @@ Get the controllable parameters of this plugin.

-

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

+

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

-

Definition at line 200 of file PluginBase.h.

+

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

-

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getParameterDescriptors().

+

Referenced by enumeratePlugins().

@@ -851,7 +849,7 @@ std::string   )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -861,11 +859,9 @@ 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, and PercussionOnsetDetector.

+

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

-

Definition at line 208 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getParameter().

+

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

@@ -888,7 +884,7 @@ ) - [inline, virtual, inherited] + [inline, virtual, inherited] @@ -898,11 +894,9 @@ Set a named parameter.

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

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

+

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

-

Definition at line 214 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::setParameter().

+

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

@@ -915,7 +909,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -926,11 +920,9 @@

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.

+

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

-

Definition at line 229 of file PluginBase.h.

- -

Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getPrograms().

+

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

@@ -943,7 +935,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -955,9 +947,7 @@

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

-

Definition at line 234 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::getCurrentProgram().

+

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

@@ -971,7 +961,7 @@ std::string   )  - [inline, virtual, inherited] + [inline, virtual, inherited] @@ -981,11 +971,9 @@ Select a program.

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

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

+

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

-

Definition at line 240 of file PluginBase.h.

- -

Referenced by Vamp::HostExt::PluginWrapper::selectProgram().

+

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

@@ -1003,17 +991,17 @@

-

Definition at line 397 of file Plugin.h.

+

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

-

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), AmplitudeFollower::initialise(), Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter(), Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

+

Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), AmplitudeFollower::initialise(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().


The documentation for this class was generated from the following file: +
  • vamp-sdk/Plugin.h -
    Generated on Wed Jul 9 11:36:09 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:20 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginAdapter-members.html --- a/code-doc/classVamp_1_1PluginAdapter-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1PluginAdapter-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + @@ -105,7 +105,7 @@

    -

    Definition at line 97 of file PluginAdapter.h.

    +

    Definition at line 99 of file PluginAdapter.h.

    @@ -122,7 +122,7 @@ float  inputSampleRate  )  - [inline, protected, virtual] + [inline, protected, virtual] @@ -132,20 +132,20 @@

    Implements Vamp::PluginAdapterBase.

    -

    Definition at line 100 of file PluginAdapter.h.

    +

    Definition at line 102 of file PluginAdapter.h.

    - +

    - + - +
    const VampPluginDescriptor * Vamp::PluginAdapterBase::getDescriptor const VampPluginDescriptor* Vamp::PluginAdapterBase::getDescriptor (  )  [inherited] [inherited]
    @@ -155,11 +155,7 @@ Return a VampPluginDescriptor describing the plugin that is wrapped by this adapter.

    -

    Definition at line 138 of file PluginAdapter.cpp.

    - -

    References Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::PluginAdapterBase::m_impl.

    - -

    Referenced by vampGetPluginDescriptor().

    +

    Referenced by vampGetPluginDescriptor().

    @@ -169,7 +165,7 @@

    - +
    Impl* Vamp::PluginAdapterBase::m_impl [protected, inherited] Impl* Vamp::PluginAdapterBase::m_impl [protected, inherited]
    @@ -177,17 +173,15 @@

    -

    Definition at line 79 of file PluginAdapter.h.

    - -

    Referenced by Vamp::PluginAdapterBase::getDescriptor(), Vamp::PluginAdapterBase::PluginAdapterBase(), and Vamp::PluginAdapterBase::~PluginAdapterBase().

    +

    Definition at line 81 of file PluginAdapter.h.


    The documentation for this class was generated from the following file: -
    Generated on Wed Jul 9 11:36:09 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginAdapterBase-members.html --- a/code-doc/classVamp_1_1PluginAdapterBase-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1PluginAdapterBase-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +


    Member Function Documentation

    - +
    - + - +
    const VampPluginDescriptor * Vamp::PluginAdapterBase::getDescriptor const VampPluginDescriptor* Vamp::PluginAdapterBase::getDescriptor (  ) 
    @@ -130,11 +119,7 @@ Return a VampPluginDescriptor describing the plugin that is wrapped by this adapter.

    -

    Definition at line 138 of file PluginAdapter.cpp.

    - -

    References Vamp::PluginAdapterBase::Impl::getDescriptor(), and m_impl.

    - -

    Referenced by vampGetPluginDescriptor().

    +

    Referenced by vampGetPluginDescriptor().

    @@ -148,7 +133,7 @@ float  inputSampleRate  )  - [protected, pure virtual] + [protected, pure virtual] @@ -158,8 +143,6 @@

    Implemented in Vamp::PluginAdapter< P >.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::PluginAdapterBase::Impl::vampInstantiate().

    -


    Member Data Documentation

    @@ -168,7 +151,7 @@
    - +
    Impl* Vamp::PluginAdapterBase::m_impl [protected] Impl* Vamp::PluginAdapterBase::m_impl [protected]
    @@ -176,17 +159,15 @@

    -

    Definition at line 79 of file PluginAdapter.h.

    - -

    Referenced by getDescriptor(), PluginAdapterBase(), and ~PluginAdapterBase().

    +

    Definition at line 81 of file PluginAdapter.h.

    -


    The documentation for this class was generated from the following files: +
    The documentation for this class was generated from the following file: -
    Generated on Wed Jul 9 11:36:09 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:20 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginAdapterBase_1_1Impl-members.html --- a/code-doc/classVamp_1_1PluginAdapterBase_1_1Impl-members.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ - - -VampPluginSDK: Member List - - - - - -
    -

    Vamp::PluginAdapterBase::Impl Member List

    This is the complete list of members for Vamp::PluginAdapterBase::Impl, including all inherited members.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AdapterMap typedefVamp::PluginAdapterBase::Impl [protected]
    checkOutputMap(Plugin *plugin)Vamp::PluginAdapterBase::Impl [protected]
    cleanup(Plugin *plugin)Vamp::PluginAdapterBase::Impl [protected]
    convertFeatures(Plugin *plugin, const Plugin::FeatureSet &features)Vamp::PluginAdapterBase::Impl [protected]
    getDescriptor()Vamp::PluginAdapterBase::Impl
    getOutputCount(Plugin *plugin)Vamp::PluginAdapterBase::Impl [protected]
    getOutputDescriptor(Plugin *plugin, unsigned int i)Vamp::PluginAdapterBase::Impl [protected]
    getRemainingFeatures(Plugin *plugin)Vamp::PluginAdapterBase::Impl [protected]
    Impl(PluginAdapterBase *)Vamp::PluginAdapterBase::Impl
    lookupAdapter(VampPluginHandle)Vamp::PluginAdapterBase::Impl [protected, static]
    m_adapterMapVamp::PluginAdapterBase::Impl [protected, static]
    m_baseVamp::PluginAdapterBase::Impl [protected]
    m_descriptorVamp::PluginAdapterBase::Impl [protected]
    m_fsVamp::PluginAdapterBase::Impl [protected]
    m_fsizesVamp::PluginAdapterBase::Impl [protected]
    m_fvsizesVamp::PluginAdapterBase::Impl [protected]
    m_parametersVamp::PluginAdapterBase::Impl [protected]
    m_pluginOutputsVamp::PluginAdapterBase::Impl [protected]
    m_populatedVamp::PluginAdapterBase::Impl [protected]
    m_programsVamp::PluginAdapterBase::Impl [protected]
    OutputMap typedefVamp::PluginAdapterBase::Impl [protected]
    process(Plugin *plugin, const float *const *inputBuffers, int sec, int nsec)Vamp::PluginAdapterBase::Impl [protected]
    resizeFL(Plugin *plugin, int n, size_t sz)Vamp::PluginAdapterBase::Impl [protected]
    resizeFS(Plugin *plugin, int n)Vamp::PluginAdapterBase::Impl [protected]
    resizeFV(Plugin *plugin, int n, int j, size_t sz)Vamp::PluginAdapterBase::Impl [protected]
    vampCleanup(VampPluginHandle handle)Vamp::PluginAdapterBase::Impl [protected, static]
    vampGetCurrentProgram(VampPluginHandle handle)Vamp::PluginAdapterBase::Impl [protected, static]
    vampGetMaxChannelCount(VampPluginHandle handle)Vamp::PluginAdapterBase::Impl [protected, static]
    vampGetMinChannelCount(VampPluginHandle handle)Vamp::PluginAdapterBase::Impl [protected, static]
    vampGetOutputCount(VampPluginHandle handle)Vamp::PluginAdapterBase::Impl [protected, static]
    vampGetOutputDescriptor(VampPluginHandle handle, unsigned int i)Vamp::PluginAdapterBase::Impl [protected, static]
    vampGetParameter(VampPluginHandle handle, int param)Vamp::PluginAdapterBase::Impl [protected, static]
    vampGetPreferredBlockSize(VampPluginHandle handle)Vamp::PluginAdapterBase::Impl [protected, static]
    vampGetPreferredStepSize(VampPluginHandle handle)Vamp::PluginAdapterBase::Impl [protected, static]
    vampGetRemainingFeatures(VampPluginHandle handle)Vamp::PluginAdapterBase::Impl [protected, static]
    vampInitialise(VampPluginHandle handle, unsigned int channels, unsigned int stepSize, unsigned int blockSize)Vamp::PluginAdapterBase::Impl [protected, static]
    vampInstantiate(const VampPluginDescriptor *desc, float inputSampleRate)Vamp::PluginAdapterBase::Impl [protected, static]
    vampProcess(VampPluginHandle handle, const float *const *inputBuffers, int sec, int nsec)Vamp::PluginAdapterBase::Impl [protected, static]
    vampReleaseFeatureSet(VampFeatureList *fs)Vamp::PluginAdapterBase::Impl [protected, static]
    vampReleaseOutputDescriptor(VampOutputDescriptor *desc)Vamp::PluginAdapterBase::Impl [protected, static]
    vampReset(VampPluginHandle handle)Vamp::PluginAdapterBase::Impl [protected, static]
    vampSelectProgram(VampPluginHandle handle, unsigned int program)Vamp::PluginAdapterBase::Impl [protected, static]
    vampSetParameter(VampPluginHandle handle, int param, float value)Vamp::PluginAdapterBase::Impl [protected, static]
    ~Impl()Vamp::PluginAdapterBase::Impl

    -
    Generated on Wed Jul 9 11:36:09 2008 for VampPluginSDK by  - -doxygen 1.5.5
    - - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginAdapterBase_1_1Impl.html --- a/code-doc/classVamp_1_1PluginAdapterBase_1_1Impl.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1359 +0,0 @@ - - -VampPluginSDK: Vamp::PluginAdapterBase::Impl Class Reference - - - - - -
    -

    Vamp::PluginAdapterBase::Impl Class Reference

    -

    -List of all members.


    Detailed Description

    - -

    Definition at line 46 of file PluginAdapter.cpp.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Public Member Functions

     Impl (PluginAdapterBase *)
     ~Impl ()
    const VampPluginDescriptorgetDescriptor ()

    Protected Types

    typedef std::map< const void
    -*, Impl * > 
    AdapterMap
    typedef std::map< Plugin
    -*, Plugin::OutputList * > 
    OutputMap

    Protected Member Functions

    void cleanup (Plugin *plugin)
    void checkOutputMap (Plugin *plugin)
    unsigned int getOutputCount (Plugin *plugin)
    VampOutputDescriptorgetOutputDescriptor (Plugin *plugin, unsigned int i)
    VampFeatureListprocess (Plugin *plugin, const float *const *inputBuffers, int sec, int nsec)
    VampFeatureListgetRemainingFeatures (Plugin *plugin)
    VampFeatureListconvertFeatures (Plugin *plugin, const Plugin::FeatureSet &features)
    void resizeFS (Plugin *plugin, int n)
    void resizeFL (Plugin *plugin, int n, size_t sz)
    void resizeFV (Plugin *plugin, int n, int j, size_t sz)

    Static Protected Member Functions

    static VampPluginHandle vampInstantiate (const VampPluginDescriptor *desc, float inputSampleRate)
    static void vampCleanup (VampPluginHandle handle)
    static int vampInitialise (VampPluginHandle handle, unsigned int channels, unsigned int stepSize, unsigned int blockSize)
    static void vampReset (VampPluginHandle handle)
    static float vampGetParameter (VampPluginHandle handle, int param)
    static void vampSetParameter (VampPluginHandle handle, int param, float value)
    static unsigned int vampGetCurrentProgram (VampPluginHandle handle)
    static void vampSelectProgram (VampPluginHandle handle, unsigned int program)
    static unsigned int vampGetPreferredStepSize (VampPluginHandle handle)
    static unsigned int vampGetPreferredBlockSize (VampPluginHandle handle)
    static unsigned int vampGetMinChannelCount (VampPluginHandle handle)
    static unsigned int vampGetMaxChannelCount (VampPluginHandle handle)
    static unsigned int vampGetOutputCount (VampPluginHandle handle)
    static VampOutputDescriptorvampGetOutputDescriptor (VampPluginHandle handle, unsigned int i)
    static void vampReleaseOutputDescriptor (VampOutputDescriptor *desc)
    static VampFeatureListvampProcess (VampPluginHandle handle, const float *const *inputBuffers, int sec, int nsec)
    static VampFeatureListvampGetRemainingFeatures (VampPluginHandle handle)
    static void vampReleaseFeatureSet (VampFeatureList *fs)
    static ImpllookupAdapter (VampPluginHandle)

    Protected Attributes

    PluginAdapterBasem_base
    bool m_populated
    VampPluginDescriptor m_descriptor
    Plugin::ParameterList m_parameters
    Plugin::ProgramList m_programs
    OutputMap m_pluginOutputs
    std::map< Plugin
    -*, VampFeatureList * > 
    m_fs
    std::map< Plugin
    -*, std::vector< size_t > > 
    m_fsizes
    std::map< Plugin
    -*, std::vector< std::vector
    -< size_t > > > 
    m_fvsizes

    Static Protected Attributes

    static AdapterMapm_adapterMap = 0
    -

    Member Typedef Documentation

    - -
    -
    - - - - -
    typedef std::map<const void *, Impl *> Vamp::PluginAdapterBase::Impl::AdapterMap [protected]
    -
    -
    - -

    - -

    Definition at line 107 of file PluginAdapter.cpp.

    - -
    -

    - -

    -
    - - - - -
    typedef std::map<Plugin *, Plugin::OutputList *> Vamp::PluginAdapterBase::Impl::OutputMap [protected]
    -
    -
    - -

    - -

    Definition at line 116 of file PluginAdapter.cpp.

    - -
    -

    -


    Constructor & Destructor Documentation

    - -
    -
    - - - - - - - - - -
    Vamp::PluginAdapterBase::Impl::Impl (PluginAdapterBase base  ) 
    -
    -
    - -

    - -

    Definition at line 143 of file PluginAdapter.cpp.

    - -
    -

    - -

    -


    Member Function Documentation

    - -
    -
    - - - - - - - - -
    const VampPluginDescriptor * Vamp::PluginAdapterBase::Impl::getDescriptor (  ) 
    -
    -
    - -

    - -

    Definition at line 153 of file PluginAdapter.cpp.

    - -

    References _VampPluginDescriptor::cleanup, _VampPluginDescriptor::copyright, Vamp::PluginAdapterBase::createPlugin(), _VampParameterDescriptor::defaultValue, _VampParameterDescriptor::description, _VampPluginDescriptor::description, Vamp::Plugin::FrequencyDomain, Vamp::PluginBase::getCopyright(), _VampPluginDescriptor::getCurrentProgram, Vamp::PluginBase::getDescription(), Vamp::PluginBase::getIdentifier(), Vamp::Plugin::getInputDomain(), Vamp::PluginBase::getMaker(), _VampPluginDescriptor::getMaxChannelCount, _VampPluginDescriptor::getMinChannelCount, Vamp::PluginBase::getName(), _VampPluginDescriptor::getOutputCount, _VampPluginDescriptor::getOutputDescriptor, _VampPluginDescriptor::getParameter, Vamp::PluginBase::getParameterDescriptors(), Vamp::PluginBase::getPluginVersion(), _VampPluginDescriptor::getPreferredBlockSize, _VampPluginDescriptor::getPreferredStepSize, Vamp::PluginBase::getPrograms(), _VampPluginDescriptor::getRemainingFeatures, Vamp::PluginBase::getVampApiVersion(), _VampParameterDescriptor::identifier, _VampPluginDescriptor::identifier, _VampPluginDescriptor::initialise, _VampPluginDescriptor::inputDomain, _VampPluginDescriptor::instantiate, _VampParameterDescriptor::isQuantized, m_adapterMap, m_base, m_descriptor, m_parameters, m_populated, m_programs, _VampPluginDescriptor::maker, _VampParameterDescriptor::maxValue, _VampParameterDescriptor::minValue, _VampParameterDescriptor::name, _VampPluginDescriptor::name, _VampPluginDescriptor::parameterCount, _VampPluginDescriptor::parameters, _VampPluginDescriptor::pluginVersion, _VampPluginDescriptor::process, _VampPluginDescriptor::programCount, _VampPluginDescriptor::programs, _VampParameterDescriptor::quantizeStep, _VampPluginDescriptor::releaseFeatureSet, _VampPluginDescriptor::releaseOutputDescriptor, _VampPluginDescriptor::reset, _VampPluginDescriptor::selectProgram, _VampPluginDescriptor::setParameter, _VampParameterDescriptor::unit, _VampParameterDescriptor::valueNames, VAMP_API_VERSION, _VampPluginDescriptor::vampApiVersion, vampCleanup(), vampFrequencyDomain, vampGetCurrentProgram(), vampGetMaxChannelCount(), vampGetMinChannelCount(), vampGetOutputCount(), vampGetOutputDescriptor(), vampGetParameter(), vampGetPreferredBlockSize(), vampGetPreferredStepSize(), vampGetRemainingFeatures(), vampInitialise(), vampInstantiate(), vampProcess(), vampReleaseFeatureSet(), vampReleaseOutputDescriptor(), vampReset(), vampSelectProgram(), vampSetParameter(), and vampTimeDomain.

    - -

    Referenced by Vamp::PluginAdapterBase::getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - -
    VampPluginHandle Vamp::PluginAdapterBase::Impl::vampInstantiate (const VampPluginDescriptor desc,
    float  inputSampleRate 
    ) [static, protected]
    -
    -
    - -

    - -

    Definition at line 317 of file PluginAdapter.cpp.

    - -

    References Vamp::PluginAdapterBase::createPlugin(), m_adapterMap, m_base, and m_descriptor.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::vampCleanup (VampPluginHandle  handle  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 349 of file PluginAdapter.cpp.

    - -

    References cleanup(), and lookupAdapter().

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    int Vamp::PluginAdapterBase::Impl::vampInitialise (VampPluginHandle  handle,
    unsigned int  channels,
    unsigned int  stepSize,
    unsigned int  blockSize 
    ) [static, protected]
    -
    -
    - -

    - -

    Definition at line 364 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::vampReset (VampPluginHandle  handle  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 379 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - -
    float Vamp::PluginAdapterBase::Impl::vampGetParameter (VampPluginHandle  handle,
    int  param 
    ) [static, protected]
    -
    -
    - -

    - -

    Definition at line 389 of file PluginAdapter.cpp.

    - -

    References lookupAdapter(), and m_parameters.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::vampSetParameter (VampPluginHandle  handle,
    int  param,
    float  value 
    ) [static, protected]
    -
    -
    - -

    - -

    Definition at line 403 of file PluginAdapter.cpp.

    - -

    References lookupAdapter(), and m_parameters.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    unsigned int Vamp::PluginAdapterBase::Impl::vampGetCurrentProgram (VampPluginHandle  handle  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 417 of file PluginAdapter.cpp.

    - -

    References lookupAdapter(), and m_programs.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::vampSelectProgram (VampPluginHandle  handle,
    unsigned int  program 
    ) [static, protected]
    -
    -
    - -

    - -

    Definition at line 434 of file PluginAdapter.cpp.

    - -

    References lookupAdapter(), and m_programs.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    unsigned int Vamp::PluginAdapterBase::Impl::vampGetPreferredStepSize (VampPluginHandle  handle  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 448 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    unsigned int Vamp::PluginAdapterBase::Impl::vampGetPreferredBlockSize (VampPluginHandle  handle  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 458 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    unsigned int Vamp::PluginAdapterBase::Impl::vampGetMinChannelCount (VampPluginHandle  handle  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 468 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    unsigned int Vamp::PluginAdapterBase::Impl::vampGetMaxChannelCount (VampPluginHandle  handle  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 478 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    unsigned int Vamp::PluginAdapterBase::Impl::vampGetOutputCount (VampPluginHandle  handle  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 488 of file PluginAdapter.cpp.

    - -

    References getOutputCount(), and lookupAdapter().

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - -
    VampOutputDescriptor * Vamp::PluginAdapterBase::Impl::vampGetOutputDescriptor (VampPluginHandle  handle,
    unsigned int  i 
    ) [static, protected]
    -
    -
    - -

    - -

    Definition at line 503 of file PluginAdapter.cpp.

    - -

    References getOutputDescriptor(), and lookupAdapter().

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::vampReleaseOutputDescriptor (VampOutputDescriptor desc  )  [static, protected]
    -
    - -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    VampFeatureList * Vamp::PluginAdapterBase::Impl::vampProcess (VampPluginHandle  handle,
    const float *const *  inputBuffers,
    int  sec,
    int  nsec 
    ) [static, protected]
    -
    -
    - -

    - -

    Definition at line 541 of file PluginAdapter.cpp.

    - -

    References lookupAdapter(), and process().

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    VampFeatureList * Vamp::PluginAdapterBase::Impl::vampGetRemainingFeatures (VampPluginHandle  handle  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 557 of file PluginAdapter.cpp.

    - -

    References getRemainingFeatures(), and lookupAdapter().

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::vampReleaseFeatureSet (VampFeatureList fs  )  [static, protected]
    -
    -
    - -

    - -

    Definition at line 569 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor().

    - -
    -

    - -

    -
    - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::cleanup (Plugin plugin  )  [protected]
    -
    -
    - -

    - -

    Definition at line 577 of file PluginAdapter.cpp.

    - -

    References m_adapterMap, m_fs, m_fsizes, m_fvsizes, and m_pluginOutputs.

    - -

    Referenced by vampCleanup().

    - -
    -

    - -

    -
    - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::checkOutputMap (Plugin plugin  )  [protected]
    -
    - -

    - -

    -
    - - - - - - - - - -
    unsigned int Vamp::PluginAdapterBase::Impl::getOutputCount (Plugin plugin  )  [protected]
    -
    -
    - -

    - -

    Definition at line 630 of file PluginAdapter.cpp.

    - -

    References checkOutputMap(), and m_pluginOutputs.

    - -

    Referenced by vampGetOutputCount().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - -
    VampOutputDescriptor * Vamp::PluginAdapterBase::Impl::getOutputDescriptor (Plugin plugin,
    unsigned int  i 
    ) [protected]
    -
    - -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    VampFeatureList * Vamp::PluginAdapterBase::Impl::process (Plugin plugin,
    const float *const *  inputBuffers,
    int  sec,
    int  nsec 
    ) [protected]
    -
    -
    - -

    - -

    Definition at line 690 of file PluginAdapter.cpp.

    - -

    References checkOutputMap(), convertFeatures(), and Vamp::Plugin::process().

    - -

    Referenced by vampProcess().

    - -
    -

    - -

    -
    - - - - - - - - - -
    VampFeatureList * Vamp::PluginAdapterBase::Impl::getRemainingFeatures (Plugin plugin  )  [protected]
    -
    -
    - -

    - -

    Definition at line 701 of file PluginAdapter.cpp.

    - -

    References checkOutputMap(), convertFeatures(), and Vamp::Plugin::getRemainingFeatures().

    - -

    Referenced by vampGetRemainingFeatures().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - -
    VampFeatureList * Vamp::PluginAdapterBase::Impl::convertFeatures (Plugin plugin,
    const Plugin::FeatureSet features 
    ) [protected]
    -
    - -

    - -

    -
    - - - - - - - - - -
    PluginAdapterBase::Impl * Vamp::PluginAdapterBase::Impl::lookupAdapter (VampPluginHandle  handle  )  [static, protected]
    -
    - -

    - -

    -
    - - - - - - - - - - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::resizeFS (Plugin plugin,
    int  n 
    ) [protected]
    -
    -
    - -

    - -

    Definition at line 788 of file PluginAdapter.cpp.

    - -

    References m_fs, m_fsizes, and m_fvsizes.

    - -

    Referenced by convertFeatures().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::resizeFL (Plugin plugin,
    int  n,
    size_t  sz 
    ) [protected]
    -
    -
    - -

    - -

    Definition at line 810 of file PluginAdapter.cpp.

    - -

    References m_fs, m_fsizes, and m_fvsizes.

    - -

    Referenced by convertFeatures().

    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void Vamp::PluginAdapterBase::Impl::resizeFV (Plugin plugin,
    int  n,
    int  j,
    size_t  sz 
    ) [protected]
    -
    -
    - -

    - -

    Definition at line 833 of file PluginAdapter.cpp.

    - -

    References m_fs, and m_fvsizes.

    - -

    Referenced by convertFeatures().

    - -
    -

    -


    Member Data Documentation

    - -
    - -
    - -

    - -

    Definition at line 55 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor(), and vampInstantiate().

    - -
    -

    - -

    - -
    - -

    - -

    Definition at line 108 of file PluginAdapter.cpp.

    - -

    Referenced by cleanup(), getDescriptor(), lookupAdapter(), vampInstantiate(), and ~Impl().

    - -
    -

    - -

    -
    - - - - -
    bool Vamp::PluginAdapterBase::Impl::m_populated [protected]
    -
    -
    - -

    - -

    Definition at line 111 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor(), and ~Impl().

    - -
    -

    - -

    - -
    - -

    - -

    Definition at line 112 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor(), vampInstantiate(), and ~Impl().

    - -
    -

    - -

    - -
    - -

    - -

    Definition at line 113 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor(), vampGetParameter(), and vampSetParameter().

    - -
    -

    - -

    - -
    - -

    - -

    Definition at line 114 of file PluginAdapter.cpp.

    - -

    Referenced by getDescriptor(), vampGetCurrentProgram(), and vampSelectProgram().

    - -
    -

    - -

    - -
    - -

    - -

    Definition at line 117 of file PluginAdapter.cpp.

    - -

    Referenced by checkOutputMap(), cleanup(), convertFeatures(), getOutputCount(), and getOutputDescriptor().

    - -
    -

    - -

    -
    - - - - -
    std::map<Plugin *, VampFeatureList *> Vamp::PluginAdapterBase::Impl::m_fs [protected]
    -
    -
    - -

    - -

    Definition at line 119 of file PluginAdapter.cpp.

    - -

    Referenced by cleanup(), convertFeatures(), resizeFL(), resizeFS(), and resizeFV().

    - -
    -

    - -

    -
    - - - - -
    std::map<Plugin *, std::vector<size_t> > Vamp::PluginAdapterBase::Impl::m_fsizes [protected]
    -
    -
    - -

    - -

    Definition at line 120 of file PluginAdapter.cpp.

    - -

    Referenced by cleanup(), convertFeatures(), resizeFL(), and resizeFS().

    - -
    -

    - -

    -
    - - - - -
    std::map<Plugin *, std::vector<std::vector<size_t> > > Vamp::PluginAdapterBase::Impl::m_fvsizes [protected]
    -
    -
    - -

    - -

    Definition at line 121 of file PluginAdapter.cpp.

    - -

    Referenced by cleanup(), convertFeatures(), resizeFL(), resizeFS(), and resizeFV().

    - -
    -

    -


    The documentation for this class was generated from the following file: -
    -
    Generated on Wed Jul 9 11:36:09 2008 for VampPluginSDK by  - -doxygen 1.5.5
    - - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginAdapterBase__inherit__graph.map --- a/code-doc/classVamp_1_1PluginAdapterBase__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1PluginAdapterBase__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,1 +1,1 @@ - + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginAdapterBase__inherit__graph.png Binary file code-doc/classVamp_1_1PluginAdapterBase__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginAdapter__inherit__graph.map --- a/code-doc/classVamp_1_1PluginAdapter__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1PluginAdapter__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,1 +1,1 @@ - + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginAdapter__inherit__graph.png Binary file code-doc/classVamp_1_1PluginAdapter__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginBase-members.html --- a/code-doc/classVamp_1_1PluginBase-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1PluginBase-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

    @@ -167,21 +167,21 @@ (  )  - const [inline, virtual] + const [inline, virtual]

    -Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

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

    -

    Definition at line 67 of file PluginBase.h.

    +

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

    -

    Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getVampApiVersion().

    +

    Referenced by enumeratePlugins().

    @@ -194,7 +194,7 @@ (  )  - const [pure virtual] + const [pure virtual] @@ -206,9 +206,9 @@ 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

    +

    Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

    -

    Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getIdentifier(), and runPlugin().

    +

    Referenced by enumeratePlugins(), and runPlugin().

    @@ -221,7 +221,7 @@ (  )  - const [pure virtual] + const [pure virtual] @@ -232,9 +232,9 @@

    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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

    +

    Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

    -

    Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getName(), and printPluginCategoryList().

    +

    Referenced by enumeratePlugins(), and printPluginCategoryList().

    @@ -247,7 +247,7 @@ (  )  - const [pure virtual] + const [pure virtual] @@ -258,9 +258,9 @@

    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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

    +

    Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

    -

    Referenced by enumeratePlugins(), Vamp::HostExt::PluginWrapper::getDescription(), Vamp::PluginAdapterBase::Impl::getDescriptor(), and printPluginCategoryList().

    +

    Referenced by enumeratePlugins(), and printPluginCategoryList().

    @@ -273,7 +273,7 @@ (  )  - const [pure virtual] + const [pure virtual] @@ -283,9 +283,9 @@ 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

    +

    Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

    -

    Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), Vamp::HostExt::PluginWrapper::getMaker(), and printPluginCategoryList().

    +

    Referenced by enumeratePlugins(), and printPluginCategoryList().

    @@ -298,7 +298,7 @@ (  )  - const [pure virtual] + const [pure virtual] @@ -308,9 +308,9 @@ 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, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

    +

    Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

    -

    Referenced by Vamp::HostExt::PluginWrapper::getCopyright(), and Vamp::PluginAdapterBase::Impl::getDescriptor().

    +

    Referenced by enumeratePlugins().

    @@ -323,7 +323,7 @@ (  )  - const [pure virtual] + const [pure virtual] @@ -333,9 +333,9 @@ Get the version number of the plugin.

    -

    Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, PercussionOnsetDetector, SpectralCentroid, and ZeroCrossing.

    +

    Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getPluginVersion().

    +

    Referenced by enumeratePlugins().

    @@ -348,7 +348,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -358,11 +358,11 @@ Get the controllable parameters of this plugin.

    -

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

    +

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

    -

    Definition at line 200 of file PluginBase.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getParameterDescriptors().

    +

    Referenced by enumeratePlugins().

    @@ -376,7 +376,7 @@ std::string   )  - const [inline, virtual] + const [inline, virtual] @@ -386,11 +386,9 @@ 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, and PercussionOnsetDetector.

    +

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

    -

    Definition at line 208 of file PluginBase.h.

    - -

    Referenced by Vamp::HostExt::PluginWrapper::getParameter().

    +

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

    @@ -413,7 +411,7 @@ ) - [inline, virtual] + [inline, virtual] @@ -423,11 +421,9 @@ Set a named parameter.

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

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

    +

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

    -

    Definition at line 214 of file PluginBase.h.

    - -

    Referenced by Vamp::HostExt::PluginWrapper::setParameter().

    +

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

    @@ -440,7 +436,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -451,11 +447,9 @@

    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.

    +

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

    -

    Definition at line 229 of file PluginBase.h.

    - -

    Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getPrograms().

    +

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

    @@ -468,7 +462,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -480,9 +474,7 @@

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

    -

    Definition at line 234 of file PluginBase.h.

    - -

    Referenced by Vamp::HostExt::PluginWrapper::getCurrentProgram().

    +

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

    @@ -496,7 +488,7 @@ std::string   )  - [inline, virtual] + [inline, virtual] @@ -506,11 +498,9 @@ Select a program.

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

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

    +

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

    -

    Definition at line 240 of file PluginBase.h.

    - -

    Referenced by Vamp::HostExt::PluginWrapper::selectProgram().

    +

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

    @@ -523,7 +513,7 @@ (  )  - const [pure virtual] + const [pure virtual] @@ -538,10 +528,10 @@


    The documentation for this class was generated from the following file: +
  • vamp-sdk/PluginBase.h -
    Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginBase__inherit__graph.map --- a/code-doc/classVamp_1_1PluginBase__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1PluginBase__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,12 +1,13 @@ - - - - - - - - - - - - + + + + + + + + + + + + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginBase__inherit__graph.md5 --- a/code-doc/classVamp_1_1PluginBase__inherit__graph.md5 Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1PluginBase__inherit__graph.md5 Tue Dec 09 11:02:57 2008 +0000 @@ -1,1 +1,1 @@ -cfc919bcad1dd2c75ebd302bda37e09b \ No newline at end of file +153f6f058020bef4629083f4dce6eaf1 \ No newline at end of file diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginBase__inherit__graph.png Binary file code-doc/classVamp_1_1PluginBase__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginHostAdapter-members.html --- a/code-doc/classVamp_1_1PluginHostAdapter-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1PluginHostAdapter-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

    @@ -286,7 +286,7 @@ ) - + @@ -294,22 +294,18 @@

    -

    Definition at line 43 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::instantiate, m_descriptor, and m_handle.

    -

    - +

    - + - +
    Vamp::PluginHostAdapter::~PluginHostAdapter virtual Vamp::PluginHostAdapter::~PluginHostAdapter (  )  [virtual] [virtual]
    @@ -317,23 +313,19 @@

    -

    Definition at line 55 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::cleanup, m_descriptor, and m_handle.

    -


    Member Function Documentation

    - +
    - + - +
    std::vector< std::string > Vamp::PluginHostAdapter::getPluginPath static std::vector<std::string> Vamp::PluginHostAdapter::getPluginPath (  )  [static] [static]
    @@ -341,12 +333,6 @@

    -

    Definition at line 62 of file PluginHostAdapter.cpp.

    - -

    References DEFAULT_VAMP_PATH, and PATH_SEPARATOR.

    - -

    Referenced by Vamp::HostExt::PluginLoader::Impl::enumeratePlugins(), and Vamp::HostExt::PluginLoader::Impl::generateTaxonomy().

    -

    @@ -374,7 +360,7 @@ ) - [virtual] + [virtual] @@ -387,10 +373,6 @@ 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 118 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::initialise, m_descriptor, and m_handle.

    -

    @@ -402,7 +384,7 @@ (  )  - [virtual] + [virtual] @@ -414,22 +396,18 @@ Not called for the first initialisation (i.e. initialise must also do a reset).

    Implements Vamp::Plugin.

    -

    Definition at line 128 of file PluginHostAdapter.cpp.

    - -

    References m_descriptor, m_handle, and _VampPluginDescriptor::reset.

    -

    - +

    - + - +
    PluginHostAdapter::InputDomain Vamp::PluginHostAdapter::getInputDomain InputDomain Vamp::PluginHostAdapter::getInputDomain (  )  const [virtual] const [virtual]
    @@ -438,13 +416,9 @@

    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 plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window. +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 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 135 of file PluginHostAdapter.cpp.

    - -

    References Vamp::Plugin::FrequencyDomain, _VampPluginDescriptor::inputDomain, m_descriptor, Vamp::Plugin::TimeDomain, and vampFrequencyDomain.

    -

    @@ -456,22 +430,18 @@ (  )  - const [virtual] + const [virtual]

    -Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

    Reimplemented from Vamp::PluginBase.

    -

    Definition at line 145 of file PluginHostAdapter.cpp.

    - -

    References m_descriptor, and _VampPluginDescriptor::vampApiVersion.

    -

    @@ -483,7 +453,7 @@ (  )  - const [virtual] + const [virtual] @@ -497,10 +467,6 @@ Example: "zero_crossings"

    Implements Vamp::PluginBase.

    -

    Definition at line 151 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::identifier, and m_descriptor.

    -

    @@ -512,7 +478,7 @@ (  )  - const [virtual] + const [virtual] @@ -525,10 +491,6 @@ Example: "Zero Crossings"

    Implements Vamp::PluginBase.

    -

    Definition at line 157 of file PluginHostAdapter.cpp.

    - -

    References m_descriptor, and _VampPluginDescriptor::name.

    -

    @@ -540,7 +502,7 @@ (  )  - const [virtual] + const [virtual] @@ -553,10 +515,6 @@ Example: "Detect and count zero crossing points"

    Implements Vamp::PluginBase.

    -

    Definition at line 163 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::description, and m_descriptor.

    -

    @@ -568,7 +526,7 @@ (  )  - const [virtual] + const [virtual] @@ -580,10 +538,6 @@ 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 169 of file PluginHostAdapter.cpp.

    - -

    References m_descriptor, and _VampPluginDescriptor::maker.

    -

    @@ -595,7 +549,7 @@ (  )  - const [virtual] + const [virtual] @@ -607,10 +561,6 @@

    Implements Vamp::PluginBase.

    -

    Definition at line 175 of file PluginHostAdapter.cpp.

    - -

    References m_descriptor, and _VampPluginDescriptor::pluginVersion.

    -

    @@ -622,7 +572,7 @@ (  )  - const [virtual] + const [virtual] @@ -634,22 +584,18 @@ This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

    Implements Vamp::PluginBase.

    -

    Definition at line 181 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::copyright, and m_descriptor.

    -

    - +

    - + - +
    PluginHostAdapter::ParameterList Vamp::PluginHostAdapter::getParameterDescriptors ParameterList Vamp::PluginHostAdapter::getParameterDescriptors (  )  const [virtual] const [virtual]
    @@ -661,10 +607,6 @@

    Reimplemented from Vamp::PluginBase.

    -

    Definition at line 187 of file PluginHostAdapter.cpp.

    - -

    References _VampParameterDescriptor::defaultValue, Vamp::PluginBase::ParameterDescriptor::defaultValue, _VampParameterDescriptor::description, Vamp::PluginBase::ParameterDescriptor::description, _VampParameterDescriptor::identifier, Vamp::PluginBase::ParameterDescriptor::identifier, _VampParameterDescriptor::isQuantized, Vamp::PluginBase::ParameterDescriptor::isQuantized, m_descriptor, _VampParameterDescriptor::maxValue, Vamp::PluginBase::ParameterDescriptor::maxValue, _VampParameterDescriptor::minValue, Vamp::PluginBase::ParameterDescriptor::minValue, _VampParameterDescriptor::name, Vamp::PluginBase::ParameterDescriptor::name, _VampPluginDescriptor::parameterCount, _VampPluginDescriptor::parameters, _VampParameterDescriptor::quantizeStep, Vamp::PluginBase::ParameterDescriptor::quantizeStep, _VampParameterDescriptor::unit, Vamp::PluginBase::ParameterDescriptor::unit, Vamp::PluginBase::ParameterDescriptor::valueNames, and _VampParameterDescriptor::valueNames.

    -

    @@ -677,7 +619,7 @@ std::string   )  - const [virtual] + const [virtual] @@ -689,10 +631,6 @@ The argument is the identifier field from that parameter's descriptor.

    Reimplemented from Vamp::PluginBase.

    -

    Definition at line 213 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::getParameter, _VampParameterDescriptor::identifier, m_descriptor, m_handle, _VampPluginDescriptor::parameterCount, and _VampPluginDescriptor::parameters.

    -

    @@ -714,7 +652,7 @@ ) - [virtual] + [virtual] @@ -726,22 +664,18 @@ The first argument is the identifier field from that parameter's descriptor.

    Reimplemented from Vamp::PluginBase.

    -

    Definition at line 227 of file PluginHostAdapter.cpp.

    - -

    References _VampParameterDescriptor::identifier, m_descriptor, m_handle, _VampPluginDescriptor::parameterCount, _VampPluginDescriptor::parameters, and _VampPluginDescriptor::setParameter.

    -

    - +

    - + - +
    PluginHostAdapter::ProgramList Vamp::PluginHostAdapter::getPrograms ProgramList Vamp::PluginHostAdapter::getPrograms (  )  const [virtual] const [virtual]
    @@ -754,10 +688,6 @@ The programs must have unique names.

    Reimplemented from Vamp::PluginBase.

    -

    Definition at line 241 of file PluginHostAdapter.cpp.

    - -

    References m_descriptor, _VampPluginDescriptor::programCount, and _VampPluginDescriptor::programs.

    -

    @@ -769,7 +699,7 @@ (  )  - const [virtual] + const [virtual] @@ -781,10 +711,6 @@

    Reimplemented from Vamp::PluginBase.

    -

    Definition at line 253 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::getCurrentProgram, m_descriptor, m_handle, and _VampPluginDescriptor::programs.

    -

    @@ -797,7 +723,7 @@ std::string   )  - [virtual] + [virtual] @@ -809,10 +735,6 @@ (If the given program name is not one of the available programs, do nothing.)

    Reimplemented from Vamp::PluginBase.

    -

    Definition at line 262 of file PluginHostAdapter.cpp.

    - -

    References m_descriptor, m_handle, _VampPluginDescriptor::programCount, _VampPluginDescriptor::programs, and _VampPluginDescriptor::selectProgram.

    -

    @@ -824,23 +746,19 @@ (  )  - const [virtual] + 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. +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 275 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::getPreferredStepSize, m_descriptor, and m_handle.

    -

    @@ -852,23 +770,19 @@ (  )  - const [virtual] + const [virtual]

    -Get the preferred block size (window size -- the number of sample frames passed in each block to the process() function). +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 282 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::getPreferredBlockSize, m_descriptor, and m_handle.

    -

    @@ -880,7 +794,7 @@ (  )  - const [virtual] + const [virtual] @@ -892,10 +806,6 @@

    Reimplemented from Vamp::Plugin.

    -

    Definition at line 289 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::getMinChannelCount, m_descriptor, and m_handle.

    -

    @@ -907,7 +817,7 @@ (  )  - const [virtual] + const [virtual] @@ -919,22 +829,18 @@

    Reimplemented from Vamp::Plugin.

    -

    Definition at line 296 of file PluginHostAdapter.cpp.

    - -

    References _VampPluginDescriptor::getMaxChannelCount, m_descriptor, and m_handle.

    -

    - +

    - + - +
    PluginHostAdapter::OutputList Vamp::PluginHostAdapter::getOutputDescriptors OutputList Vamp::PluginHostAdapter::getOutputDescriptors (  )  const [virtual] const [virtual]
    @@ -943,21 +849,17 @@

    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. +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 303 of file PluginHostAdapter.cpp.

    - -

    References _VampOutputDescriptor::binCount, Vamp::Plugin::OutputDescriptor::binCount, _VampOutputDescriptor::binNames, Vamp::Plugin::OutputDescriptor::binNames, _VampOutputDescriptor::description, Vamp::Plugin::OutputDescriptor::description, Vamp::Plugin::OutputDescriptor::FixedSampleRate, _VampPluginDescriptor::getOutputCount, _VampPluginDescriptor::getOutputDescriptor, _VampOutputDescriptor::hasFixedBinCount, Vamp::Plugin::OutputDescriptor::hasFixedBinCount, _VampOutputDescriptor::hasKnownExtents, Vamp::Plugin::OutputDescriptor::hasKnownExtents, _VampOutputDescriptor::identifier, Vamp::Plugin::OutputDescriptor::identifier, _VampOutputDescriptor::isQuantized, Vamp::Plugin::OutputDescriptor::isQuantized, m_descriptor, m_handle, _VampOutputDescriptor::maxValue, Vamp::Plugin::OutputDescriptor::maxValue, _VampOutputDescriptor::minValue, Vamp::Plugin::OutputDescriptor::minValue, _VampOutputDescriptor::name, Vamp::Plugin::OutputDescriptor::name, Vamp::Plugin::OutputDescriptor::OneSamplePerStep, _VampOutputDescriptor::quantizeStep, Vamp::Plugin::OutputDescriptor::quantizeStep, _VampPluginDescriptor::releaseOutputDescriptor, _VampOutputDescriptor::sampleRate, Vamp::Plugin::OutputDescriptor::sampleRate, Vamp::Plugin::OutputDescriptor::sampleType, _VampOutputDescriptor::sampleType, _VampOutputDescriptor::unit, Vamp::Plugin::OutputDescriptor::unit, vampFixedSampleRate, vampOneSamplePerStep, vampVariableSampleRate, and Vamp::Plugin::OutputDescriptor::VariableSampleRate.

    -

    - +

    - + @@ -971,7 +873,7 @@ - +
    PluginHostAdapter::FeatureSet Vamp::PluginHostAdapter::process FeatureSet Vamp::PluginHostAdapter::process ( const float *const *  inputBuffers,
    ) [virtual] [virtual]
    @@ -980,27 +882,23 @@

    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 will be the real time in seconds of the start of the supplied block of samples.

    +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 353 of file PluginHostAdapter.cpp.

    - -

    References convertFeatures(), m_descriptor, m_handle, Vamp::RealTime::nsec, _VampPluginDescriptor::process, _VampPluginDescriptor::releaseFeatureSet, and Vamp::RealTime::sec.

    -

    - +

    - + - +
    PluginHostAdapter::FeatureSet Vamp::PluginHostAdapter::getRemainingFeatures FeatureSet Vamp::PluginHostAdapter::getRemainingFeatures (  )  [virtual] [virtual]
    @@ -1012,10 +910,6 @@

    Implements Vamp::Plugin.

    -

    Definition at line 372 of file PluginHostAdapter.cpp.

    - -

    References convertFeatures(), _VampPluginDescriptor::getRemainingFeatures, m_descriptor, m_handle, and _VampPluginDescriptor::releaseFeatureSet.

    -

    @@ -1026,18 +920,18 @@ void Vamp::PluginHostAdapter::convertFeatures ( VampFeatureList *  - features, + , FeatureSet &  - fs  +   ) - [protected] + [protected] @@ -1045,12 +939,6 @@

    -

    Definition at line 385 of file PluginHostAdapter.cpp.

    - -

    References _VampFeatureList::featureCount, _VampFeatureList::features, _VampPluginDescriptor::getOutputCount, _VampFeature::hasTimestamp, Vamp::Plugin::Feature::hasTimestamp, Vamp::Plugin::Feature::label, _VampFeature::label, m_descriptor, m_handle, _VampFeature::nsec, _VampFeature::sec, Vamp::Plugin::Feature::timestamp, _VampFeature::valueCount, _VampFeature::values, and Vamp::Plugin::Feature::values.

    - -

    Referenced by getRemainingFeatures(), and process().

    -

    @@ -1062,7 +950,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -1074,7 +962,7 @@ Do not reimplement this function in your subclass.

    Implements Vamp::PluginBase.

    -

    Definition at line 391 of file Plugin.h.

    +

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

    @@ -1092,9 +980,7 @@

    -

    Definition at line 109 of file PluginHostAdapter.h.

    - -

    Referenced by convertFeatures(), getCopyright(), getCurrentProgram(), getDescription(), getIdentifier(), getInputDomain(), getMaker(), getMaxChannelCount(), getMinChannelCount(), getName(), getOutputDescriptors(), getParameter(), getParameterDescriptors(), getPluginVersion(), getPreferredBlockSize(), getPreferredStepSize(), getPrograms(), getRemainingFeatures(), getVampApiVersion(), initialise(), PluginHostAdapter(), process(), reset(), selectProgram(), setParameter(), and ~PluginHostAdapter().

    +

    Definition at line 113 of file PluginHostAdapter.h.

    @@ -1111,9 +997,7 @@

    -

    Definition at line 110 of file PluginHostAdapter.h.

    - -

    Referenced by convertFeatures(), getCurrentProgram(), getMaxChannelCount(), getMinChannelCount(), getOutputDescriptors(), getParameter(), getPreferredBlockSize(), getPreferredStepSize(), getRemainingFeatures(), initialise(), PluginHostAdapter(), process(), reset(), selectProgram(), setParameter(), and ~PluginHostAdapter().

    +

    Definition at line 114 of file PluginHostAdapter.h.

    @@ -1130,17 +1014,17 @@

    -

    Definition at line 397 of file Plugin.h.

    +

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

    -

    Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), AmplitudeFollower::initialise(), Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter(), Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), AmplitudeFollower::initialise(), ZeroCrossing::process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

    -


    The documentation for this class was generated from the following files: +
    The documentation for this class was generated from the following file: -
    Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginHostAdapter__inherit__graph.map --- a/code-doc/classVamp_1_1PluginHostAdapter__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1PluginHostAdapter__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,2 +1,2 @@ - - + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1PluginHostAdapter__inherit__graph.png Binary file code-doc/classVamp_1_1PluginHostAdapter__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1Plugin__inherit__graph.map --- a/code-doc/classVamp_1_1Plugin__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1Plugin__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,12 +1,13 @@ - - - - - - - - - - - - + + + + + + + + + + + + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1Plugin__inherit__graph.md5 --- a/code-doc/classVamp_1_1Plugin__inherit__graph.md5 Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1Plugin__inherit__graph.md5 Tue Dec 09 11:02:57 2008 +0000 @@ -1,1 +1,1 @@ -1fdc0d123de21caf38692f762b282897 \ No newline at end of file +31b985e17164f0e43b6f86bac750d6d6 \ No newline at end of file diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1Plugin__inherit__graph.png Binary file code-doc/classVamp_1_1Plugin__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classVamp_1_1RealTime-members.html --- a/code-doc/classVamp_1_1RealTime-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classVamp_1_1RealTime-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

    @@ -191,7 +191,7 @@

    -

    Definition at line 348 of file Plugin.h.

    +

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

    @@ -208,7 +208,7 @@

    -

    Definition at line 195 of file PluginBase.h.

    +

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

    @@ -225,7 +225,7 @@

    -

    Definition at line 217 of file PluginBase.h.

    +

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

    @@ -251,7 +251,7 @@ -

    Definition at line 149 of file Plugin.h.

    +

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

    @@ -266,7 +266,7 @@ float  inputSampleRate  )  - + @@ -274,7 +274,7 @@

    -

    Definition at line 45 of file ZeroCrossing.cpp.

    +

    Definition at line 46 of file ZeroCrossing.cpp.

    @@ -287,7 +287,7 @@ (  )  - [virtual] + [virtual] @@ -295,7 +295,7 @@

    -

    Definition at line 52 of file ZeroCrossing.cpp.

    +

    Definition at line 53 of file ZeroCrossing.cpp.

    @@ -325,7 +325,7 @@ ) - [virtual] + [virtual] @@ -338,9 +338,9 @@ 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 93 of file ZeroCrossing.cpp.

    +

    Definition at line 94 of file ZeroCrossing.cpp.

    -

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

    +

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

    @@ -353,7 +353,7 @@ (  )  - [virtual] + [virtual] @@ -365,7 +365,7 @@ Not called for the first initialisation (i.e. initialise must also do a reset).

    Implements Vamp::Plugin.

    -

    Definition at line 104 of file ZeroCrossing.cpp.

    +

    Definition at line 105 of file ZeroCrossing.cpp.

    References m_previousSample.

    @@ -380,7 +380,7 @@ (  )  - const [inline, virtual] + const [inline, virtual] @@ -394,7 +394,7 @@

    Definition at line 56 of file ZeroCrossing.h.

    -

    References Vamp::Plugin::TimeDomain.

    +

    References Vamp::Plugin::TimeDomain.

    @@ -407,7 +407,7 @@ (  )  - const [virtual] + const [virtual] @@ -421,7 +421,7 @@ Example: "zero_crossings"

    Implements Vamp::PluginBase.

    -

    Definition at line 57 of file ZeroCrossing.cpp.

    +

    Definition at line 58 of file ZeroCrossing.cpp.

    @@ -434,7 +434,7 @@ (  )  - const [virtual] + const [virtual] @@ -447,7 +447,7 @@ Example: "Zero Crossings"

    Implements Vamp::PluginBase.

    -

    Definition at line 63 of file ZeroCrossing.cpp.

    +

    Definition at line 64 of file ZeroCrossing.cpp.

    @@ -460,7 +460,7 @@ (  )  - const [virtual] + const [virtual] @@ -473,7 +473,7 @@ Example: "Detect and count zero crossing points"

    Implements Vamp::PluginBase.

    -

    Definition at line 69 of file ZeroCrossing.cpp.

    +

    Definition at line 70 of file ZeroCrossing.cpp.

    @@ -486,7 +486,7 @@ (  )  - const [virtual] + const [virtual] @@ -498,7 +498,7 @@ 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 75 of file ZeroCrossing.cpp.

    +

    Definition at line 76 of file ZeroCrossing.cpp.

    @@ -511,7 +511,7 @@ (  )  - const [virtual] + const [virtual] @@ -523,7 +523,7 @@

    Implements Vamp::PluginBase.

    -

    Definition at line 81 of file ZeroCrossing.cpp.

    +

    Definition at line 82 of file ZeroCrossing.cpp.

    @@ -536,7 +536,7 @@ (  )  - const [virtual] + const [virtual] @@ -548,7 +548,7 @@ This can be an informative text, without the same presentation constraints as mentioned for getMaker above.

    Implements Vamp::PluginBase.

    -

    Definition at line 87 of file ZeroCrossing.cpp.

    +

    Definition at line 88 of file ZeroCrossing.cpp.

    @@ -561,7 +561,7 @@ (  )  - const [virtual] + const [virtual] @@ -573,9 +573,9 @@ 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 110 of file ZeroCrossing.cpp.

    +

    Definition at line 111 of file ZeroCrossing.cpp.

    -

    References Vamp::Plugin::OutputDescriptor::binCount, Vamp::Plugin::OutputDescriptor::description, Vamp::Plugin::OutputDescriptor::hasFixedBinCount, Vamp::Plugin::OutputDescriptor::hasKnownExtents, Vamp::Plugin::OutputDescriptor::identifier, Vamp::Plugin::OutputDescriptor::isQuantized, Vamp::Plugin::m_inputSampleRate, Vamp::Plugin::OutputDescriptor::name, Vamp::Plugin::OutputDescriptor::OneSamplePerStep, Vamp::Plugin::OutputDescriptor::quantizeStep, Vamp::Plugin::OutputDescriptor::sampleRate, Vamp::Plugin::OutputDescriptor::sampleType, Vamp::Plugin::OutputDescriptor::unit, and Vamp::Plugin::OutputDescriptor::VariableSampleRate.

    +

    References Vamp::Plugin::OutputDescriptor::binCount, Vamp::Plugin::OutputDescriptor::description, Vamp::Plugin::OutputDescriptor::hasFixedBinCount, Vamp::Plugin::OutputDescriptor::hasKnownExtents, Vamp::Plugin::OutputDescriptor::identifier, Vamp::Plugin::OutputDescriptor::isQuantized, Vamp::Plugin::m_inputSampleRate, Vamp::Plugin::OutputDescriptor::name, Vamp::Plugin::OutputDescriptor::OneSamplePerStep, Vamp::Plugin::OutputDescriptor::quantizeStep, Vamp::Plugin::OutputDescriptor::sampleRate, Vamp::Plugin::OutputDescriptor::sampleType, Vamp::Plugin::OutputDescriptor::unit, and Vamp::Plugin::OutputDescriptor::VariableSampleRate.

    @@ -598,7 +598,7 @@ ) - [virtual] + [virtual] @@ -607,14 +607,14 @@

    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 will be the real time in seconds of the start of the supplied block of samples.

    +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 141 of file ZeroCrossing.cpp.

    +

    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.

    +

    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.

    @@ -627,7 +627,7 @@ (  )  - [virtual] + [virtual] @@ -639,7 +639,7 @@

    Implements Vamp::Plugin.

    -

    Definition at line 190 of file ZeroCrossing.cpp.

    +

    Definition at line 191 of file ZeroCrossing.cpp.

    @@ -652,7 +652,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -663,11 +663,11 @@

    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::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

    +

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

    -

    Definition at line 171 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::HostExt::PluginWrapper::getPreferredBlockSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredBlockSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

    +

    Referenced by enumeratePlugins(), and runPlugin().

    @@ -680,7 +680,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -691,11 +691,11 @@

    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::PluginHostAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginWrapper, and PercussionOnsetDetector.

    +

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

    -

    Definition at line 186 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::HostExt::PluginWrapper::getPreferredStepSize(), Vamp::HostExt::PluginInputDomainAdapter::Impl::getPreferredStepSize(), Vamp::HostExt::PluginBufferingAdapter::Impl::initialise(), and runPlugin().

    +

    Referenced by enumeratePlugins(), and runPlugin().

    @@ -708,7 +708,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -720,9 +720,9 @@

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

    -

    Definition at line 191 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::HostExt::PluginWrapper::getMinChannelCount(), initialise(), SpectralCentroid::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), PercussionOnsetDetector::initialise(), AmplitudeFollower::initialise(), and runPlugin().

    +

    Referenced by enumeratePlugins(), initialise(), SpectralCentroid::initialise(), PowerSpectrum::initialise(), PercussionOnsetDetector::initialise(), FixedTempoEstimator::initialise(), AmplitudeFollower::initialise(), and runPlugin().

    @@ -735,7 +735,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -747,9 +747,9 @@

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

    -

    Definition at line 196 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::HostExt::PluginWrapper::getMaxChannelCount(), initialise(), SpectralCentroid::initialise(), Vamp::HostExt::PluginChannelAdapter::Impl::initialise(), PercussionOnsetDetector::initialise(), AmplitudeFollower::initialise(), and runPlugin().

    +

    Referenced by enumeratePlugins(), initialise(), SpectralCentroid::initialise(), PowerSpectrum::initialise(), PercussionOnsetDetector::initialise(), FixedTempoEstimator::initialise(), AmplitudeFollower::initialise(), and runPlugin().

    @@ -762,7 +762,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -774,7 +774,7 @@ Do not reimplement this function in your subclass.

    Implements Vamp::PluginBase.

    -

    Definition at line 391 of file Plugin.h.

    +

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

    @@ -787,21 +787,21 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited]

    -Get the Vamp API compatibility level of the plugin. +Get the Vamp API compatibility level of the plugin.

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

    -

    Definition at line 67 of file PluginBase.h.

    +

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

    -

    Referenced by enumeratePlugins(), Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getVampApiVersion().

    +

    Referenced by enumeratePlugins().

    @@ -814,7 +814,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -824,11 +824,11 @@ Get the controllable parameters of this plugin.

    -

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

    +

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

    -

    Definition at line 200 of file PluginBase.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getParameterDescriptors().

    +

    Referenced by enumeratePlugins().

    @@ -842,7 +842,7 @@ std::string   )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -852,11 +852,9 @@ 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, and PercussionOnsetDetector.

    +

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

    -

    Definition at line 208 of file PluginBase.h.

    - -

    Referenced by Vamp::HostExt::PluginWrapper::getParameter().

    +

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

    @@ -879,7 +877,7 @@ ) - [inline, virtual, inherited] + [inline, virtual, inherited] @@ -889,11 +887,9 @@ Set a named parameter.

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

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

    +

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

    -

    Definition at line 214 of file PluginBase.h.

    - -

    Referenced by Vamp::HostExt::PluginWrapper::setParameter().

    +

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

    @@ -906,7 +902,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -917,11 +913,9 @@

    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.

    +

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

    -

    Definition at line 229 of file PluginBase.h.

    - -

    Referenced by Vamp::PluginAdapterBase::Impl::getDescriptor(), and Vamp::HostExt::PluginWrapper::getPrograms().

    +

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

    @@ -934,7 +928,7 @@ (  )  - const [inline, virtual, inherited] + const [inline, virtual, inherited] @@ -946,9 +940,7 @@

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

    -

    Definition at line 234 of file PluginBase.h.

    - -

    Referenced by Vamp::HostExt::PluginWrapper::getCurrentProgram().

    +

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

    @@ -962,7 +954,7 @@ std::string   )  - [inline, virtual, inherited] + [inline, virtual, inherited] @@ -972,11 +964,9 @@ Select a program.

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

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

    +

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

    -

    Definition at line 240 of file PluginBase.h.

    - -

    Referenced by Vamp::HostExt::PluginWrapper::selectProgram().

    +

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

    @@ -996,7 +986,7 @@

    Definition at line 73 of file ZeroCrossing.h.

    -

    Referenced by initialise(), and process().

    +

    Referenced by initialise(), and process().

    @@ -1015,7 +1005,7 @@

    Definition at line 74 of file ZeroCrossing.h.

    -

    Referenced by process(), and reset().

    +

    Referenced by process(), and reset().

    @@ -1032,17 +1022,17 @@

    -

    Definition at line 397 of file Plugin.h.

    +

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

    -

    Referenced by getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), Vamp::HostExt::PluginRateExtractor::getRate(), AmplitudeFollower::initialise(), Vamp::HostExt::PluginBufferingAdapter::PluginBufferingAdapter(), Vamp::HostExt::PluginInputDomainAdapter::PluginInputDomainAdapter(), process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().

    +

    Referenced by getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), AmplitudeFollower::initialise(), process(), SpectralCentroid::process(), and PercussionOnsetDetector::process().


    The documentation for this class was generated from the following files: -
    Generated on Wed Jul 9 11:36:08 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:19 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classZeroCrossing__inherit__graph.map --- a/code-doc/classZeroCrossing__inherit__graph.map Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/classZeroCrossing__inherit__graph.map Tue Dec 09 11:02:57 2008 +0000 @@ -1,2 +1,2 @@ - - + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/classZeroCrossing__inherit__graph.png Binary file code-doc/classZeroCrossing__inherit__graph.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/dir_2d75386d541e768dd0382c2de0bcb161.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/dir_2d75386d541e768dd0382c2de0bcb161.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,44 @@ + + +VampPluginSDK: src/ Directory Reference + + + + + +
    +

    src Directory Reference

    +

    + +

    +

    +
    +
    +

    src/
    + + +
    + + + + + +

    Files

    file  doc-overview [code]
    +
    +
    Generated on Mon Dec 8 14:37:22 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/dir_2d75386d541e768dd0382c2de0bcb161_dep.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/dir_2d75386d541e768dd0382c2de0bcb161_dep.map Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,1 @@ + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/dir_2d75386d541e768dd0382c2de0bcb161_dep.png Binary file code-doc/dir_2d75386d541e768dd0382c2de0bcb161_dep.png has changed diff -r 34e758355884 -r cc0be37dc9d3 code-doc/dir_35887283b966ca996e4ff77f459c38ce.html --- a/code-doc/dir_35887283b966ca996e4ff77f459c38ce.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/dir_35887283b966ca996e4ff77f459c38ce.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
  • AdapterFlags : Vamp::HostExt::PluginLoader -
  • AdapterMap -: Vamp::PluginAdapterBase::Impl
  • AmplitudeFollower() : AmplitudeFollower +
  • assembleFeatures() +: FixedTempoEstimator::D +
  • AveragingMethod +: Vamp::HostExt::PluginSummarisingAdapter -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x62.html --- a/code-doc/functions_0x62.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x62.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -74,8 +70,8 @@ , Vamp::Plugin::OutputDescriptor
    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x63.html --- a/code-doc/functions_0x63.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x63.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - c -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x64.html --- a/code-doc/functions_0x64.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x64.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - d -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x65.html --- a/code-doc/functions_0x65.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ - - -VampPluginSDK: Class Members - - - - - -
    -Here is a list of all class members with links to the classes they belong to: -

    -

    - e -

    -
    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
    - - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x66.html --- a/code-doc/functions_0x66.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x66.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - f -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x67.html --- a/code-doc/functions_0x67.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x67.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - g -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x68.html --- a/code-doc/functions_0x68.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x68.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - h -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x69.html --- a/code-doc/functions_0x69.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x69.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -72,44 +68,37 @@ , Vamp::Plugin::OutputDescriptor , Vamp::PluginBase::ParameterDescriptor , _VampPluginDescriptor -
  • Impl() -: Vamp::HostExt::PluginChannelAdapter::Impl -, Vamp::HostExt::PluginInputDomainAdapter::Impl -, Vamp::HostExt::PluginLoader::Impl -, Vamp::PluginAdapterBase::Impl -, Vamp::HostExt::PluginBufferingAdapter::Impl
  • initialise() -: SpectralCentroid +: Vamp::HostExt::PluginBufferingAdapter +, FixedTempoEstimator , PercussionOnsetDetector -, Vamp::HostExt::PluginChannelAdapter::Impl , Vamp::HostExt::PluginChannelAdapter -, Vamp::HostExt::PluginInputDomainAdapter::Impl +, PowerSpectrum +, SpectralCentroid +, Vamp::PluginHostAdapter +, ZeroCrossing +, FixedTempoEstimator::D +, AmplitudeFollower +, Vamp::HostExt::PluginWrapper , Vamp::HostExt::PluginInputDomainAdapter -, Vamp::HostExt::PluginWrapper -, AmplitudeFollower -, Vamp::HostExt::PluginBufferingAdapter , _VampPluginDescriptor -, Vamp::PluginHostAdapter +, Vamp::HostExt::PluginSummarisingAdapter , Vamp::Plugin -, ZeroCrossing -, Vamp::HostExt::PluginBufferingAdapter::Impl
  • inputDomain : _VampPluginDescriptor
  • InputDomain : Vamp::Plugin -
  • InstanceCleaner() -: Vamp::HostExt::PluginLoader::Impl::InstanceCleaner
  • instantiate : _VampPluginDescriptor
  • isQuantized : Vamp::PluginBase::ParameterDescriptor , Vamp::Plugin::OutputDescriptor +, _VampParameterDescriptor , _VampOutputDescriptor -, _VampParameterDescriptor -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x6c.html --- a/code-doc/functions_0x6c.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x6c.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -69,24 +65,16 @@
  • label : _VampFeature , Vamp::Plugin::Feature -
  • listFiles() -: Vamp::HostExt::PluginLoader::Impl +
  • lag2tempo() +: FixedTempoEstimator::D
  • listPlugins() -: Vamp::HostExt::PluginLoader::Impl -, Vamp::HostExt::PluginLoader -
  • loadLibrary() -: Vamp::HostExt::PluginLoader::Impl +: Vamp::HostExt::PluginLoader
  • loadPlugin() -: Vamp::HostExt::PluginLoader::Impl -, Vamp::HostExt::PluginLoader -
  • lookupAdapter() -: Vamp::PluginAdapterBase::Impl -
  • lookupInLibrary() -: Vamp::HostExt::PluginLoader::Impl +: Vamp::HostExt::PluginLoader -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x6d.html --- a/code-doc/functions_0x6d.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x6d.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - m -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x6e.html --- a/code-doc/functions_0x6e.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x6e.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -77,8 +73,8 @@ , _VampFeature
    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x6f.html --- a/code-doc/functions_0x6f.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x6f.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -82,21 +78,20 @@ : Vamp::RealTime
  • operator=() : Vamp::RealTime -, Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer
  • operator==() : Vamp::RealTime
  • operator>() : Vamp::RealTime
  • operator>=() : Vamp::RealTime +
  • OutputDescriptor() +: Vamp::Plugin::OutputDescriptor
  • OutputList : Vamp::Plugin -
  • OutputMap -: Vamp::PluginAdapterBase::Impl -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x70.html --- a/code-doc/functions_0x70.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x70.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -68,12 +64,12 @@

    - p -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x71.html --- a/code-doc/functions_0x71.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x71.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -73,8 +69,8 @@ , _VampOutputDescriptor
    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x72.html --- a/code-doc/functions_0x72.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x72.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -69,35 +65,28 @@
  • RealTime() : Vamp::RealTime
  • realTime2Frame() -: Vamp::RealTime +: Vamp::RealTime
  • releaseFeatureSet : _VampPluginDescriptor
  • releaseOutputDescriptor : _VampPluginDescriptor
  • reset() -: Vamp::Plugin +: FixedTempoEstimator::D +, AmplitudeFollower +, Vamp::HostExt::PluginWrapper +, Vamp::PluginHostAdapter +, Vamp::HostExt::PluginBufferingAdapter +, Vamp::Plugin +, _VampPluginDescriptor , SpectralCentroid +, PowerSpectrum +, ZeroCrossing +, FixedTempoEstimator , PercussionOnsetDetector -, AmplitudeFollower -, ZeroCrossing -, Vamp::PluginHostAdapter -, Vamp::HostExt::PluginBufferingAdapter::Impl -, Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer -, Vamp::HostExt::PluginBufferingAdapter -, Vamp::HostExt::PluginWrapper -, _VampPluginDescriptor -
  • resizeFL() -: Vamp::PluginAdapterBase::Impl -
  • resizeFS() -: Vamp::PluginAdapterBase::Impl -
  • resizeFV() -: Vamp::PluginAdapterBase::Impl -
  • RingBuffer() -: Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x73.html --- a/code-doc/functions_0x73.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x73.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - s -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x74.html --- a/code-doc/functions_0x74.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x74.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - t -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x75.html --- a/code-doc/functions_0x75.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x75.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -71,14 +67,14 @@ , _VampOutputDescriptor , Vamp::PluginBase::ParameterDescriptor , Vamp::Plugin::OutputDescriptor -
  • unloadLibrary() -: Vamp::HostExt::PluginLoader::Impl +
  • UnknownSummaryType +: Vamp::HostExt::PluginSummarisingAdapter
  • usec() : Vamp::RealTime -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x76.html --- a/code-doc/functions_0x76.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x76.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - v -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x77.html --- a/code-doc/functions_0x77.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ - - -VampPluginSDK: Class Members - - - - - -
    -Here is a list of all class members with links to the classes they belong to: -

    -

    - w -

    -
    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
    - - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x7a.html --- a/code-doc/functions_0x7a.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x7a.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to:

    - z -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_0x7e.html --- a/code-doc/functions_0x7e.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_0x7e.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all class members with links to the classes they belong to: @@ -68,14 +64,10 @@

    - ~ -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_enum.html --- a/code-doc/functions_enum.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_enum.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
  • operator=() : Vamp::RealTime -, Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer
  • operator==() : Vamp::RealTime
  • operator>() : Vamp::RealTime
  • operator>=() : Vamp::RealTime +
  • OutputDescriptor() +: Vamp::Plugin::OutputDescriptor -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_func_0x70.html --- a/code-doc/functions_func_0x70.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_func_0x70.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
     

    - p -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_func_0x72.html --- a/code-doc/functions_func_0x72.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_func_0x72.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
      @@ -65,30 +60,23 @@
  • RealTime() : Vamp::RealTime
  • realTime2Frame() -: Vamp::RealTime +: Vamp::RealTime
  • reset() -: Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer +: PercussionOnsetDetector +, FixedTempoEstimator +, FixedTempoEstimator::D +, AmplitudeFollower +, Vamp::HostExt::PluginWrapper +, Vamp::PluginHostAdapter , Vamp::HostExt::PluginBufferingAdapter +, Vamp::Plugin , ZeroCrossing , SpectralCentroid -, Vamp::Plugin -, Vamp::HostExt::PluginWrapper -, AmplitudeFollower -, Vamp::PluginHostAdapter -, PercussionOnsetDetector -, Vamp::HostExt::PluginBufferingAdapter::Impl -
  • resizeFL() -: Vamp::PluginAdapterBase::Impl -
  • resizeFS() -: Vamp::PluginAdapterBase::Impl -
  • resizeFV() -: Vamp::PluginAdapterBase::Impl -
  • RingBuffer() -: Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer +, PowerSpectrum -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_func_0x73.html --- a/code-doc/functions_func_0x73.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_func_0x73.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
      @@ -64,28 +59,30 @@

    - s -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_func_0x74.html --- a/code-doc/functions_func_0x74.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_func_0x74.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
     

    - t -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_func_0x75.html --- a/code-doc/functions_func_0x75.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_func_0x75.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
     

    - u -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_func_0x76.html --- a/code-doc/functions_func_0x76.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ - - -VampPluginSDK: Class Members - Functions - - - - - -
    -  -

    -

    - v -

    -
    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
    - - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_func_0x77.html --- a/code-doc/functions_func_0x77.html Mon Nov 24 15:17:08 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ - - -VampPluginSDK: Class Members - Functions - - - - - -
    -  -

    -

    - w -

    -
    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  - -doxygen 1.5.5
    - - diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_func_0x7a.html --- a/code-doc/functions_func_0x7a.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_func_0x7a.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
     

    - z -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_func_0x7e.html --- a/code-doc/functions_func_0x7e.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_func_0x7e.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
      @@ -64,14 +59,10 @@

    - ~ -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/functions_type.html --- a/code-doc/functions_type.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/functions_type.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
  • description -: Vamp::Plugin::OutputDescriptor +: _VampOutputDescriptor , _VampPluginDescriptor -, _VampOutputDescriptor +, Vamp::PluginBase::ParameterDescriptor +, Vamp::Plugin::OutputDescriptor , _VampParameterDescriptor -, Vamp::PluginBase::ParameterDescriptor +
  • duration +: Vamp::Plugin::Feature +
  • durationNsec +: _VampFeatureV2 +
  • durationSec +: _VampFeatureV2

    - f -

    - g -

    - h -

    - m -

    - v -

    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/globals.html --- a/code-doc/globals.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/globals.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    Here is a list of all file members with links to the files they belong to:

    +

    - _ -

    - a -

    +

    - c -

    - d -

    - m -

    -

    - o -

    - p -

    -
    Generated on Wed Jul 9 11:36:11 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:22 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/globals_defs.html --- a/code-doc/globals_defs.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/globals_defs.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
  • 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.
  • +

    +

    +

    +

    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.

    -Starting with version 1.1 of the Vamp SDK, there are several classes in the Vamp::HostExt namespace that aim to make the host's life as easy as possible:

    +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::PluginInputDomainAdapter provides a simple means for hosts to handle plugins that want frequency-domain input, without having to convert the input 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.
  • -The PluginLoader class can also use the input domain and channel adapters automatically to make the entire conversion process transparent to the host if required.

    +

    +

    +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.

    -Our suggestion for a 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

    +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 API itself.

    -There is an example host in the "host" directory from which code may be drawn.

    +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. -
    Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/namespaceVamp.html --- a/code-doc/namespaceVamp.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/namespaceVamp.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    -

    Vamp Namespace Reference


    Detailed Description

    -If you want to compile using FFTW instead of the built-in FFT implementation for the PluginInputDomainAdapter, define HAVE_FFTW3 in the Makefile. -

    -Be aware that FFTW is licensed under the GPL -- unlike this SDK, which is provided under a more liberal BSD license in order to permit use in closed source applications. The use of FFTW would mean that your code would need to be licensed under the GPL as well. Do not define this symbol unless you understand and accept the implications of this.

    -Parties such as Linux distribution packagers who redistribute this SDK for use in other programs should _not_ define this symbol, as it would change the effective licensing terms under which the SDK was available to third party developers.

    -The default is not to use FFTW, and to use the built-in FFT instead.

    -Note: The FFTW code uses FFTW_MEASURE, and so will perform badly on its first invocation unless the host has saved and restored FFTW wisdom (see the FFTW documentation). +

    Vamp Namespace Reference

    @@ -41,33 +35,33 @@  Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio or related data. More...
    class  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. More...
    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  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...
    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...

    Namespaces

    namespace  HostExt

    Functions

    -std::ostream & operator<< (std::ostream &out, const RealTime &rt) +std::ostream & operator<< (std::ostream &out, const RealTime &rt)

    Function Documentation

    - +
    - + @@ -81,7 +75,7 @@ - +
    std::ostream & Vamp::operator<< std::ostream& Vamp::operator<< ( std::ostream &  out,
    )
    @@ -89,15 +83,11 @@

    -

    Definition at line 110 of file RealTime.cpp.

    - -

    References Vamp::RealTime::nsec, ONE_BILLION, Vamp::RealTime::sec, and Vamp::RealTime::zeroTime.

    -

    -


    Generated on Wed Jul 9 11:36:09 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:20 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/namespaceVamp_1_1HostExt.html --- a/code-doc/namespaceVamp_1_1HostExt.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/namespaceVamp_1_1HostExt.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

    @@ -129,7 +135,24 @@

    -

    Definition at line 47 of file plugins.cpp.

    +

    Definition at line 49 of file plugins.cpp.

    + + +

    + +

    +
    + + + + +
    Vamp::PluginAdapter<FixedTempoEstimator> fixedTempoAdapter [static]
    +
    +
    + +

    + +

    Definition at line 50 of file plugins.cpp.

    @@ -146,13 +169,30 @@

    -

    Definition at line 48 of file plugins.cpp.

    +

    Definition at line 51 of file plugins.cpp.

    + + +

    + +

    +
    + + + + +
    Vamp::PluginAdapter<PowerSpectrum> powerSpectrum [static]
    +
    +
    + +

    + +

    Definition at line 52 of file plugins.cpp.

    -


    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/structVamp_1_1PluginBase_1_1ParameterDescriptor-members.html --- a/code-doc/structVamp_1_1PluginBase_1_1ParameterDescriptor-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/structVamp_1_1PluginBase_1_1ParameterDescriptor-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

    @@ -125,9 +150,9 @@ A human-readable short text describing the parameter.

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

    Definition at line 143 of file PluginBase.h.

    +

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

    -

    Referenced by Vamp::PluginHostAdapter::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    +

    Referenced by PercussionOnsetDetector::getParameterDescriptors(), FixedTempoEstimator::D::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    @@ -146,9 +171,9 @@ The unit of the parameter, in human-readable form.

    -

    Definition at line 148 of file PluginBase.h.

    +

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

    -

    Referenced by Vamp::PluginHostAdapter::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    +

    Referenced by PercussionOnsetDetector::getParameterDescriptors(), FixedTempoEstimator::D::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    @@ -167,9 +192,9 @@ The minimum value of the parameter.

    -

    Definition at line 153 of file PluginBase.h.

    +

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

    -

    Referenced by Vamp::PluginHostAdapter::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    +

    Referenced by PercussionOnsetDetector::getParameterDescriptors(), FixedTempoEstimator::D::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    @@ -188,9 +213,9 @@ The maximum value of the parameter.

    -

    Definition at line 158 of file PluginBase.h.

    +

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

    -

    Referenced by Vamp::PluginHostAdapter::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    +

    Referenced by PercussionOnsetDetector::getParameterDescriptors(), FixedTempoEstimator::D::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    @@ -209,9 +234,9 @@ 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 166 of file PluginBase.h.

    +

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

    -

    Referenced by Vamp::PluginHostAdapter::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    +

    Referenced by PercussionOnsetDetector::getParameterDescriptors(), FixedTempoEstimator::D::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    @@ -230,9 +255,9 @@ True if the parameter values are quantized to a particular resolution.

    -

    Definition at line 172 of file PluginBase.h.

    +

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

    -

    Referenced by Vamp::PluginHostAdapter::getParameterDescriptors(), PercussionOnsetDetector::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    +

    Referenced by PercussionOnsetDetector::getParameterDescriptors(), FixedTempoEstimator::D::getParameterDescriptors(), and AmplitudeFollower::getParameterDescriptors().

    @@ -251,9 +276,7 @@ Quantization resolution of the parameter values (e.g.

    1.0 if they are all integers). Undefined if isQuantized is false. -

    Definition at line 179 of file PluginBase.h.

    - -

    Referenced by Vamp::PluginHostAdapter::getParameterDescriptors().

    +

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

    @@ -273,17 +296,15 @@

    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 192 of file PluginBase.h.

    - -

    Referenced by Vamp::PluginHostAdapter::getParameterDescriptors().

    +

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


    The documentation for this struct was generated from the following file: +
  • vamp-sdk/PluginBase.h -
    Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/structVamp_1_1Plugin_1_1Feature-members.html --- a/code-doc/structVamp_1_1Plugin_1_1Feature-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/structVamp_1_1Plugin_1_1Feature-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

    + +

    + +
    + +

    +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 355 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 362 of file vamp-sdk/Plugin.h.

    + +

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

    @@ -107,9 +180,9 @@ 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 339 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginHostAdapter::convertFeatures(), ZeroCrossing::process(), SpectralCentroid::process(), PercussionOnsetDetector::process(), and AmplitudeFollower::process().

    +

    Referenced by FixedTempoEstimator::D::assembleFeatures(), ZeroCrossing::process(), SpectralCentroid::process(), PowerSpectrum::process(), PercussionOnsetDetector::process(), and AmplitudeFollower::process().

    @@ -128,17 +201,17 @@ Label for the sample of this feature.

    -

    Definition at line 344 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginHostAdapter::convertFeatures().

    +

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


    The documentation for this struct was generated from the following file: +
  • vamp-sdk/Plugin.h -
    Generated on Wed Jul 9 11:36:09 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:20 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/structVamp_1_1Plugin_1_1OutputDescriptor-members.html --- a/code-doc/structVamp_1_1Plugin_1_1OutputDescriptor-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/structVamp_1_1Plugin_1_1OutputDescriptor-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

    +


    Constructor & Destructor Documentation

    + +
    +
    + + + + + + + + +
    Vamp::Plugin::OutputDescriptor::OutputDescriptor (  )  [inline]
    +
    +
    + +

    + +

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

    @@ -129,9 +157,9 @@ 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 206 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), FixedTempoEstimator::D::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    @@ -150,9 +178,9 @@ The human-readable name of the output.

    Example: "Zero Crossing Counts" -

    Definition at line 212 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), FixedTempoEstimator::D::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    @@ -171,9 +199,9 @@ 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 219 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), FixedTempoEstimator::D::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    @@ -192,9 +220,9 @@ The unit of the output, in human-readable form.

    -

    Definition at line 224 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), FixedTempoEstimator::D::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    @@ -213,9 +241,9 @@ 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 231 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), FixedTempoEstimator::D::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    @@ -234,9 +262,9 @@ 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 239 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), FixedTempoEstimator::D::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    @@ -255,9 +283,7 @@ The (human-readable) names of each of the bins, if appropriate.

    This is always optional. -

    Definition at line 245 of file Plugin.h.

    - -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    +

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

    @@ -276,9 +302,9 @@ 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 252 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), FixedTempoEstimator::D::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    @@ -297,9 +323,9 @@ Minimum value of the results in the output.

    Undefined if hasKnownExtents is false or binCount is zero. -

    Definition at line 258 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    +

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

    @@ -318,9 +344,9 @@ Maximum value of the results in the output.

    Undefined if hasKnownExtents is false or binCount is zero. -

    Definition at line 264 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    +

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

    @@ -339,9 +365,9 @@ True if the output values are quantized to a particular resolution.

    Undefined if binCount is zero. -

    Definition at line 270 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), FixedTempoEstimator::D::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    @@ -360,9 +386,9 @@ 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 277 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), and PercussionOnsetDetector::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and FixedTempoEstimator::D::getOutputDescriptors().

    @@ -381,9 +407,9 @@ Positioning in time of the output results.

    -

    Definition at line 294 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), SpectralCentroid::getOutputDescriptors(), PowerSpectrum::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), FixedTempoEstimator::D::getOutputDescriptors(), and AmplitudeFollower::getOutputDescriptors().

    @@ -403,17 +429,38 @@

    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 306 of file Plugin.h.

    +

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

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), ZeroCrossing::getOutputDescriptors(), Vamp::PluginHostAdapter::getOutputDescriptors(), and PercussionOnsetDetector::getOutputDescriptors().

    +

    Referenced by ZeroCrossing::getOutputDescriptors(), PercussionOnsetDetector::getOutputDescriptors(), and FixedTempoEstimator::D::getOutputDescriptors().

    + + +

    + +

    + +
    + +

    +True if the returned results for this output are known to have a duration field. +

    + +

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

    + +

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


    The documentation for this struct was generated from the following file: +
  • vamp-sdk/Plugin.h -
    Generated on Wed Jul 9 11:36:09 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:20 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/structVamp_1_1RealTime.html --- a/code-doc/structVamp_1_1RealTime.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/structVamp_1_1RealTime.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +
    -

    Vamp::RealTime Class Reference

    #include <vamp-sdk/RealTime.h> +

    Vamp::RealTime Class Reference

    #include <vamp-sdk/RealTime.h>

    List of all members.


    Detailed Description

    RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conversion functions. -

    Definition at line 63 of file RealTime.h.

    +

    Definition at line 66 of file vamp-sdk/RealTime.h.

    @@ -78,18 +78,18 @@ - + - + - + - + - - + + - + @@ -109,7 +109,7 @@ - +

    Public Member Functions

     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 fromSeconds (double sec)
    static RealTime fromMilliseconds (int msec)
    static RealTime fromMilliseconds (int msec)
    static RealTime fromTimeval (const struct timeval &)
    static RealTime fromTimeval (const struct timeval &)
    static long realTime2Frame (const RealTime &r, unsigned int sampleRate)
    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 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.
     Convert a sample frame at the given sample rate into a RealTime.

    Public Attributes

    int sec
    (  )  [inline] [inline]
    @@ -117,9 +117,7 @@

    -

    Definition at line 71 of file RealTime.h.

    - -

    Referenced by fromMilliseconds(), fromSeconds(), fromTimeval(), operator+(), operator-(), and operator/().

    +

    Definition at line 74 of file vamp-sdk/RealTime.h.

    @@ -142,7 +140,7 @@ ) - + @@ -150,10 +148,6 @@

    -

    Definition at line 75 of file RealTime.cpp.

    - -

    References nsec, ONE_BILLION, and sec.

    -

    @@ -166,7 +160,7 @@ const RealTimer  )  - [inline] + [inline] @@ -174,7 +168,7 @@

    -

    Definition at line 74 of file RealTime.h.

    +

    Definition at line 77 of file vamp-sdk/RealTime.h.

    @@ -188,7 +182,7 @@ (  )  - const [inline] + const [inline] @@ -196,9 +190,7 @@

    -

    Definition at line 68 of file RealTime.h.

    - -

    References nsec.

    +

    Definition at line 71 of file vamp-sdk/RealTime.h.

    @@ -211,7 +203,7 @@ (  )  - const [inline] + const [inline] @@ -219,25 +211,21 @@

    -

    Definition at line 69 of file RealTime.h.

    - -

    References nsec.

    - -

    Referenced by toText().

    +

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

    - +

    - + - +
    RealTime Vamp::RealTime::fromSeconds static RealTime Vamp::RealTime::fromSeconds ( double  sec  )  [static] [static]
    @@ -245,23 +233,19 @@

    -

    Definition at line 91 of file RealTime.cpp.

    - -

    References ONE_BILLION, and RealTime().

    -

    - +

    - + - +
    RealTime Vamp::RealTime::fromMilliseconds static RealTime Vamp::RealTime::fromMilliseconds ( int  msec  )  [static] [static]
    @@ -269,23 +253,19 @@

    -

    Definition at line 97 of file RealTime.cpp.

    - -

    References RealTime().

    -

    - +

    - + - + - +
    RealTime Vamp::RealTime::fromTimeval static RealTime Vamp::RealTime::fromTimeval ( const struct timeval &  tv  )  [static] [static]
    @@ -293,10 +273,6 @@

    -

    Definition at line 104 of file RealTime.cpp.

    - -

    References RealTime().

    -

    @@ -309,7 +285,7 @@ const RealTimer  )  - [inline] + [inline] @@ -317,9 +293,9 @@

    -

    Definition at line 84 of file RealTime.h.

    +

    Definition at line 87 of file vamp-sdk/RealTime.h.

    -

    References nsec, and sec.

    +

    References nsec, and sec.

    @@ -333,7 +309,7 @@ const RealTimer  )  - const [inline] + const [inline] @@ -341,9 +317,9 @@

    -

    Definition at line 88 of file RealTime.h.

    +

    Definition at line 91 of file vamp-sdk/RealTime.h.

    -

    References nsec, RealTime(), and sec.

    +

    References nsec, and sec.

    @@ -357,7 +333,7 @@ const RealTimer  )  - const [inline] + const [inline] @@ -365,9 +341,9 @@

    -

    Definition at line 91 of file RealTime.h.

    +

    Definition at line 94 of file vamp-sdk/RealTime.h.

    -

    References nsec, RealTime(), and sec.

    +

    References nsec, and sec.

    @@ -380,7 +356,7 @@ (  )  - const [inline] + const [inline] @@ -388,9 +364,7 @@

    -

    Definition at line 94 of file RealTime.h.

    - -

    References nsec, RealTime(), and sec.

    +

    Definition at line 97 of file vamp-sdk/RealTime.h.

    @@ -404,7 +378,7 @@ const RealTimer  )  - const [inline] + const [inline] @@ -412,9 +386,9 @@

    -

    Definition at line 98 of file RealTime.h.

    +

    Definition at line 101 of file vamp-sdk/RealTime.h.

    -

    References nsec, and sec.

    +

    References nsec, and sec.

    @@ -428,7 +402,7 @@ const RealTimer  )  - const [inline] + const [inline] @@ -436,9 +410,9 @@

    -

    Definition at line 103 of file RealTime.h.

    +

    Definition at line 106 of file vamp-sdk/RealTime.h.

    -

    References nsec, and sec.

    +

    References nsec, and sec.

    @@ -452,7 +426,7 @@ const RealTimer  )  - const [inline] + const [inline] @@ -460,9 +434,9 @@

    -

    Definition at line 108 of file RealTime.h.

    +

    Definition at line 111 of file vamp-sdk/RealTime.h.

    -

    References nsec, and sec.

    +

    References nsec, and sec.

    @@ -476,7 +450,7 @@ const RealTimer  )  - const [inline] + const [inline] @@ -484,7 +458,7 @@

    -

    Definition at line 112 of file RealTime.h.

    +

    Definition at line 115 of file vamp-sdk/RealTime.h.

    @@ -498,7 +472,7 @@ const RealTimer  )  - const [inline] + const [inline] @@ -506,9 +480,9 @@

    -

    Definition at line 116 of file RealTime.h.

    +

    Definition at line 119 of file vamp-sdk/RealTime.h.

    -

    References nsec, and sec.

    +

    References nsec, and sec.

    @@ -522,7 +496,7 @@ const RealTimer  )  - const [inline] + const [inline] @@ -530,9 +504,9 @@

    -

    Definition at line 121 of file RealTime.h.

    +

    Definition at line 124 of file vamp-sdk/RealTime.h.

    -

    References nsec, and sec.

    +

    References nsec, and sec.

    @@ -546,7 +520,7 @@ int  d  )  - const + const @@ -554,10 +528,6 @@

    -

    Definition at line 203 of file RealTime.cpp.

    - -

    References nsec, ONE_BILLION, RealTime(), and sec.

    -

    @@ -570,7 +540,7 @@ const RealTimer  )  - const + const @@ -580,10 +550,6 @@ Return the ratio of two times.

    -

    Definition at line 214 of file RealTime.cpp.

    - -

    References nsec, ONE_BILLION, and sec.

    -

    @@ -595,7 +561,7 @@ (  )  - const + const @@ -605,11 +571,7 @@ Return a human-readable debug-type string to full precision (probably not a format to show to a user directly).

    -

    Definition at line 135 of file RealTime.cpp.

    - -

    References stringstream.

    - -

    Referenced by printFeatures().

    +

    Referenced by printFeatures().

    @@ -623,7 +585,7 @@ bool  fixedDp = false  )  - const + const @@ -633,18 +595,14 @@ Return a user-readable string to the nearest millisecond in a form like HH:MM:SS.mmm.

    -

    Definition at line 151 of file RealTime.cpp.

    - -

    References msec(), sec, stringstream, and zeroTime.

    -

    - +

    - + @@ -658,7 +616,7 @@ - +
    long Vamp::RealTime::realTime2Frame static long Vamp::RealTime::realTime2Frame ( const RealTime r,
    ) [static] [static]
    @@ -668,20 +626,14 @@ Convert a RealTime into a sample frame at the given sample rate.

    -

    Definition at line 224 of file RealTime.cpp.

    - -

    References nsec, sec, and zeroTime.

    - -

    Referenced by Vamp::HostExt::PluginBufferingAdapter::Impl::process().

    -

    - +

    - + @@ -695,7 +647,7 @@ - +
    RealTime Vamp::RealTime::frame2RealTime static RealTime Vamp::RealTime::frame2RealTime ( long  frame,
    ) [static] [static]
    @@ -705,11 +657,7 @@ Convert a sample frame at the given sample rate into a RealTime.

    -

    Definition at line 232 of file RealTime.cpp.

    - -

    References nsec, and sec.

    - -

    Referenced by ZeroCrossing::process(), Vamp::HostExt::PluginInputDomainAdapter::Impl::process(), PercussionOnsetDetector::process(), and Vamp::HostExt::PluginBufferingAdapter::Impl::processBlock().

    +

    Referenced by ZeroCrossing::process(), and PercussionOnsetDetector::process().

    @@ -727,9 +675,9 @@

    -

    Definition at line 65 of file RealTime.h.

    +

    Definition at line 68 of file vamp-sdk/RealTime.h.

    -

    Referenced by frame2RealTime(), operator+(), operator-(), operator/(), operator<(), Vamp::operator<<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), Vamp::PluginHostAdapter::process(), RealTime(), realTime2Frame(), and toText().

    +

    Referenced by operator+(), operator-(), operator<(), operator<=(), operator=(), operator==(), operator>(), and operator>=().

    @@ -746,9 +694,9 @@

    -

    Definition at line 66 of file RealTime.h.

    +

    Definition at line 69 of file vamp-sdk/RealTime.h.

    -

    Referenced by frame2RealTime(), msec(), operator+(), operator-(), operator/(), operator<(), Vamp::operator<<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), Vamp::PluginHostAdapter::process(), RealTime(), realTime2Frame(), and usec().

    +

    Referenced by operator+(), operator-(), operator<(), operator<=(), operator=(), operator==(), operator>(), and operator>=().

    @@ -765,17 +713,15 @@

    -

    Definition at line 155 of file RealTime.h.

    - -

    Referenced by Vamp::operator<<(), realTime2Frame(), and toText().

    +

    Definition at line 158 of file vamp-sdk/RealTime.h.

    -


    The documentation for this class was generated from the following files: +
    The documentation for this class was generated from the following file: -
    Generated on Wed Jul 9 11:36:10 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/struct__VampFeature-members.html --- a/code-doc/struct__VampFeature-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/struct__VampFeature-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/struct__VampFeatureV2-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/struct__VampFeatureV2-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,36 @@ + + +VampPluginSDK: Member List + + + + + +
    +

    _VampFeatureV2 Member List

    This is the complete list of members for _VampFeatureV2, including all inherited members.

    + + + +
    durationNsec_VampFeatureV2
    durationSec_VampFeatureV2
    hasDuration_VampFeatureV2

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/struct__VampFeatureV2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/struct__VampFeatureV2.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,112 @@ + + +VampPluginSDK: _VampFeatureV2 Struct Reference + + + + + +
    +

    _VampFeatureV2 Struct Reference

    #include <vamp.h> +

    + +

    +List of all members.


    Detailed Description

    + +

    Definition at line 196 of file vamp.h.

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

    Public Attributes

    int hasDuration
     1 if the feature has a duration.
    int durationSec
     Seconds component of duratiion.
    int durationNsec
     Nanoseconds component of duration.
    +

    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: +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/struct__VampOutputDescriptor-members.html --- a/code-doc/struct__VampOutputDescriptor-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/struct__VampOutputDescriptor-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

    @@ -137,8 +136,6 @@ May be translatable.

    Definition at line 127 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), Vamp::PluginHostAdapter::getOutputDescriptors(), and Vamp::PluginAdapterBase::Impl::vampReleaseOutputDescriptor().

    -

    @@ -158,8 +155,6 @@

    Definition at line 130 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), Vamp::PluginHostAdapter::getOutputDescriptors(), and Vamp::PluginAdapterBase::Impl::vampReleaseOutputDescriptor().

    -

    @@ -179,8 +174,6 @@

    Definition at line 133 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), Vamp::PluginHostAdapter::getOutputDescriptors(), and Vamp::PluginAdapterBase::Impl::vampReleaseOutputDescriptor().

    -

    @@ -200,8 +193,6 @@

    Definition at line 136 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), Vamp::PluginHostAdapter::getOutputDescriptors(), and Vamp::PluginAdapterBase::Impl::vampReleaseOutputDescriptor().

    -

    @@ -221,8 +212,6 @@ May be NULL.

    Definition at line 139 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), Vamp::PluginHostAdapter::getOutputDescriptors(), and Vamp::PluginAdapterBase::Impl::vampReleaseOutputDescriptor().

    -

    @@ -242,8 +231,6 @@

    Definition at line 142 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    -

    @@ -263,8 +250,6 @@

    Definition at line 145 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    -

    @@ -284,8 +269,6 @@

    Definition at line 148 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    -

    @@ -305,8 +288,6 @@

    Definition at line 151 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    -

    @@ -326,8 +307,6 @@

    Definition at line 154 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    -

    @@ -347,8 +326,6 @@

    Definition at line 157 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    -

    @@ -368,15 +345,32 @@ "Resolution" of result, if sampleType is vampVariableSampleRate.

    Definition at line 161 of file vamp.h.

    -

    Referenced by Vamp::PluginAdapterBase::Impl::getOutputDescriptor(), and Vamp::PluginHostAdapter::getOutputDescriptors().

    + +

    + +

    + +
    + +

    +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: -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/struct__VampParameterDescriptor-members.html --- a/code-doc/struct__VampParameterDescriptor-members.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/struct__VampParameterDescriptor-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + @@ -149,6 +149,8 @@

    Definition at line 67 of file system.h.

    +

    Referenced by usage().

    +

    @@ -169,8 +171,8 @@

    -


    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/tree.html --- a/code-doc/tree.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/tree.html Tue Dec 09 11:02:57 2008 +0000 @@ -61,40 +61,37 @@
    -

    VampPluginSDK

    +

    VampPluginSDK

    o*Vamp Plugin SDK

    o+Class List

    |o*_VampFeature

    |o*_VampFeatureList

    +

    |o*_VampFeatureUnion

    +

    |o*_VampFeatureV2

    |o*_VampOutputDescriptor

    |o*_VampParameterDescriptor

    |o*_VampPluginDescriptor

    |o*AmplitudeFollower

    +

    |o*FixedTempoEstimator

    +

    |o*FixedTempoEstimator::D

    |o*PercussionOnsetDetector

    |o*Vamp::Plugin

    |o*Vamp::Plugin::Feature

    |o*Vamp::Plugin::OutputDescriptor

    |o*Vamp::PluginAdapter< P >

    |o*Vamp::PluginAdapterBase

    -

    |o*Vamp::PluginAdapterBase::Impl

    |o*Vamp::PluginBase

    |o*Vamp::PluginBase::ParameterDescriptor

    |o*Vamp::HostExt::PluginBufferingAdapter

    -

    |o*Vamp::HostExt::PluginBufferingAdapter::Impl

    -

    |o*Vamp::HostExt::PluginBufferingAdapter::Impl::RingBuffer

    |o*Vamp::HostExt::PluginChannelAdapter

    -

    |o*Vamp::HostExt::PluginChannelAdapter::Impl

    |o*Vamp::PluginHostAdapter

    |o*Vamp::HostExt::PluginInputDomainAdapter

    -

    |o*Vamp::HostExt::PluginInputDomainAdapter::Impl

    |o*Vamp::HostExt::PluginLoader

    -

    |o*Vamp::HostExt::PluginLoader::Impl

    -

    |o*Vamp::HostExt::PluginLoader::Impl::InstanceCleaner

    -

    |o*Vamp::HostExt::PluginLoader::Impl::PluginDeletionNotifyAdapter

    -

    |o*Vamp::HostExt::PluginRateExtractor

    +

    |o*Vamp::HostExt::PluginSummarisingAdapter

    |o*Vamp::HostExt::PluginWrapper

    +

    |o*PowerSpectrum

    |o*Vamp::RealTime

    |o*SpectralCentroid

    |\*ZeroCrossing

    @@ -103,43 +100,40 @@

    o*Class Members

    @@ -155,30 +149,34 @@

    |o*AmplitudeFollower.cpp

    |o*AmplitudeFollower.h

    |o*doc-overview

    +

    |o*FixedTempoEstimator.cpp

    +

    |o*FixedTempoEstimator.h

    +

    |o*hostguard.h

    |o*PercussionOnsetDetector.cpp

    |o*PercussionOnsetDetector.h

    -

    |o*Plugin.h

    -

    |o*PluginAdapter.cpp

    +

    |o*plugguard.h

    +

    |o*vamp-sdk/Plugin.h

    +

    |o*vamp-hostsdk/Plugin.h

    |o*PluginAdapter.h

    -

    |o*PluginBase.h

    -

    |o*PluginBufferingAdapter.cpp

    +

    |o*vamp-sdk/PluginBase.h

    +

    |o*vamp-hostsdk/PluginBase.h

    |o*PluginBufferingAdapter.h

    -

    |o*PluginChannelAdapter.cpp

    |o*PluginChannelAdapter.h

    -

    |o*PluginHostAdapter.cpp

    |o*PluginHostAdapter.h

    -

    |o*PluginInputDomainAdapter.cpp

    |o*PluginInputDomainAdapter.h

    -

    |o*PluginLoader.cpp

    |o*PluginLoader.h

    |o*plugins.cpp

    -

    |o*PluginWrapper.cpp

    +

    |o*PluginSummarisingAdapter.h

    |o*PluginWrapper.h

    -

    |o*RealTime.cpp

    -

    |o*RealTime.h

    +

    |o*PowerSpectrum.cpp

    +

    |o*PowerSpectrum.h

    +

    |o*vamp-sdk/RealTime.h

    +

    |o*vamp-hostsdk/RealTime.h

    |o*SpectralCentroid.cpp

    |o*SpectralCentroid.h

    |o*system.h

    +

    |o*vamp-hostsdk.h

    +

    |o*vamp-sdk.h

    |o*vamp-simple-host.cpp

    |o*vamp.h

    |o*ZeroCrossing.cpp

    @@ -188,14 +186,12 @@

    \*File Members

    - - + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/union__VampFeatureUnion-members.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/union__VampFeatureUnion-members.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,35 @@ + + +VampPluginSDK: Member List + + + + + +
    +

    _VampFeatureUnion Member List

    This is the complete list of members for _VampFeatureUnion, including all inherited members.

    + + +
    v1_VampFeatureUnion
    v2_VampFeatureUnion

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/union__VampFeatureUnion.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/union__VampFeatureUnion.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,84 @@ + + +VampPluginSDK: _VampFeatureUnion Union Reference + + + + + +
    +

    _VampFeatureUnion Union Reference

    #include <vamp.h> +

    + +

    +List of all members.


    Detailed Description

    + +

    Definition at line 209 of file vamp.h.

    + + + + + + + +

    Public Attributes

    VampFeature v1
    VampFeatureV2 v2
    +

    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: +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-hostsdk_2PluginBase_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-hostsdk_2PluginBase_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,74 @@ + + +VampPluginSDK: PluginBase.h Source File + + + + + +
    +

    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
    +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-hostsdk_2PluginBase_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-hostsdk_2PluginBase_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,34 @@ + + +VampPluginSDK: PluginBase.h File Reference + + + + + +
    +

    vamp-hostsdk/PluginBase.h File Reference

    +

    + +

    +Go to the source code of this file. + +
    +

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-hostsdk_2Plugin_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-hostsdk_2Plugin_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,74 @@ + + +VampPluginSDK: Plugin.h Source File + + + + + +
    +

    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
    +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-hostsdk_2Plugin_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-hostsdk_2Plugin_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,34 @@ + + +VampPluginSDK: Plugin.h File Reference + + + + + +
    +

    vamp-hostsdk/Plugin.h File Reference

    +

    + +

    +Go to the source code of this file. + +
    +

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-hostsdk_2RealTime_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-hostsdk_2RealTime_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,73 @@ + + +VampPluginSDK: RealTime.h Source File + + + + + +
    +

    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
    +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-hostsdk_2RealTime_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-hostsdk_2RealTime_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,34 @@ + + +VampPluginSDK: RealTime.h File Reference + + + + + +
    +

    vamp-hostsdk/RealTime.h File Reference

    +

    + +

    +Go to the source code of this file. + +
    +

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-hostsdk_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-hostsdk_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,80 @@ + + +VampPluginSDK: vamp-hostsdk.h Source File + + + + + +
    +

    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 
    +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-hostsdk_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-hostsdk_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,34 @@ + + +VampPluginSDK: vamp-hostsdk.h File Reference + + + + + +
    +

    vamp-hostsdk.h File Reference

    +

    + +

    +Go to the source code of this file. + +
    +

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-sdk_2PluginBase_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-sdk_2PluginBase_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,151 @@ + + +VampPluginSDK: PluginBase.h Source File + + + + + +
    +

    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 "2.0"
    +00044 #define VAMP_SDK_MAJOR_VERSION 2
    +00045 #define VAMP_SDK_MINOR_VERSION 0
    +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
    +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-sdk_2PluginBase_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-sdk_2PluginBase_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,104 @@ + + +VampPluginSDK: PluginBase.h File Reference + + + + + +
    +

    vamp-sdk/PluginBase.h File Reference

    +

    + +

    +Go to the source code of this file. + + + + + + + + + + + + + + + + + +

    Namespaces

    namespace  Vamp

    Classes

    class  Vamp::PluginBase
     A base class for plugins with optional configurable parameters, programs, etc. More...
    struct  Vamp::PluginBase::ParameterDescriptor

    Defines

    #define VAMP_SDK_VERSION   "2.0"
    #define VAMP_SDK_MAJOR_VERSION   2
    #define VAMP_SDK_MINOR_VERSION   0
    +


    Define Documentation

    + +
    +
    + + + + +
    #define VAMP_SDK_VERSION   "2.0"
    +
    +
    + +

    + +

    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   0
    +
    +
    + +

    + +

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

    + +
    +

    +

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-sdk_2Plugin_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-sdk_2Plugin_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,195 @@ + + +VampPluginSDK: Plugin.h Source File + + + + + +
    +

    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     
    +00164     virtual InputDomain getInputDomain() const = 0;
    +00165 
    +00174     virtual size_t getPreferredBlockSize() const { return 0; }
    +00175 
    +00189     virtual size_t getPreferredStepSize() const { return 0; }
    +00190 
    +00194     virtual size_t getMinChannelCount() const { return 1; }
    +00195 
    +00199     virtual size_t getMaxChannelCount() const { return 1; }
    +00200 
    +00201     struct OutputDescriptor
    +00202     {
    +00209         std::string identifier;
    +00210 
    +00215         std::string name;
    +00216 
    +00222         std::string description;
    +00223 
    +00227         std::string unit;
    +00228 
    +00234         bool hasFixedBinCount;
    +00235 
    +00242         size_t binCount;
    +00243 
    +00248         std::vector<std::string> binNames;
    +00249 
    +00255         bool hasKnownExtents;
    +00256 
    +00261         float minValue;
    +00262 
    +00267         float maxValue;
    +00268 
    +00273         bool isQuantized;
    +00274 
    +00280         float quantizeStep;
    +00281 
    +00282         enum SampleType {
    +00283 
    +00285             OneSamplePerStep,
    +00286 
    +00288             FixedSampleRate,
    +00289 
    +00291             VariableSampleRate
    +00292         };
    +00293 
    +00297         SampleType sampleType;
    +00298 
    +00309         float sampleRate;
    +00310 
    +00315         bool hasDuration;
    +00316 
    +00317         OutputDescriptor() : // defaults for mandatory non-class-type members
    +00318             hasFixedBinCount(false), hasKnownExtents(false), isQuantized(false),
    +00319             sampleType(OneSamplePerStep), hasDuration(false) { }
    +00320     };
    +00321 
    +00322     typedef std::vector<OutputDescriptor> OutputList;
    +00323 
    +00329     virtual OutputList getOutputDescriptors() const = 0;
    +00330 
    +00331     struct Feature
    +00332     {
    +00339         bool hasTimestamp;
    +00340 
    +00347         RealTime timestamp;
    +00348 
    +00355         bool hasDuration;
    +00356 
    +00362         RealTime duration;
    +00363         
    +00369         std::vector<float> values;
    +00370 
    +00374         std::string label;
    +00375 
    +00376         Feature() : // defaults for mandatory non-class-type members
    +00377             hasTimestamp(false), hasDuration(false) { }
    +00378     };
    +00379 
    +00380     typedef std::vector<Feature> FeatureList;
    +00381 
    +00382     typedef std::map<int, FeatureList> FeatureSet; // key is output no
    +00383 
    +00411     virtual FeatureSet process(const float *const *inputBuffers,
    +00412                                RealTime timestamp) = 0;
    +00413 
    +00418     virtual FeatureSet getRemainingFeatures() = 0;
    +00419 
    +00425     virtual std::string getType() const { return "Feature Extraction Plugin"; }
    +00426 
    +00427 protected:
    +00428     Plugin(float inputSampleRate) :
    +00429         m_inputSampleRate(inputSampleRate) { }
    +00430 
    +00431     float m_inputSampleRate;
    +00432 };
    +00433 
    +00434 }
    +00435 
    +00436 _VAMP_SDK_PLUGSPACE_END(Plugin.h)
    +00437 
    +00438 #endif
    +00439 
    +00440 
    +00441 
    +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-sdk_2Plugin_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-sdk_2Plugin_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,45 @@ + + +VampPluginSDK: Plugin.h File Reference + + + + + +
    +

    vamp-sdk/Plugin.h File Reference

    +

    + +

    +Go to the source code of this file. + + + + + + + + + + + + +

    Namespaces

    namespace  Vamp

    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
    +

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-sdk_2RealTime_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-sdk_2RealTime_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,170 @@ + + +VampPluginSDK: RealTime.h Source File + + + + + +
    +

    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
    +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-sdk_2RealTime_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-sdk_2RealTime_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,44 @@ + + +VampPluginSDK: RealTime.h File Reference + + + + + +
    +

    vamp-sdk/RealTime.h File Reference

    +

    + +

    +Go to the source code of this file. + + + + + + + + + + + +

    Namespaces

    namespace  Vamp

    Classes

    class  Vamp::RealTime
     RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conversion functions. More...

    Functions

    std::ostream & Vamp::operator<< (std::ostream &out, const RealTime &rt)
    +

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-sdk_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-sdk_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,73 @@ + + +VampPluginSDK: vamp-sdk.h Source File + + + + + +
    +

    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 
    +
    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-sdk_8h.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/code-doc/vamp-sdk_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -0,0 +1,34 @@ + + +VampPluginSDK: vamp-sdk.h File Reference + + + + + +
    +

    vamp-sdk.h File Reference

    +

    + +

    +Go to the source code of this file. + +
    +

    +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  + +doxygen 1.5.6
    + + diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-simple-host_8cpp-source.html --- a/code-doc/vamp-simple-host_8cpp-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/vamp-simple-host_8cpp-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

    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 /*
    @@ -27,613 +27,814 @@
     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     FFT code from Don Cross's public domain FFT implementation.
    -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 */
    +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 #include "vamp-sdk/PluginHostAdapter.h"
    -00039 #include "vamp-sdk/hostext/PluginChannelAdapter.h"
    -00040 #include "vamp-sdk/hostext/PluginInputDomainAdapter.h"
    -00041 #include "vamp-sdk/hostext/PluginLoader.h"
    -00042 #include "vamp/vamp.h"
    -00043 
    -00044 #include <iostream>
    -00045 #include <fstream>
    -00046 #include <set>
    -00047 #include <sndfile.h>
    +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 <cstring>
    -00050 #include <cstdlib>
    -00051 
    -00052 #include "system.h"
    -00053 
    -00054 #include <cmath>
    -00055 
    -00056 using namespace std;
    +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 using Vamp::Plugin;
    -00059 using Vamp::PluginHostAdapter;
    -00060 using Vamp::RealTime;
    -00061 using Vamp::HostExt::PluginLoader;
    +00058 #include <cstring>
    +00059 #include <cstdlib>
    +00060 
    +00061 #include "system.h"
     00062 
    -00063 #define HOST_VERSION "1.1"
    -00064 
    -00065 enum Verbosity {
    -00066     PluginIds,
    -00067     PluginOutputIds,
    -00068     PluginInformation
    -00069 };
    -00070 
    -00071 void printFeatures(int, int, int, Plugin::FeatureSet, ofstream *, bool frames);
    -00072 void transformInput(float *, size_t);
    -00073 void fft(unsigned int, bool, double *, double *, double *, double *);
    -00074 void printPluginPath(bool verbose);
    -00075 void printPluginCategoryList();
    -00076 void enumeratePlugins(Verbosity);
    -00077 void listPluginsInLibrary(string soname);
    -00078 int runPlugin(string myname, string soname, string id, string output,
    -00079               int outputNo, string inputFile, string outfilename, bool frames);
    -00080 
    -00081 void usage(const char *name)
    -00082 {
    -00083     cerr << "\n"
    -00084          << name << ": A simple Vamp plugin host.\n\n"
    -00085         "Centre for Digital Music, Queen Mary, University of London.\n"
    -00086         "Copyright 2006-2007 Chris Cannam and QMUL.\n"
    -00087         "Freely redistributable; published under a BSD-style license.\n\n"
    -00088         "Usage:\n\n"
    -00089         "  " << name << " [-s] pluginlibrary[." << PLUGIN_SUFFIX << "]:plugin[:output] file.wav [-o out.txt]\n"
    -00090         "  " << name << " [-s] pluginlibrary[." << PLUGIN_SUFFIX << "]:plugin file.wav [outputno] [-o out.txt]\n\n"
    -00091         "    -- Load plugin id \"plugin\" from \"pluginlibrary\" and run it on the\n"
    -00092         "       audio data in \"file.wav\", retrieving the named \"output\", or output\n"
    -00093         "       number \"outputno\" (the first output by default) and dumping it to\n"
    -00094         "       standard output, or to \"out.txt\" if the -o option is given.\n\n"
    -00095         "       \"pluginlibrary\" should be a library name, not a file path; the\n"
    -00096         "       standard Vamp library search path will be used to locate it.  If\n"
    -00097         "       a file path is supplied, the directory part(s) will be ignored.\n\n"
    -00098         "       If the -s option is given, results will be labelled with the audio\n"
    -00099         "       sample frame at which they occur. Otherwise, they will be labelled\n"
    -00100         "       with time in seconds.\n\n"
    -00101         "  " << name << " -l\n\n"
    -00102         "    -- List the plugin libraries and Vamp plugins in the library search path\n"
    -00103         "       in a verbose human-readable format.\n\n"
    -00104         "  " << name << " --list-ids\n\n"
    -00105         "    -- List the plugins in the search path in a terse machine-readable format,\n"
    -00106         "       in the form vamp:soname:identifier.\n\n"
    -00107         "  " << name << " --list-outputs\n\n"
    -00108         "    -- List the outputs for plugins in the search path in a machine-readable\n"
    -00109         "       format, in the form vamp:soname:identifier:output.\n\n"
    -00110         "  " << name << " --list-by-category\n\n"
    -00111         "    -- List the plugins as a plugin index by category, in a machine-readable\n"
    -00112         "       format.  The format may change in future releases.\n\n"
    -00113         "  " << name << " -p\n\n"
    -00114         "    -- Print out the Vamp library search path.\n\n"
    -00115         "  " << name << " -v\n\n"
    -00116         "    -- Display version information only.\n"
    -00117          << endl;
    -00118     exit(2);
    -00119 }
    -00120 
    -00121 int main(int argc, char **argv)
    -00122 {
    -00123     char *scooter = argv[0];
    -00124     char *name = 0;
    -00125     while (scooter && *scooter) {
    -00126         if (*scooter == '/' || *scooter == '\\') name = ++scooter;
    -00127         else ++scooter;
    -00128     }
    -00129     if (!name || !*name) name = argv[0];
    -00130     
    -00131     if (argc < 2) usage(name);
    -00132 
    -00133     if (argc == 2) {
    -00134 
    -00135         if (!strcmp(argv[1], "-v")) {
    +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-2008 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             cout << "Simple Vamp plugin host version: " << HOST_VERSION << endl
    -00138                  << "Vamp API version: " << VAMP_API_VERSION << endl
    -00139                  << "Vamp SDK version: " << VAMP_SDK_VERSION << endl;
    -00140             return 0;
    -00141 
    -00142         } else if (!strcmp(argv[1], "-l")) {
    -00143 
    -00144             printPluginPath(true);
    -00145             enumeratePlugins(PluginInformation);
    -00146             return 0;
    -00147 
    -00148         } else if (!strcmp(argv[1], "-p")) {
    -00149 
    -00150             printPluginPath(false);
    -00151             return 0;
    +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         } else if (!strcmp(argv[1], "--list-ids")) {
    -00154 
    -00155             enumeratePlugins(PluginIds);
    +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], "--list-outputs")) {
    +00158         } else if (!strcmp(argv[1], "-l") || !strcmp(argv[1], "--list")) {
     00159 
    -00160             enumeratePlugins(PluginOutputIds);
    -00161             return 0;
    -00162 
    -00163         } else if (!strcmp(argv[1], "--list-by-category")) {
    -00164 
    -00165             printPluginCategoryList();
    -00166             return 0;
    -00167 
    -00168         } else usage(name);
    -00169     }
    +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     if (argc < 3) usage(name);
    -00172 
    -00173     bool useFrames = false;
    -00174     
    -00175     int base = 1;
    -00176     if (!strcmp(argv[1], "-s")) {
    -00177         useFrames = true;
    -00178         base = 2;
    -00179     }
    +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     string soname = argv[base];
    -00182     string wavname = argv[base+1];
    -00183     string plugid = "";
    -00184     string output = "";
    -00185     int outputNo = -1;
    -00186     string outfilename;
    -00187 
    -00188     if (argc >= base+3) {
    -00189 
    -00190         int idx = base+2;
    +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 (isdigit(*argv[idx])) {
    -00193             outputNo = atoi(argv[idx++]);
    -00194         }
    -00195 
    -00196         if (argc == idx + 2) {
    -00197             if (!strcmp(argv[idx], "-o")) {
    -00198                 outfilename = argv[idx+1];
    -00199             } else usage(name);
    -00200         } else if (argc != idx) {
    -00201             (usage(name));
    -00202         }
    -00203     }
    -00204 
    -00205     cerr << endl << name << ": Running..." << endl;
    -00206 
    -00207     cerr << "Reading file: \"" << wavname << "\", writing to ";
    -00208     if (outfilename == "") {
    -00209         cerr << "standard output" << endl;
    -00210     } else {
    -00211         cerr << "\"" << outfilename << "\"" << endl;
    -00212     }
    -00213 
    -00214     string::size_type sep = soname.find(':');
    -00215 
    -00216     if (sep != string::npos) {
    -00217         plugid = soname.substr(sep + 1);
    -00218         soname = soname.substr(0, sep);
    -00219 
    -00220         sep = plugid.find(':');
    -00221         if (sep != string::npos) {
    -00222             output = plugid.substr(sep + 1);
    -00223             plugid = plugid.substr(0, sep);
    -00224         }
    -00225     }
    -00226 
    -00227     if (plugid == "") {
    -00228         usage(name);
    -00229     }
    -00230 
    -00231     if (output != "" && outputNo != -1) {
    -00232         usage(name);
    +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     if (output == "" && outputNo == -1) {
    -00236         outputNo = 0;
    -00237     }
    -00238 
    -00239     return runPlugin(name, soname, plugid, output, outputNo,
    -00240                      wavname, outfilename, useFrames);
    -00241 }
    -00242 
    -00243 
    -00244 int runPlugin(string myname, string soname, string id,
    -00245               string output, int outputNo, string wavname,
    -00246               string outfilename, bool useFrames)
    -00247 {
    -00248     PluginLoader *loader = PluginLoader::getInstance();
    -00249 
    -00250     PluginLoader::PluginKey key = loader->composePluginKey(soname, id);
    -00251     
    -00252     SNDFILE *sndfile;
    -00253     SF_INFO sfinfo;
    -00254     memset(&sfinfo, 0, sizeof(SF_INFO));
    +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     sndfile = sf_open(wavname.c_str(), SFM_READ, &sfinfo);
    -00257     if (!sndfile) {
    -00258         cerr << myname << ": ERROR: Failed to open input file \""
    -00259              << wavname << "\": " << sf_strerror(sndfile) << endl;
    -00260         return 1;
    -00261     }
    -00262 
    -00263     ofstream *out = 0;
    -00264     if (outfilename != "") {
    -00265         out = new ofstream(outfilename.c_str(), ios::out);
    -00266         if (!*out) {
    -00267             cerr << myname << ": ERROR: Failed to open output file \""
    -00268                  << outfilename << "\" for writing" << endl;
    -00269             delete out;
    -00270             return 1;
    -00271         }
    -00272     }
    -00273 
    -00274     Plugin *plugin = loader->loadPlugin
    -00275         (key, sfinfo.samplerate, PluginLoader::ADAPT_ALL_SAFE);
    -00276     if (!plugin) {
    -00277         cerr << myname << ": ERROR: Failed to load plugin \"" << id
    -00278              << "\" from library \"" << soname << "\"" << endl;
    -00279         sf_close(sndfile);
    -00280         if (out) {
    -00281             out->close();
    -00282             delete out;
    -00283         }
    -00284         return 1;
    -00285     }
    -00286 
    -00287     cerr << "Running plugin: \"" << plugin->getIdentifier() << "\"..." << endl;
    -00288 
    -00289     int blockSize = plugin->getPreferredBlockSize();
    -00290     int stepSize = plugin->getPreferredStepSize();
    -00291 
    -00292     if (blockSize == 0) {
    -00293         blockSize = 1024;
    -00294     }
    -00295     if (stepSize == 0) {
    -00296         if (plugin->getInputDomain() == Plugin::FrequencyDomain) {
    -00297             stepSize = blockSize/2;
    -00298         } else {
    -00299             stepSize = blockSize;
    -00300         }
    -00301     } else if (stepSize > blockSize) {
    -00302         cerr << "WARNING: stepSize " << stepSize << " > blockSize " << blockSize << ", resetting blockSize to ";
    -00303         if (plugin->getInputDomain() == Plugin::FrequencyDomain) {
    -00304             blockSize = stepSize * 2;
    -00305         } else {
    -00306             blockSize = stepSize;
    -00307         }
    -00308         cerr << blockSize << endl;
    -00309     }
    -00310 
    -00311     int channels = sfinfo.channels;
    -00312 
    -00313     float *filebuf = new float[blockSize * channels];
    -00314     float **plugbuf = new float*[channels];
    -00315     for (int c = 0; c < channels; ++c) plugbuf[c] = new float[blockSize + 2];
    -00316 
    -00317     cerr << "Using block size = " << blockSize << ", step size = "
    -00318               << stepSize << endl;
    -00319 
    -00320     int minch = plugin->getMinChannelCount();
    -00321     int maxch = plugin->getMaxChannelCount();
    -00322     cerr << "Plugin accepts " << minch << " -> " << maxch << " channel(s)" << endl;
    -00323     cerr << "Sound file has " << channels << " (will mix/augment if necessary)" << endl;
    -00324 
    -00325     Plugin::OutputList outputs = plugin->getOutputDescriptors();
    -00326     Plugin::OutputDescriptor od;
    -00327 
    -00328     int returnValue = 1;
    -00329     int progress = 0;
    -00330 
    -00331     if (outputs.empty()) {
    -00332         cerr << "ERROR: Plugin has no outputs!" << endl;
    -00333         goto done;
    -00334     }
    -00335 
    -00336     if (outputNo < 0) {
    -00337 
    -00338         for (size_t oi = 0; oi < outputs.size(); ++oi) {
    -00339             if (outputs[oi].identifier == output) {
    -00340                 outputNo = oi;
    -00341                 break;
    -00342             }
    -00343         }
    +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 
    +00343     int channels = sfinfo.channels;
     00344 
    -00345         if (outputNo < 0) {
    -00346             cerr << "ERROR: Non-existent output \"" << output << "\" requested" << endl;
    -00347             goto done;
    -00348         }
    -00349 
    -00350     } else {
    +00345     float *filebuf = new float[blockSize * channels];
    +00346     float **plugbuf = new float*[channels];
    +00347     for (int c = 0; c < channels; ++c) plugbuf[c] = new float[blockSize + 2];
    +00348 
    +00349     cerr << "Using block size = " << blockSize << ", step size = "
    +00350               << stepSize << endl;
     00351 
    -00352         if (int(outputs.size()) <= outputNo) {
    -00353             cerr << "ERROR: Output " << outputNo << " requested, but plugin has only " << outputs.size() << " output(s)" << endl;
    -00354             goto done;
    -00355         }        
    -00356     }
    -00357 
    -00358     od = outputs[outputNo];
    -00359     cerr << "Output is: \"" << od.identifier << "\"" << endl;
    +00352     // The channel queries here are for informational purposes only --
    +00353     // a PluginChannelAdapter is being used automatically behind the
    +00354     // scenes, and it will take case of any channel mismatch
    +00355 
    +00356     int minch = plugin->getMinChannelCount();
    +00357     int maxch = plugin->getMaxChannelCount();
    +00358     cerr << "Plugin accepts " << minch << " -> " << maxch << " channel(s)" << endl;
    +00359     cerr << "Sound file has " << channels << " (will mix/augment if necessary)" << endl;
     00360 
    -00361     if (!plugin->initialise(channels, stepSize, blockSize)) {
    -00362         cerr << "ERROR: Plugin initialise (channels = " << channels
    -00363              << ", stepSize = " << stepSize << ", blockSize = "
    -00364              << blockSize << ") failed." << endl;
    -00365         goto done;
    -00366     }
    -00367 
    -00368     for (size_t i = 0; i < sfinfo.frames; i += stepSize) {
    -00369 
    -00370         int count;
    -00371 
    -00372         if (sf_seek(sndfile, i, SEEK_SET) < 0) {
    -00373             cerr << "ERROR: sf_seek failed: " << sf_strerror(sndfile) << endl;
    -00374             break;
    -00375         }
    -00376         
    -00377         if ((count = sf_readf_float(sndfile, filebuf, blockSize)) < 0) {
    -00378             cerr << "ERROR: sf_readf_float failed: " << sf_strerror(sndfile) << endl;
    -00379             break;
    -00380         }
    -00381 
    -00382         for (int c = 0; c < channels; ++c) {
    -00383             int j = 0;
    -00384             while (j < count) {
    -00385                 plugbuf[c][j] = filebuf[j * sfinfo.channels + c];
    -00386                 ++j;
    -00387             }
    -00388             while (j < blockSize) {
    -00389                 plugbuf[c][j] = 0.0f;
    -00390                 ++j;
    -00391             }
    -00392         }
    -00393 
    -00394         printFeatures
    -00395             (i, sfinfo.samplerate, outputNo, plugin->process
    -00396              (plugbuf, RealTime::frame2RealTime(i, sfinfo.samplerate)),
    -00397              out, useFrames);
    -00398 
    -00399         int pp = progress;
    -00400         progress = lrintf((float(i) / sfinfo.frames) * 100.f);
    -00401         if (progress != pp && out) {
    -00402             cerr << "\r" << progress << "%";
    -00403         }
    -00404     }
    -00405     if (out) cerr << "\rDone" << endl;
    -00406 
    -00407     printFeatures(sfinfo.frames, sfinfo.samplerate, outputNo,
    -00408                   plugin->getRemainingFeatures(), out, useFrames);
    -00409 
    -00410     returnValue = 0;
    -00411 
    -00412 done:
    -00413     delete plugin;
    -00414     if (out) {
    -00415         out->close();
    -00416         delete out;
    -00417     }
    -00418     sf_close(sndfile);
    -00419     return returnValue;
    -00420 }
    -00421 
    -00422 void
    -00423 printFeatures(int frame, int sr, int output,
    -00424               Plugin::FeatureSet features, ofstream *out, bool useFrames)
    -00425 {
    -00426     for (unsigned int i = 0; i < features[output].size(); ++i) {
    -00427 
    -00428         if (useFrames) {
    -00429 
    -00430             int displayFrame = frame;
    -00431 
    -00432             if (features[output][i].hasTimestamp) {
    -00433                 displayFrame = RealTime::realTime2Frame
    -00434                     (features[output][i].timestamp, sr);
    -00435             }
    -00436 
    -00437             (out ? *out : cout) << displayFrame << ":";
    -00438 
    -00439         } else {
    -00440 
    -00441             RealTime rt = RealTime::frame2RealTime(frame, sr);
    +00361     Plugin::OutputList outputs = plugin->getOutputDescriptors();
    +00362     Plugin::OutputDescriptor od;
    +00363 
    +00364     int returnValue = 1;
    +00365     int progress = 0;
    +00366 
    +00367     RealTime rt;
    +00368     PluginWrapper *wrapper = 0;
    +00369     RealTime adjustment = RealTime::zeroTime;
    +00370 
    +00371     if (outputs.empty()) {
    +00372         cerr << "ERROR: Plugin has no outputs!" << endl;
    +00373         goto done;
    +00374     }
    +00375 
    +00376     if (outputNo < 0) {
    +00377 
    +00378         for (size_t oi = 0; oi < outputs.size(); ++oi) {
    +00379             if (outputs[oi].identifier == output) {
    +00380                 outputNo = oi;
    +00381                 break;
    +00382             }
    +00383         }
    +00384 
    +00385         if (outputNo < 0) {
    +00386             cerr << "ERROR: Non-existent output \"" << output << "\" requested" << endl;
    +00387             goto done;
    +00388         }
    +00389 
    +00390     } else {
    +00391 
    +00392         if (int(outputs.size()) <= outputNo) {
    +00393             cerr << "ERROR: Output " << outputNo << " requested, but plugin has only " << outputs.size() << " output(s)" << endl;
    +00394             goto done;
    +00395         }        
    +00396     }
    +00397 
    +00398     od = outputs[outputNo];
    +00399     cerr << "Output is: \"" << od.identifier << "\"" << endl;
    +00400 
    +00401     if (!plugin->initialise(channels, stepSize, blockSize)) {
    +00402         cerr << "ERROR: Plugin initialise (channels = " << channels
    +00403              << ", stepSize = " << stepSize << ", blockSize = "
    +00404              << blockSize << ") failed." << endl;
    +00405         goto done;
    +00406     }
    +00407 
    +00408     wrapper = dynamic_cast<PluginWrapper *>(plugin);
    +00409     if (wrapper) {
    +00410         // See documentation for
    +00411         // PluginInputDomainAdapter::getTimestampAdjustment
    +00412         PluginInputDomainAdapter *ida =
    +00413             wrapper->getWrapper<PluginInputDomainAdapter>();
    +00414         if (ida) adjustment = ida->getTimestampAdjustment();
    +00415     }
    +00416 
    +00417     for (size_t i = 0; i < sfinfo.frames; i += stepSize) {
    +00418 
    +00419         int count;
    +00420 
    +00421         if (sf_seek(sndfile, i, SEEK_SET) < 0) {
    +00422             cerr << "ERROR: sf_seek failed: " << sf_strerror(sndfile) << endl;
    +00423             break;
    +00424         }
    +00425         
    +00426         if ((count = sf_readf_float(sndfile, filebuf, blockSize)) < 0) {
    +00427             cerr << "ERROR: sf_readf_float failed: " << sf_strerror(sndfile) << endl;
    +00428             break;
    +00429         }
    +00430 
    +00431         for (int c = 0; c < channels; ++c) {
    +00432             int j = 0;
    +00433             while (j < count) {
    +00434                 plugbuf[c][j] = filebuf[j * sfinfo.channels + c];
    +00435                 ++j;
    +00436             }
    +00437             while (j < blockSize) {
    +00438                 plugbuf[c][j] = 0.0f;
    +00439                 ++j;
    +00440             }
    +00441         }
     00442 
    -00443             if (features[output][i].hasTimestamp) {
    -00444                 rt = features[output][i].timestamp;
    -00445             }
    -00446 
    -00447             (out ? *out : cout) << rt.toString() << ":";
    -00448         }
    +00443         rt = RealTime::frame2RealTime(i, sfinfo.samplerate);
    +00444 
    +00445         printFeatures
    +00446             (RealTime::realTime2Frame(rt + adjustment, sfinfo.samplerate),
    +00447              sfinfo.samplerate, outputNo, plugin->process(plugbuf, rt),
    +00448              out, useFrames);
     00449 
    -00450         for (unsigned int j = 0; j < features[output][i].values.size(); ++j) {
    -00451             (out ? *out : cout) << " " << features[output][i].values[j];
    -00452         }
    -00453 
    -00454         (out ? *out : cout) << endl;
    +00450         int pp = progress;
    +00451         progress = lrintf((float(i) / sfinfo.frames) * 100.f);
    +00452         if (progress != pp && out) {
    +00453             cerr << "\r" << progress << "%";
    +00454         }
     00455     }
    -00456 }
    +00456     if (out) cerr << "\rDone" << endl;
     00457 
    -00458 void
    -00459 printPluginPath(bool verbose)
    -00460 {
    -00461     if (verbose) {
    -00462         cout << "\nVamp plugin search path: ";
    -00463     }
    -00464 
    -00465     vector<string> path = PluginHostAdapter::getPluginPath();
    -00466     for (size_t i = 0; i < path.size(); ++i) {
    -00467         if (verbose) {
    -00468             cout << "[" << path[i] << "]";
    -00469         } else {
    -00470             cout << path[i] << endl;
    -00471         }
    -00472     }
    -00473 
    -00474     if (verbose) cout << endl;
    -00475 }
    -00476 
    -00477 void
    -00478 enumeratePlugins(Verbosity verbosity)
    +00458     rt = RealTime::frame2RealTime(sfinfo.frames, sfinfo.samplerate);
    +00459 
    +00460     printFeatures(RealTime::realTime2Frame(rt + adjustment, sfinfo.samplerate),
    +00461                   sfinfo.samplerate, outputNo,
    +00462                   plugin->getRemainingFeatures(), out, useFrames);
    +00463 
    +00464     returnValue = 0;
    +00465 
    +00466 done:
    +00467     delete plugin;
    +00468     if (out) {
    +00469         out->close();
    +00470         delete out;
    +00471     }
    +00472     sf_close(sndfile);
    +00473     return returnValue;
    +00474 }
    +00475 
    +00476 void
    +00477 printFeatures(int frame, int sr, int output,
    +00478               Plugin::FeatureSet features, ofstream *out, bool useFrames)
     00479 {
    -00480     PluginLoader *loader = PluginLoader::getInstance();
    +00480     for (unsigned int i = 0; i < features[output].size(); ++i) {
     00481 
    -00482     if (verbosity == PluginInformation) {
    -00483         cout << "\nVamp plugin libraries found in search path:" << endl;
    -00484     }
    +00482         if (useFrames) {
    +00483 
    +00484             int displayFrame = frame;
     00485 
    -00486     vector<PluginLoader::PluginKey> plugins = loader->listPlugins();
    -00487     typedef multimap<string, PluginLoader::PluginKey>
    -00488         LibraryMap;
    -00489     LibraryMap libraryMap;
    +00486             if (features[output][i].hasTimestamp) {
    +00487                 displayFrame = RealTime::realTime2Frame
    +00488                     (features[output][i].timestamp, sr);
    +00489             }
     00490 
    -00491     for (size_t i = 0; i < plugins.size(); ++i) {
    -00492         string path = loader->getLibraryPathForPlugin(plugins[i]);
    -00493         libraryMap.insert(LibraryMap::value_type(path, plugins[i]));
    -00494     }
    -00495 
    -00496     string prevPath = "";
    -00497     int index = 0;
    +00491             (out ? *out : cout) << displayFrame;
    +00492 
    +00493             if (features[output][i].hasDuration) {
    +00494                 displayFrame = RealTime::realTime2Frame
    +00495                     (features[output][i].duration, sr);
    +00496                 (out ? *out : cout) << "," << displayFrame;
    +00497             }
     00498 
    -00499     for (LibraryMap::iterator i = libraryMap.begin();
    -00500          i != libraryMap.end(); ++i) {
    -00501         
    -00502         string path = i->first;
    -00503         PluginLoader::PluginKey key = i->second;
    +00499             (out ? *out : cout)  << ":";
    +00500 
    +00501         } else {
    +00502 
    +00503             RealTime rt = RealTime::frame2RealTime(frame, sr);
     00504 
    -00505         if (path != prevPath) {
    -00506             prevPath = path;
    -00507             index = 0;
    -00508             if (verbosity == PluginInformation) {
    -00509                 cout << "\n  " << path << ":" << endl;
    -00510             }
    -00511         }
    -00512 
    -00513         Plugin *plugin = loader->loadPlugin(key, 48000);
    -00514         if (plugin) {
    +00505             if (features[output][i].hasTimestamp) {
    +00506                 rt = features[output][i].timestamp;
    +00507             }
    +00508 
    +00509             (out ? *out : cout) << rt.toString();
    +00510 
    +00511             if (features[output][i].hasDuration) {
    +00512                 rt = features[output][i].duration;
    +00513                 (out ? *out : cout) << "," << rt.toString();
    +00514             }
     00515 
    -00516             char c = char('A' + index);
    -00517             if (c > 'Z') c = char('a' + (index - 26));
    +00516             (out ? *out : cout) << ":";
    +00517         }
     00518 
    -00519             if (verbosity == PluginInformation) {
    -00520 
    -00521                 cout << "    [" << c << "] [v"
    -00522                      << plugin->getVampApiVersion() << "] "
    -00523                      << plugin->getName() << ", \""
    -00524                      << plugin->getIdentifier() << "\"" << " ["
    -00525                      << plugin->getMaker() << "]" << endl;
    +00519         for (unsigned int j = 0; j < features[output][i].values.size(); ++j) {
    +00520             (out ? *out : cout) << " " << features[output][i].values[j];
    +00521         }
    +00522 
    +00523         (out ? *out : cout) << endl;
    +00524     }
    +00525 }
     00526 
    -00527                 PluginLoader::PluginCategoryHierarchy category =
    -00528                     loader->getPluginCategory(key);
    -00529 
    -00530                 if (!category.empty()) {
    -00531                     cout << "       ";
    -00532                     for (size_t ci = 0; ci < category.size(); ++ci) {
    -00533                         cout << " > " << category[ci];
    -00534                     }
    -00535                     cout << endl;
    -00536                 }
    -00537 
    -00538                 if (plugin->getDescription() != "") {
    -00539                     cout << "        - " << plugin->getDescription() << endl;
    -00540                 }
    -00541 
    -00542             } else if (verbosity == PluginIds) {
    -00543                 cout << "vamp:" << key << endl;
    -00544             }
    -00545             
    -00546             Plugin::OutputList outputs =
    -00547                 plugin->getOutputDescriptors();
    -00548 
    -00549             if (outputs.size() > 1 || verbosity == PluginOutputIds) {
    -00550                 for (size_t j = 0; j < outputs.size(); ++j) {
    -00551                     if (verbosity == PluginInformation) {
    -00552                         cout << "         (" << j << ") "
    -00553                              << outputs[j].name << ", \""
    -00554                              << outputs[j].identifier << "\"" << endl;
    -00555                         if (outputs[j].description != "") {
    -00556                             cout << "             - " 
    -00557                                  << outputs[j].description << endl;
    -00558                         }
    -00559                     } else if (verbosity == PluginOutputIds) {
    -00560                         cout << "vamp:" << key << ":" << outputs[j].identifier << endl;
    -00561                     }
    -00562                 }
    -00563             }
    -00564 
    -00565             ++index;
    +00527 void
    +00528 printPluginPath(bool verbose)
    +00529 {
    +00530     if (verbose) {
    +00531         cout << "\nVamp plugin search path: ";
    +00532     }
    +00533 
    +00534     vector<string> path = PluginHostAdapter::getPluginPath();
    +00535     for (size_t i = 0; i < path.size(); ++i) {
    +00536         if (verbose) {
    +00537             cout << "[" << path[i] << "]";
    +00538         } else {
    +00539             cout << path[i] << endl;
    +00540         }
    +00541     }
    +00542 
    +00543     if (verbose) cout << endl;
    +00544 }
    +00545 
    +00546 static
    +00547 string
    +00548 header(string text, int level)
    +00549 {
    +00550     string out = '\n' + text + '\n';
    +00551     for (size_t i = 0; i < text.length(); ++i) {
    +00552         out += (level == 1 ? '=' : level == 2 ? '-' : '~');
    +00553     }
    +00554     out += '\n';
    +00555     return out;
    +00556 }
    +00557 
    +00558 void
    +00559 enumeratePlugins(Verbosity verbosity)
    +00560 {
    +00561     PluginLoader *loader = PluginLoader::getInstance();
    +00562 
    +00563     if (verbosity == PluginInformation) {
    +00564         cout << "\nVamp plugin libraries found in search path:" << endl;
    +00565     }
     00566 
    -00567             delete plugin;
    -00568         }
    -00569     }
    -00570 
    -00571     if (verbosity == PluginInformation) {
    -00572         cout << endl;
    -00573     }
    -00574 }
    -00575 
    -00576 void
    -00577 printPluginCategoryList()
    -00578 {
    -00579     PluginLoader *loader = PluginLoader::getInstance();
    -00580 
    -00581     vector<PluginLoader::PluginKey> plugins = loader->listPlugins();
    -00582 
    -00583     set<string> printedcats;
    -00584 
    -00585     for (size_t i = 0; i < plugins.size(); ++i) {
    -00586 
    -00587         PluginLoader::PluginKey key = plugins[i];
    -00588         
    -00589         PluginLoader::PluginCategoryHierarchy category =
    -00590             loader->getPluginCategory(key);
    -00591 
    -00592         Plugin *plugin = loader->loadPlugin(key, 48000);
    -00593         if (!plugin) continue;
    -00594 
    -00595         string catstr = "";
    -00596 
    -00597         if (category.empty()) catstr = '|';
    -00598         else {
    -00599             for (size_t j = 0; j < category.size(); ++j) {
    -00600                 catstr += category[j];
    -00601                 catstr += '|';
    -00602                 if (printedcats.find(catstr) == printedcats.end()) {
    -00603                     std::cout << catstr << std::endl;
    -00604                     printedcats.insert(catstr);
    -00605                 }
    -00606             }
    -00607         }
    -00608 
    -00609         std::cout << catstr << key << ":::" << plugin->getName() << ":::" << plugin->getMaker() << ":::" << plugin->getDescription() << std::endl;
    -00610     }
    -00611 }
    -00612 
    +00567     vector<PluginLoader::PluginKey> plugins = loader->listPlugins();
    +00568     typedef multimap<string, PluginLoader::PluginKey>
    +00569         LibraryMap;
    +00570     LibraryMap libraryMap;
    +00571 
    +00572     for (size_t i = 0; i < plugins.size(); ++i) {
    +00573         string path = loader->getLibraryPathForPlugin(plugins[i]);
    +00574         libraryMap.insert(LibraryMap::value_type(path, plugins[i]));
    +00575     }
    +00576 
    +00577     string prevPath = "";
    +00578     int index = 0;
    +00579 
    +00580     for (LibraryMap::iterator i = libraryMap.begin();
    +00581          i != libraryMap.end(); ++i) {
    +00582         
    +00583         string path = i->first;
    +00584         PluginLoader::PluginKey key = i->second;
    +00585 
    +00586         if (path != prevPath) {
    +00587             prevPath = path;
    +00588             index = 0;
    +00589             if (verbosity == PluginInformation) {
    +00590                 cout << "\n  " << path << ":" << endl;
    +00591             } else if (verbosity == PluginInformationDetailed) {
    +00592                 string::size_type ki = i->second.find(':');
    +00593                 string text = "Library \"" + i->second.substr(0, ki) + "\"";
    +00594                 cout << "\n" << header(text, 1);
    +00595             }
    +00596         }
    +00597 
    +00598         Plugin *plugin = loader->loadPlugin(key, 48000);
    +00599         if (plugin) {
    +00600 
    +00601             char c = char('A' + index);
    +00602             if (c > 'Z') c = char('a' + (index - 26));
    +00603 
    +00604             PluginLoader::PluginCategoryHierarchy category =
    +00605                 loader->getPluginCategory(key);
    +00606             string catstr;
    +00607             if (!category.empty()) {
    +00608                 for (size_t ci = 0; ci < category.size(); ++ci) {
    +00609                     if (ci > 0) catstr += " > ";
    +00610                         catstr += category[ci];
    +00611                 }
    +00612             }
    +00613 
    +00614             if (verbosity == PluginInformation) {
    +00615 
    +00616                 cout << "    [" << c << "] [v"
    +00617                      << plugin->getVampApiVersion() << "] "
    +00618                      << plugin->getName() << ", \""
    +00619                      << plugin->getIdentifier() << "\"" << " ["
    +00620                      << plugin->getMaker() << "]" << endl;
    +00621                 
    +00622                 if (catstr != "") {
    +00623                     cout << "       > " << catstr << endl;
    +00624                 }
    +00625 
    +00626                 if (plugin->getDescription() != "") {
    +00627                     cout << "        - " << plugin->getDescription() << endl;
    +00628                 }
    +00629 
    +00630             } else if (verbosity == PluginInformationDetailed) {
    +00631 
    +00632                 cout << header(plugin->getName(), 2);
    +00633                 cout << " - Identifier:         "
    +00634                      << key << endl;
    +00635                 cout << " - Plugin Version:     " 
    +00636                      << plugin->getPluginVersion() << endl;
    +00637                 cout << " - Vamp API Version:   "
    +00638                      << plugin->getVampApiVersion() << endl;
    +00639                 cout << " - Maker:              \""
    +00640                      << plugin->getMaker() << "\"" << endl;
    +00641                 cout << " - Copyright:          \""
    +00642                      << plugin->getCopyright() << "\"" << endl;
    +00643                 cout << " - Description:        \""
    +00644                      << plugin->getDescription() << "\"" << endl;
    +00645                 cout << " - Input Domain:       "
    +00646                      << (plugin->getInputDomain() == Vamp::Plugin::TimeDomain ?
    +00647                          "Time Domain" : "Frequency Domain") << endl;
    +00648                 cout << " - Default Step Size:  " 
    +00649                      << plugin->getPreferredStepSize() << endl;
    +00650                 cout << " - Default Block Size: " 
    +00651                      << plugin->getPreferredBlockSize() << endl;
    +00652                 cout << " - Minimum Channels:   " 
    +00653                      << plugin->getMinChannelCount() << endl;
    +00654                 cout << " - Maximum Channels:   " 
    +00655                      << plugin->getMaxChannelCount() << endl;
    +00656 
    +00657             } else if (verbosity == PluginIds) {
    +00658                 cout << "vamp:" << key << endl;
    +00659             }
    +00660             
    +00661             Plugin::OutputList outputs =
    +00662                 plugin->getOutputDescriptors();
    +00663 
    +00664             if (verbosity == PluginInformationDetailed) {
    +00665 
    +00666                 Plugin::ParameterList params = plugin->getParameterDescriptors();
    +00667                 for (size_t j = 0; j < params.size(); ++j) {
    +00668                     Plugin::ParameterDescriptor &pd(params[j]);
    +00669                     cout << "\nParameter " << j+1 << ": \"" << pd.name << "\"" << endl;
    +00670                     cout << " - Identifier:         " << pd.identifier << endl;
    +00671                     cout << " - Description:        \"" << pd.description << "\"" << endl;
    +00672                     if (pd.unit != "") {
    +00673                         cout << " - Unit:               " << pd.unit << endl;
    +00674                     }
    +00675                     cout << " - Range:              ";
    +00676                     cout << pd.minValue << " -> " << pd.maxValue << endl;
    +00677                     cout << " - Default:            ";
    +00678                     cout << pd.defaultValue << endl;
    +00679                     if (pd.isQuantized) {
    +00680                         cout << " - Quantize Step:      "
    +00681                              << pd.quantizeStep << endl;
    +00682                     }
    +00683                     if (!pd.valueNames.empty()) {
    +00684                         cout << " - Value Names:        ";
    +00685                         for (size_t k = 0; k < pd.valueNames.size(); ++k) {
    +00686                             if (k > 0) cout << ", ";
    +00687                             cout << "\"" << pd.valueNames[k] << "\"";
    +00688                         }
    +00689                         cout << endl;
    +00690                     }
    +00691                 }
    +00692 
    +00693                 if (outputs.empty()) {
    +00694                     cout << "\n** Note: This plugin reports no outputs!" << endl;
    +00695                 }
    +00696                 for (size_t j = 0; j < outputs.size(); ++j) {
    +00697                     Plugin::OutputDescriptor &od(outputs[j]);
    +00698                     cout << "\nOutput " << j+1 << ": \"" << od.name << "\"" << endl;
    +00699                     cout << " - Identifier:         " << od.identifier << endl;
    +00700                     cout << " - Description:        \"" << od.description << "\"" << endl;
    +00701                     if (od.unit != "") {
    +00702                         cout << " - Unit:               " << od.unit << endl;
    +00703                     }
    +00704                     if (od.hasFixedBinCount) {
    +00705                         cout << " - Default Bin Count:  " << od.binCount << endl;
    +00706                     }
    +00707                     if (!od.binNames.empty()) {
    +00708                         bool have = false;
    +00709                         for (size_t k = 0; k < od.binNames.size(); ++k) {
    +00710                             if (od.binNames[k] != "") {
    +00711                                 have = true; break;
    +00712                             }
    +00713                         }
    +00714                         if (have) {
    +00715                             cout << " - Bin Names:          ";
    +00716                             for (size_t k = 0; k < od.binNames.size(); ++k) {
    +00717                                 if (k > 0) cout << ", ";
    +00718                                 cout << "\"" << od.binNames[k] << "\"";
    +00719                             }
    +00720                             cout << endl;
    +00721                         }
    +00722                     }
    +00723                     if (od.hasKnownExtents) {
    +00724                         cout << " - Default Extents:    ";
    +00725                         cout << od.minValue << " -> " << od.maxValue << endl;
    +00726                     }
    +00727                     if (od.isQuantized) {
    +00728                         cout << " - Quantize Step:      "
    +00729                              << od.quantizeStep << endl;
    +00730                     }
    +00731                     cout << " - Sample Type:        "
    +00732                          << (od.sampleType ==
    +00733                              Plugin::OutputDescriptor::OneSamplePerStep ?
    +00734                              "One Sample Per Step" :
    +00735                              od.sampleType ==
    +00736                              Plugin::OutputDescriptor::FixedSampleRate ?
    +00737                              "Fixed Sample Rate" :
    +00738                              "Variable Sample Rate") << endl;
    +00739                     if (od.sampleType !=
    +00740                         Plugin::OutputDescriptor::OneSamplePerStep) {
    +00741                         cout << " - Default Rate:       "
    +00742                              << od.sampleRate << endl;
    +00743                     }
    +00744                     cout << " - Has Duration:       "
    +00745                          << (od.hasDuration ? "Yes" : "No") << endl;
    +00746                 }
    +00747             }
    +00748 
    +00749             if (outputs.size() > 1 || verbosity == PluginOutputIds) {
    +00750                 for (size_t j = 0; j < outputs.size(); ++j) {
    +00751                     if (verbosity == PluginInformation) {
    +00752                         cout << "         (" << j << ") "
    +00753                              << outputs[j].name << ", \""
    +00754                              << outputs[j].identifier << "\"" << endl;
    +00755                         if (outputs[j].description != "") {
    +00756                             cout << "             - " 
    +00757                                  << outputs[j].description << endl;
    +00758                         }
    +00759                     } else if (verbosity == PluginOutputIds) {
    +00760                         cout << "vamp:" << key << ":" << outputs[j].identifier << endl;
    +00761                     }
    +00762                 }
    +00763             }
    +00764 
    +00765             ++index;
    +00766 
    +00767             delete plugin;
    +00768         }
    +00769     }
    +00770 
    +00771     if (verbosity == PluginInformation ||
    +00772         verbosity == PluginInformationDetailed) {
    +00773         cout << endl;
    +00774     }
    +00775 }
    +00776 
    +00777 void
    +00778 printPluginCategoryList()
    +00779 {
    +00780     PluginLoader *loader = PluginLoader::getInstance();
    +00781 
    +00782     vector<PluginLoader::PluginKey> plugins = loader->listPlugins();
    +00783 
    +00784     set<string> printedcats;
    +00785 
    +00786     for (size_t i = 0; i < plugins.size(); ++i) {
    +00787 
    +00788         PluginLoader::PluginKey key = plugins[i];
    +00789         
    +00790         PluginLoader::PluginCategoryHierarchy category =
    +00791             loader->getPluginCategory(key);
    +00792 
    +00793         Plugin *plugin = loader->loadPlugin(key, 48000);
    +00794         if (!plugin) continue;
    +00795 
    +00796         string catstr = "";
    +00797 
    +00798         if (category.empty()) catstr = '|';
    +00799         else {
    +00800             for (size_t j = 0; j < category.size(); ++j) {
    +00801                 catstr += category[j];
    +00802                 catstr += '|';
    +00803                 if (printedcats.find(catstr) == printedcats.end()) {
    +00804                     std::cout << catstr << std::endl;
    +00805                     printedcats.insert(catstr);
    +00806                 }
    +00807             }
    +00808         }
    +00809 
    +00810         std::cout << catstr << key << ":::" << plugin->getName() << ":::" << plugin->getMaker() << ":::" << plugin->getDescription() << std::endl;
    +00811     }
    +00812 }
    +00813 
     
    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp-simple-host_8cpp.html --- a/code-doc/vamp-simple-host_8cpp.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/vamp-simple-host_8cpp.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

    @@ -97,10 +100,12 @@ PluginInformation  +PluginInformationDetailed  + -

    Definition at line 65 of file vamp-simple-host.cpp.

    +

    Definition at line 76 of file vamp-simple-host.cpp.

    @@ -148,7 +153,7 @@ ) - + @@ -156,11 +161,11 @@

    -

    Definition at line 423 of file vamp-simple-host.cpp.

    +

    Definition at line 477 of file vamp-simple-host.cpp.

    -

    References Vamp::RealTime::toString().

    +

    References Vamp::RealTime::toString().

    -

    Referenced by runPlugin().

    +

    Referenced by runPlugin().

    @@ -183,7 +188,7 @@ ) - + @@ -236,7 +241,7 @@ ) - + @@ -256,7 +261,7 @@ bool  verbose  )  - + @@ -264,9 +269,9 @@

    -

    Definition at line 459 of file vamp-simple-host.cpp.

    +

    Definition at line 528 of file vamp-simple-host.cpp.

    -

    Referenced by main().

    +

    Referenced by main().

    @@ -279,7 +284,7 @@ (  )  - + @@ -287,11 +292,11 @@

    -

    Definition at line 577 of file vamp-simple-host.cpp.

    +

    Definition at line 778 of file vamp-simple-host.cpp.

    -

    References Vamp::PluginBase::getDescription(), Vamp::PluginBase::getMaker(), Vamp::PluginBase::getName(), Vamp::HostExt::PluginLoader::getPluginCategory(), Vamp::HostExt::PluginLoader::listPlugins(), and Vamp::HostExt::PluginLoader::loadPlugin().

    +

    References Vamp::PluginBase::getDescription(), Vamp::PluginBase::getMaker(), Vamp::PluginBase::getName(), Vamp::HostExt::PluginLoader::getPluginCategory(), Vamp::HostExt::PluginLoader::listPlugins(), and Vamp::HostExt::PluginLoader::loadPlugin().

    -

    Referenced by main().

    +

    Referenced by main().

    @@ -305,7 +310,7 @@ Verbosity  verbosity  )  - + @@ -313,11 +318,11 @@

    -

    Definition at line 478 of file vamp-simple-host.cpp.

    +

    Definition at line 559 of file vamp-simple-host.cpp.

    -

    References Vamp::PluginBase::getDescription(), Vamp::PluginBase::getIdentifier(), Vamp::HostExt::PluginLoader::getLibraryPathForPlugin(), Vamp::PluginBase::getMaker(), Vamp::PluginBase::getName(), Vamp::Plugin::getOutputDescriptors(), Vamp::HostExt::PluginLoader::getPluginCategory(), Vamp::PluginBase::getVampApiVersion(), Vamp::HostExt::PluginLoader::listPlugins(), Vamp::HostExt::PluginLoader::loadPlugin(), PluginIds, PluginInformation, and PluginOutputIds.

    +

    References Vamp::PluginBase::getCopyright(), Vamp::PluginBase::getDescription(), Vamp::PluginBase::getIdentifier(), Vamp::Plugin::getInputDomain(), Vamp::HostExt::PluginLoader::getLibraryPathForPlugin(), Vamp::PluginBase::getMaker(), Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), Vamp::PluginBase::getName(), Vamp::Plugin::getOutputDescriptors(), Vamp::PluginBase::getParameterDescriptors(), Vamp::HostExt::PluginLoader::getPluginCategory(), Vamp::PluginBase::getPluginVersion(), Vamp::Plugin::getPreferredBlockSize(), Vamp::Plugin::getPreferredStepSize(), Vamp::PluginBase::getVampApiVersion(), header(), Vamp::HostExt::PluginLoader::listPlugins(), Vamp::HostExt::PluginLoader::loadPlugin(), PluginIds, PluginInformation, PluginInformationDetailed, PluginOutputIds, and Vamp::Plugin::TimeDomain.

    -

    Referenced by main().

    +

    Referenced by main().

    @@ -331,7 +336,7 @@ string  soname  )  - + @@ -396,7 +401,7 @@ ) - + @@ -404,11 +409,11 @@

    -

    Definition at line 244 of file vamp-simple-host.cpp.

    +

    Definition at line 265 of file vamp-simple-host.cpp.

    -

    References Vamp::HostExt::PluginLoader::composePluginKey(), Vamp::PluginBase::getIdentifier(), Vamp::Plugin::getInputDomain(), Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), Vamp::Plugin::getOutputDescriptors(), Vamp::Plugin::getPreferredBlockSize(), Vamp::Plugin::getPreferredStepSize(), Vamp::Plugin::getRemainingFeatures(), Vamp::Plugin::initialise(), Vamp::HostExt::PluginLoader::loadPlugin(), printFeatures(), and Vamp::Plugin::process().

    +

    References Vamp::HostExt::PluginLoader::composePluginKey(), Vamp::PluginBase::getIdentifier(), Vamp::Plugin::getInputDomain(), Vamp::Plugin::getMaxChannelCount(), Vamp::Plugin::getMinChannelCount(), Vamp::Plugin::getOutputDescriptors(), Vamp::Plugin::getPreferredBlockSize(), Vamp::Plugin::getPreferredStepSize(), Vamp::Plugin::getRemainingFeatures(), Vamp::HostExt::PluginInputDomainAdapter::getTimestampAdjustment(), Vamp::HostExt::PluginWrapper::getWrapper(), Vamp::Plugin::initialise(), Vamp::HostExt::PluginLoader::loadPlugin(), printFeatures(), and Vamp::Plugin::process().

    -

    Referenced by main().

    +

    Referenced by main().

    @@ -422,7 +427,7 @@ const char *  name  )  - + @@ -430,11 +435,11 @@

    -

    Definition at line 81 of file vamp-simple-host.cpp.

    +

    Definition at line 93 of file vamp-simple-host.cpp.

    -

    References PLUGIN_SUFFIX.

    +

    References PLUGIN_SUFFIX.

    -

    Referenced by main().

    +

    Referenced by main().

    @@ -457,7 +462,7 @@ ) - + @@ -465,15 +470,48 @@

    -

    Definition at line 121 of file vamp-simple-host.cpp.

    +

    Definition at line 137 of file vamp-simple-host.cpp.

    -

    References enumeratePlugins(), HOST_VERSION, PluginIds, PluginInformation, PluginOutputIds, printPluginCategoryList(), printPluginPath(), runPlugin(), usage(), VAMP_API_VERSION, and VAMP_SDK_VERSION.

    +

    References enumeratePlugins(), HOST_VERSION, PluginIds, PluginInformation, PluginInformationDetailed, PluginOutputIds, printPluginCategoryList(), printPluginPath(), runPlugin(), usage(), VAMP_API_VERSION, and VAMP_SDK_VERSION.

    + + +

    + +

    +
    + + + + + + + + + + + + + + + + + + +
    static string header (string  text,
    int  level 
    ) [static]
    +
    +
    + +

    + +

    Definition at line 548 of file vamp-simple-host.cpp.

    + +

    Referenced by enumeratePlugins().

    -


    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp_8h-source.html --- a/code-doc/vamp_8h-source.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/vamp_8h-source.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - + +

    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 /*
    @@ -62,7 +62,7 @@
     00041 extern "C" {
     00042 #endif
     00043 
    -00053 #define VAMP_API_VERSION 1
    +00053 #define VAMP_API_VERSION 2
     00054 
     00071 typedef struct _VampParameterDescriptor
     00072 {
    @@ -128,129 +128,149 @@
     00158 
     00161     float sampleRate;
     00162 
    -00163 } VampOutputDescriptor;
    -00164 
    -00165 typedef struct _VampFeature
    -00166 {
    -00168     int hasTimestamp;
    -00169 
    -00171     int sec;
    -00172 
    -00174     int nsec;
    -00175 
    -00177     unsigned int valueCount;
    +00170     int hasDuration;
    +00171 
    +00172 } VampOutputDescriptor;
    +00173 
    +00174 typedef struct _VampFeature
    +00175 {
    +00177     int hasTimestamp;
     00178 
    -00180     float *values;
    +00180     int sec;
     00181 
    -00183     char *label;
    +00183     int nsec;
     00184 
    -00185 } VampFeature;
    -00186 
    -00187 typedef struct _VampFeatureList
    -00188 {
    -00190     unsigned int featureCount;
    -00191 
    -00193     VampFeature *features;
    -00194 
    -00195 } VampFeatureList;
    -00196 
    -00197 typedef enum
    -00198 {
    -00199     vampTimeDomain,
    -00200     vampFrequencyDomain
    -00201 
    -00202 } VampInputDomain;
    +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 
    -00204 typedef void *VampPluginHandle;
    -00205 
    -00206 typedef struct _VampPluginDescriptor
    -00207 {
    -00209     unsigned int vampApiVersion;
    -00210 
    -00212     const char *identifier;
    -00213 
    -00215     const char *name;
    +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 
    -00218     const char *description;
    -00219 
    -00221     const char *maker;
    -00222 
    -00224     int pluginVersion;
    -00225 
    -00227     const char *copyright;
    -00228 
    -00230     unsigned int parameterCount;
    -00231 
    -00233     const VampParameterDescriptor **parameters;
    -00234 
    -00236     unsigned int programCount;
    -00237 
    -00239     const char **programs;
    -00240 
    -00242     VampInputDomain inputDomain;
    +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 
    -00245     VampPluginHandle (*instantiate)(const struct _VampPluginDescriptor *,
    -00246                                    float inputSampleRate);
    +00244 } VampInputDomain;
    +00245 
    +00246 typedef void *VampPluginHandle;
     00247 
    -00249     void (*cleanup)(VampPluginHandle);
    -00250 
    -00252     int (*initialise)(VampPluginHandle,
    -00253                       unsigned int inputChannels,
    -00254                       unsigned int stepSize, 
    -00255                       unsigned int blockSize);
    -00256 
    -00258     void (*reset)(VampPluginHandle);
    -00259 
    -00261     float (*getParameter)(VampPluginHandle, int);
    -00262 
    -00264     void  (*setParameter)(VampPluginHandle, int, float);
    -00265 
    -00267     unsigned int (*getCurrentProgram)(VampPluginHandle);
    -00268 
    -00270     void  (*selectProgram)(VampPluginHandle, unsigned int);
    -00271     
    -00273     unsigned int (*getPreferredStepSize)(VampPluginHandle);
    -00274 
    -00276     unsigned int (*getPreferredBlockSize)(VampPluginHandle);
    -00277 
    -00279     unsigned int (*getMinChannelCount)(VampPluginHandle);
    -00280 
    -00282     unsigned int (*getMaxChannelCount)(VampPluginHandle);
    -00283 
    -00285     unsigned int (*getOutputCount)(VampPluginHandle);
    -00286 
    -00291     VampOutputDescriptor *(*getOutputDescriptor)(VampPluginHandle,
    -00292                                                 unsigned int);
    -00293 
    -00295     void (*releaseOutputDescriptor)(VampOutputDescriptor *);
    -00296 
    -00302     VampFeatureList *(*process)(VampPluginHandle,
    -00303                                 const float *const *inputBuffers,
    -00304                                 int sec,
    -00305                                 int nsec);
    -00306 
    -00308     VampFeatureList *(*getRemainingFeatures)(VampPluginHandle);
    -00309 
    -00311     void (*releaseFeatureSet)(VampFeatureList *);
    -00312 
    -00313 } VampPluginDescriptor;
    -00314 
    -00315 
    -00334 const VampPluginDescriptor *vampGetPluginDescriptor
    -00335     (unsigned int hostApiVersion, unsigned int index);
    -00336 
    -00337 
    -00339 typedef const VampPluginDescriptor *(*VampGetPluginDescriptorFunction)
    -00340     (unsigned int, unsigned int);
    -00341 
    -00342 #ifdef __cplusplus
    -00343 }
    -00344 #endif
    -00345 
    -00346 #endif
    +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
     
    -
    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 code-doc/vamp_8h.html --- a/code-doc/vamp_8h.html Mon Nov 24 15:17:08 2008 +0000 +++ b/code-doc/vamp_8h.html Tue Dec 09 11:02:57 2008 +0000 @@ -4,7 +4,7 @@ - +

    @@ -112,7 +121,10 @@

    - +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.

    @@ -145,6 +157,36 @@

    + +

    +
    + + + + +
    typedef struct _VampFeatureV2 VampFeatureV2
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    typedef union _VampFeatureUnion VampFeatureUnion
    +
    +
    + +

    + +

    +

    @@ -173,7 +215,7 @@

    -

    Definition at line 204 of file vamp.h.

    +

    Definition at line 246 of file vamp.h.

    @@ -207,7 +249,7 @@ Function pointer type for vampGetPluginDescriptor.

    -

    Definition at line 340 of file vamp.h.

    +

    Definition at line 382 of file vamp.h.

    @@ -266,7 +308,7 @@ -

    Definition at line 197 of file vamp.h.

    +

    Definition at line 239 of file vamp.h.

    @@ -290,7 +332,7 @@ ) - + @@ -300,17 +342,17 @@ 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 50 of file plugins.cpp.

    +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().

    +

    References Vamp::PluginAdapterBase::getDescriptor().

    -


    Generated on Wed Jul 9 11:36:07 2008 for VampPluginSDK by  +
    Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by  -doxygen 1.5.5
    +doxygen 1.5.6
    diff -r 34e758355884 -r cc0be37dc9d3 develop.html --- a/develop.html Mon Nov 24 15:17:08 2008 +0000 +++ b/develop.html Tue Dec 09 11:02:57 2008 +0000 @@ -27,7 +27,7 @@ src="http://sourceforge.net/sflogo.php?group_id=192001&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"/>

    -

    Vamp is a very easy system to develop plugins for, as it has +

    Vamp is an easy system to develop plugins for. It has a standard cross-platform SDK which includes API documentation, example plugins, ready-to-use C++ base classes, the C API header, and a test host.

    @@ -38,15 +38,15 @@ This is particularly advisable since the values returned by a plugin may have relatively complex structures.

    -