Staff class
Represents a single staff (line of music) containing an ordered list of Measures.
A Staff is the top-level musical container passed to MusicScore and LayoutEngine. Measures are laid out left-to-right and wrapped into systems automatically by the layout engine.
Example:
final staff = Staff(measures: [
Measure()
..add(Clef())
..add(TimeSignature(numerator: 4, denominator: 4))
..add(Note(pitch: const Pitch(step: 'C', octave: 4),
duration: const Duration(DurationType.quarter))),
]);
Properties
Methods
-
add(
Measure measure) → void - Appends a Measure to the end of this staff.
-
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