|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.midifile.MIDIFilePrinter
public class MIDIFilePrinter
MIDI File Printer This class is called by the MIDI File Input Stream when it parses MIDI Files. It prints the events as they are parsed.
Constructor Summary | |
---|---|
MIDIFilePrinter()
|
Method Summary | |
---|---|
void |
handleBeginTrack(int index)
Called at the beginning of each track |
void |
handleEndTrack(int index)
Called at the end of each track |
void |
handleEvent(int ticks,
int command,
int data1,
int data2)
Called when a MIDI Message event is encountered. |
void |
handleHeader(int format,
int numTracks,
short division)
Called when the header is parsed. |
void |
handleMetaEvent(int ticks,
int type,
byte[] b)
Called when a MetaEvent is encountered. |
void |
handleSysExF0(int ticks,
byte[] b)
Called when an F0 SysEx event is encountered. |
void |
handleSysExF7(int ticks,
byte[] b)
Called when an F7 SysEx event is encountered. |
static void |
main(java.lang.String[] args)
|
static void |
printMIDIFile(java.lang.String fileName)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MIDIFilePrinter()
Method Detail |
---|
public void handleHeader(int format, int numTracks, short division)
handleHeader
in interface MIDIFileListener
format
- Format of file. 0, 1 or 2.numTracks
- division
- public void handleBeginTrack(int index)
handleBeginTrack
in interface MIDIFileListener
index
- Track index starting at zeropublic void handleEndTrack(int index)
handleEndTrack
in interface MIDIFileListener
index
- Track index starting at zeropublic void handleSysExF0(int ticks, byte[] b)
handleSysExF0
in interface MIDIFileListener
ticks
- MIDIFile time-stampb
- bytes read from file for SysEx. May be null.public void handleSysExF7(int ticks, byte[] b)
handleSysExF7
in interface MIDIFileListener
ticks
- MIDIFile time-stampb
- bytes read from file for SysEx. May be null.public void handleMetaEvent(int ticks, int type, byte[] b)
handleMetaEvent
in interface MIDIFileListener
ticks
- MIDIFile time-stamptype
- MetaEvent type, from 0 to 127.b
- bytes read from file for SysEx. May be null.public void handleEvent(int ticks, int command, int data1, int data2)
handleEvent
in interface MIDIFileListener
ticks
- MIDIFile time-stampcommand
- MIDI Command, eg. NOTE_ON.data1
- First data byte of message.data2
- Second optional data byte of message.public static void main(java.lang.String[] args)
public static void printMIDIFile(java.lang.String fileName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |