NAME

MIDI::Simple::Drummer - Glorified metronome

ABSTRACT

Is there a drummer in the house?

SYNOPSIS

use MIDI::Simple::Drummer;
my $d = MIDI::Simple::Drummer->new(-bpm => 111);
$d->count_in();
for(0 .. $d->phrases - 1) {
  $d->beat_2(-fill => $_);
  $d->beat_3();
  $d->fill();
}
$d->write;

DESCRIPTION

This module is embroyonic but may yet grow into a giant reptilian monster that smashes Tokyo.

Until then, this is just meant to be a robotic drummer and hide the ugliness of fooling with MIDI::Simple parameters.

METHODS

* new()

my $d = MIDI::Simple::Drummer->new(%arguments);

Far away in a distant galaxy... But nevermind that Luke, use The Source.

* phrases()

Return or set the number of phrases to play.

* n2p(), p2n()

Return %MIDI::notenum2percussion or %MIDI::percussion2notenum.

* kit()

Return note values for percussion names.

* metronome()

Beats x Phases.

* count_in()

And a-one, and a-two and a-one, two, three, four!</Lawrence Welk> ..11</FZ>

= * alternate()

Return the alternating backbeat of the rhythm. By default, this is the kick and snare.

= * option_patch()

Return a patch name from a given patch or a random selection from a list of patches.

* foo_beat()

Append a bar of this anecdotal beat onto the event stream. Indicate that we filled in the previous bar to crash on the first beat.

* fill()

Append a glop of filler cheese to the event stream and return the id for the chosen fill. The N parameter determines which fill will be played. If N=0 or there is no Nth fill, a random one is chosen.

* write()

This is just an alias for "write_score" in MIDI::Simple.

TO DO

* Read the source TODO comments. > grep TODO `perldoc -l MIDI::Simple::Drummer`

* Make the beats and fills a user definable list of coderefs.

* Allow smoother modification of the drum kit.

* It don't mean a thing if it ain't got that swing.

* Intelligently modulate dynamics (A.K.A. "add nuance").

SEE ALSO

The eg/* file(s), that come(s) with this distribution.

MIDI::Simple itself.

http://maps.google.com/maps?q=mike+avery+joplin - my drum teacher.

"from_drum_tab" in MIDI::Tab - possibly handy

Music::Tempo - possibly handy

AUTHOR AND COPYRIGHT

Gene Boggs <gene@cpan.org>

Copyright 2009, Gene Boggs, All Rights Reserved.

LICENSE

This program is free software; you can redistribute or modify it under the same terms as Perl itself.