dcsimg

How do I load and play a Midi audio file?

John Zukowski

Using the Java Sound classes found in the javax.sound.midi package of course...

Sequencer sequencer = MidiSystem.getSequencer();
sequencer.open();
Sequence sequence = new URL(midifileurl);
sequencer.setSequence(sequence);
sequencer.start();