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))),
]);
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- lineCount → int
-
Número de linhas da pauta. Padrão é 5 (CMN). Valores válidos conforme MEI:
final
-
measures
→ List<
Measure> -
All measures in this staff, in chronological order.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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