
# Time-stamp: "2007-08-03 19:09:19 AKDT sburke@cpan.org"
use MIDI::Simple;

new_score;
@Score = ();
text_event 'The Gravina Island Adagio; sburke@cpan.org';
text_event '(BACKING UP HERE!!)';

my $instrument = 73;

set_tempo 500000; 
 # So 1 qn => .5 seconds (500,000 microseconds)

             noop 'v126', 'd96', 'D6';  time_passes();
$Time = 60;  noop 'v120', 'd93', 'D6';  time_passes();
$Time = 40;  noop 'v126', 'd93', 'Cs6'; time_passes();
$Time = 40;  noop  'v80', 'd97', 'Cs6'; time_passes();

write_score 'backing_up1.mid';
print "Done.\n";


sub time_passes {
  print "Truck $Channel...\n";
  patch_change $Channel, $instrument;
  for(1..1000) {
    n;
    r;
    $Time += int(rand(100)) if rand(1) < .07;
  }
  ++$Channel;
  return;
}
