|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfugue.EventManager
Places musical data into the MIDI sequence.
Constructor Summary | |
EventManager()
|
Method Summary | |
void |
addEvent(int command,
int data1,
int data2,
int data3,
long duration)
Adds a ShortMessage.NOTE_ON event to the current track, using attack and decay velocity values. |
void |
addEvent(int command,
int data1,
int data2,
long duration)
Adds a MIDI event to the current track. |
void |
advanceTrackTimer(long duration)
Advances the timer for the current track by the specified duration, which is specified in Pulses Per Quarter (PPQ) |
javax.sound.midi.Sequence |
getSequence()
Returns the current sequence, which is a collection of tracks. |
long |
getTrackTimer()
Returns the timer for the current track. |
void |
setCurrentTrack(byte track)
Sets the current track, or channel, to which new events will be added. |
void |
setTrackTimer(long newTime)
Sets the timer for the current track by the given time, which is specified in Pulses Per Quarter (PPQ) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EventManager()
Method Detail |
public void setCurrentTrack(byte track)
track
- the track to selectpublic void advanceTrackTimer(long duration)
duration
- the duration to increase the track timerpublic void setTrackTimer(long newTime)
newTime
- the time at which to set the track timerpublic long getTrackTimer()
public void addEvent(int command, int data1, int data2, long duration)
command
- the MIDI command represented by this messagedata1
- the first data bytedata2
- the second data byteduration
- for Note events, the duration of the notepublic void addEvent(int command, int data1, int data2, int data3, long duration)
command
- the NOTE_ON command. If another command is given, this
method will call addEvent(command, data1, data2, duration)data1
- the first data byte, which contains the note valuedata2
- the second data byte for the NOTE_ON event, which contains the attack velocitydata3
- the second data byte for the NOTE_OFF event, which contains the decay velocityduration
- the duration of the notepublic javax.sound.midi.Sequence getSequence()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |