Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Win32::MIDI Player

by LostS (Friar)
on Jan 31, 2003 at 22:37 UTC ( [id://231747]=note: print w/replies, xml ) Need Help??


in reply to Win32::MIDI Player

This song is written correctly... The others I don't think I coded right... will rework them...

Now see if you can identify this song:
G#,1,3,0 E,1,3,0 R,.25,4,1 G#,.25,4,1 B,.25,4,1 G#,.25,4,1 F#,1,3,0 D,1,3,0 B,1,3,0 A,.25,4,1 F#,.25,4,1 A,.50,4,1 A,1,3,0 F#,1,3,0 D,1,3,0 D,.25,5,1 A,.25,4,1 D,.50,5,1 E,1,3,0 C#,1,3,0 A,1,3,0 C#,.25,5,1 A,.25,4,1 C#,.50,5,1


-----------------------
Billy S.
Slinar Hardtail - Hand of Dane
Datal Ephialtes - Guildless
RallosZek.Net Admin/WebMaster

perl -e '$cat = "cat"; if ($cat =~ /\143\x61\x74/) { print "Its a cat! +\n"; } else { print "Thats a dog\n"; } print "\n";'

Replies are listed 'Best First'.
A MIDI For LostS
by Mr. Muskrat (Canon) on Feb 07, 2003 at 15:47 UTC
    #!/usr/bin/perl use strict; use warnings; use MIDI::Simple; my $quarter_notes_per_minute = 140; new_score(); Volume 127; set_tempo int(60_000_000/$quarter_notes_per_minute); patch_change 1, 1; noop "c1", "o3"; # Setup n "hn", "Gs", "E", "en", "rest"; n "Gs_u1"; n "B_u1"; n "Gs_u1"; n "hn", "Fs", "D", "B", "en", "A_u1"; n "Fs_u1"; n "qn", "A_u1"; n "hn", "A", "Fs", "D", "en", "D_u2"; n "A_u1"; n "qn", "D_u2"; n "hn", "E", "Cs", "A", "en", "Cs_u2"; n "A_u1"; n "qn", "Cs_u2"; r "wn"; write_score('LostS.mid'); exec('start','LostS.mid') if ($^O =~ /MSWin32/);
      What is this part? It doesn't work for me:
      exec('start','LostS.mid') if ($^O =~ /MSWin32/);


      -----------------------
      Billy S.
      Slinar Hardtail - Hand of Dane
      Datal Ephialtes - Guildless
      RallosZek.Net Admin/WebMaster

      perl -le '$cat = "cat"; if ($cat =~ /\143\x61\x74/) { print "Its a cat +!\n"; } else { print "Thats a dog\n"; }'

        Exec 'start' with 'LostS.mid' as the only command line parameter if you are running a version of MS Windows. It works like a charm on my Win98 box but I should have tested it on my win2k box before posting. Perhaps exec('LostS.mid') would work better for you?

        Basically it's supposed to start the MIDI using whatever player is associated with .mid files.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://231747]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found