Audio::LADSPA::Network 0.018 review

Download
by rbytes.net on

Audio::LADSPA::Network is a semi automatic connection of Audio::LADSPA::* objects. SYNOPSIS use Audio::LADSPA::Network;

License: Perl Artistic License
File size: 80K
Developer: Joost Diepenmaat
0 stars award from rbytes.net

Audio::LADSPA::Network is a semi automatic connection of Audio::LADSPA::* objects.

SYNOPSIS

use Audio::LADSPA::Network;
use Audio::LADSPA::Plugin::Play;
sub subscriber {
my ($object,$event) = @_;
$object = ref($object);
print "Recieved event '$event' from $objectn";
}
Audio::LADSPA::Network->add_subscriber('*',&subscriber);

my $net = Audio::LADSPA::Network->new();
my $sine = $net->add_plugin( label => 'sine_fcac' );
my $delay = $net->add_plugin( label => 'delay_5s' );
my $play = $net->add_plugin('Audio::LADSPA::Plugin::Play');

$net->connect($sine,'Output',$delay,'Input');
$net->connect($delay,'Output',$play,'Input');

$sine->set('Frequency (Hz)' => 440); # set freq
$sine->set(Amplitude => 1); # set amp

$delay->set('Delay (Seconds)' => 1); # 1 sec delay
$delay->set('Dry/Wet Balance' => 0.2); # balance - 0.2

for ( 0 .. 100 ) {
$net->run(100);
}
$sine->set(Amplitude => 0); #just delay from now
for ( 0 .. 500 ) {
$net->run(100);
}

This module makes it easier to create connecting Audio::LADSPA::Plugin objects. It automatically keeps the sampling frequencies correct for all plugins, adds control and audio buffers to unconnected plugins and prevents illegal connections.

It also implements an observable-type API via Class::Publisher that can be used to recieve notifications of events in the network. Amongst other things, this makes writing loosely coupled GUIs fairly straightforward.

Requirements:
Perl

Audio::LADSPA::Network 0.018 keywords