Skip to main content

alphaTab.model.Staff

This class describes a single staff within a track. There are instruments like pianos where a single track can contain multiple staves.

 class Staff

Properties​

bars​

Gets or sets a list of all bars contained in this staff.

bars: Bar[];

capo​

Gets or sets the fret on which a capo is set.

capo: number;

chords​

Gets or sets a list of all chords defined for this staff. chordId refers to entries in this lookup.

chords: Map<string, Chord> | null;

DefaultStandardNotationLineCount​

(no description)

static readonly DefaultStandardNotationLineCount: unknown;

displayTranspositionPitch​

Gets or sets the number of semitones this track should be transposed. This applies only to rendering.

displayTranspositionPitch: number;

filledVoices​

The indexes of the non-empty voices in this staff..

readonly filledVoices: Set<number>;

index​

Gets or sets the zero-based index of this staff within the track.

index: number;

isPercussion​

Gets or sets whether the staff contains percussion notation

isPercussion: boolean;

isStringed​

(no description)

readonly isStringed: boolean;

showNumbered​

Gets or sets whether the numbered notation is shown.

showNumbered: boolean;

showSlash​

Gets or sets whether the slash notation is shown.

showSlash: boolean;

showStandardNotation​

Gets or sets whether the standard notation is shown.

showStandardNotation: boolean;

showTablature​

Gets or sets whether the tabs are shown.

showTablature: boolean;

standardNotationLineCount​

The number of lines shown for the standard notation. For some percussion instruments this number might vary.

standardNotationLineCount: number;

stringTuning​

Get or set the guitar tuning of the guitar. This tuning also indicates the number of strings shown in the guitar tablature. Unlike the string property this array directly represents the order of the tracks shown in the tablature. The first item is the most top tablature line.

stringTuning: Tuning;

track​

Gets or sets the reference to the track this staff belongs to.

track: Track;

transpositionPitch​

Gets or sets the number of semitones this track should be transposed. This applies to rendering and playback.

transpositionPitch: number;

tuning​

Get or set the values of the related guitar tuning.

readonly tuning: number[];

tuningName​

Gets or sets the name of the tuning.

readonly tuningName: string;

Methods​

addBar​

(no description)

addBar(bar: Bar): void
ParameterSummary
barAll

(no description)

addChord​

(no description)

addChord(chordId: string, chord: Chord): void
ParameterSummary
chordIdAll

(no description)

chordAll

(no description)

finish​

(no description)

finish(settings: Settings, sharedDataBag?: Map<string, unknown> | null): void
ParameterSummary
settingsAll

(no description)

sharedDataBagAll

(no description)

getChord​

(no description)

getChord(chordId: string): Chord | null
ParameterSummary
chordIdAll

(no description)

hasChord​

(no description)

hasChord(chordId: string): boolean
ParameterSummary
chordIdAll

(no description)