I hate to bring this topic up again, but i simply cannot control the volume of midi playback and there seems to be no real solution on the web.
I have tried this, but i guess this doesnt work for Midi files that already have control change 7 events in them.
MidiChannel[] channels = this.synthesizer.getChannels();
for (int i = 0; i < channels.length; i++) {
channels.controlChange(0x07, (int) (127.0 * (volume / MAX_VOLUME)));
}
Is there any other way besides changing the volume on the actual file?
This is how i set up my sequencer and synthesizer:
sequencer = MidiSystem.getSequencer();
synthesizer = MidiSystem.getSynthesizer();
sequencer.open();
synthesizer.open();
sequencer.getTransmitter().setReceiver(synthesizer.getReceiver());