From 7b67c423a084898a2bc2f6569285550c0b6c3961 Mon Sep 17 00:00:00 2001 From: fundamental Date: Sun, 27 May 2018 23:12:15 -0400 Subject: Add initial WIP for more user friendly docs See May 2018 lv2-devel discussion for some of the motivations for the different style of documentation. --- doc/lv2_host_guide/lv2-host-perspective.adoc | 185 +++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 doc/lv2_host_guide/lv2-host-perspective.adoc (limited to 'doc/lv2_host_guide') diff --git a/doc/lv2_host_guide/lv2-host-perspective.adoc b/doc/lv2_host_guide/lv2-host-perspective.adoc new file mode 100644 index 0000000..c890c54 --- /dev/null +++ b/doc/lv2_host_guide/lv2-host-perspective.adoc @@ -0,0 +1,185 @@ +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