class:: LADSPA
categories:: UGens>Wrappers
summary:: Run any LADSPA plugin inside SuperCollider

description::
This UGen lets you run any LADSPA footnote:: See http://www.ladspa.org/ for more information about LADSPA :: plugin inside SuperCollider.

Plugins are searched in the colon-separated LADSPA_PATH environment variable.
If this variable is not set, it looks in /usr/lib/ladspa or /usr/local/lib/ladspa
on Linux and /Library/Audio/Plug-Ins/LADSPA on Mac OS X.

If you have Ardour installed, you can find lots of plugins in /Applications/Ardour.app/Contents/Plugins

WARNING::
Some LADSPA plugins might not be real-time safe, if they allocate memory at initialization.
::

classmethods::
private:: initClass

method:: ar
argument:: nChans
the number of output audio channels
argument:: id
the UniqueID for the LADSPA ugen that should be used
argument:: ... args
all the inputs in the same order as shown in code::listPlugins::
discussion::
If the plugin doesn't provide the requested number of channels, the extra channels will be silenced.
If the plugin provides more than requested number of channels, the extra channels will be ignored.

method:: listPlugins
print a list of all available plugins.
discussion::
Each entry looks like this (example for glame lowpass iir with ID 1891):
code::
# 1891 Glame Lowpass Filter
> k: Cutoff Frequency (0.0001 to 0.45)
> k: Stages(2 poles per stage) (1 to 10)
> a: Input
< a: Output
::

The meaning of the first two characters for each port are:
list::
## '>' - input
## '<' - output
## 'k' - controlrate
## 'a' - audiorate
::

method:: ladspalist_path
set/get the location of the code::ladspalist:: binary, used to print a list of available plugins.

examples::
get a list of all plugins and decide which one you want:
code::
LADSPA.listPlugins;
::
for example, glame lowpass iir with ID 1891:
code::
# 1891 Glame Lowpass Filter
> k: Cutoff Frequency (0.0001 to 0.45)
> k: Stages(2 poles per stage) (1 to 10)
> a: Input
< a: Output
::
Use it in SuperCollider:
code::
play{ LADSPA.ar(1, 1891, 1000+LFNoise1.kr(10, 800), 2, WhiteNoise.ar(1!2)) }
::
