💾 Archived View for thrig.me › blog › 2023 › 09 › 23 › rinterval.pl captured on 2024-05-26 at 15:45:15.

View Raw

More Information

⬅️ Previous capture (2023-09-28)

-=-=-=-=-=-=-

#!/usr/bin/perl
use 5.36.0;
use MIDI::Simple;
use Math::Random::Discrete;

my $int = Math::Random::Discrete->new(
    [ qw(20 30 10 40 15 30 25) ],
    [ qw(-3 -2 -1  0  1  2  3) ],
);
my $start = 60;
for ( 1 .. 16 ) {
    print $start, " ";
    n qn => $start;
    $start += $int->rand;
}
print "\n";
write_score 'rinterval.midi';