💾 Archived View for thrig.me › blog › 2023 › 09 › 23 › fractal.pl captured on 2024-05-10 at 12:19:38.

View Raw

More Information

⬅️ Previous capture (2023-09-28)

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

#!/usr/bin/perl
use 5.36.0;
use MIDI::Simple;
use Music::Voss 'bitchange';

my %map = qw(0 C 1 D 2 E 3 F 4 G 5 A 6 B);
my $bc  = bitchange(
    roll    => sub { int rand 2 },
    rollers => 6,
);
for my $x ( 0 .. 29 ) {
    my $i = $bc->($x);
    my $n = $map{$i};
    print $n, " ";
    n qn => $n;
}
print "\n";
write_score 'fractal.midi';