[jmsl] JavaSound To Use System Default Midi Device

jmsl at music.columbia.edu jmsl at music.columbia.edu
Mon May 11 15:55:50 EDT 2009


Hi,

When JavaSound is chosen as the JMSL output, it seems to use the first 
device on the list, not the default Midi device set by OS.
If you use
MidiSystem.getReceiver()';
instead of using
MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo();
device = MidiSystem.getMidiDevice(infos[index]);
rcvr = device.getReceiver();
it will return the default device set by OS.


static Sequencer getSequencer()
static Synthesizer getSynthesizer()
static Receiver getReceiver()
static Transmitter getTransmitter()
The first two of these methods obtain the system's default sequencing and 
synthesis resources, which either represent physical devices or are 
implemented wholly in software. The getReceiver method obtains a Receiver 
object that takes MIDI messages sent to it and relays them to the default 
receiving device. Similarly, the getTransmitter method obtains a Transmitter 
object that can send MIDI messages to some receiver on behalf of the default 
transmitting device.

Chi 



More information about the jmsl mailing list