Re: Problems with MIDI:Opus

[email protected] ("amjad salameh") Wed, 19 Sep 2001 08:49:52 +0300
Newsgroups perl.midi
Message-ID <[email protected]>
hi all what u have to do is

foreach my $file ( @ARGV ) {
	my $song = MIDI::Opus->new(
        {
        from_file => $file,
        }
        ) || die "Non riesco a leggere il file - $!\n";
	print "$file\n";
	print $song->dump({flat => 1});
	print Dumper( $song );
note the hashtable .................

Regareds
Salameh
--------------------------------------------------------------------

>From: Stefano Rodighiero <[email protected]>
>To: <[email protected]>
>Subject: Problems with MIDI:Opus
>Date: Tue, 18 Sep 2001 22:04:28 +0200 (CEST)
>
>Hi all
>
>I'm trying to use MIDI::Opus to get infos
>from .mid files. Here my very first script,
>that's almost cut&paste from doc examples.
>
>#!/usr/bin/perl
>
># use strict;
>
>use MIDI;
>use Data::Dumper;
>
>$MIDI::Opus::Debug = 1;
>
>foreach my $file ( @ARGV ) {
>	my $song = MIDI::Opus->new(
>		from_file => $file,
>	) || die "Non riesco a leggere il file - $!\n";
>	print "$file\n";
>	print $song->dump({flat => 1});
>	print Dumper( $song );
>}
>
>
>Unfortunataly, I'm not able to get any data
>from the file, no matter what's the .mid file
>in use. Here an example of output for the
>script above.
>
>New object in class MIDI::Opus
>_init called against MIDI::Opus=HASH(0x80f87a0)
>Null parameters for opus init
>Guitar Waltz.mid
>$VAR1 = bless( {
>                  'format' => 1,
>                  'ticks' => 96,
>                  'tracks' => []
>                }, 'MIDI::Opus' );
>
>Any advice? Thank you.
>
>Stefano
>
>--
>"1492! La Battaglia di Lexington!
>Trozsky! La spigolatrice!"
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp