Updated! Now creates a complete Perl script.
#!/perl/bin/perl -w use strict; use MIDI; for my $midi (@ARGV) { open(*STDOUT, ">", "$midi.pl"); print <<'EOP'; #!/usr/bin/perl -w use MIDI; my $opus = EOP my $opus = MIDI::Opus->new({ 'from_file' => $midi, 'no_parse' => 1 } +); $opus->dump( { dump_tracks => 1 } ); print "\$opus->write_to_file('$midi');\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dump MIDI as Perl Code
by zentara (Cardinal) on Feb 18, 2003 at 17:11 UTC | |
|
Re: Dump MIDI as Perl Code
by zentara (Cardinal) on Feb 18, 2003 at 15:34 UTC | |
by Mr. Muskrat (Canon) on Feb 18, 2003 at 15:44 UTC |