Skip to main content

alphaTab.model.Track

This public class describes a single track or instrument of score. It is primarily a list of staves containing individual music notation kinds.

 class Track

Properties​

color​

Gets or sets the display color defined for this track.

color: Color;

defaultSystemsLayout​

Defines how many bars are placed into the systems (rows) when displaying the track unless a value is set in the systemsLayout.

defaultSystemsLayout: number;

index​

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

index: number;

isPercussion​

Gets whether this track is a percussion track.

readonly isPercussion: boolean;

isVisibleOnMultiTrack​

Gets or sets whether this track should be visible in the UI. This information is purely informational and might not be provided by all input formats. In formats like Guitar Pro this flag indicates whether on the default "multi-track" layout tracks should be visible or not.

isVisibleOnMultiTrack: boolean;

lineBreaks​

Defines on which bars specifically a line break is forced.

lineBreaks?: Set<number>;

name​

Gets or sets the long name of this track.

name: string;

percussionArticulations​

Gets or sets a mapping on which staff lines particular percussion instruments should be shown.

percussionArticulations: InstrumentArticulation[];

playbackInfo​

Gets or sets the playback information for this track.

playbackInfo: PlaybackInformation;

score​

Gets or sets the reference this track belongs to.

score: Score;

shortName​

Gets or sets the short name of this track.

shortName: string;

staves​

Gets or sets the list of staves that are defined for this track.

staves: Staff[];

style​

The style customizations for this item.

style?: TrackStyle;

systemsLayout​

Defines how many bars are placed into the systems (rows) when displaying the track.

systemsLayout: number[];

Methods​

addLineBreaks​

Adds a new line break.

addLineBreaks(index: number): void
ParameterSummary
indexAll

The index of the bar before which a line break should happen.

addStaff​

(no description)

addStaff(staff: Staff): void
ParameterSummary
staffAll

(no description)

applyLyrics​

(no description)

applyLyrics(lyrics: Lyrics[]): void
ParameterSummary
lyricsAll

(no description)

ensureStaveCount​

(no description)

ensureStaveCount(staveCount: number): void
ParameterSummary
staveCountAll

(no description)

finish​

(no description)

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

(no description)

sharedDataBagAll

(no description)