LV2  1.0.13
Data Structures | Macros | Typedefs | Functions
lv2.h File Reference

API for the LV2 specification http://lv2plug.in/ns/lv2core. More...

Data Structures

struct  LV2_Feature
 Feature. More...
 
struct  LV2_Descriptor
 Plugin Descriptor. More...
 
struct  LV2_Lib_Descriptor
 Descriptor for a plugin library. More...
 

Macros

#define LV2_CORE_URI   "http://lv2plug.in/ns/lv2core"
 
#define LV2_CORE_PREFIX   LV2_CORE_URI "#"
 
#define LV2_CORE__AllpassPlugin   LV2_CORE_PREFIX "AllpassPlugin"
 
#define LV2_CORE__AmplifierPlugin   LV2_CORE_PREFIX "AmplifierPlugin"
 
#define LV2_CORE__AnalyserPlugin   LV2_CORE_PREFIX "AnalyserPlugin"
 
#define LV2_CORE__AudioPort   LV2_CORE_PREFIX "AudioPort"
 
#define LV2_CORE__BandpassPlugin   LV2_CORE_PREFIX "BandpassPlugin"
 
#define LV2_CORE__CVPort   LV2_CORE_PREFIX "CVPort"
 
#define LV2_CORE__ChorusPlugin   LV2_CORE_PREFIX "ChorusPlugin"
 
#define LV2_CORE__CombPlugin   LV2_CORE_PREFIX "CombPlugin"
 
#define LV2_CORE__CompressorPlugin   LV2_CORE_PREFIX "CompressorPlugin"
 
#define LV2_CORE__ConstantPlugin   LV2_CORE_PREFIX "ConstantPlugin"
 
#define LV2_CORE__ControlPort   LV2_CORE_PREFIX "ControlPort"
 
#define LV2_CORE__ConverterPlugin   LV2_CORE_PREFIX "ConverterPlugin"
 
#define LV2_CORE__DelayPlugin   LV2_CORE_PREFIX "DelayPlugin"
 
#define LV2_CORE__DistortionPlugin   LV2_CORE_PREFIX "DistortionPlugin"
 
#define LV2_CORE__DynamicsPlugin   LV2_CORE_PREFIX "DynamicsPlugin"
 
#define LV2_CORE__EQPlugin   LV2_CORE_PREFIX "EQPlugin"
 
#define LV2_CORE__EnvelopePlugin   LV2_CORE_PREFIX "EnvelopePlugin"
 
#define LV2_CORE__ExpanderPlugin   LV2_CORE_PREFIX "ExpanderPlugin"
 
#define LV2_CORE__ExtensionData   LV2_CORE_PREFIX "ExtensionData"
 
#define LV2_CORE__Feature   LV2_CORE_PREFIX "Feature"
 
#define LV2_CORE__FilterPlugin   LV2_CORE_PREFIX "FilterPlugin"
 
#define LV2_CORE__FlangerPlugin   LV2_CORE_PREFIX "FlangerPlugin"
 
#define LV2_CORE__FunctionPlugin   LV2_CORE_PREFIX "FunctionPlugin"
 
#define LV2_CORE__GatePlugin   LV2_CORE_PREFIX "GatePlugin"
 
#define LV2_CORE__GeneratorPlugin   LV2_CORE_PREFIX "GeneratorPlugin"
 
#define LV2_CORE__HighpassPlugin   LV2_CORE_PREFIX "HighpassPlugin"
 
#define LV2_CORE__InputPort   LV2_CORE_PREFIX "InputPort"
 
#define LV2_CORE__InstrumentPlugin   LV2_CORE_PREFIX "InstrumentPlugin"
 
#define LV2_CORE__LimiterPlugin   LV2_CORE_PREFIX "LimiterPlugin"
 
#define LV2_CORE__LowpassPlugin   LV2_CORE_PREFIX "LowpassPlugin"
 
#define LV2_CORE__MixerPlugin   LV2_CORE_PREFIX "MixerPlugin"
 
#define LV2_CORE__ModulatorPlugin   LV2_CORE_PREFIX "ModulatorPlugin"
 
#define LV2_CORE__MultiEQPlugin   LV2_CORE_PREFIX "MultiEQPlugin"
 
#define LV2_CORE__OscillatorPlugin   LV2_CORE_PREFIX "OscillatorPlugin"
 
#define LV2_CORE__OutputPort   LV2_CORE_PREFIX "OutputPort"
 
#define LV2_CORE__ParaEQPlugin   LV2_CORE_PREFIX "ParaEQPlugin"
 
#define LV2_CORE__PhaserPlugin   LV2_CORE_PREFIX "PhaserPlugin"
 
#define LV2_CORE__PitchPlugin   LV2_CORE_PREFIX "PitchPlugin"
 
#define LV2_CORE__Plugin   LV2_CORE_PREFIX "Plugin"
 
#define LV2_CORE__PluginBase   LV2_CORE_PREFIX "PluginBase"
 
#define LV2_CORE__Point   LV2_CORE_PREFIX "Point"
 
#define LV2_CORE__Port   LV2_CORE_PREFIX "Port"
 
#define LV2_CORE__PortProperty   LV2_CORE_PREFIX "PortProperty"
 
#define LV2_CORE__Resource   LV2_CORE_PREFIX "Resource"
 
#define LV2_CORE__ReverbPlugin   LV2_CORE_PREFIX "ReverbPlugin"
 
#define LV2_CORE__ScalePoint   LV2_CORE_PREFIX "ScalePoint"
 
#define LV2_CORE__SimulatorPlugin   LV2_CORE_PREFIX "SimulatorPlugin"
 
#define LV2_CORE__SpatialPlugin   LV2_CORE_PREFIX "SpatialPlugin"
 
#define LV2_CORE__Specification   LV2_CORE_PREFIX "Specification"
 
#define LV2_CORE__SpectralPlugin   LV2_CORE_PREFIX "SpectralPlugin"
 
#define LV2_CORE__UtilityPlugin   LV2_CORE_PREFIX "UtilityPlugin"
 
#define LV2_CORE__WaveshaperPlugin   LV2_CORE_PREFIX "WaveshaperPlugin"
 
#define LV2_CORE__appliesTo   LV2_CORE_PREFIX "appliesTo"
 
#define LV2_CORE__binary   LV2_CORE_PREFIX "binary"
 
#define LV2_CORE__connectionOptional   LV2_CORE_PREFIX "connectionOptional"
 
#define LV2_CORE__control   LV2_CORE_PREFIX "control"
 
#define LV2_CORE__default   LV2_CORE_PREFIX "default"
 
#define LV2_CORE__designation   LV2_CORE_PREFIX "designation"
 
#define LV2_CORE__documentation   LV2_CORE_PREFIX "documentation"
 
#define LV2_CORE__enumeration   LV2_CORE_PREFIX "enumeration"
 
#define LV2_CORE__extensionData   LV2_CORE_PREFIX "extensionData"
 
#define LV2_CORE__freeWheeling   LV2_CORE_PREFIX "freeWheeling"
 
#define LV2_CORE__hardRTCapable   LV2_CORE_PREFIX "hardRTCapable"
 
#define LV2_CORE__inPlaceBroken   LV2_CORE_PREFIX "inPlaceBroken"
 
#define LV2_CORE__index   LV2_CORE_PREFIX "index"
 
#define LV2_CORE__integer   LV2_CORE_PREFIX "integer"
 
#define LV2_CORE__isLive   LV2_CORE_PREFIX "isLive"
 
#define LV2_CORE__latency   LV2_CORE_PREFIX "latency"
 
#define LV2_CORE__maximum   LV2_CORE_PREFIX "maximum"
 
#define LV2_CORE__microVersion   LV2_CORE_PREFIX "microVersion"
 
#define LV2_CORE__minimum   LV2_CORE_PREFIX "minimum"
 
#define LV2_CORE__minorVersion   LV2_CORE_PREFIX "minorVersion"
 
#define LV2_CORE__name   LV2_CORE_PREFIX "name"
 
#define LV2_CORE__optionalFeature   LV2_CORE_PREFIX "optionalFeature"
 
#define LV2_CORE__port   LV2_CORE_PREFIX "port"
 
#define LV2_CORE__portProperty   LV2_CORE_PREFIX "portProperty"
 
#define LV2_CORE__project   LV2_CORE_PREFIX "project"
 
#define LV2_CORE__reportsLatency   LV2_CORE_PREFIX "reportsLatency"
 
#define LV2_CORE__requiredFeature   LV2_CORE_PREFIX "requiredFeature"
 
#define LV2_CORE__sampleRate   LV2_CORE_PREFIX "sampleRate"
 
#define LV2_CORE__scalePoint   LV2_CORE_PREFIX "scalePoint"
 
#define LV2_CORE__symbol   LV2_CORE_PREFIX "symbol"
 
#define LV2_CORE__toggled   LV2_CORE_PREFIX "toggled"
 
#define LV2_SYMBOL_EXPORT
 Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded by the host as a symbol from the dynamic library. More...
 

Typedefs

typedef void * LV2_Handle
 Plugin Instance Handle. More...
 
typedef const LV2_Descriptor *(* LV2_Descriptor_Function )(uint32_t index)
 Type of the lv2_descriptor() function in a library (old discovery API). More...
 
typedef void * LV2_Lib_Handle
 Handle for a library descriptor. More...
 
typedef const
LV2_Lib_Descriptor *(* 
LV2_Lib_Descriptor_Function )(const char *bundle_path, const LV2_Feature *const *features)
 Type of the lv2_lib_descriptor() function in an LV2 library. More...
 

Functions

LV2_SYMBOL_EXPORT const
LV2_Descriptor
lv2_descriptor (uint32_t index)
 Prototype for plugin accessor function. More...
 
const LV2_Lib_Descriptorlv2_lib_descriptor (const char *bundle_path, const LV2_Feature *const *features)
 Prototype for library accessor function. More...
 

Detailed Description

API for the LV2 specification http://lv2plug.in/ns/lv2core.

Revision: 6.5

Macro Definition Documentation

#define LV2_CORE_URI   "http://lv2plug.in/ns/lv2core"
#define LV2_CORE_PREFIX   LV2_CORE_URI "#"
#define LV2_CORE__AllpassPlugin   LV2_CORE_PREFIX "AllpassPlugin"
#define LV2_CORE__AmplifierPlugin   LV2_CORE_PREFIX "AmplifierPlugin"
#define LV2_CORE__AnalyserPlugin   LV2_CORE_PREFIX "AnalyserPlugin"
#define LV2_CORE__AudioPort   LV2_CORE_PREFIX "AudioPort"
#define LV2_CORE__BandpassPlugin   LV2_CORE_PREFIX "BandpassPlugin"
#define LV2_CORE__CVPort   LV2_CORE_PREFIX "CVPort"
#define LV2_CORE__ChorusPlugin   LV2_CORE_PREFIX "ChorusPlugin"
#define LV2_CORE__CombPlugin   LV2_CORE_PREFIX "CombPlugin"
#define LV2_CORE__CompressorPlugin   LV2_CORE_PREFIX "CompressorPlugin"
#define LV2_CORE__ConstantPlugin   LV2_CORE_PREFIX "ConstantPlugin"
#define LV2_CORE__ControlPort   LV2_CORE_PREFIX "ControlPort"
#define LV2_CORE__ConverterPlugin   LV2_CORE_PREFIX "ConverterPlugin"
#define LV2_CORE__DelayPlugin   LV2_CORE_PREFIX "DelayPlugin"
#define LV2_CORE__DistortionPlugin   LV2_CORE_PREFIX "DistortionPlugin"
#define LV2_CORE__DynamicsPlugin   LV2_CORE_PREFIX "DynamicsPlugin"
#define LV2_CORE__EQPlugin   LV2_CORE_PREFIX "EQPlugin"
#define LV2_CORE__EnvelopePlugin   LV2_CORE_PREFIX "EnvelopePlugin"
#define LV2_CORE__ExpanderPlugin   LV2_CORE_PREFIX "ExpanderPlugin"
#define LV2_CORE__ExtensionData   LV2_CORE_PREFIX "ExtensionData"
#define LV2_CORE__Feature   LV2_CORE_PREFIX "Feature"
#define LV2_CORE__FilterPlugin   LV2_CORE_PREFIX "FilterPlugin"
#define LV2_CORE__FlangerPlugin   LV2_CORE_PREFIX "FlangerPlugin"
#define LV2_CORE__FunctionPlugin   LV2_CORE_PREFIX "FunctionPlugin"
#define LV2_CORE__GatePlugin   LV2_CORE_PREFIX "GatePlugin"
#define LV2_CORE__GeneratorPlugin   LV2_CORE_PREFIX "GeneratorPlugin"
#define LV2_CORE__HighpassPlugin   LV2_CORE_PREFIX "HighpassPlugin"
#define LV2_CORE__InputPort   LV2_CORE_PREFIX "InputPort"
#define LV2_CORE__InstrumentPlugin   LV2_CORE_PREFIX "InstrumentPlugin"
#define LV2_CORE__LimiterPlugin   LV2_CORE_PREFIX "LimiterPlugin"
#define LV2_CORE__LowpassPlugin   LV2_CORE_PREFIX "LowpassPlugin"
#define LV2_CORE__MixerPlugin   LV2_CORE_PREFIX "MixerPlugin"
#define LV2_CORE__ModulatorPlugin   LV2_CORE_PREFIX "ModulatorPlugin"
#define LV2_CORE__MultiEQPlugin   LV2_CORE_PREFIX "MultiEQPlugin"
#define LV2_CORE__OscillatorPlugin   LV2_CORE_PREFIX "OscillatorPlugin"
#define LV2_CORE__OutputPort   LV2_CORE_PREFIX "OutputPort"
#define LV2_CORE__ParaEQPlugin   LV2_CORE_PREFIX "ParaEQPlugin"
#define LV2_CORE__PhaserPlugin   LV2_CORE_PREFIX "PhaserPlugin"
#define LV2_CORE__PitchPlugin   LV2_CORE_PREFIX "PitchPlugin"
#define LV2_CORE__Plugin   LV2_CORE_PREFIX "Plugin"
#define LV2_CORE__PluginBase   LV2_CORE_PREFIX "PluginBase"
#define LV2_CORE__Point   LV2_CORE_PREFIX "Point"
#define LV2_CORE__Port   LV2_CORE_PREFIX "Port"
#define LV2_CORE__PortProperty   LV2_CORE_PREFIX "PortProperty"
#define LV2_CORE__Resource   LV2_CORE_PREFIX "Resource"
#define LV2_CORE__ReverbPlugin   LV2_CORE_PREFIX "ReverbPlugin"
#define LV2_CORE__ScalePoint   LV2_CORE_PREFIX "ScalePoint"
#define LV2_CORE__SimulatorPlugin   LV2_CORE_PREFIX "SimulatorPlugin"
#define LV2_CORE__SpatialPlugin   LV2_CORE_PREFIX "SpatialPlugin"
#define LV2_CORE__Specification   LV2_CORE_PREFIX "Specification"
#define LV2_CORE__SpectralPlugin   LV2_CORE_PREFIX "SpectralPlugin"
#define LV2_CORE__UtilityPlugin   LV2_CORE_PREFIX "UtilityPlugin"
#define LV2_CORE__WaveshaperPlugin   LV2_CORE_PREFIX "WaveshaperPlugin"
#define LV2_CORE__appliesTo   LV2_CORE_PREFIX "appliesTo"
#define LV2_CORE__binary   LV2_CORE_PREFIX "binary"
#define LV2_CORE__connectionOptional   LV2_CORE_PREFIX "connectionOptional"
#define LV2_CORE__control   LV2_CORE_PREFIX "control"
#define LV2_CORE__default   LV2_CORE_PREFIX "default"
#define LV2_CORE__designation   LV2_CORE_PREFIX "designation"
#define LV2_CORE__documentation   LV2_CORE_PREFIX "documentation"
#define LV2_CORE__enumeration   LV2_CORE_PREFIX "enumeration"
#define LV2_CORE__extensionData   LV2_CORE_PREFIX "extensionData"
#define LV2_CORE__freeWheeling   LV2_CORE_PREFIX "freeWheeling"
#define LV2_CORE__hardRTCapable   LV2_CORE_PREFIX "hardRTCapable"
#define LV2_CORE__inPlaceBroken   LV2_CORE_PREFIX "inPlaceBroken"
#define LV2_CORE__index   LV2_CORE_PREFIX "index"
#define LV2_CORE__integer   LV2_CORE_PREFIX "integer"
#define LV2_CORE__isLive   LV2_CORE_PREFIX "isLive"
#define LV2_CORE__latency   LV2_CORE_PREFIX "latency"
#define LV2_CORE__maximum   LV2_CORE_PREFIX "maximum"
#define LV2_CORE__microVersion   LV2_CORE_PREFIX "microVersion"
#define LV2_CORE__minimum   LV2_CORE_PREFIX "minimum"
#define LV2_CORE__minorVersion   LV2_CORE_PREFIX "minorVersion"
#define LV2_CORE__name   LV2_CORE_PREFIX "name"
#define LV2_CORE__optionalFeature   LV2_CORE_PREFIX "optionalFeature"
#define LV2_CORE__port   LV2_CORE_PREFIX "port"
#define LV2_CORE__portProperty   LV2_CORE_PREFIX "portProperty"
#define LV2_CORE__project   LV2_CORE_PREFIX "project"
#define LV2_CORE__reportsLatency   LV2_CORE_PREFIX "reportsLatency"
#define LV2_CORE__requiredFeature   LV2_CORE_PREFIX "requiredFeature"
#define LV2_CORE__sampleRate   LV2_CORE_PREFIX "sampleRate"
#define LV2_CORE__scalePoint   LV2_CORE_PREFIX "scalePoint"
#define LV2_CORE__symbol   LV2_CORE_PREFIX "symbol"
#define LV2_CORE__toggled   LV2_CORE_PREFIX "toggled"
#define LV2_SYMBOL_EXPORT

Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded by the host as a symbol from the dynamic library.

Typedef Documentation

typedef void* LV2_Handle

Plugin Instance Handle.

This is a handle for one particular instance of a plugin. It is valid to compare to NULL (or 0 for C++) but otherwise the host MUST NOT attempt to interpret it.

typedef const LV2_Descriptor*(* LV2_Descriptor_Function)(uint32_t index)

Type of the lv2_descriptor() function in a library (old discovery API).

typedef void* LV2_Lib_Handle

Handle for a library descriptor.

typedef const LV2_Lib_Descriptor*(* LV2_Lib_Descriptor_Function)(const char *bundle_path, const LV2_Feature *const *features)

Type of the lv2_lib_descriptor() function in an LV2 library.

Function Documentation

LV2_SYMBOL_EXPORT const LV2_Descriptor* lv2_descriptor ( uint32_t  index)

Prototype for plugin accessor function.

This is part of the old discovery API, which has been replaced due to being inadequate for some plugins. It is limited because the bundle path is not available during discovery, and it relies on non-portable shared library constructors/destructors. However, this API is still supported and plugins are not required to migrate.

Plugins are discovered by hosts using RDF data (not by loading libraries). See http://lv2plug.in for details on the discovery process, though most hosts should use an existing library to implement this functionality.

A plugin library MUST include a function called "lv2_descriptor" with this prototype. This function MUST have C-style linkage (if you are using C++ this is taken care of by the 'extern "C"' clause at the top of this file).

When it is time to load a plugin (designated by its URI), the host loads the plugin's library, gets the lv2_descriptor() function from it, and uses this function to find the LV2_Descriptor for the desired plugin. Plugins are accessed by index using values from 0 upwards. This function MUST return NULL for out of range indices, so the host can enumerate plugins by increasing index until NULL is returned.

Note that index has no meaning, hosts MUST NOT depend on it remaining consistent between loads of the plugin library.

const LV2_Lib_Descriptor* lv2_lib_descriptor ( const char *  bundle_path,
const LV2_Feature *const *  features 
)

Prototype for library accessor function.

This is the entry point for a plugin library. Hosts load this symbol from the library and call this function to obtain a library descriptor which can be used to access all the contained plugins. The returned object must not be destroyed (using LV2_Lib_Descriptor::cleanup()) until all plugins loaded from that library have been destroyed.