|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/POE-Framework-MIDI/blib/lib/POE/Framework/MIDI/POEConductor.pm |
POE::Framework::MIDI::POEConductor;
POE functionality for the management of POEMusician objects, and eventual rendering down to perl code for MIDI::Simple via the Conductor's 'render' method.
use POE::Framework::MIDI::POEMusician;
... include your musician objects here ...
POE::Framework::MIDI::POEConductor->spawn(
| { | |
| bars => 30, | |
| verbose => 1, | |
| debug => 1, | |
| filename => 'test_output.mid', | |
| musicians => | |
| [ | |
| { | |
| name => 'frank', |
# specify which module you want to have "play" this track.
#
# the only real requirement for a musician object is
# that it define a 'make_bar' method. ideally that should
# return POE::Framework::MIDI::Bar( { number => $barnum } );
# or a ::Phrase( { number => $barnum } );
# set the package you want to generate events on this channel
package => 'POE::Framework::MIDI::Musician::Your::Musicians::GuitarFreak',
# which channel should these events end up on?
channel => 1,
# which patch should we use? frank likes the jazz guitar sound.
patch => '27',
},
{ name => 'ike', package => 'POE::Framework::MIDI::Musician::Your::Musicians::MyOrganPlayer', channel => 2, patch => '60', }, { name => 'terry', package => 'POE::Framework::MIDI::Musician::Your::Musicians::MyFunkyDrummer', channel => 9, # drum channel - zero based patch => '58', },
], } );
$poe_kernel->run;
Steve McNabb
CPAN ID: JUSTSOMEGUY
steve@justsomeguy.com
http://justsomeguy.com/code/POE/POE-Framework-MIDI
Copyright (c) 2002 Steve McNabb. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl(1). POE. Perl-MIDI
|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/POE-Framework-MIDI/blib/lib/POE/Framework/MIDI/POEConductor.pm |