MasterBar Class


The MasterBar stores information about a bar which affects all tracks.
Base Types
  • object
graph TD Base0["object"]-->Type Type["MasterBar"] class Type type-node


public class MasterBar


Name Summary
MasterBar() Initializes a new instance of the MasterBar class.


Name Constant Value Summary
MaxAlternateEndings 8
The maximum alternate endings. (1 byte with 8 bitflags)


Name Value Summary
AlternateEndings byte
Gets or sets the bitflag for the alternate endings. Each bit defines for which repeat counts the bar is played.
Fermata FastDictionary<TKey, TValue>
Gets or sets the fermatas for this bar. The key is the offset of the fermata in midi ticks.
Index int
Gets the zero based index of the masterbar.
IsDoubleBar bool
Gets or sets whether a double bar is shown for this masterbar.
IsRepeatEnd bool
Gets or sets whether a repeat section ends on this masterbar.
IsRepeatStart bool
Gets or sets whether a repeat section starts on this masterbar.
IsSectionStart bool
Gets a value indicating whether a new section starts on this bar.
KeySignature KeySignature
Gets or sets the key signature used on all bars.
KeySignatureType KeySignatureType
Gets or sets the type of key signature (major/minor)
NextMasterBar MasterBar
Gets or sets the next masterbar in the song.
PreviousMasterBar MasterBar
Gets or sets the next masterbar in the song.
RepeatCount int
Gets or sets the number of repeats for the current repeat section.
RepeatGroup RepeatGroup
Gets or sets the repeat group this bar belongs to.
Score Score
Gets or sets the reference to the score this song belongs to.
Section Section
Gets or sets the new section information for this bar.
Start int
The timeline position of the voice within the whole score. (unit: midi ticks)
TempoAutomation Automation
Gets or sets the tempo automation for this bar.
TimeSignatureCommon bool
Gets or sets whether this is bar has a common time signature.
TimeSignatureDenominator int
Gets or sets the time signature denominiator.
TimeSignatureNumerator int
Gets or sets the time signature numerator.
TripletFeel TripletFeel
Gets or sets the triplet feel that is valid for this bar.


Name Value Summary
CalculateDuration() int
Calculates the time spent in this bar. (unit: midi ticks)