FaustSequencer class

A helper class to simplify musical sequencing for Faust Physical Models.

FaustSequencer provides a high-level API for building note sequences in terms of beats, durations, velocities, and legato articulation. It handles beat-to-sample mapping and automatic articulation (legato/staccato) for multi-instrument event management.

Use addNote to enqueue notes, then buildEvents to produce sample-accurate FaustEventData ready for the native bridge.

Constructors

FaustSequencer({double sampleRate = 44100.0, double tempoBpm = 120.0})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampleRate double
final
tempoBpm double
final

Methods

addNote({required int instrumentId, required double pitch, required double beat, double duration = 0.9, double velocity = 0.8, bool legato = false, int paramId = 0}) → void
Adds a note to the sequence. beat is the starting beat (0-indexed). duration is the length in beats (e.g., 1.0 for a quarter note). velocity is the strike strength or breath pressure (0.0 to 1.0). legato if true, the breath won't stop before the next note if it overlaps.
buildEvents({double autoDecayMs = 10.0}) List<FaustEventData>
Renders the sequence into a list of FaustEventData ready for the native bridge. autoDecayMs is the micro-gap between staccato notes to ensure clean re-strikes.
clear() → void
Clears all notes from the sequencer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited