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().
-
MidiFileReader(InputStream)
-
-
main(String[])
-
-
read()
- Read the entire MIDI File.
-
readMidiPhrase(String)
- Read the named MIDI file and return a single phrase (merging
all of its tracks).
-
readMidiPhraseArray(String)
- Read the named MIDI file and return an array of phrases
that contain its tracks.
-
setAction(MidiFileAction)
-
MidiFileReader
public MidiFileReader(InputStream in)
setAction
public void setAction(MidiFileAction a)
read
public void read() throws MidiException
- Read the entire MIDI File.
- Throws: MidiException
- If there is an error while reading.
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.
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.
main
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index