I wrote this program to make some use out of my old guitar hero controller, but there is a bit of a delay when I want to play a note or chord. I know this isn't because of the controller because I set up a simple JFrame containing a JButton to play a chord and the delay is still present. How can I make this more efficient?

OpenInstrument() {
try
{
// Locate the default synthesizer
synth = MidiSystem.getSynthesizer();
// Open the synthesizer
synth.open();
// Get the available Midi channels - there are usually 16
channels = synth.getChannels();
// Get the synth's soundbank where all the sounds are stored
bank = synth.getDefaultSoundbank();
// Load all the available instruments
synth.loadAllInstruments(bank);
// Get a list of the available instruments
instrs = synth.getLoadedInstruments();
}
catch (Exception exc) { exc.printStackTrace(); }
}