What is the best way to read a MIDI file (chronologically) with multiple tracks? (Java)
Note: I don't want to play the MIDI file, just read the messages.
Couple ideas:
Is it safe to assume there are no note events shorter than the 1/64th note? Or should I visit every track and only move to the next tick after all other ticks tracks
MIDI files can be opened with Windows Media Player, VLC, WildMidi, TiMidity++, NoteWorthy Composer, WildMIDI, Synthesia, MuseScore, Amarok, Apple's Logic Pro, and very likely some other popular media players. To play one online, try Online Sequencer.
MIDI Files contain one or more MIDI streams, with time information for each event. Song, sequence, and track structures, tempo and time signature information, are all supported. Track names and other descriptive information may be stored with the MIDI data.
If you want to just play MIDI files on your PC, you can use media player software like VLC. Thankfully, Windows Media Player also supports MIDI as input format. So, you don't need third-party software to play MIDI files. Just import a MIDI file into it and play it.
JFugue can read a MIDI file and sort the messages in chronological order.
The results can be read as JFugue MusicStrings (for example, C-sharp, 5th octave, whole note = "C#5w"), or you can write your own ParserListener and attach it to the MidiParser so you can output your own text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With