|
To answer my own question, I used the steps I described above, but they were not as tedious as I feared they might be. Here is my code:
my $opus = MIDI::Opus->new();
my @tracks;
foreach my $simple (@simples){
my $track = MIDI::Track->new();
my $events_r = MIDI::Score::score_r_to_events_r($simple->Score_r);
$track->events_r($events_r);
push (@tracks, $track);
}
$opus->tracks(@tracks);
$opus->write_to_file($filename);
which is pretty straightforward. |