Sunday, September 4, 2011

MidiPlayer

Playing a MIDI file (advanced)

Purpose. Plays a single MIDI file. Allows to select the sequencer, the synthesizer or MIDI port or dumping to the console.
Usage. 
java MidiPlayer -l
java MidiPlayer [ -s ] [ -m ] [ -d devicename ] [ -c ] [ -S sequencername ] midifile
Parameters. 

-l
list the availabe MIDI devices, including sequencers
-m
play on the MIDI port
-d devicename
play on the named MIDI device
-c
dump on the console
-S sequencername
play using the named Sequencer
midifile
the name of the MIDI file that should be played
All options may be used together. No option is equal to giving -s.Bugs, limitations. This example requires the JDK1.5 or later.

Source code. here

Source : http://www.jsresources.org

No comments:

Post a Comment