Chris@1: Chris@1: Chris@1: Chris@1: Chris@3: Chris@6: Chris@6: Chris@1: VampPluginSDK: Vamp::Plugin Class Reference Chris@1: Chris@6: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6:
Chris@1:
Chris@1: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@1:
Chris@1:
VampPluginSDK Chris@6:  2.7 Chris@1:
Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1:
Chris@1: Chris@1:
Chris@1:
Chris@1:
Chris@1: Chris@1:
Chris@1:
Chris@1: Chris@1:
Chris@6:
Vamp::Plugin Class Referenceabstract
Chris@3:
Chris@1:
Chris@3: Chris@1:

Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio or related data. Chris@1: More...

Chris@1: Chris@1:

#include <vamp-sdk/Plugin.h>

Chris@1:
Chris@1: Inheritance diagram for Vamp::Plugin:
Chris@1:
Chris@1:
Inheritance graph
Chris@1: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@1:
[legend]
Chris@1: Chris@6: Chris@3: Chris@6: Chris@3: Chris@6: Chris@6:

Chris@1: Classes

struct  Feature
 
struct  OutputDescriptor
 
Chris@6: Chris@3: Chris@6: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6:

Chris@1: Public Types

enum  InputDomain { TimeDomain, Chris@1: FrequencyDomain Chris@1: }
 
typedef std::vector< OutputDescriptorOutputList
 
typedef std::vector< FeatureFeatureList
 
typedef std::map< int, FeatureListFeatureSet
 
typedef std::vector< ParameterDescriptorParameterList
 
typedef std::vector< std::string > ProgramList
 
Chris@6: Chris@3: Chris@6: Chris@3: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@3: Chris@6: Chris@6: Chris@6:

Chris@1: Public Member Functions

virtual ~Plugin ()
 
virtual bool initialise (size_t inputChannels, size_t stepSize, size_t blockSize)=0
 Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames). More...
 
virtual void reset ()=0
 Reset the plugin after use, to prepare it for another clean run. More...
 
virtual InputDomain getInputDomain () const =0
 Get the plugin's required input domain. More...
 
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). More...
 
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. More...
 
virtual size_t getMinChannelCount () const
 Get the minimum supported number of input channels. More...
 
virtual size_t getMaxChannelCount () const
 Get the maximum supported number of input channels. More...
 
virtual OutputList getOutputDescriptors () const =0
 Get the outputs of this plugin. More...
 
virtual FeatureSet process (const float *const *inputBuffers, RealTime timestamp)=0
 Process a single block of input data. More...
 
virtual FeatureSet getRemainingFeatures ()=0
 After all blocks have been processed, calculate and return any remaining features derived from the complete input. More...
 
virtual std::string getType () const
 Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase. More...
 
virtual unsigned int getVampApiVersion () const
 Get the Vamp API compatibility level of the plugin. More...
 
virtual std::string getIdentifier () const =0
 Get the computer-usable name of the plugin. More...
 
virtual std::string getName () const =0
 Get a human-readable name or title of the plugin. More...
 
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". More...
 
virtual std::string getMaker () const =0
 Get the name of the author or vendor of the plugin in human-readable form. More...
 
virtual std::string getCopyright () const =0
 Get the copyright statement or licensing summary for the plugin. More...
 
virtual int getPluginVersion () const =0
 Get the version number of the plugin. More...
 
virtual ParameterList getParameterDescriptors () const
 Get the controllable parameters of this plugin. More...
 
virtual float getParameter (std::string) const
 Get the value of a named parameter. More...
 
virtual void setParameter (std::string, float)
 Set a named parameter. More...
 
virtual ProgramList getPrograms () const
 Get the program settings available in this plugin. More...
 
virtual std::string getCurrentProgram () const
 Get the current program. More...
 
virtual void selectProgram (std::string)
 Select a program. More...
 
Chris@6: Chris@3: Chris@6: Chris@6:

Chris@1: Protected Member Functions

 Plugin (float inputSampleRate)
 
Chris@6: Chris@3: Chris@6: Chris@1:

Chris@1: Protected Attributes

float m_inputSampleRate
 
Chris@6:

Detailed Description

Chris@1:

Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio or related data.

Chris@1:

In most cases, the input will be audio and the output will be a stream of derived data at a lower sampling resolution than the input.

Chris@6:

Note that this class inherits several abstract methods from PluginBase. These must be implemented by the subclass.

Chris@1:

PLUGIN LIFECYCLE

Chris@1:

Feature extraction plugins are managed differently from real-time plugins (such as VST effects). The main difference is that the parameters for a feature extraction plugin are configured before the plugin is used, and do not change during use.

Chris@3:
    Chris@6:
  1. Host constructs the plugin, passing it the input sample rate. The plugin may do basic initialisation, but should not do anything computationally expensive at this point. You must make sure your plugin is cheap to construct, otherwise you'll seriously affect the startup performance of almost all hosts. If you have serious initialisation to do, the proper place is in initialise() (step 5).
  2. Chris@3:
  3. Host may query the plugin's available outputs.
  4. Chris@3:
  5. Host queries programs and parameter descriptors, and may set some or all of them. Parameters that are not explicitly set should take their default values as specified in the parameter descriptor. When a program is set, the parameter values may change and the host will re-query them to check.
  6. Chris@3:
  7. Host queries the preferred step size, block size and number of channels. These may all vary depending on the parameter values. (Note however that you cannot make the number of distinct outputs dependent on parameter values.)
  8. Chris@3:
  9. Plugin is properly initialised with a call to initialise. This fixes the step size, block size, and number of channels, as well as all of the parameter and program settings. If the values passed in to initialise do not match the plugin's advertised preferred values from step 4, the plugin may refuse to initialise and return false (although if possible it should accept the new values). Any computationally expensive setup code should take place here.
  10. Chris@3:
  11. Host finally checks the number of values, resolution, extents etc per output (which may vary depending on the number of channels, step size and block size as well as the parameter values).
  12. Chris@3:
  13. Host will repeatedly call the process method to pass in blocks of input data. This method may return features extracted from that data (if the plugin is causal).
  14. Chris@3:
  15. Host will call getRemainingFeatures exactly once, after all the input data has been processed. This may return any non-causal or leftover features.
  16. Chris@3:
  17. At any point after initialise was called, the host may optionally call the reset method and restart processing. (This does not mean it can change the parameters, which are fixed from initialise until destruction.)
  18. Chris@3:
Chris@1:

A plugin does not need to handle the case where setParameter or selectProgram is called after initialise has been called. It's the host's responsibility not to do that. Similarly, the plugin may safely assume that initialise is called no more than once.

Chris@1: Chris@6:

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

Chris@6:

Member Typedef Documentation

Chris@6: Chris@6:

◆ OutputList

Chris@6: Chris@1:
Chris@1:
Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:
typedef std::vector<OutputDescriptor> Vamp::Plugin::OutputList
Chris@6:
Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ FeatureList

Chris@6: Chris@1:
Chris@1:
Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:
typedef std::vector<Feature> Vamp::Plugin::FeatureList
Chris@6:
Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ FeatureSet

Chris@6: Chris@1:
Chris@1:
Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:
typedef std::map<int, FeatureList> Vamp::Plugin::FeatureSet
Chris@6:
Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ ParameterList

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList
Chris@6:
Chris@6: inherited
Chris@6:
Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ ProgramList

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
typedef std::vector<std::string> Vamp::PluginBase::ProgramList
Chris@6:
Chris@6: inherited
Chris@6:
Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6:

Member Enumeration Documentation

Chris@6: Chris@6:

◆ InputDomain

Chris@6: Chris@1:
Chris@1:
Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:
enum Vamp::Plugin::InputDomain
Chris@6:
Chris@6: Chris@6: Chris@6: Chris@1:
Enumerator
TimeDomain 
FrequencyDomain 
Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6:

Constructor & Destructor Documentation

Chris@6: Chris@6:

◆ ~Plugin()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual Vamp::Plugin::~Plugin ()
Chris@6:
Chris@6: inlinevirtual
Chris@6:
Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ Plugin()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
Vamp::Plugin::Plugin (float inputSampleRate)
Chris@6:
Chris@6: inlineprotected
Chris@6:
Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6:

Member Function Documentation

Chris@6: Chris@6:

◆ initialise()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual bool Vamp::Plugin::initialise (size_t inputChannels,
size_t stepSize,
size_t blockSize 
)
Chris@6:
Chris@6: pure virtual
Chris@6:
Chris@1: Chris@1:

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

Chris@1:

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

Chris@1:

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

Chris@1: Chris@1:

Implemented in Vamp::HostExt::PluginChannelAdapter, Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

Chris@1: Chris@6:

Referenced by runPlugin().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ reset()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual void Vamp::Plugin::reset ()
Chris@6:
Chris@6: pure virtual
Chris@6:
Chris@1: Chris@1:

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

Chris@1:

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

Chris@1: Chris@1:

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getInputDomain()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual InputDomain Vamp::Plugin::getInputDomain () const
Chris@6:
Chris@6: pure virtual
Chris@6:
Chris@1: Chris@1:

Get the plugin's required input domain.

Chris@6:

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.

Chris@6:

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

Chris@1: Chris@6:

Implemented in Vamp::HostExt::PluginInputDomainAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

Chris@1: Chris@6:

Referenced by enumeratePlugins(), and runPlugin().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getPreferredBlockSize()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual size_t Vamp::Plugin::getPreferredBlockSize () const
Chris@6:
Chris@6: inlinevirtual
Chris@6:
Chris@1: Chris@6:

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

Chris@6:

This should be called before initialise().

Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@6:

Referenced by enumeratePlugins(), and runPlugin().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getPreferredStepSize()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual size_t Vamp::Plugin::getPreferredStepSize () const
Chris@6:
Chris@6: inlinevirtual
Chris@6:
Chris@1: Chris@6:

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.

Chris@6:

This should be called before initialise().

Chris@6:

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.

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@6:

Referenced by enumeratePlugins(), and runPlugin().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getMinChannelCount()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual size_t Vamp::Plugin::getMinChannelCount () const
Chris@6:
Chris@6: inlinevirtual
Chris@6:
Chris@1: Chris@1:

Get the minimum supported number of input channels.

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getMaxChannelCount()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual size_t Vamp::Plugin::getMaxChannelCount () const
Chris@6:
Chris@6: inlinevirtual
Chris@6:
Chris@1: Chris@1:

Get the maximum supported number of input channels.

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getOutputDescriptors()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual OutputList Vamp::Plugin::getOutputDescriptors () const
Chris@6:
Chris@6: pure virtual
Chris@6:
Chris@1: Chris@1:

Get the outputs of this plugin.

Chris@6:

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.

Chris@1: Chris@6:

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, PercussionOnsetDetector, PowerSpectrum, AmplitudeFollower, SpectralCentroid, and ZeroCrossing.

Chris@1: Chris@6:

Referenced by enumeratePlugins(), and runPlugin().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ process()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual FeatureSet Vamp::Plugin::process (const float *const * inputBuffers,
RealTime timestamp 
)
Chris@6:
Chris@6: pure virtual
Chris@6:
Chris@1: Chris@1:

Process a single block of input data.

Chris@1:

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.

Chris@6:

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

Chris@1:

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

Chris@1: Chris@1:

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::HostExt::PluginChannelAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginInputDomainAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, PercussionOnsetDetector, AmplitudeFollower, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

Chris@1: Chris@6:

Referenced by runPlugin().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getRemainingFeatures()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual FeatureSet Vamp::Plugin::getRemainingFeatures ()
Chris@6:
Chris@6: pure virtual
Chris@6:
Chris@1: Chris@1:

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

Chris@1: Chris@1:

Implemented in Vamp::HostExt::PluginBufferingAdapter, Vamp::PluginHostAdapter, Vamp::HostExt::PluginSummarisingAdapter, Vamp::HostExt::PluginWrapper, FixedTempoEstimator, PercussionOnsetDetector, AmplitudeFollower, PowerSpectrum, SpectralCentroid, and ZeroCrossing.

Chris@1: Chris@6:

Referenced by runPlugin().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getType()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual std::string Vamp::Plugin::getType () const
Chris@6:
Chris@6: inlinevirtual
Chris@6:
Chris@1: Chris@6:

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

Chris@1:

Do not reimplement this function in your subclass.

Chris@1: Chris@1:

Implements Vamp::PluginBase.

Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getVampApiVersion()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual unsigned int Vamp::PluginBase::getVampApiVersion () const
Chris@6:
Chris@6: inlinevirtualinherited
Chris@6:
Chris@1: Chris@1:

Get the Vamp API compatibility level of the plugin.

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@6:

Referenced by enumeratePlugins().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getIdentifier()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual std::string Vamp::PluginBase::getIdentifier () const
Chris@6:
Chris@6: pure virtualinherited
Chris@6:
Chris@1: Chris@1:

Get the computer-usable name of the plugin.

Chris@1:

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.

Chris@1:

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

Chris@1:

Example: "zero_crossings"

Chris@1: Chris@6:

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

Chris@1: Chris@6:

Referenced by enumeratePlugins(), and runPlugin().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getName()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual std::string Vamp::PluginBase::getName () const
Chris@6:
Chris@6: pure virtualinherited
Chris@6:
Chris@1: Chris@1:

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

Chris@1:

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

Chris@1:

Example: "Zero Crossings"

Chris@1: Chris@6:

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

Chris@1: Chris@6:

Referenced by enumeratePlugins(), and printPluginCategoryList().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getDescription()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual std::string Vamp::PluginBase::getDescription () const
Chris@6:
Chris@6: pure virtualinherited
Chris@6:
Chris@1: Chris@1:

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

Chris@1:

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

Chris@1:

Example: "Detect and count zero crossing points"

Chris@1: Chris@6:

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

Chris@1: Chris@6:

Referenced by enumeratePlugins(), and printPluginCategoryList().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getMaker()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual std::string Vamp::PluginBase::getMaker () const
Chris@6:
Chris@6: pure virtualinherited
Chris@6:
Chris@1: Chris@1:

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

Chris@1:

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

Chris@1: Chris@6:

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

Chris@1: Chris@6:

Referenced by enumeratePlugins(), and printPluginCategoryList().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getCopyright()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual std::string Vamp::PluginBase::getCopyright () const
Chris@6:
Chris@6: pure virtualinherited
Chris@6:
Chris@1: Chris@1:

Get the copyright statement or licensing summary for the plugin.

Chris@1:

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

Chris@1: Chris@6:

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

Chris@1: Chris@6:

Referenced by enumeratePlugins().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getPluginVersion()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual int Vamp::PluginBase::getPluginVersion () const
Chris@6:
Chris@6: pure virtualinherited
Chris@6:
Chris@1: Chris@1:

Get the version number of the plugin.

Chris@1: Chris@6:

Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.

Chris@1: Chris@6:

Referenced by enumeratePlugins().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getParameterDescriptors()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual ParameterList Vamp::PluginBase::getParameterDescriptors () const
Chris@6:
Chris@6: inlinevirtualinherited
Chris@6:
Chris@1: Chris@1:

Get the controllable parameters of this plugin.

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@6:

Referenced by enumeratePlugins().

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getParameter()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual float Vamp::PluginBase::getParameter (std::string ) const
Chris@6:
Chris@6: inlinevirtualinherited
Chris@6:
Chris@1: Chris@1:

Get the value of a named parameter.

Chris@1:

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

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ setParameter()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual void Vamp::PluginBase::setParameter (std::string ,
float  
)
Chris@6:
Chris@6: inlinevirtualinherited
Chris@6:
Chris@1: Chris@1:

Set a named parameter.

Chris@1:

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

Chris@1: Chris@1:

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

Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getPrograms()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual ProgramList Vamp::PluginBase::getPrograms () const
Chris@6:
Chris@6: inlinevirtualinherited
Chris@6:
Chris@1: Chris@1:

Get the program settings available in this plugin.

Chris@1:

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.

Chris@1:

The programs must have unique names.

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ getCurrentProgram()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual std::string Vamp::PluginBase::getCurrentProgram () const
Chris@6:
Chris@6: inlinevirtualinherited
Chris@6:
Chris@1: Chris@1:

Get the current program.

Chris@1: Chris@6:

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

Chris@1: Chris@6:

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

Chris@1: Chris@1:
Chris@1:
Chris@6: Chris@6:

◆ selectProgram()

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
virtual void Vamp::PluginBase::selectProgram (std::string )
Chris@6:
Chris@6: inlinevirtualinherited
Chris@6:
Chris@1: Chris@1:

Select a program.

Chris@1:

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

Chris@1: Chris@1:

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

Chris@1: Chris@6:

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

Chris@6: Chris@6:

References _VAMP_SDK_PLUGSPACE_END.

Chris@1: Chris@1:
Chris@1:
Chris@6:

Member Data Documentation

Chris@6: Chris@6:

◆ m_inputSampleRate

Chris@6: Chris@1:
Chris@1:
Chris@6: Chris@6: Chris@6: Chris@6: Chris@6: Chris@6:
Chris@1: Chris@1: Chris@6: Chris@1: Chris@1:
float Vamp::Plugin::m_inputSampleRate
Chris@6:
Chris@6: protected
Chris@6:
Chris@1:
Chris@1:
The documentation for this class was generated from the following file: Chris@3:
Chris@6:
Chris@6: Chris@6: Chris@1: Chris@1: