nymph
A Nim library for writing audio and MIDI plugins conforming to the LV2 standard
Examples
Build the amp.lv2 example plugin:
nimble build_ex amp
Check the amp.lv2 plugin bundle with lv2lint:
nimble lv2lint amp
Run the lv2bm benchmark with the amp.lv2 plugin:
nimble lv2bm amp
Install the amp.lv2 example plugin:
cp -a examples/amp.lv2 ~/.lv2
How To
-
Install this library:
nimble install https://git.0x20.eu/chris/nymph
-
Copy
examples/amp.lv2andexamples/amp.niminto your project and rename them as you like (also renaneamp.lv2/amp.ttl). I'll usemypluginas the base bname in the examples below. -
Edit
myplugin.lv2/manifest.ttland change the plugin URI and change the plugin's shared library name defined withlv2:binarytolibmyplugin.so. -
Edit
myplugin.lv2/myplugin.ttl:- Change the plugin URI.
- Define audio, control and atom ports as needed.
-
Edit
myplugin.nim:- Change the
PluginUriconstant at the top. - Change the
PluginPortenum and list the ports in the order defined inmyplugin.ttl. - Change the definition of the
AmpPluginobject type and define its members with the appropriate data type for the plugin port they will be connected to. Update the type name ininstantiate,deactivate,connectPortsandrunprocs. - Update and extend the
casestatement inconnectPortto connect ports to your plugin object instance members. - Implement your DSP code in the
runproc.
- Change the
-
Compile the plugin shared library object with:
nim c --app:lib --noMain:on --mm:arc \ --out:myplugin.lv2/libmyplugin.so myplugin.nimSee the definition of the
build_extask in the nymph.nimble file on how to create a nimble task to siplify compilation.
Dependencies
Required:
- Nim >= 2.0
Optional: