Skip to main content

alphaTab.model.Voice

A voice represents a group of beats that can be played during a bar.

 class Voice

Properties​

bar​

Gets or sets the reference to the bar this voice belongs to.

bar: Bar;

beats​

Gets or sets the list of beats contained in this voice.

beats: Beat[];

id​

Gets or sets the unique id of this bar.

id: number;

index​

Gets or sets the zero-based index of this voice within the bar.

index: number;

isEmpty​

Gets or sets a value indicating whether this voice is empty.

readonly isEmpty: boolean;

isRestOnly​

Gets or sets a value indicating whether this voice is empty.

readonly isRestOnly: boolean;

style​

The style customizations for this item.

style?: VoiceStyle;

Methods​

addBeat​

(no description)

addBeat(beat: Beat): void
ParameterSummary
beatAll

(no description)

addGraceBeat​

(no description)

addGraceBeat(beat: Beat): void
ParameterSummary
beatAll

(no description)

calculateDuration​

(no description)

calculateDuration(): number

finish​

(no description)

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

(no description)

sharedDataBagAll

(no description)

getBeatAtPlaybackStart​

(no description)

getBeatAtPlaybackStart(playbackStart: number): Beat | null
ParameterSummary
playbackStartAll

(no description)

insertBeat​

(no description)

insertBeat(after: Beat, newBeat: Beat): void
ParameterSummary
afterAll

(no description)

newBeatAll

(no description)