|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfugue.MidiEventManager
public class MidiEventManager
Places musical data into the MIDI sequence.
This was named EventManager in previous versions of JFugue.
| Constructor Summary | |
|---|---|
MidiEventManager(float sequenceTiming,
int resolution)
|
|
| Method Summary | |
|---|---|
void |
addEvent(int command,
int data1)
Adds a MIDI event to the current track. |
void |
addEvent(int command,
int data1,
int data2)
Adds a MIDI event to the current track. |
void |
addMetaMessage(int type,
byte[] bytes)
Adds a MetaMessage to the current track. |
void |
addNoteEvent(int data1,
int data2,
int data3,
long duration,
boolean addNoteOn,
boolean addNoteOff)
Adds a ShortMessage.NOTE_ON event to the current track, using attack and decay velocity values. |
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 |
setCurrentLayer(byte layer)
Sets the current layer within the track to which new events will be added. |
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 MidiEventManager(float sequenceTiming,
int resolution)
| Method Detail |
|---|
public void setCurrentTrack(byte track)
track - the track to selectpublic void setCurrentLayer(byte layer)
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 addMetaMessage(int type,
byte[] bytes)
command - the MIDI command represented by this messagedata1 - the first data bytedata2 - the second data byte
public void addEvent(int command,
int data1)
command - the MIDI command represented by this messagedata1 - the first data byte
public void addEvent(int command,
int data1,
int data2)
command - the MIDI command represented by this messagedata1 - the first data bytedata2 - the second data byte
public void addNoteEvent(int data1,
int data2,
int data3,
long duration,
boolean addNoteOn,
boolean addNoteOff)
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 noteaddNoteOn - whether a ShortMessage.NOTE_ON event should be created for for this event. For the end of a tied note, this should be false; otherwise it should be true.addNoteOff - whether a ShortMessage.NOTE_OFF event should be created for for this event. For the start of a tied note, this should be false; otherwise it should be true.public javax.sound.midi.Sequence getSequence()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||