Playing a note on the synthesizerPurpose. Plays a single note on the synthesizer. Usage. java SynthNote keynumber velocity duration Parameters.
Bugs, limitations. The precision of the duration depends on the precision of Thread.sleep(), which in turn depends on the precision of the system time and the latency of th thread scheduling of the Java VM. For many VMs, this means about 20 ms. When playing multiple notes, it is recommended to use a Sequence and the Sequencer, which is supposed to give better timing. Source code. SynthNote.java | |