Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: playing chords with MIDI modules...

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


in reply to Re: Re: playing chords with MIDI modules...
in thread playing chords with MIDI modules...

Name this tune:
song(3); sub song { my $octave = shift; my $num = 0; while ($num < 10) { $midi_obj->play_note('E', "1.25", 127, 1, 1, $octave) || print $ +midi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('G', ".5", 127, 1, 1, $octave) || print $mi +di_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('G#', ".25", 127, 1, 1, $octave) || print $ +midi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('B', ".25", 127, 1, 1, $octave) || print $m +idi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('E', ".25", 127, 1, 1, $octave) || print $m +idi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('D', ".25", 127, 1, 1, $octave) || print $m +idi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('D', "1", 127, 1, 1, $octave) || print $mid +i_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('B', ".25", 127, 1, 1, $octave) || print $m +idi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('F#', ".25", 127, 1, 1, $octave) || print $ +midi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('F', ".25", 127, 1, 1, $octave) || print $m +idi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('B', ".25", 127, 1, 1, $octave) || print $m +idi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('D', ".25", 127, 1, 1, $octave) || print $m +idi_obj->error() . "\n" and $midi_obj->reset_error(); $midi_obj->play_note('E', ".25", 127, 1, 1, $octave) || print $m +idi_obj->error() . "\n" and $midi_obj->reset_error(); $num++; } }
Send me a message to see if your right...

-----------------------
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";'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found