46 Plugin(inputSampleRate),
58 return "powerspectrum";
64 return "Simple Power Spectrum";
70 return "Return the power spectrum of a signal";
76 return "Vamp SDK Example Plugins";
88 return "Freely redistributable (BSD license)";
114 d.
name =
"Power Spectrum";
115 d.
description =
"Power values of the frequency spectrum bins calculated from the input signal";
141 cerr <<
"ERROR: PowerSpectrum::process: Not initialised" << endl;
146 const float *fbuf = inputBuffers[0];
150 feature.
values.reserve(n);
152 for (
size_t i = 0; i < n; ++i) {
154 double real = fbuf[i * 2];
155 double imag = fbuf[i * 2 + 1];
157 feature.
values.push_back(real * real + imag * imag);
160 fs[0].push_back(feature);
std::vector< OutputDescriptor > OutputList
std::string getCopyright() const
Get the copyright statement or licensing summary for the plugin.
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.
OutputList getOutputDescriptors() const
Get the outputs of this plugin.
std::map< int, FeatureList > FeatureSet
std::string getName() const
Get a human-readable name or title of the plugin.
std::string description
A human-readable short text describing the output.
std::string identifier
The name of the output, in computer-usable form.
FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp)
Process a single block of input data.
std::string getIdentifier() const
Get the computer-usable name of the plugin.
std::string unit
The unit of the output, in human-readable form.
std::string getDescription() const
Get a human-readable description for the plugin, typically a line of text that may optionally be disp...
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.
bool initialise(size_t channels, size_t stepSize, size_t blockSize)
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).
FeatureSet getRemainingFeatures()
After all blocks have been processed, calculate and return any remaining features derived from the co...
Results from each process() align with that call's block start.
virtual size_t getMaxChannelCount() const
Get the maximum supported number of input channels.
size_t binCount
The number of values per result of the output.
std::string getMaker() const
Get the name of the author or vendor of the plugin in human-readable form.
void reset()
Reset the plugin after use, to prepare it for another clean run.
bool isQuantized
True if the output values are quantized to a particular resolution.
int getPluginVersion() const
Get the version number of the plugin.
virtual size_t getMinChannelCount() const
Get the minimum supported number of input channels.
PowerSpectrum(float 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)...