Exceed file_size_limit .....?
[email protected] (Markus Kollmar) Fri, 28 Mar 2003 23:09:27 +0100
| Newsgroups | perl.midi |
|---|---|
| Message-ID | <[email protected]> |
Hello!
As a new user of midi-perl and with less knowledge in perl (please forgive me,
i am still at the beginning of learning this really powerfull language), i
tested
the midiparse.pl to view some of my midifiles closer than it is possible with my
hardwaresequencer.
I currently use: perl 5.6.1 (i586-linux) and midi-perl-0.8.
-------------------------------------------------------------
midiparse.pl:
-------------
#!/usr/bin/perl
# Time-stamp: "1998-08-10 00:08:26 MDT"
use MIDI;
use Getopt::Std;
getopts('E:I:btfd');
# b = brief (don't dump the tracks)
# f = flat (not brief)
# d = data (don't parse the MTrk track data)
# t = only read in the text events
# I [comma-separated list] = include only given events
# E [comma-separated list] = exclude given events
die "Don't specify both -I and -E!\n" if length($opt_I) and length($opt_E);
@Include = grep(m/\w/, split(',', $opt_I ));
@Exclude = grep(m/\w/, split(',', $opt_E ));
@Include = @MIDI::Event::Text_events if $opt_t; # shortcut for text only
die "No filename" unless @ARGV;
print "# Reading $ARGV[0]\n" unless $opt_b;
$opus = MIDI::Opus->new({'from_file' => $ARGV[0], 'no_parse' => ($opt_d),
@Include ? ( 'include' => \@Include) : (),
@Exclude ? ( 'exclude' => \@Exclude) : (), } );
$opus->dump( { 'dump_tracks' => !$opt_b, 'flat' => $opt_f } );
print "# OK at ", scalar(localtime), ".\n" unless $opt_b;
exit;
__END__
--------------------------------------------------------
test.mid:
---------
0000 4d 54 68 64 00 00 00 06 00 01 00 02 01 e0 4d 54 MThd.... .....àMT
0010 72 6b 00 00 00 30 00 ff 7f 09 43 7b 00 58 46 30 rk...0.ÿ ..C{.XF0
0020 32 00 02 00 ff 03 0c 47 38 30 30 42 72 61 73 73 2...ÿ..G 800Brass
0030 20 20 20 00 ff 51 03 07 a1 20 00 ff 58 04 04 02 .ÿQ.. ¡ .ÿX...
0040 18 08 00 ff 2f 00 4d 54 72 6b 00 00 00 1c 00 ff ...ÿ/.MT rk.....ÿ
0050 03 08 50 65 72 66 6f 72 6d 61 81 48 b0 00 78 00 ..Perfor ma.H°.x.
0060 b0 20 00 00 c0 63 00 ff 2f 00 f8 f8 f8 f8 f8 f8 ° ..Àc.ÿ /.øøøøø
ø
0070 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0080 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0090 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
00a0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
00b0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
00c0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
00d0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
00e0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
00f0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0100 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0110 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0120 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0130 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0140 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0150 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0160 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0170 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0180 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
0190 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
01a0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
01b0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
01c0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
01d0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
01e0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
01f0 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 øøøøøøøø øøø
øøøøø
-----------------------------------------------------------------
==> The output of invoking "midiparse.pl test.mid":
-----------------------------------------------------------------
# Reading test.mid
reading track #3 (of length 4177066232) would exceed file_size_limit at
./midiparse.pl line 21
-----------------------------------------------------------------
Some files much larger than that (tiny one) will be dumped without a
problem. But some files end like the above one...
==> MY QUESTION:
Can anyone explain me what i did wrong, or what is wrong?
Thanks for any answer!
P.S.:
Many Thanks to Sean M. Burke and all the others who realized that project.
I think it is a great way to automate some stupid midi-processing.
Markus Kollmar
(Germany (I think you probably have noticed that - there is not only a
problem with my speaking of perl ;-) ))