GlobalState class
A singleton that manages the global state of the sequencer engine. It is responsible for setting up, starting, and stopping the engine. It also maintains the timer for "topping off" the buffers.
Constructors
- GlobalState()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEngineReady ↔ bool
-
getter/setter pair
- keepEngineRunning ↔ bool
-
getter/setter pair
- lastTickInBuffer ↔ int
-
getter/setter pair
-
onEngineReadyCallbacks
→ List<
dynamic Function()> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRate ↔ int?
-
getter/setter pair
-
sequenceIdMap
→ Map<
int, Sequence> -
final
Methods
-
framesToUs(
int frames) → int - For internal use only.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onEngineReady(
dynamic callback()) → void - Calls a function when the sequencer engine is ready. Trying to play the sequence won't do anything until the engine is ready.
-
pauseSequence(
int? id) → void - For internal use only.
-
playSequence(
int? id) → void - For internal use only.
-
registerSequence(
Sequence sequence) → int - For internal use only. Registers the sequence with the underlying engine.
-
setKeepEngineRunning(
bool nextValue) → void - Set this to true in your app's initState to leave the audio engine running even when there is no sequence playing. This may consume more energy. With this setting enabled, you can use Track.startNoteNow etc to play an instrument in real time.
-
toString(
) → String -
A string representation of this object.
inherited
-
unregisterSequence(
Sequence sequence) → void - For internal use only. Unregisters the sequence with the underlying engine.
-
usToFrames(
int us) → int - For internal use only.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited