#1 Getting Midi IN/OUT by Name (String)

open
nobody
Midi (1)
5
2012-05-19
2012-05-19
No

When we try to get communicate with external devices/software to render sound, we must specify that to the Musician. Generally we just pass the device name (string) in the Musician's constructor, but if there are two devices with the same name this can be a problem. This happens often at the Mac plataform (Bus1 is both input and output).

Ex:

MidiDevice[] devices = OctopusMidiSystem.getDevices(true, true);

String deviceName = (devices[0].getDeviceInfo().getName());

MidiSynthesizerController controller = new MidiSynthesizerController(deviceName);

Musician m = new Musician(controller);

m.play(Note.getNote("C"));

Discussion


Log in to post a comment.