Chris@1: Chris@1: Chris@1:
Chris@1: Chris@3: Chris@1:
Chris@1: VampPluginSDK
Chris@3: 2.4
Chris@1:
Chris@1:
Chris@1: |
Chris@1:
Chris@1:
Chris@1:
Chris@1:
A base class for plugins with optional configurable parameters, programs, etc. Chris@1: More...
Chris@1: Chris@1:#include <PluginBase.h>
Chris@1: Classes | |
struct | ParameterDescriptor |
Chris@1: Public Types | |
typedef std::vector Chris@1: < ParameterDescriptor > | ParameterList |
typedef std::vector< std::string > | ProgramList |
Chris@1: Public Member Functions | |
virtual | ~PluginBase () |
virtual unsigned int | getVampApiVersion () const |
Get the Vamp API compatibility level of the plugin. | |
virtual std::string | getIdentifier () const =0 |
Get the computer-usable name of the plugin. | |
virtual std::string | getName () const =0 |
Get a human-readable name or title of the plugin. | |
virtual std::string | getDescription () const =0 |
Get a human-readable description for the plugin, typically a line of text that may optionally be displayed in addition to the plugin's "name". | |
virtual std::string | getMaker () const =0 |
Get the name of the author or vendor of the plugin in human-readable form. | |
virtual std::string | getCopyright () const =0 |
Get the copyright statement or licensing summary for the plugin. | |
virtual int | getPluginVersion () const =0 |
Get the version number of the plugin. | |
virtual ParameterList | getParameterDescriptors () const |
Get the controllable parameters of this plugin. | |
virtual float | getParameter (std::string) const |
Get the value of a named parameter. | |
virtual void | setParameter (std::string, float) |
Set a named parameter. | |
virtual ProgramList | getPrograms () const |
Get the program settings available in this plugin. | |
virtual std::string | getCurrentProgram () const |
Get the current program. | |
virtual void | selectProgram (std::string) |
Select a program. | |
virtual std::string | getType () const =0 |
Get the type of plugin. |
A base class for plugins with optional configurable parameters, programs, etc.
Chris@1:The Vamp::Plugin is derived from this, and individual Vamp plugins should derive from that.
Chris@1:This class does not provide the necessary interfaces to instantiate or run a plugin. It only specifies an interface for retrieving those controls that the host may wish to show to the user for editing. It could meaningfully be subclassed by real-time plugins or other sorts of plugin as well as Vamp plugins.
Chris@1: Chris@3:Definition at line 60 of file vamp-sdk/PluginBase.h.
Chris@1:typedef std::vector<ParameterDescriptor> Vamp::PluginBase::ParameterList | Chris@1:
Definition at line 199 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:typedef std::vector<std::string> Vamp::PluginBase::ProgramList | Chris@1:
Definition at line 221 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:virtual Vamp::PluginBase::~PluginBase | Chris@1:( | Chris@1:) | Chris@1: [inline, virtual] |
Chris@1:
Definition at line 63 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:virtual unsigned int Vamp::PluginBase::getVampApiVersion | Chris@1:( | Chris@1:) | Chris@1: const [inline, virtual] |
Chris@1:
Get the Vamp API compatibility level of the plugin.
Chris@1: Chris@1:Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.
Chris@1: Chris@3:Definition at line 68 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:Referenced by enumeratePlugins().
Chris@1: Chris@1:virtual std::string Vamp::PluginBase::getIdentifier | Chris@1:( | Chris@1:) | Chris@1: const [pure virtual] |
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@1:Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.
Chris@1: Chris@1:Referenced by enumeratePlugins(), and runPlugin().
Chris@1: Chris@1:virtual std::string Vamp::PluginBase::getName | Chris@1:( | Chris@1:) | Chris@1: const [pure virtual] |
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@1:Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.
Chris@1: Chris@1:Referenced by enumeratePlugins(), and printPluginCategoryList().
Chris@1: Chris@1:virtual std::string Vamp::PluginBase::getDescription | Chris@1:( | Chris@1:) | Chris@1: const [pure virtual] |
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@1:Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.
Chris@1: Chris@1:Referenced by enumeratePlugins(), and printPluginCategoryList().
Chris@1: Chris@1:virtual std::string Vamp::PluginBase::getMaker | Chris@1:( | Chris@1:) | Chris@1: const [pure virtual] |
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@1:Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.
Chris@1: Chris@1:Referenced by enumeratePlugins(), and printPluginCategoryList().
Chris@1: Chris@1:virtual std::string Vamp::PluginBase::getCopyright | Chris@1:( | Chris@1:) | Chris@1: const [pure virtual] |
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@1:Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.
Chris@1: Chris@1:Referenced by enumeratePlugins().
Chris@1: Chris@1:virtual int Vamp::PluginBase::getPluginVersion | Chris@1:( | Chris@1:) | Chris@1: const [pure virtual] |
Chris@1:
Get the version number of the plugin.
Chris@1: Chris@1:Implemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, PowerSpectrum, AmplitudeFollower, SpectralCentroid, ZeroCrossing, FixedTempoEstimator, and PercussionOnsetDetector.
Chris@1: Chris@1:Referenced by enumeratePlugins().
Chris@1: Chris@1:virtual ParameterList Vamp::PluginBase::getParameterDescriptors | Chris@1:( | Chris@1:) | Chris@1: const [inline, virtual] |
Chris@1:
Get the controllable parameters of this plugin.
Chris@1: Chris@1:Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.
Chris@1: Chris@3:Definition at line 204 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:Referenced by enumeratePlugins().
Chris@1: Chris@1:virtual float Vamp::PluginBase::getParameter | Chris@1:( | Chris@1:std::string | Chris@1:) | Chris@1: const [inline, virtual] |
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@1:Reimplemented in Vamp::PluginHostAdapter, Vamp::HostExt::PluginWrapper, AmplitudeFollower, FixedTempoEstimator, and PercussionOnsetDetector.
Chris@1: Chris@3:Definition at line 212 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:virtual void Vamp::PluginBase::setParameter | Chris@1:( | Chris@1:std::string | Chris@1:, | Chris@1:
Chris@1: | Chris@1: | float | Chris@1:Chris@1: |
Chris@1: | ) | Chris@1: [inline, virtual] |
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@3:Definition at line 218 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:virtual ProgramList Vamp::PluginBase::getPrograms | Chris@1:( | Chris@1:) | Chris@1: const [inline, virtual] |
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@1:Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.
Chris@1: Chris@3:Definition at line 233 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:virtual std::string Vamp::PluginBase::getCurrentProgram | Chris@1:( | Chris@1:) | Chris@1: const [inline, virtual] |
Chris@1:
Get the current program.
Chris@1: Chris@1:Reimplemented in Vamp::PluginHostAdapter, and Vamp::HostExt::PluginWrapper.
Chris@1: Chris@3:Definition at line 238 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:virtual void Vamp::PluginBase::selectProgram | Chris@1:( | Chris@1:std::string | Chris@1:) | Chris@1: [inline, virtual] |
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@3:Definition at line 244 of file vamp-sdk/PluginBase.h.
Chris@1: Chris@1:virtual std::string Vamp::PluginBase::getType | Chris@1:( | Chris@1:) | Chris@1: const [pure virtual] |
Chris@1:
Get the type of plugin.
Chris@1:This is to be implemented by the immediate subclass, not by actual plugins. Do not attempt to implement this in plugin code.
Chris@1: Chris@1:Implemented in Vamp::Plugin.
Chris@1: Chris@1: