This Java tip illustrates a method of loading and playing Midi audio. This tip may be very useful for the developers who want to create multi-media applications. Games can also be a very useful end application for this code.

 try {
        // From file
        Sequence sequence = MidiSystem.getSequence(new File("midiaudiofile"));
        // From URL
        sequence = MidiSystem.getSequence(new URL("http://hostname/midiaudiofile"));
        // Create a sequencer for the sequence
        Sequencer sequencer = MidiSystem.getSequencer();;
        // Start playing
    } catch (MalformedURLException e) {
    } catch (IOException e) {
    } catch (MidiUnavailableException e) {
    } catch (InvalidMidiDataException e) {