|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.frinika.sequencer.FrinikaTrackWrapper
public class FrinikaTrackWrapper
An extended version of the Track class in javax.sound.midi. The purpose of the extension is to make the Sequencer player able to request all events for a given tick, rather than having to perform a binary search, or keeping a track index to get them. For the track mapping to remain consistent - it is important NOT to modify the MidiEvent objects separately. If a MIDI event needs to be changed, it should be removed and then added again to this Track.
Field Summary | |
---|---|
static int |
CHANNEL_FROM_EVENT
Indicates that the channel defined in the multievents should not be overridden by the channel set in this track |
Method Summary | |
---|---|
boolean |
add(javax.sound.midi.MidiEvent event)
Add a MidiEvent to the track - note that you should normally use MultiEvents instead of MidiEvents |
void |
attachToSequence()
|
void |
clear()
clear this track of all events except the "META END OF TRACK" (PJL tempo track rebuild) |
void |
detachFromSequence()
|
javax.sound.midi.MidiEvent |
get(int index)
Return MidiEvent at a given index in the track |
java.util.Vector<javax.sound.midi.MidiMessage> |
getControllerStateAtTick(long tick)
Return a list of midimessages in order to restore controller states at a specific tick. |
EditHistoryContainer |
getEditHistoryContainer()
|
java.util.Vector<javax.sound.midi.MidiEvent> |
getEventsForTick(long tick)
Used by the sequencer player to get the messages it should play at a certain position |
int |
getMidiChannel()
|
javax.sound.midi.MidiDevice |
getMidiDevice()
|
FrinikaSequence |
getSequence()
|
long |
lastTickUsed()
|
boolean |
remove(javax.sound.midi.MidiEvent event)
Remove a MidiEvent from the track - Note that you should normally use MultiEvents instead of MidiEvents |
void |
setMidiChannel(int midiChannel)
Set the midi channel for this track |
void |
setMidiDevice(javax.sound.midi.MidiDevice midiDevice)
|
void |
setSequence(FrinikaSequence sequence)
|
int |
size()
Return number of MidiEvents in track |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CHANNEL_FROM_EVENT
Method Detail |
---|
public void clear()
public boolean add(javax.sound.midi.MidiEvent event)
event
-
public boolean remove(javax.sound.midi.MidiEvent event)
event
-
public int size()
public javax.sound.midi.MidiEvent get(int index)
index
-
public java.util.Vector<javax.sound.midi.MidiEvent> getEventsForTick(long tick)
tick
-
public java.util.Vector<javax.sound.midi.MidiMessage> getControllerStateAtTick(long tick)
tick
-
public FrinikaSequence getSequence()
public void setSequence(FrinikaSequence sequence)
public int getMidiChannel()
public void setMidiChannel(int midiChannel)
midiChannel
- public javax.sound.midi.MidiDevice getMidiDevice()
public void setMidiDevice(javax.sound.midi.MidiDevice midiDevice)
midiDevice
- The midiDevice to set.public EditHistoryContainer getEditHistoryContainer()
public void attachToSequence()
public void detachFromSequence()
public long lastTickUsed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |