How do I control the volume when playing Midi audio?
Created May 4, 2012
John Zukowski If your Sequencer is a Synthesizer, get its channels and adjust them.
Synthesizer synthesizer = (Synthesizer)sequencer; MidiChannel channelsp[] = synthesizer.getChannels(); for (int i=0, n=channels.length; i<n; i++) { channels[i].controlChange(7, (int)(gain * 127.0)); // gain between 0 and 1 }