alphaTab.model.Bar
A bar is a single block within a track, also known as Measure.
class BarPropertiesโ
barLineLeftโ
The bar line to draw on the left side of the bar. Note that the combination with barLineRight of the previous bar matters.
If this bar has a Regular/Automatic style but the previous bar is customized, no additional line is drawn by this bar.
If both bars have a custom style, both bar styles are drawn.
- JavaScript
- C#
- Kotlin
barLineRightโ
The bar line to draw on the right side of the bar. Note that the combination with barLineLeft of the next bar matters.
If this bar has a Regular/Automatic style but the next bar is customized, no additional line is drawn by this bar.
If both bars have a custom style, both bar styles are drawn.
- JavaScript
- C#
- Kotlin
barNumberDisplayโ
Use scoreDisplay , tabDisplay ,
slashDisplay , or numberedDisplay .barNumber for
per-staff-type per-bar control. The setter broadcasts the value
to all four override bags (lazy-creating each); on undefined
it clears .barNumber on each existing bag without removing it.
How bar numbers should be displayed on this specific bar.
- JavaScript
- C#
- Kotlin
barNumberDisplay: BarNumberDisplay | undefined;BarNumberDisplay? BarNumberDisplay { get; set; }var barNumberDisplay: BarNumberDisplay?clefโ
Gets or sets the clef on this bar.
clefOttavaโ
Gets or sets the ottava applied to the clef.
displayScaleโ
A relative scale for the size of the bar when displayed. The scale is relative within a single line (system). The sum of all scales in one line make the total width, and then this individual scale gives the relative size.
- JavaScript
- C#
- Kotlin
displayScale: number;double DisplayScale { get; set; }var displayScale: DoubledisplayWidthโ
An absolute width of the bar to use when displaying in single track display scenarios.
- JavaScript
- C#
- Kotlin
displayWidth: number;double DisplayWidth { get; set; }var displayWidth: DoublefilledVoicesโ
Gets the number of voices which have content within this stuff.
- JavaScript
- C#
- Kotlin
readonly filledVoices: Set<number>;Set<double> FilledVoices { get; }val filledVoices: Set<Double>hasChangesโ
Whether this bar has any changes applied which are not related to the voices in it. (e.g. new key signatures)
- JavaScript
- C#
- Kotlin
readonly hasChanges: boolean;bool HasChanges { get; }val hasChanges: Booleanidโ
Gets or sets the unique id of this bar.
- JavaScript
- C#
- Kotlin
id: number;double Id { get; set; }var id: Doubleindexโ
Gets or sets the zero-based index of this bar within the staff.
- JavaScript
- C#
- Kotlin
index: number;double Index { get; set; }var index: DoubleisEmptyโ
Whether this bar is fully empty (not even having rests).
- JavaScript
- C#
- Kotlin
readonly isEmpty: boolean;bool IsEmpty { get; }val isEmpty: BooleanisMultiVoiceโ
Gets a value indicating whether this bar contains multiple voices with notes.
- JavaScript
- C#
- Kotlin
readonly isMultiVoice: boolean;bool IsMultiVoice { get; }val isMultiVoice: BooleanisRestOnlyโ
Whether this bar is empty or has only rests.
- JavaScript
- C#
- Kotlin
readonly isRestOnly: boolean;bool IsRestOnly { get; }val isRestOnly: BooleankeySignatureโ
Gets or sets the key signature used on all bars.
- JavaScript
- C#
- Kotlin
keySignatureTypeโ
Gets or sets the type of key signature (major/minor)
- JavaScript
- C#
- Kotlin
keySignatureType: KeySignatureType;KeySignatureType KeySignatureType { get; set; }var keySignatureType: KeySignatureTypemasterBarโ
(no description)
nextBarโ
Gets or sets the next bar that comes after this bar.
numberedDisplayโ
Per-bar override for the numbered (jianpu) staff's display.
- JavaScript
- C#
- Kotlin
numberedDisplay?: NumberedBarOverride;NumberedBarOverride NumberedDisplay { get; set; }var numberedDisplay: NumberedBarOverridepreviousBarโ
Gets or sets the previous bar that comes before this bar.
scoreDisplayโ
Per-bar override for the standard-notation staff's display.
- JavaScript
- C#
- Kotlin
scoreDisplay?: ScoreBarOverride;ScoreBarOverride ScoreDisplay { get; set; }var scoreDisplay: ScoreBarOverridesimileMarkโ
Gets or sets the simile mark on this bar.
- JavaScript
- C#
- Kotlin
slashDisplayโ
Per-bar override for the slash staff's display.
- JavaScript
- C#
- Kotlin
slashDisplay?: SlashBarOverride;SlashBarOverride SlashDisplay { get; set; }var slashDisplay: SlashBarOverridestaffโ
Gets or sets the reference to the parent staff.
styleโ
The style customizations for this item.
sustainPedalsโ
The sustain pedal markers within this bar.
- JavaScript
- C#
- Kotlin
sustainPedals: SustainPedalMarker[];IList<SustainPedalMarker> SustainPedals { get; set; }var sustainPedals: alphaTab.collections.List<SustainPedalMarker>tabDisplayโ
Per-bar override for the tablature staff's display.
- JavaScript
- C#
- Kotlin
voicesโ
Gets or sets the list of voices contained in this bar.
Methodsโ
addVoiceโ
(no description)
| Parameter | Summary |
|---|---|
voiceAll | (no description) |
calculateDurationโ
(no description)
- JavaScript
- C#
- Kotlin
calculateDuration(): numberdouble CalculateDuration()fun calculateDuration(): Doublefinishโ
(no description)
| Parameter | Summary |
|---|---|
settingsAll | (no description) |
sharedDataBagAll | (no description) |
getActualBarLineLeftโ
The bar line to draw on the left side of the bar with an "automatic" type resolved to the actual one.
- JavaScript
- C#
- Kotlin
getActualBarLineLeft(isFirstOfSystem: boolean): BarLineStyleBarLineStyle GetActualBarLineLeft(bool isFirstOfSystem)fun getActualBarLineLeft(isFirstOfSystem: Boolean): BarLineStyle| Parameter | Summary |
|---|---|
isFirstOfSystemAll | Whether the bar is the first one in the system. |
getActualBarLineRightโ
The bar line to draw on the right side of the bar with an "automatic" type resolved to the actual one.
- JavaScript
- C#
- Kotlin
getActualBarLineRight(): BarLineStyleBarLineStyle GetActualBarLineRight()fun getActualBarLineRight(): BarLineStyle