rt-vamp-plugin-sdk
0.3.1
Real-time Vamp plugin SDK for C++20
|
Extended plugin base class with automatic parameter / program handling. More...
#include <rtvamp/pluginsdk/PluginExt.hpp>
Public Member Functions | |
PluginExt (float inputSampleRate) | |
std::optional< float > | getParameter (std::string_view id) const override final |
bool | setParameter (std::string_view id, float value) override final |
std::string_view | getCurrentProgram () const override final |
bool | selectProgram (std::string_view name) override final |
virtual void | onParameterChange (std::string_view id, float newValue) |
virtual void | onProgramChange (std::string_view newProgram) |
Public Member Functions inherited from rtvamp::pluginsdk::Plugin< NOutputs > | |
constexpr | Plugin (float inputSampleRate) |
virtual uint32_t | getPreferredStepSize () const |
virtual uint32_t | getPreferredBlockSize () const |
virtual OutputList | getOutputDescriptors () const =0 |
virtual bool | initialise (uint32_t stepSize, uint32_t blockSize)=0 |
virtual void | reset ()=0 |
virtual const FeatureSet & | process (InputBuffer buffer, uint64_t nsec)=0 |
Public Member Functions inherited from rtvamp::pluginsdk::PluginBase | |
virtual | ~PluginBase ()=default |
Additional Inherited Members | |
Public Types inherited from rtvamp::pluginsdk::Plugin< NOutputs > | |
using | OutputList = std::array< OutputDescriptor, NOutputs > |
List of output descriptors. More... | |
using | FeatureSet = std::array< Feature, NOutputs > |
Computed features for each output. More... | |
Public Types inherited from rtvamp::pluginsdk::PluginBase | |
enum | InputDomain { InputDomain::Time, InputDomain::Frequency } |
Input domain of the plugin. More... | |
using | TimeDomainBuffer = std::span< const float > |
Time domain buffer. More... | |
using | FrequencyDomainBuffer = std::span< const std::complex< float > > |
Frequency domain buffer (FFT) More... | |
using | InputBuffer = std::variant< TimeDomainBuffer, FrequencyDomainBuffer > |
Input domain variant. More... | |
using | Feature = std::vector< float > |
Feature with one or more values (defined by OutputDescriptor::binCount) More... | |
Static Public Attributes inherited from rtvamp::pluginsdk::Plugin< NOutputs > | |
static constexpr uint32_t | outputCount = NOutputs |
Number of outputs (defined by template parameter) More... | |
static constexpr Meta | meta {} |
Required static plugin descriptor. More... | |
static constexpr std::array< ParameterDescriptor, 0 > | parameters {} |
Optional parameter descriptors (default: none) More... | |
static constexpr std::array< const char *, 0 > | programs {} |
Optional program list (default: none) More... | |
Protected Member Functions inherited from rtvamp::pluginsdk::Plugin< NOutputs > | |
float | getInputSampleRate () const noexcept |
FeatureSet & | getFeatureSet () noexcept |
void | initialiseFeatureSet () |
Extended plugin base class with automatic parameter / program handling.
Two template arguments must be provided:
Assumptions:
|
inlineexplicit |
|
finaloverridevirtual |
Reimplemented from rtvamp::pluginsdk::Plugin< NOutputs >.
|
finaloverridevirtual |
Reimplemented from rtvamp::pluginsdk::Plugin< NOutputs >.
|
inlinevirtual |
|
inlinevirtual |
|
finaloverridevirtual |
Reimplemented from rtvamp::pluginsdk::Plugin< NOutputs >.
|
finaloverridevirtual |
Reimplemented from rtvamp::pluginsdk::Plugin< NOutputs >.