views:

369

answers:

2

When I try to list Synthesizer devices in Java (1.6.0), I get only one device, Java Sound Synthesizer. I want to use the Synthesizer in the sound card or use any other installed synthesizer, eg. the Microsoft Synthesizer. How can I go about doing that ? If this capability is not inbuilt, is there any open source project that act as front end to synthesizer drivers installed ?

+1  A: 

I don't believe java lets you specify which installed synthesizer to use. The API usually only provides one device per type (synth, transmitter, etc), so you're going to get the default. I suspect the java API, under windows, is actually using whichever one is specified in the control panel as your default MIDI device.

Arcane
+1  A: 

Frinika can do this so it may hold the answer.

Edit: In Java 1.5 upwards, most OS Midi devices turn up as devices that can be accessed using MidiSystem.getMidiDeviceInfo() and MidiSystem.getMididevice().

According to the midi FAQ, there is no good way of accessing the sound card Midi device as a Synthesizer because of problems with writing custom drivers for each sound card, and getting info back from hardware for which there is no Midi standard.

However hardware synthesizer will typically show up as a MidiDevice to which events can be sent. (http://www.jsresources.org/faq_midi.html#use_hw_synth).

Thanks to Arcane for pointing me in the right direction.

Sid Datta