Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Anybody knows how to get the following imformation from a midi file?

Reply
Thread Tools

Anybody knows how to get the following imformation from a midi file?

 
 
edward.chow
Guest
Posts: n/a
 
      05-28-2011
I'm attempting to make an applet for analyzing features of midi
files.
Anybody familiar with the APIs in javax.sound.midi package?


I've already been capable of getting the tempo of a file, but i met
some problems in connecting an object of Sequencer with an object of
Synthesizer.

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.
 
Reply With Quote
 
 
 
 
Gavino
Guest
Posts: n/a
 
      05-31-2011
"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.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Portable midi communication with external midi instruments? Asbjørn Bjørnstad Java 0 10-09-2008 03:03 PM
Real Time Midi File Playback - Reading and Writing midi at the sametime Gilly Python 6 05-04-2008 09:16 PM
D/L midi files launches a midi player I want the midi file Vlad Firefox 2 06-10-2005 02:25 AM
Java MIDI output device to MIDI Yoke. Hugo Villeneuve Java 0 07-04-2003 10:31 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57