Breaking News
Home / Java / Java Snippets / MIDI Sound Player

MIDI Sound Player

Midi Player in JavaThis snippet shows how to play music Midi files (musical sequences).

In order to play midi sequences, the Midi Sequencer is needed which is retrieved by MidiSystem.getSequencer() method. Then midi sequences from the midi file are read by FileInputStream and then feed to the sequencer to play.

The midi sound can be stopped by calling the sequencer.close() method.


Check Also

How to progamatically get the Java version?

Snippet The key here is to use the system property java.version and get minor and …

Advertisment ad adsense adlogger