index
news
documentation
download
recordings
screenshots
development
links
users
authors
|
NOTICE!!
This file is deprecated, please see the user's guide for the most
recent information.
LADSPA Support HOWTO
Ladspa Plugins
Ladspa is a relatively new simple audio plugin architecture. This standard is
open, and aims to enable linux audio applications to share audio plugins.
GDAM has preliminary support for both loading ladspa plugins and creating
them from mininetwork layouts.
How to install ladspa
-
Download the LADSPA SDK.
-
Copy the ladspa.h to /usr/local/include.
Note: you must do this BEFORE you configure GDAM - otherwise
it will automatically compile without LADSPA support.
The packages should ALWAYS include LADSPA support.
However, even with the packages, you will need ladspa.h to
compile new plugins.
How to install ladspapluginmaker
Currently, the latest version is
ladspapluginmaker-0.0e
.
More packages are available on the download page.
How to write LADSPA plugins using GDAM
Overview
The procedure has two steps:
- Create a flow graph graphically using GDAM (inside the mininetwork
filter). Save it to XML.
- Convert the XML to a LADSPA plugin using ladspapluginmaker.
Usually this will convert the xml to C code, then it runs the compiler.
Using the mininetwork
The mininetwork has many types of "nodes"
which you can create, delete, and connect.
Here is the example we will use throughout:
This actually sounds like a plucked string filter.
(I'll describe it a bit more below).
You can see it contains a bunch of nodes
which are connected.
You can drag them around, and drag pipes from inputs to outputs.
Here are exactly what the various mouse buttons do:
- left mouse button:
- if you clicked on a node's input or output, you may
drag a pipe to another node's input or output. (you must
connect inputs to outputs though!).
- if you clicked on a node,
you may drag it, and it will be selected. When it is selected,
a menu of adjustable parameters appears. (eg for the gain filter,
a gain slider appears in that window.)
- if you clicked outside a node, a new unconnected node is formed.
- middle:
- if you clicked on a node, it is deleted, but its
inputs are attached to its outputs.
- if you clicked on a pipe,
a new node is formed in the middle of the pipe,
properly connected.
- right:
- if you clicked on a node, it and all its pipes will be deleted.
- if you clicked on a pipe, it will be deleted.
The inputs to each node are on the top of the node --
each node has only one output, but you can connect an
arbitrary number of things to that output.
Here are some common nodes:
-
:
the mix.
This just adds all its inputs together.
-
:
the modulator.
This multiplies its inputs like a ring modulator.
Or equivalently it is a variable gain.
-
:
constant gain.
This multiplies its single input by a constant value.
-
:
constant delay.
This delays its input for a certain number of samples.
[in the gui, you can change the constant, but it is constant once
it is converted to a LADSPA plugin].
-
:
This delays its input for a number of samples, which is computed
from another nodes output.
The actual delay at any time is given by:
delay = (base_delay) + (delay_fluctuation * input_value)
where the input_value is from the delay-input (which is the top-right
connector on the variable delay).
-
:
the input to the filter.
You cannot create new inputs or destroy the existing one.
-
:
the output from the filter.
You cannot create new outputs or destroy the existing one.
Brief digression into plucked string
So the plucked string is basically a feedback of the tuning
frequency with a lowpass filter.
- In the upper-left corner, the input is revolumized (by a modulator)
with a control node (at left). This implements the input gain slider.
- In the mix in the center is the mix which is collecting feedback.
- The right side is the feedback loop. It is revolumized
to control how loud the reverb should be.
- The two lower-right nodes implement a very simple lowpass
filter that just averages the last two samples.
This is usually called a Karplus-Strong string filter.
Saving it
You just press the save button, at the left.
It will prompt you for a filename -- you'll
have to specify it in the next step.
Converting it
Download and build ladspapluginmaker.
Suppose you saved the mininetwork as pluckedstring.xml.
Then you would run the following command:
ladspapluginmaker --input pluckedstring.xml \
--output output_dir \
--class PluckedString \
--basename pluckedstring \
--description "Karplus-Strong Plucked String" \
--unique-id 10 \
--build
The --unique-id deserves brief mention.
Currently all plugins are centrally allocated
by talking to Richard Furse <richard@muse.demon.co.uk>.
He will assign you a list of UniqueIDs.
In the interim, you can use ids <4000 for development
purposes.
(TODO: put more of these options in the xml!)
This will create a directory output_dir with
three files in it:
- output_dir/pluckedstring.c - the c file implementing the plugin
- output_dir/pluckedstring.h - the h file with the instance structure
(which is named PluckedString) in it.
- output_dir/pluckedstring.so - the library we obtained by compiling
the above source files.
Loading LADSPA Filters with GDAM
GDAM automatically scans for LADSPA plugins when it
starts up. It looks in /usr/lib/ladspa
and /usr/local/lib/ladspa. It will
write a summary file to ~/.gdam/ladspa.xml.
This is what the loaded plugin looks like:
|