Can someone show me how to control the volume of an MIDI sequencer without using a sound bank or synthesizer?
I want to make the MIDI fade out before continuing to the next MIDI in sequence
if(midiplay)
{
midi = s + savereq;
try {
//System.out.println("Play MIDI " + midi);
if (musicSr != null)
{
/* This is where I want it to fade out*/
musicSr.stop(); //stop sequencer
musicSr.close(); //close sequencer
}
musicSr = null;
musicS = null;
File music = new File(midi);
if(music.exists())
{
musicS = MidiSystem.getSequence(music);
}
// Create a sequencer for the sequence
musicSr = MidiSystem.getSequencer();
musicSr.open();
musicSr.setSequence(musicS);
musicSr.setLoopCount(musicSr.LOOP_CONTINUOUSLY);
musicSr.start();
} catch (Exception ex) {
ex.printStackTrace();
}
midiplay = false;
}