#include <lua_api.h>
Definition at line 303 of file lua_api.h.
◆ Vamp()
ARDOUR::LuaAPI::Vamp::Vamp |
( |
const std::string & |
, |
|
|
float |
sample_rate |
|
) |
| |
Vamp Plugin Interface
Vamp is an audio processing plugin system for plugins that extract descriptive information from audio data - typically referred to as audio analysis plugins or audio feature extraction plugins.
This interface allows to load a plugins and directly access it using the Vamp Plugin API.
A convenience method is provided to analyze Ardour::AudioReadable objects (Regions).
◆ ~Vamp()
ARDOUR::LuaAPI::Vamp::~Vamp |
( |
| ) |
|
◆ analyze()
int ARDOUR::LuaAPI::Vamp::analyze |
( |
std::shared_ptr< ARDOUR::AudioReadable > |
r, |
|
|
uint32_t |
channel, |
|
|
luabridge::LuaRef |
fn |
|
) |
| |
high-level abstraction to process a single channel of the given AudioReadable.
If the plugin is not yet initialized, initialize() is called.
if fn
is not nil, it is called with the immediate Vamp::Plugin::Features on every process call.
- Parameters
-
r | readable |
channel | channel to process |
fn | lua callback function or nil |
- Returns
- 0 on success
◆ initialize()
bool ARDOUR::LuaAPI::Vamp::initialize |
( |
| ) |
|
initialize the plugin for use with analyze().
This is equivalent to plugin():initialise (1, ssiz, bsiz) and prepares a plugin for analyze. (by preferred step and block sizes are used. if the plugin does not specify them or they're larger than 8K, both are set to 1024)
Manual initialization is only required to set plugin-parameters which depend on prior initialization of the plugin.
vamp:
plugin():setParameter (0, 1.5, nil)
int analyze(std::shared_ptr< ARDOUR::AudioReadable > r, uint32_t channel, luabridge::LuaRef fn)
::Vamp::Plugin * plugin()
◆ initialized()
bool ARDOUR::LuaAPI::Vamp::initialized |
( |
| ) |
const |
|
inline |
◆ list_plugins()
static std::vector<std::string> ARDOUR::LuaAPI::Vamp::list_plugins |
( |
| ) |
|
|
static |
Search for all available available Vamp plugins.
- Returns
- list of plugin-keys
◆ plugin()
::Vamp::Plugin* ARDOUR::LuaAPI::Vamp::plugin |
( |
| ) |
|
|
inline |
◆ process()
::Vamp::Plugin::FeatureSet ARDOUR::LuaAPI::Vamp::process |
( |
const std::vector< float * > & |
d, |
|
|
::Vamp::RealTime |
rt |
|
) |
| |
process given array of audio-samples.
This is a lua-binding for vamp:plugin():process ()
- Parameters
-
d | audio-data, the vector must match the configured channel count and hold a complete buffer for every channel as set during plugin():initialise() |
rt | timestamp matching the provided buffer. |
- Returns
- features extracted from that data (if the plugin is causal)
◆ reset()
void ARDOUR::LuaAPI::Vamp::reset |
( |
| ) |
|
◆ _bufsize
◆ _initialized
bool ARDOUR::LuaAPI::Vamp::_initialized |
|
private |
◆ _plugin
::Vamp::Plugin* ARDOUR::LuaAPI::Vamp::_plugin |
|
private |
◆ _sample_rate
float ARDOUR::LuaAPI::Vamp::_sample_rate |
|
private |
◆ _stepsize
The documentation for this class was generated from the following file: