Algorithm-Gutter

 view release on metacpan or  search on metacpan

eg/rainmidi3000.pl  view on Meta::CPAN

    { format => 0, ticks => 96, tracks => make_track() } )
  ->write_to_file($out_file);

########################################################################
#
# SUBROUTINES

sub coinflip { int rand 2 }

# This is for when you want random pitches, possibly when using a drum
# SountFont and to select from random drum samples. The MIDI number
# range may well need to be fiddled with. Softlocks if you try to
# request too many pitches from it, so don't do that.
{
    my %seen;

    sub getapitch {
        my $p;
        do {
            $p = 24 + int rand( 77 - 24 );
        } while exists $seen{$p};



( run in 0.231 second using v1.01-cache-2.11-cpan-94b05bcf43c )