#!/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';