All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.nosuch.midi.MidiFileReader

java.lang.Object
   |
   +----com.nosuch.midi.MidiFileReader

public class MidiFileReader
extends Object
Read a Standard MIDI File. There are a couple static convenience methods for reading a MIDI file with a single statement, e.g.
MidiPhrase p = MidiFileReader.readMidiPhrase("jsbach.mid");

If you want to get more control, create a MidiFileReader object, use setAction() to set its MidiFileAction object, and call read().


Constructor Index

 o MidiFileReader(InputStream)

Method Index

 o main(String[])
 o read()
Read the entire MIDI File.
 o readMidiPhrase(String)
Read the named MIDI file and return a single phrase (merging all of its tracks).
 o readMidiPhraseArray(String)
Read the named MIDI file and return an array of phrases that contain its tracks.
 o setAction(MidiFileAction)

Constructors

 o MidiFileReader
 public MidiFileReader(InputStream in)

Methods

 o setAction
 public void setAction(MidiFileAction a)
 o read
 public void read() throws MidiException
Read the entire MIDI File.

Throws: MidiException
If there is an error while reading.
 o readMidiPhraseArray
 public static MidiPhrase[] readMidiPhraseArray(String fname) throws MidiException, FileNotFoundException
Read the named MIDI file and return an array of phrases that contain its tracks.

Parameters:
fname - Name of file to read
Returns:
MidiPhrase
Throws: MidiException
If there is an error while reading.
 o readMidiPhrase
 public static MidiPhrase readMidiPhrase(String fname) throws MidiException, FileNotFoundException
Read the named MIDI file and return a single phrase (merging all of its tracks).

Parameters:
fname - Name of file to read
Returns:
MidiPhrase
Throws: MidiException
If there is an error while reading.
 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index