Introduction to LV2, a Plugin Host Perspective ============================================== :toc: Intro ----- Hello there, if you're reading this document then you're likely trying to figure out how to work with existing LV2 plugins and understanding some of the details of the LV2 spec. This document assumes some cursory knowledge about prior plugin standards including LADSPA(link)/DSSI(link)/VST(link)/etc. At the end of reading this guide you should be comfortable with setting up a basic host which can process audio, MIDI, and control events using several of the LV2 utility libraries in C. If you're looking for a C++ implementation, we'll briefly explain how the information within this guide can be translated at the end of this article. For the most part in this guide we'll refer to the official API specifications for more clarifications, though several code examples will come from one of several simple hosts including jalv(link) which is the reference implementation, lv2file(link) (a simple wav file processor), lv2apply(), lv2ls(link), and ... What can LV2 plugins do? ------------------------ talk about the raw basics of audio synthesis, audio effects, midi effects, and GUIs. Have a brief mention of extensions, but do *NOT* talk about them until later. Perhaps mention the existance of .ttl files here and say xxx is abstracted away by yyy. The LV2 Ecosystem ----------------- If you're searching around for libraries related to LV2 you may come across a wide variety of them. This can include lilv(links), raul(for), suil(every), serd(one), sord(of the), LV2 toolkit(libraries), and a few others. Fortunately building a basic host is not that difficult and will primarily build off of lilv. Talk about the other components as need be How can you load a LV2 plugin? ------------------------------ So, now that we know that we're using lilv, how can we load a simple plugin. For this let's try to load one of the basic sample plugins 'eg-amp'. Plugins within LV2 are loaded based upon URIs, so in the case of the 'eg-amp' plugin LV2 names it 'http://lv2plug.in/plugins/eg-amp'. (perhaps a brief footnote on why this is the case, but nothing more) First let's verify that this plugin is installed on your system -------------------------------------------------------------------------------- void list_plugins(void) { LilvWorld *world = lilv_world_new(); lilv_world_load_all(world); const LilvPlugins *plugins=lilv_world_get_all_plugins(lilvworld); LilvIter *plug_itr = lilv_plugins_begin(plugins); for(int i=0; i