This article relies too much on references to primary sources. (August 2011) (Learn how and when to remove this template message)
|Developer(s)||Steve Harris, David Robillard, other members of linux-audio-dev|
|Operating system||Linux, Windows, OS X, BSD|
LV2, an acronym for Linux Audio Developer's Simple Plugin API (LADSPA) version 2, is an open standard for audio plug-ins and matching host applications. It includes support for audio synthesis (generation) and digital signal processing of digital audio and MIDI. It provides an open alternative to other standards such as Virtual Studio Technology (VST) and Audio Units.
Currently there is support for LV2 in Ardour, Calf Studio Gear, Qtractor, Traverso DAW, Harrison Mixbus, MusE and the 2.0.6 and above versions of Audacity. It is also the plugin format used by the Mod Duo hardware effects unit. KXStudio's Carla is a multiplatform host supporting many plug-in formats including LV2.
LV2 replaces the former Disposable Soft Synth Interface (DSSI) plugin infrastructure, and succeeds the more limited LADSPA standard, adding MIDI capability, custom UIs, a system allowing extensibility of the initial standard, and other features.
A wide range of plugins are available in LV2 format
LV2 is an extensible framework, allowing a program to load a plugin to do some processing. Note that the terms used here are generic on purpose because LV2 allows any type of data to be exchanged between the host and the plugin. In this example we will use audio processing as a demonstration.
The host program loads the plugin, and calls some initialization functions. The host can provide a list of LV2_Extension that it supports when it initializes the plugin, so the capabilities of the host are known to the plugin when it is start up. Similarly, the plugin can provide a list of capabilities to the host, so the host can accommodate those. This capability concept is very powerful, but also difficult to understand at first.
One capability that a host can provide to a plugin is a "worker thread". In programming terms, this means that the plugin can offload some work to be done in another thread that the host provides. This is generally useful because a plugin is usually run in the real-time audio thread of an application, and hence cannot do any non-real-time safe operations (disk-accesses, system calls, etc.). To make it easy for the plugin to achieve its goals (e.g.: load a file from disk), the host can provide a worker thread. The host provides the LV2_Extension for the worker thread and the plugin is then able to use it.