Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Gavino" Newsgroups: comp.lang.java.help,comp.lang.java.programmer Subject: Re: Anybody knows how to get the following imformation from a midi file? Date: Tue, 31 May 2011 22:12:55 +0200 Lines: 15 Message-ID: <94l0eeFhg8U1@mid.individual.net> References: <65aad0aa-be9a-432e-9671-ed5d2a492478@y27g2000prb.googlegroups.com> X-Trace: individual.net 7slKwJrXwKoLBbCbXFGM/A2ZPB4zeX7jKRs51CrEaMJZBXhJf7 Cancel-Lock: sha1:n32xtl8PiEFkZ+L3G4p4Ng6s64c= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.help:725 comp.lang.java.programmer:4815 "edward.chow" wrote in message news:65aad0aa-be9a-432e-9671-ed5d2a492478@y27g2000prb.googlegroups.com... > 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.