Understanding LV2

From MOD Wiki
Revision as of 14:17, 1 November 2021 by FalkTX (talk | contribs)
Jump to navigation Jump to search

This page describes basic LV2 related concepts for those unfamiliar with the subject.

LV2 plugins are audio plugins, this means they process and/or generate audio, MIDI and/or control data. Just like other audio plugins they require a host, in case of MOD they are hosted in JACK on the device for data processing and in the browser on a remote client for the GUI. For programming LV2 plugins, experience with C/C++ is required. (The LV2 developers have a handy webpage with examples at https://lv2plug.in/book/)

The LV2 plugin contains two parts: code and data. The code part contains C or C compatible language (e.g. C++) files which are responsible for processes like instantiation and port connection (this means where the plugin can find the locations of the data to read and analyse and write output to) as well as the DSP components of the plugin. The data part contains Turtle files which are used to link all files together in a “bundle” such that the host can quickly scan the plugin for critical information (in the manifest.ttl) and loads more detailed meta-data (in the pluginname.ttl) once the plugin is analysed. This means a host can quickly scan for manifests to discover plugins, proces the other Turtle files to generate a UI and use the code portion of the bundle to process audio data once loaded.