Re: Only MIDI type 0?

[email protected] ("Sean M. Burke") Wed, 24 Jan 2001 22:39:55 -0700
Newsgroups perl.midi
Message-ID <[email protected]>
At 05:56 PM 2001-01-24 -0500, Mike Shapiro wrote:
>MIDI-PERL looks great, but the limitation of reading in only type
>0 (single track) MIDI files [...]

...is happily nonexistent.

% perl

use LWP::Simple;
use MIDI;
die "couldn't get it" unless mirror(
 'http://www.monmouth.com/~lynex/opus27.mid',
   # an example type-1 file.
 'opus27.mid'
);

my $o = MIDI::Opus->new({ 'from_file' => 'opus27.mid'});
$o->dump;
#ZING!

[control-d.  Program outputs:]

MIDI::Opus->new({
  'format' => 1,
  'ticks'  => 480,
  'tracks' => [ ],  # 5 tracks (not dumped)
});


--
Sean M. Burke  [email protected]  http://www.spinn.net/~sburke/