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"; }
442 m_inputSampleRate(inputSampleRate) { }
std::vector< OutputDescriptor > OutputList
bool hasDuration
True if the returned results for this output are known to have a duration field.
std::string label
Label for the sample of this feature.
Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio o...
virtual size_t getPreferredStepSize() const
Get the preferred step size (window increment – the distance in sample frames between the start fram...
float sampleRate
Sample rate of the output results, as samples per second.
bool hasFixedBinCount
True if the output has the same number of values per sample for every output sample.
std::vector< float > values
Results for a single sample of this feature.
Results are evenly spaced in time (sampleRate specified below)
std::map< int, FeatureList > FeatureSet
float quantizeStep
Quantization resolution of the output values (e.g.
RealTime timestamp
Timestamp of the output feature.
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.
float minValue
Minimum value of the results in the output.
std::vector< std::string > binNames
The (human-readable) names of each of the bins, if appropriate.
float maxValue
Maximum value of the results in the output.
RealTime duration
Duration of the output feature.
std::string unit
The unit of the output, in human-readable form.
std::string name
The human-readable name of the output.
RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...
bool hasTimestamp
True if an output feature has its own timestamp.
virtual std::string getType() const
Used to distinguish between Vamp::Plugin and other potential sibling subclasses of PluginBase...
#define _VAMP_SDK_PLUGSPACE_BEGIN(h)
std::vector< Feature > FeatureList
#define _VAMP_SDK_PLUGSPACE_END(h)
bool hasDuration
True if an output feature has a specified duration.
Results from each process() align with that call's block start.
virtual size_t getMaxChannelCount() const
Get the maximum supported number of input channels.
A base class for plugins with optional configurable parameters, programs, etc.
size_t binCount
The number of values per result of the output.
bool isQuantized
True if the output values are quantized to a particular resolution.
virtual size_t getPreferredBlockSize() const
Get the preferred block size (window size – the number of sample frames passed in each block to the ...
virtual size_t getMinChannelCount() const
Get the minimum supported number of input channels.
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)...