NAME
Audio::LADSPA - Modular audio processing using LADSPA plugins. Implements a LADSPA 1.1 host.
SYNOPSIS
use Audio::LADSPA;
for my $class (Audio::LADSPA->plugins) {
print "\t",$class->name," (",$class->id,"/",$class->label,")";
}
DESCRIPTION
LADSPA plugins are objects in shared libraries that can generate or transform audio signals (like VST or Direct-X plugins on Mac and Win32 systems). Most of the existing LADSPA plugins are pretty low-level compared to VST plugins (you get seperate oscilator, ADSR and delay plugins instead of "complete" virtual synthesizers etc). See also http://www.ladspa.org/
With these modules you can create a LADSPA host, which can load the plugins, query their capabilities, connect them together in a network, and run audio streams through them.
The LADSPA API was developed for linux but should be platform independent, so you might be able to compile these modules and the nessisary plugins on win32 systems (please let me know if it works or not).
USER GUIDE
This is the reference documentation. If you want a general overview/introduction on this set of modules, take a look at Audio::LADSPA::UserGuide (not finished).
Reading Audio::LADSPA::Plugin and Audio::LADSPA::Network is recommended.
STARTUP
By default, use Audio::LADSPA
will attempt to load all libraries in the $ENV{LADSPA_PATH} (a colon seperated list of directories) or "/usr/lib/ladspa" and "/usr/local/lib/ladspa" if $ENV{LADSPA_PATH} is not set.
You can then get the loaded libraries and their plugins using the libraries
, plugins
and plugin
methods described below.
METHODS
All methods in the Audio::LADSPA package are class methods.
plugins
my @availabe_plugins = Audio::LADSPA->plugins();
Returns the list of @available_plugins. These are package names you can use to create a new instance of those plugins, can invoke class-methods on to query the plugins, and pass to Audio::LADSPA::Network to do most of the work for you. See also Audio::LADSPA::Plugin and Audio::LADSPA::Network.
plugin
my $plugin = Audio::LADSPA->plugin( %search_arguments );
Get the package name (class) for a specific Audio::LADSPA::Plugin subclass given the %search_arguments. Returns the first matching plugin class or undef
if none is found. You can use one or less of each of these:
id
my $sine_faaa_class = Audio::LADSPA->plugin( id => 1044 );
Match a plugin class by unique id. If one is loaded returns the class name. If an id
argument is present, other %search_arguments will not be considered.
label
my $delay_5s = Audio::LADSPA->plugin( label => 'delay_5s' );
Match a plugin class by label
. If name
is also specified, the plugin must also match name
.
name
my $noise = Audio::LADSPA->plugin( name => 'White Noise Source' );
Match a plugin class by name
. If label
is also specified, the plugin must also match label
.
libraries
my @loaded_libraries = Audio::LADSPA->libraries();
Returns the list of @loaded_libraries (Audio::LADSPA::Library subclasses), mostly useful if you want to know which plugins are in a specific library.
See also Audio::LADSPA::Library.
SEE ALSO
Audio::LADSPA::UserGuide - the user guide.
Modules and scripts in this distribution
pluginfo - query ladspa plugins.
Audio::LADSPA - this module.
Audio::LADSPA::Library - libraries containing one or more plugins
Audio::LADSPA::Plugin - Base class for ladspa plugins
Audio::LADSPA::Network - a set of connected plugins and buffers
Audio::LADSPA::Plugin::Play - output audio to soundcard.
Audio::LADSPA::Plugin::Sequencer4 - a simple 4-step sequencer.
Audio::LADSPA::Plugin::XS - Base class real (compiled) ladspa plugins
Audio::LADSPA::Plugin::Perl - Base class for perl-only ladspa plugins.
Audio::LADSPA::Buffer - audio/data buffer that can be used to control a plugin or to connect plugins together
Audio::LADSPA::LibraryLoader - loads ladspa shared libraries (.so files) into Audio::LADSPA::Library classes
Links
For more information about the LADSPA API, and how to obtain more plugins, see http://www.ladspa.org/
THANKS TO
Mike Castle, for providing a patch for non-C'99 compilers.
COPYRIGHT AND LICENSE
Copyright (C) 2003 - 2005 Joost Diepenmaat <jdiepen AT cpan.org>
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.