Class ladspa
LADSPA plugin support.
local mladspa = require 'melisma.ladspa' local spec = 'caps.so:Plate' local info = mladspa.info(spec) print('name:',info.name) print('maker:',info.maker) local input = ... local plate = mladspa.load(spec,input) plate:control(1,1) local left = plate:out(6) local right = plate:out(7)
Functions
| ladspa.info(spec) | Get information about a specific plugin. |
| ladspa.lib_info(path) | List plugins in the specified plugin library. |
| ladspa.load(spec, ...) | Load a ladspa plugin. |
Methods
| ladspa:control(i, v) | Set the value of an input control port. |
| ladspa:out(i) | Get the audio output port at the specified index. |
Functions
Methods- ladspa.info(spec)
-
Get information about a specific plugin.
Plugin specifications are written in the format
<path>:<plugin>, where<path>is the full name of the plugin library (e.g.caps.so), and<plugin>is the name or label of the plugin. If<path>is not an absolute path, the library is searched for first in the current directory, then inLADSPA_PATH.This can be used to generate more ergonomic plugin interfaces.
Parameters:
- spec string Plugin specification.
Returns:
-
table
Plugin information.
- ladspa.lib_info(path)
-
List plugins in the specified plugin library.
If
pathis not an absolute path, the library is searched for first in the current directory, then inLADSPA_PATH.Parameters:
- path string Path to plugin library.
Returns:
-
table
List of short plugin descriptions.
- ladspa.load(spec, ...)
-
Load a ladspa plugin.
Input signals are connected to the plugins audio input ports in the order that they are declared.
Parameters:
- spec string Plugin specification.
- ... channel Input signals.
Methods
- ladspa:control(i, v)
-
Set the value of an input control port.
Ports are indexed based on the order they are declared by the plugin. This also means the indices of control ports are not necessarily consecutive.
Parameters:
- i integer One-based port index.
- v number New control port value.
- ladspa:out(i)
-
Get the audio output port at the specified index.
Ports are indexed based on the order they are declared by the plugin. This also means the indices of audio ports are not necessarily consecutive.
Parameters:
- i integer One-based port index.
Returns:
-
channel
Audio output at specified index.