Hi,
I'm no experienced Java Sound user, so please forgive me if the following "bugs" are not caused by Gervill but my own program. I tried to integrate Gervill into my program Xenoage Player, which is a free MIDI player for MusicXML files, http://www.xenoage.com/player/ First: This works: > sequencer = MidiSystem.getSequencer(); > synthesizer = MidiSystem.getSynthesizer(); But this fails (works perfectly with old Java Sound): > sequencer = MidiSystem.getSequencer(false); > synthesizer = MidiSystem.getSynthesizer(); > Transmitter seqTransmitter = sequencer.getTransmitter(); > seqTransmitter.setReceiver(synthesizer.getReceiver()); with > java.lang.NullPointerException > at com.sun.media.sound.SoftReceiver.<init>(Unknown Source) > at com.sun.media.sound.SoftSynthesizer.getReceiver(Unknown Source) > at com.xenoage.player.Player.<init>(Player.java:79) Line 79 is "seqTransmitter.setReceiver(synthesizer.getReceiver());" Second: This is the way I change the playback volume (maybe this is bad code, but it was the only way it worked for me with old Java Sound): > MidiChannel[] channels = synthesizer.getChannels(); > //... > for (int i = 0; i < channels.length; i++) > { > channels[i].controlChange(7, (int) (volume * max)); > } This doesn't change the volume, while old Java Sound does. If it helps, code is available by SVN, see the website. If these are no bugs, please forgive me ;-) Bye, Andi _______________________________________________ audio-engine-dev mailing list [email protected] http://mail.openjdk.java.net/mailman/listinfo/audio-engine-dev
