Search
Categories
Documents
Audio::LADSPA::UserGuide.pod (Audio::LADSPA::UserGuide - What you can do with these modules.)
Audio::LADSPA::UserGuide - What you can do with these modules.
A LADSPA library contains the code and description for one or more Plugins,
each of which can be completely independent. The library is mostly a
a convenient way of storing multiple plugins in a file.
A plugin is an object that can create audio and control streams, based on
other audio and control streams. In this system, the difference between
audio and control streams is only in their frequency - an audio stream has
a fixed sample rate, a control stream can have a variable sample rate.
Figure 1: Plugin layout with input (I) and output (O) ports
+- Plugin ----+
| Description |
| I Port 1 |
| O Port 2 |
| . ... |
+-------------+
A plugin consists of a description, a number of ports that can send or
recieve audio or control streams, and methods to connect the streams and
run the plugins etc. See the Audio::LADSPA::Plugin manpage for more info.
The buffer object implements the audio and control streams. You can connect
multiple ports from different plugins to a buffer, and they will read from it
or write to it, according to their port type. The plugin and buffer objects
do not protect you from making silly (or even dangerous) connections, so take
care when connecting, or use Audio::LADSPA::Network.
Figure 2: Example of plugin/buffer connections
+-Plugin 2-+
+-Plugin 1-+ | O Port 1 +-> Buffer3
| O Port 1 +--> Buffer1 --> + I Port 2 |
| O Port 2 +-+ +----------+
+----------+ |
| +-Plugin 3-+
+-> Buffer2 -> + I Port 1 |
+----------+
The Audio::LADSPA::Network class contains a plugin network; a number of plugins
and buffers that are connected and need to be run in sync. The network can take
care of testing the connections and keeping all plugins running at the same
sample rate.
By default, the statement
use Audio::LADSPA;
loads all LADSPA libraries it can find from in the paths defined by the evironment
variable $LADSPA_PATH, if it's defined or from ``/usr/lib/ladspa'' and
``/usr/local/lib/ladspa'' otherwise.
For each library, it creates a class inheriting from Audio::LADSPA::Library
and then proceeds to create a class inheriting from Audio::LADSPA::Plugin
for each plugin in the library.
After that, you can query the loaded libraries by using:
my @libs = Audio::LADSPA->libraries();
Which will return the class names of all loaded libraries.
Similary, you can get the list of all loaded plugins with:
my @plugins = Audio::LADSPA->plugins();
Or, get the plugins from a library:
my ($lib1,$lib2) = Audio::LADSPA->libraries();
my @plugins = $lib1->plugins();
Both will return a list of classes (package names) that you can use to
query the capabilities of the plugins, or instantiate new plugin objects that
you can use to process some audio data.
Once your libraries are loaded, you can query the plugins - for instance, you
can ask for the plugin name like:
my $name = $plugin_class_or_object->name();
Or ask for its input ports like:
my @ports = grep { $plugin->is_input($_) } $plugin->ports();
See the Audio::LADSPA::Plugin manpage for the full story.
TODO: This section needs to be written. For now, take a look at the Audio::LADSPA::Network manpage and
the Audio::LADSPA::Plugin manpage.
pluginfo - query ladspa plugins.
the Audio::LADSPA::Library manpage - a library containing one
or more plugins
the Audio::LADSPA::Plugin manpage - the actual ladspa plugins
the Audio::LADSPA::Buffer manpage - audio/data buffer that can be used to control
a plugin or to connect plugins together
the Audio::LADSPA::Network manpage - a set of connected plugins and buffers
the Audio::LADSPA::LibraryLoader manpage - loads ladspa shared libraries (.so files) into
Audio::LADSPA::Library classes
For more information about the LADSPA API, and how to obtain more plugins, see
http://www.ladspa.org/
The website for these modules is located at:
http://www.hortus-mechanicus.net/perl/
Copyright (C) 2003 Joost Diepenmaat <joost AT hortus-mechanicus.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Information
|
This site is currently in testing, it is not yet operating using the full database. Until it is officially launched you may wish to visit Help-Site Computer Manuals. After launch, this site (HelpSpy) will replace Help-Site. Information about the spider which is currently trawling the Internet looking for links to add to this directory can be found here. |
|