Posted on 2007-05-12 11:58:29-07 by cnoocy in response to 5114
Re: MIDI::Simple and multiple channels
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.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.