Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.java.programmer > #4815

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

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" <invalid@invalid.invalid>
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> (permalink)
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

Cross-posted to 2 groups.

Show key headers only | View raw


"edward.chow" <ztm.edward@gmail.com> 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.


Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

Anybody knows how to get the following imformation from a midi file? "edward.chow" <ztm.edward@gmail.com> - 2011-05-27 19:40 -0700
  Re: Anybody knows how to get the following imformation from a midi file? "Gavino" <invalid@invalid.invalid> - 2011-05-31 22:12 +0200

csiph-web