Go to the documentation of this file.
37 #ifndef _VAMP_SDK_PLUGIN_H_
38 #define _VAMP_SDK_PLUGIN_H_
141 virtual bool initialise(
size_t inputChannels,
143 size_t blockSize) = 0;
150 virtual void reset() = 0;
169 virtual InputDomain getInputDomain()
const = 0;
323 hasFixedBinCount(false),
325 hasKnownExtents(false),
330 sampleType(OneSamplePerStep),
332 hasDuration(false) { }
342 virtual OutputList getOutputDescriptors()
const = 0;
390 hasTimestamp(false), hasDuration(false) { }
424 virtual FeatureSet process(
const float *
const *inputBuffers,
431 virtual FeatureSet getRemainingFeatures() = 0;
438 virtual std::string
getType()
const {
return "Feature Extraction Plugin"; }
447 m_inputSampleRate(inputSampleRate) { }
SampleType sampleType
Positioning in time of the output results.
bool hasKnownExtents
True if the results in each output bin fall within a fixed numeric range (minimum and maximum values)...
float sampleRate
Sample rate of the output results, as samples per second.
std::vector< float > values
Results for a single sample of this feature.
bool hasDuration
True if the returned results for this output are known to have a duration field.
float quantizeStep
Quantization resolution of the output values (e.g.
std::string label
Label for the sample of this feature.
bool hasFixedBinCount
True if the output has the same number of values per sample for every output sample.
@ FixedSampleRate
Results are evenly spaced in time (sampleRate specified below)
float getInputSampleRate() const
Retrieve the input sample rate set on construction.
std::string description
A human-readable short text describing the output.
Plugin(float inputSampleRate)
std::string identifier
The name of the output, in computer-usable form.
std::vector< std::string > binNames
The (human-readable) names of each of the bins, if appropriate.
virtual size_t getPreferredBlockSize() const
Get the preferred block size (window size – the number of sample frames passed in each block to the p...
float minValue
Minimum value of the results in the output.
RealTime duration
Duration of the output feature.
virtual size_t getMinChannelCount() const
Get the minimum supported number of input channels.
#define _VAMP_SDK_PLUGSPACE_BEGIN(h)
virtual size_t getMaxChannelCount() const
Get the maximum supported number of input channels.
float maxValue
Maximum value of the results in the output.
std::string unit
The unit of the output, in human-readable form.
A base class for plugins with optional configurable parameters, programs, etc.
RealTime timestamp
Timestamp of the output feature.
std::string name
The human-readable name of the output.
std::vector< OutputDescriptor > OutputList
bool hasTimestamp
True if an output feature has its own timestamp.
virtual size_t getPreferredStepSize() const
Get the preferred step size (window increment – the distance in sample frames between the start frame...
@ OneSamplePerStep
Results from each process() align with that call's block start.
bool hasDuration
True if an output feature has a specified duration.
virtual std::string getType() const
Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase.
size_t binCount
The number of values per result of the output.
std::vector< Feature > FeatureList
bool isQuantized
True if the output values are quantized to a particular resolution.
#define _VAMP_SDK_PLUGSPACE_END(h)
std::map< int, FeatureList > FeatureSet