Track class
Represents a track. A track belongs to a sequence and has a collection of events.
Properties
-
events
→ List<
SchedulerEvent> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
final
- instrument → Instrument
-
final
- lastFrameSynced ↔ int
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sequence → Sequence
-
final
Methods
-
addMidiCC(
{required int ccNumber, required int ccValue, required double beat}) → void - Adds a MIDI CC event to this track. This does not sync the events to the backend.
-
addMidiPitchBend(
{required double value, required double beat}) → void - Adds a MIDI pitch bend event to this track. The value must be between -1 and 1. This does not sync the events to the backend.
-
addNote(
{required int noteNumber, required double velocity, required double startBeat, required double durationBeats}) → void - Adds a Note On and Note Off event to this track. This does not sync the events to the backend.
-
addNoteOff(
{required int noteNumber, required double beat}) → void - Adds a Note Off event to this track. This does not sync the events to the backend.
-
addNoteOn(
{required int noteNumber, required double velocity, required double beat}) → void - Adds a Note On event to this track. This does not sync the events to the backend.
-
addVolumeChange(
{required double volume, required double beat}) → void - Adds a Volume event to this track. This does not sync the events to the backend.
-
changeVolumeNow(
{required double volume}) → void - Handles a Volume Change event on this track immediately. The event will not be added to this track's events.
-
clearBuffer(
) → void - For internal use only. Clears any scheduled events in the backend.
-
clearEvents(
) → void - Clears all events on this track. This does not sync the events to the backend.
-
getVolume(
) → double - Gets the current volume of the track.
-
midiCCNow(
{required int ccNumber, required int ccValue}) → void - Handles a MIDI CC event on this track immediately. The event will not be added to this track's events.
-
midiPitchBendNow(
{required double value}) → void - Handles a MIDI pitch bend event on this track immediately. The event will not be added to this track's events.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startNoteNow(
{required int noteNumber, required double velocity}) → void - Handles a Note On event on this track immediately. The event will not be added to this track's events.
-
stopNoteNow(
{required int noteNumber}) → void - Handles a Note Off event on this track immediately. The event will not be added to this track's events.
-
syncBuffer(
[int? absoluteStartFrame, int maxEventsToSync = BUFFER_SIZE]) → void - Syncs events to the backend. This should be called after making changes to track events to ensure that the changes are synced immediately.
-
topOffBuffer(
) → void - For internal use only. Triggers a sync that will fill any available space in the buffer with any un-synced events.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
build(
{required Sequence sequence, required Instrument instrument}) → Future< Track?> - Creates a track in the underlying sequencer engine.