Package jmsltestsuite
Class MIDIFileListenerTest
java.lang.Object
jmsltestsuite.MIDIFileListenerTest
- All Implemented Interfaces:
MIDIFileListener
public class MIDIFileListenerTest extends java.lang.Object implements MIDIFileListener
-
Constructor Summary
Constructors Constructor Description MIDIFileListenerTest() -
Method Summary
Modifier and Type Method Description voidhandleBeginTrack(int index)Called at the beginning of each trackvoidhandleEndTrack(int index)Called at the end of each trackvoidhandleEvent(int ticks, int command, int data1, int data2)Called when a MIDI Message event is encountered.voidhandleHeader(int format, int numTracks, short division)Called when the header is parsed.voidhandleMetaEvent(int ticks, int type, byte[] b)Called when a MetaEvent is encountered.voidhandleSysExF0(int ticks, byte[] b)Called when an F0 SysEx event is encountered.voidhandleSysExF7(int ticks, byte[] b)Called when an F7 SysEx event is encountered.static voidmain(java.lang.String[] args)Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MIDIFileListenerTest
public MIDIFileListenerTest()
-
-
Method Details
-
handleHeader
public void handleHeader(int format, int numTracks, short division)Description copied from interface:MIDIFileListenerCalled when the header is parsed.- Specified by:
handleHeaderin interfaceMIDIFileListener- Parameters:
format- Format of file. 0, 1 or 2.
-
handleBeginTrack
public void handleBeginTrack(int index)Description copied from interface:MIDIFileListenerCalled at the beginning of each track- Specified by:
handleBeginTrackin interfaceMIDIFileListener- Parameters:
index- Track index starting at zero
-
handleEndTrack
public void handleEndTrack(int index)Description copied from interface:MIDIFileListenerCalled at the end of each track- Specified by:
handleEndTrackin interfaceMIDIFileListener- Parameters:
index- Track index starting at zero
-
handleSysExF0
public void handleSysExF0(int ticks, byte[] b)Description copied from interface:MIDIFileListenerCalled when an F0 SysEx event is encountered.- Specified by:
handleSysExF0in interfaceMIDIFileListener- Parameters:
ticks- MIDIFile time-stampb- bytes read from file for SysEx. May be null.
-
handleSysExF7
public void handleSysExF7(int ticks, byte[] b)Description copied from interface:MIDIFileListenerCalled when an F7 SysEx event is encountered.- Specified by:
handleSysExF7in interfaceMIDIFileListener- Parameters:
ticks- MIDIFile time-stampb- bytes read from file for SysEx. May be null.
-
handleMetaEvent
public void handleMetaEvent(int ticks, int type, byte[] b)Description copied from interface:MIDIFileListenerCalled when a MetaEvent is encountered.- Specified by:
handleMetaEventin interfaceMIDIFileListener- Parameters:
ticks- MIDIFile time-stamptype- MetaEvent type, from 0 to 127.b- bytes read from file for SysEx. May be null.
-
handleEvent
public void handleEvent(int ticks, int command, int data1, int data2)Description copied from interface:MIDIFileListenerCalled when a MIDI Message event is encountered.- Specified by:
handleEventin interfaceMIDIFileListener- Parameters:
ticks- MIDIFile time-stampcommand- MIDI Command, eg. NOTE_ON.data1- First data byte of message.data2- Second optional data byte of message.
-
main
public static void main(java.lang.String[] args)
-