NAME

MIDI::Drummer::Tiny - Glorified metronome

VERSION

version 0.02

SYNOPSIS

use MIDI::Drummer::Tiny;
my $d = MIDI::Drummer::Tiny->new(
   file => 'drums.mid',
   bpm => 120,
   signature => '4/4',
   bars => 32,
);
$d->count_in();
$d->metronome();
$d->write();

DESCRIPTION

This module provides a MIDI drummer with the bare essentials to add notes to a MIDI score.

ATTRIBUTES

channel: 9

volume: 100

bpm: 120

reverb: 0

chorus: 0

pan: 0

bars: 4

beats: 4

divisions: 4

signature: 4/4

file: MIDI-Drummer.mid

score

KIT

kick

snare

open_hh

closed_hh

pedal_hh

crash1

crash2

splash

china

ride1

ride2

ride_bell

hi_tom

hi_mid_tom

low_mid_tom

low_tom

hi_floor_tom

low_floor_tom

DURATIONS

whole

half

quarter

eighth

sixteenth

METHODS

note()

$d->note( $d->quarter, $d->closed_hh, $d->kick );
$d->note( 'qn', 'n42', 'n35' ); # Same thing

Send a note to the score.

rest()

$d->rest( $d->quarter );

Send a rest to the score.

count_in()

$d->count_in;
$d->count_in($bars);

Play the closed hihat for the number of beats times the given bars. If no bars are given, the default of 1 is used.

metronome()

Add a steady beat to the score.

write()

Output the score to a *.mid file.

AUTHOR

Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Gene Boggs.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.