|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.softsynth.midifile.MIDIFileImage
public class MIDIFileImage
Contains an image of a MIDIFile.
| Field Summary | |
|---|---|
int |
currentTrackIndex
|
short |
division
|
int |
format
|
int |
ticksPerBeat
|
MIDIFileTrack[] |
tracks
|
| Constructor Summary | |
|---|---|
MIDIFileImage()
|
|
| 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)
|
void |
print()
|
double |
ticksToSeconds(int ticks)
Scan tempo map to determine real-time for a given tick. |
void |
write(MIDIFileOutput mfout)
Write a MIDIFile image object to a MIDIFile on disk. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public MIDIFileTrack[] tracks
public int format
public short division
public int currentTrackIndex
public int ticksPerBeat
| Constructor Detail |
|---|
public MIDIFileImage()
| Method Detail |
|---|
public double ticksToSeconds(int ticks)
public void handleHeader(int format,
int numTracks,
short division)
handleHeader in interface MIDIFileListenerformat - Format of file. 0, 1 or 2.numTracks - division - public void handleBeginTrack(int index)
handleBeginTrack in interface MIDIFileListenerindex - Track index starting at zeropublic void handleEndTrack(int index)
handleEndTrack in interface MIDIFileListenerindex - Track index starting at zero
public void handleSysExF0(int ticks,
byte[] b)
handleSysExF0 in interface MIDIFileListenerticks - MIDIFile time-stampb - bytes read from file for SysEx. May be null.
public void handleSysExF7(int ticks,
byte[] b)
handleSysExF7 in interface MIDIFileListenerticks - MIDIFile time-stampb - bytes read from file for SysEx. May be null.
public void handleMetaEvent(int ticks,
int type,
byte[] b)
handleMetaEvent in interface MIDIFileListenerticks - 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 MIDIFileListenerticks - MIDIFile time-stampcommand - MIDI Command, eg. NOTE_ON.data1 - First data byte of message.data2 - Second optional data byte of message.public void print()
public void write(MIDIFileOutput mfout)
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||