dguitar.players.sound.midi
Class PerformanceLive
java.lang.Object
javax.sound.midi.Sequence
dguitar.players.sound.midi.PerformanceCore
dguitar.players.sound.midi.PerformanceLive
- All Implemented Interfaces:
- EventSettings, MetaContainer, Performance, TimerSettings
- public class PerformanceLive
- extends PerformanceCore
- implements MetaContainer, EventSettings, TimerSettings
- Author:
- crnash
Fields inherited from class javax.sound.midi.Sequence |
divisionType, PPQ, resolution, SMPTE_24, SMPTE_25, SMPTE_30, SMPTE_30DROP, tracks |
Methods inherited from class javax.sound.midi.Sequence |
createTrack, deleteTrack, getDivisionType, getMicrosecondLength, getPatchList, getResolution, getTickLength, getTracks |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
className
private static java.lang.String className
logger
private static java.util.logging.Logger logger
timerFrequency
int timerFrequency
eventTrack
javax.sound.midi.Track eventTrack
timerStream
EventStream timerStream
metaItems
java.util.List metaItems
PerformanceLive
public PerformanceLive(int tracks,
Tempo tempo,
int resolution)
throws javax.sound.midi.InvalidMidiDataException
- Parameters:
tracks
- tempo
- resolution
-
- Throws:
javax.sound.midi.InvalidMidiDataException
getTimerFrequency
public int getTimerFrequency()
- Returns:
- Returns the timerFrequency.
setTimerFrequency
public void setTimerFrequency(int timerFrequency)
- Description copied from interface:
Performance
- Set the frequency of timer events, in clicks per beat.
- Specified by:
setTimerFrequency
in interface TimerSettings
- Parameters:
timerFrequency
- The timerFrequency to set.
create
public javax.sound.midi.MidiEvent create(PerformanceEvent item)
- Specified by:
create
in interface MetaContainer
- Parameters:
item
-
- Returns:
- a MidiEvent based on the item
lookup
public PerformanceEvent lookup(int key)
- Specified by:
lookup
in interface MetaContainer
- Parameters:
key
-
- Returns:
- the PerformanceEvent associadte with the key
addTimerEvents
public void addTimerEvents(SongMeasure measure,
int location)
- Description copied from interface:
Performance
- Generate timer events for the given measure, which will be at the specified
location. It is up to the implementor to ensure that at least one event
(corresponding to the measure start) is generated by this call.
- Specified by:
addTimerEvents
in interface Performance
- Parameters:
measure
- the measure for which to add informationlocation
- the time offset, measured in timing pulses
recordPerformanceEvent
protected void recordPerformanceEvent(PerformanceEvent item)
- Specified by:
recordPerformanceEvent
in class PerformanceCore
- Parameters:
item
-
enableNoteEvents
public void enableNoteEvents(boolean enable)
- Specified by:
enableNoteEvents
in interface EventSettings