|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Performance is an interface to a prepared version of a Song. Implementations of this interface must be prepared to deliver PerformanceEvent objects to listeners when the music is playing. Implementations will also typically have to generate specific note data (such as MIDI messages or wave files).
Method Summary | |
void |
addMusicalEvents(EventStream events)
Adds the given list of musical events to the performance. |
void |
addTimerEvents(SongMeasure measure,
int location)
Generate timer events for the given measure, which will be at the specified location. |
Tempo |
getTempo()
|
void |
initializeTrack(SongTrack track)
Generate initialization events (such as controller initialization and patch selection) for the given SongTrack. |
void |
setTimerFrequency(int frequency)
Set the frequency of timer events, in clicks per beat. |
void |
setTimeSignature(int location,
TimeSignature currentTimeSignature)
|
Method Detail |
public void setTimerFrequency(int frequency)
frequency
- public void initializeTrack(SongTrack track)
track
- the SongTrack to add.public void addTimerEvents(SongMeasure measure, int location)
measure
- the measure for which to add informationlocation
- the time offset, measured in timing pulsespublic void addMusicalEvents(EventStream events)
Typically the PerformanceEvent is little more than a wrapped SongEvent with added time information. Note this means that a PerformanceEvent applies strictly to the notation of a Song, not necessarily the actual notes. For example, a tied note may be delivered as multiple events, which a typical implementation must be ready to handle as a single played note (but keep the multiple events in the event stream).
The implementor should not necessarily assume the incoming list of events is in precise performance order (rather, the events will arrive in the order they appear on a score). Events on each call will originate from the same virtual track. Note that it is the responsibility of the implementation to expect and handle calls from multiple virtual tracks into the same physical track.
events
- an event stream of PerformanceEvents to addpublic Tempo getTempo()
public void setTimeSignature(int location, TimeSignature currentTimeSignature)
location
- currentTimeSignature
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |