Preparing the Bundle
In this page you will learn how to add the features of the MODGUI extension to an existing LV2 plugin bundle.
This is a very mechanical procedure and all you need to know is how to edit some text files in a plain text editor, such as notepad. No programming skills are needed.
Lets do it.
Contents
Add the modgui extension to the plugin ttl
In a text editor, open the manifest.ttl file of your plugin.
Look for a line that says “rdfs:seeAlso”. It usually is followed by the reference to another ttl file named after the plugin name.
Example:
mda:SubSynth a lv2:Plugin ; rdfs:seeAlso <SubSynth.ttl> ; lv2:binary <SubSynth@LIB_EXT@> .
In this line, add the reference to the modgui.ttl file that we will created in the next step, separating from the existing reference using a comma. This is the final result:
mda:SubSynth a lv2:Plugin ; rdfs:seeAlso <SubSynth.ttl> , <modgui.ttl> ; lv2:binary <SubSynth@LIB_EXT@> .
Note: you must keep the semicolon after the new value you added. If the “seeAlso” parameter was the last parameter of this block, it would be a dot instead of a semicolon. Just keep whatever character is there. Here is another example:
<http://guitarix.sourceforge.net/plugins/gx_CreamMachine_#_CreamMachine_> a lv2:Plugin ; lv2:binary <gx_CreamMachine.so> ; rdfs:seeAlso <gx_CreamMachine.ttl> , <modgui.ttl> .
Create the modgui.ttl
In the same folder where the manifest.ttl file is, create a new file named modgui.ttl.
Copy and paste the following content to this file:
@prefix modgui: <http://moddevices.com/ns/modgui#> . @prefix lv2: <http://lv2plug.in/ns/lv2core#> . <http://YOUR-PLUGIN-URI> modgui:gui [ ] .
Replace “YOUR-PLUGIN-URI” with the plugin URI. You can find it in the manifest.ttl file.
Create a folder to hold the GUI files
Inside your bundle, create a new folder called “modgui”. Inside this folder we will place all our images, html and css files.
Add your assets information
Now we are going to add the references to the files that compose the GUI. These are the references you must add:
modgui:resourcesDirectory - the directory where all the GUI elements will live. modgui is a good name ;) modgui:iconTemplate - The HTML template that renders the Plugin in the Pedalboard assembler modgui:stylesheet - the CSS stylesheet used by the HTML template modgui:screenshot - A real size image that represents the plugin. Usually a static screenshot of the iconTemplate. modgui:thumbnail - A thumbnail version of the screenshot
So the result will be something like this:
@prefix modgui: <http://moddevices.com/ns/modgui#> . @prefix lv2: <http://lv2plug.in/ns/lv2core#> . <http://moddevices.com/plugins/mod-devel/cabsim-vintage> modgui:gui [ modgui:resourcesDirectory <modgui> ; modgui:iconTemplate <modgui/icon-cabsim-vintage.html> ; modgui:stylesheet <modgui/stylesheet-cabsim-vintage.css> ; modgui:screenshot <modgui/screenshot-vintage-cabinet.png> ; modgui:thumbnail <modgui/thumbnail-vintage-cabinet.png> ; ] .
Add ports information
The last thing you must add to this file is the reference to the control ports the plugin has.
You will do this by copying information present in the plugin TTL file. You must look for “lv2:ControlPort” declarations and copy all the symbols and names to your modgui.ttl.
For each control port you will create an entry with an index (that is an incremental value), the symbol and the name of the port.
So, if in your plugin TTL file you have:
[ a lv2:InputPort , lv2:ControlPort ; lv2:index 2 ; lv2:symbol "BYPASS" ; lv2:name "BYPASS" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; lv2:designation lv2:enabled; lv2:portProperty lv2:integer; ], [ a lv2:InputPort , lv2:ControlPort ; lv2:index 3 ; lv2:symbol "BASS" ; lv2:name "BASS" ; lv2:default 0.5 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ]
You will add the following to your modgui.ttl:
[ lv2:index 0 ; lv2:symbol "BYPASS" ; lv2:name "BYPASS" ; ], [ lv2:index 1 ; lv2:symbol "BASS" ; lv2:name "BASS" ; ]
Note: The index does not necessarily matches the index in the plugin .TTL file. It is an incremental number starting from zero. Name and Symbol, in the other hand, must be identical.
So your final result will be something like this:
@prefix modgui: <http://moddevices.com/ns/modgui#> . @prefix lv2: <http://lv2plug.in/ns/lv2core#> . <http://moddevices.com/plugins/mod-devel/cabsim-vintage> modgui:gui [ modgui:resourcesDirectory <modgui> ; modgui:iconTemplate <modgui/icon-cabsim-vintage.html> ; modgui:stylesheet <modgui/stylesheet-cabsim-vintage.css> ; modgui:screenshot <modgui/screenshot-vintage-cabinet.png> ; modgui:thumbnail <modgui/thumbnail-vintage-cabinet.png> ; modgui:port [ lv2:index 0; lv2:symbol "Attenuation"; lv2:name "Attenuation"; ], [ lv2:index 1; lv2:symbol "Model"; lv2:name "Model"; ] ; ] .