"edward.chow" <> wrote in message
news:65aad0aa-be9a-432e-9671-...
> I'll be glad and grateful if anybody knows how to get the instruments,
> rhythm(whether 4/4 or 3/4 or etc.) and the pitch of each note from a
> midi file using java APIs.
Use MidiSystem.getSequence() to create a Sequence from the File.
From the Sequence object, use getTracks() to extract the constituent tracks.
Then you can extract the individual MidiEvents from each track (using
get()), and analyse them to extract information about the notes, etc.
See the javax.sound.midi API docs for details.
|