Go to the documentation of this file.
37 #ifndef _VAMP_SDK_PLUGIN_H_
38 #define _VAMP_SDK_PLUGIN_H_
143 size_t blockSize) = 0;
323 hasFixedBinCount(false),
325 hasKnownExtents(false),
330 sampleType(OneSamplePerStep),
332 hasDuration(false) { }
390 hasTimestamp(false), hasDuration(false) { }
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.
virtual InputDomain getInputDomain() const =0
Get the plugin's required input domain.
virtual void reset()=0
Reset the plugin after use, to prepare it for another clean run.
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.
Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio o...
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 OutputList getOutputDescriptors() const =0
Get the outputs of this plugin.
virtual size_t getPreferredStepSize() const
Get the preferred step size (window increment – the distance in sample frames between the start frame...
virtual FeatureSet process(const float *const *inputBuffers, RealTime timestamp)=0
Process a single block of input data.
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,...
@ OneSamplePerStep
Results from each process() align with that call's block start.
virtual FeatureSet getRemainingFeatures()=0
After all blocks have been processed, calculate and return any remaining features derived from the co...
bool hasDuration
True if an output feature has a specified duration.
RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...
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