LV2 Support/Project Docs

From Audacity Wiki
Jump to: navigation, search

Contents

LV2 project documentation

This page serves as documentation for the work done on the LV2 GSoC project. It lists the different parts of the project and describes where to find the relevant code and how to test it.

For testing purposes there are two LV2 plug-ins available: SimpleAmp written by Steve Harris with some minor bugfixes and modifications by me (Lars Luthman), and SineshaperStripped written by me. These are chosen specifically because they don't have any external dependencies, so they should be relatively easy to build and install. The Makefiles are for Linux and may have to be tweaked for other systems. You can of course install other LV2 plug-in packages if you want, like ll-plug-ins or CALF, but they may require a bit more work.

To install the two plug-ins above, just unpack them, type 'make' inside their directories, and then copy the whole directories to your LV2 plug-in directory (e.g. /usr/local/lib/lv2/).

Parts

See the LV2 Support page for more information about these different parts of the project.

1 & 2: Effect category support and bundled effect categorisation

Relevant source files: Menus.cpp, Menus.h, EffectCategory.cpp EffectCategory.h, Effect.cpp, Effect.h, EffectManager.cpp, EffectManager.h, and all built-in effect source files and Nyquist plug-ins

How to test: Compile with EFFECT_CATEGORIES defined and pull down the "Effects" menu. Instead of the old list of submenus with effects in groups of 15 you should see a hierarchy of submenus named after functionality, e.g. "Filter", "Amplifier" and so on. Plugin effects without categories will go in a "Unsorted" submenu.

3: LADSPA category support

Relevant source files: LadspaEffect.h, LadspaEffect.cpp, LoadLadspa.h, LoadLadspa.cpp

Relevant libraries: Redland and liblrdf

How to test: Compile with USE_LIBLRDF defined and liblrdf enabled and make sure that you have a LADSPA plug-in pack with RDF data files installed, e.g. the swh-plug-ins package. The LADSPA plug-ins should appear in the functional hierarchy instead of in the "Unsorted" submenu.

4: Basic LV2 support

Relevant source files: LV2Effect.h, LV2Effect.cpp, LoadLV2.h, LoadLV2.cpp

Relevant libraries: Redland and SLV2

How to test: Compile with USE_SLV2 defined and libslv2 enabled. Load an audio file and select "Effects" -> "Amplifier" -> "Simple Amplifier". This is the SimpleAmp LV2 plug-in linked above. Try moving the gain control and process some audio.

5: LV2 synth support

Relevant source files: LoadLV2.h, LoadLV2.cpp, LV2Effect.h, LV2Effect.cpp, and the header files lv2_event.h, lv2_event_helpers.h and lv2_uri_map - the latter are part of the LV2 event specification and are copied from http://lv2plug.in

Relevant libraries: Redland and SLV2

How to test: Compile with USE_SLV2 defined and libslv2 enabled. Select "Generate" -> "Instrument" -> "Sineshaper". This is the SineshaperStripped plug-in linked above. You should get a dialog box where you can set the length of the generated audio, the length of the note and the MIDI key number and velocity, as well as all the control parameters of the plug-in - tuning, distortion, gain, echo and so on. When you click "OK" you should get a single generated note.

6: Scale point support

Relevant source files: LV2Effect.cpp, LV2Effect.h

Relevant libraries: Redland and SLV2

How to test: Bring up the "Simple Amplifier" plug-in dialog again. The text boxes at the ends of the slider for the gain control should say "-90dB" and "24dB" instead of just the numerical values "-90" and "-24". These text labels are scale point labels defined in the RDF files for the plug-in.

7: LV2 i18n support

Relevant patches: lib-src/slv2/i18n.patch

How to test: Set the environment variable LANG to "de" before you start Audacity. The "Simple Amplifier" plug-in should now instead be called "Einfacher Verstärker" and the "gain" control should be labelled "gewinn".

Since this is a patch against SLV2 it only works if you are using the local version of the library or apply the patch to your own version. The patch has been submitted upstream, so hopefully future versions of SLV2 will have this too.

8: LV2 port group support

Relevant source files: LV2PortGroup.h, LV2PortGroup.cpp, LV2Effect.h, LV2Effect.cpp

Relevant libraries: Redland, SLV2

How to test: Bring up the Sineshaper dialog. Instead of just a long stack of sliders, you should see a couple of titled boxes with sliders inside them - "Amplifer", "Delay", "Envelope", "Oscillator 2" and so on. These are port groups that are defined in the RDF data for the plug-in.

Personal tools

Donate securely by PayPal, using your credit card or PayPal account!