Playing a note on a MIDI device

Purpose. Plays a single note on a MIDI device. The MIDI device can be a software synthesizer, an internal hardware synthesizer or any device connected to the MIDI OUT port.

Usage. 

java MidiNote keynumber velocity duration

Parameters. 

keynumber

the MIDI key number

velocity

the velocity

duration

the duration in milliseconds

Bugs, limitations. Not well-tested.

Source code.  MidiNote.java, MidiCommon.java