alphaTab.model.MasterBar
The MasterBar stores information about a bar which affects all tracks.
class MasterBarProperties​
alternateEndings​
Gets or sets the bitflag for the alternate endings. Each bit defines for which repeat counts the bar is played.
- JavaScript
- C#
- Kotlin
alternateEndings: number;double AlternateEndings { get; set; }var alternateEndings: DoublebeamingRules​
Defines the custom beaming rules which should be applied to this bar and all bars following.
- JavaScript
- C#
- Kotlin
directions​
The directions applied to this masterbar.
displayScale​
Gets a percentual scale for the size of the bars when displayed in a multi-track layout.
- JavaScript
- C#
- Kotlin
displayScale: number;double DisplayScale { get; set; }var displayScale: DoubledisplayWidth​
An absolute width of the bar to use when displaying in a multi-track layout.
- JavaScript
- C#
- Kotlin
displayWidth: number;double DisplayWidth { get; set; }var displayWidth: Doublefermata​
Gets or sets the fermatas for this bar. The key is the offset of the fermata in midi ticks.
hasChanges​
Whether the masterbar is has any changes applied to it (e.g. tempo changes, time signature changes etc) The first bar is always considered changed due to initial setup of values. It does not consider elements like whether the tempo really changes to the previous bar.
- JavaScript
- C#
- Kotlin
readonly hasChanges: boolean;bool HasChanges { get; }val hasChanges: Booleanindex​
Gets the zero based index of the masterbar.
- JavaScript
- C#
- Kotlin
index: number;double Index { get; set; }var index: DoubleisAnacrusis​
Gets or sets a value indicating whether the master bar is an anacrusis (aka. pickup bar)
- JavaScript
- C#
- Kotlin
isAnacrusis: boolean;bool IsAnacrusis { get; set; }var isAnacrusis: BooleanisDoubleBar​
Gets or sets whether a double bar is shown for this masterbar.
- JavaScript
- C#
- Kotlin
isDoubleBar: boolean;bool IsDoubleBar { get; set; }var isDoubleBar: BooleanisFreeTime​
Gets or sets whether the bar indicates a free time playing.
- JavaScript
- C#
- Kotlin
isFreeTime: boolean;bool IsFreeTime { get; set; }var isFreeTime: BooleanisRepeatEnd​
(no description)
- JavaScript
- C#
- Kotlin
readonly isRepeatEnd: boolean;bool IsRepeatEnd { get; }val isRepeatEnd: BooleanisRepeatStart​
Gets or sets whether a repeat section starts on this masterbar.
- JavaScript
- C#
- Kotlin
isRepeatStart: boolean;bool IsRepeatStart { get; set; }var isRepeatStart: BooleanisSectionStart​
(no description)
- JavaScript
- C#
- Kotlin
readonly isSectionStart: boolean;bool IsSectionStart { get; }val isSectionStart: BooleankeySignature​
The key signature used on all bars.
- JavaScript
- C#
- Kotlin
keySignatureType​
The type of key signature (major/minor)
- JavaScript
- C#
- Kotlin
keySignatureType: KeySignatureType;KeySignatureType KeySignatureType { get; set; }var keySignatureType: KeySignatureTypeMaxAlternateEndings​
(no description)
- JavaScript
- C#
- Kotlin
static readonly MaxAlternateEndings: number;static double MaxAlternateEndings { get; }companion object { val MaxAlternateEndings: Double }nextMasterBar​
Gets or sets the next masterbar in the song.
previousMasterBar​
Gets or sets the next masterbar in the song.
repeatCount​
Gets or sets the number of repeats for the current repeat section.
- JavaScript
- C#
- Kotlin
repeatCount: number;double RepeatCount { get; set; }var repeatCount: DoublerepeatGroup​
Gets or sets the repeat group this bar belongs to.
- JavaScript
- C#
- Kotlin
score​
Gets or sets the reference to the score this song belongs to.
section​
Gets or sets the new section information for this bar.
start​
The timeline position of the voice within the whole score. (unit: midi ticks)
- JavaScript
- C#
- Kotlin
start: number;double Start { get; set; }var start: DoublesyncPoints​
The sync points for this master bar to synchronize the alphaTab time axis with the external backing track audio.
- JavaScript
- C#
- Kotlin
syncPoints: Automation[] | undefined;IList<Automation>? SyncPoints { get; set; }var syncPoints: alphaTab.collections.List<Automation>?tempoAutomation​
Gets or sets the first tempo automation for this bar.
- JavaScript
- C#
- Kotlin
readonly tempoAutomation: Automation | null;Automation? TempoAutomation { get; }val tempoAutomation: Automation?tempoAutomations​
Gets or sets all tempo automation for this bar.
- JavaScript
- C#
- Kotlin
tempoAutomations: Automation[];IList<Automation> TempoAutomations { get; set; }var tempoAutomations: alphaTab.collections.List<Automation>timeSignatureCommon​
Gets or sets whether this is bar has a common time signature.
- JavaScript
- C#
- Kotlin
timeSignatureCommon: boolean;bool TimeSignatureCommon { get; set; }var timeSignatureCommon: BooleantimeSignatureDenominator​
Gets or sets the time signature denominiator.
- JavaScript
- C#
- Kotlin
timeSignatureDenominator: number;double TimeSignatureDenominator { get; set; }var timeSignatureDenominator: DoubletimeSignatureNumerator​
Gets or sets the time signature numerator.
- JavaScript
- C#
- Kotlin
timeSignatureNumerator: number;double TimeSignatureNumerator { get; set; }var timeSignatureNumerator: DoubletripletFeel​
Gets or sets the triplet feel that is valid for this bar.
- JavaScript
- C#
- Kotlin
Methods​
addDirection​
Adds a direction to the masterbar.
| Parameter | Summary |
|---|---|
directionAll | The direction to add. |
addFermata​
Adds a fermata to the masterbar.
| Parameter | Summary |
|---|---|
offsetAll | The offset of the fermata within the bar in midi ticks. |
fermataAll | The fermata. |
addSyncPoint​
Adds the given sync point to the list of sync points for this bar.
- JavaScript
- C#
- Kotlin
addSyncPoint(syncPoint: Automation): voidvoid AddSyncPoint(Automation syncPoint)fun addSyncPoint(syncPoint: Automation): Unit| Parameter | Summary |
|---|---|
syncPointAll | The sync point to add. |
calculateDuration​
Calculates the time spent in this bar. (unit: midi ticks)
- JavaScript
- C#
- Kotlin
calculateDuration(respectAnacrusis?: boolean): numberdouble CalculateDuration(bool? respectAnacrusis)fun calculateDuration(respectAnacrusis: Boolean?): Double| Parameter | Summary |
|---|---|
respectAnacrusisAll | (no description) |
finish​
(no description)
- JavaScript
- C#
- Kotlin
finish(sharedDataBag: Map<string, unknown>): voidvoid Finish(Map<string, object> sharedDataBag)fun finish(sharedDataBag: alphaTab.collections.StringAnyMap<String, Any>): Unit| Parameter | Summary |
|---|---|
sharedDataBagAll | (no description) |
getFermata​
Gets the fermata for a given beat.
| Parameter | Summary |
|---|---|
beatAll | The beat to get the fermata for. |