Skip to main content

alphaTab.model.Beat

A beat is a single block within a bar. A beat is a combination of several notes played at the same time.

 class Beat

Properties​

absoluteDisplayStart​

(no description)

readonly absoluteDisplayStart: number;

absolutePlaybackStart​

(no description)

readonly absolutePlaybackStart: number;

automations​

Gets or sets a list of all automations on this beat.

automations: Automation[];

barreFret​

The fret of a barrΓ© being played on this beat.

barreFret: number;

barreShape​

The shape how the barre should be played on this beat.

barreShape: BarreShape;

beamingMode​

Gets or sets how the beaming should be done for this beat.

beamingMode: BeatBeamingMode;

brushDuration​

Gets or sets the duration of the brush between the notes in midi ticks.

brushDuration: number;

brushType​

Gets or sets the brush type applied to the notes of this beat.

brushType: BrushType;

chord​

(no description)

readonly chord: Chord | null;

chordId​

Gets or sets the ID of the chord used on this beat.

chordId: string | null;

crescendo​

Gets or sets whether a crescendo/decrescendo is applied on this beat.

crescendo: CrescendoType;

deadSlapped​

Whether this beat should rendered and played as "dead slapped".

deadSlapped: boolean;

displayDuration​

Gets or sets the duration that is used for the display of this beat. It defines the size/width of the beat in the music sheet. (unit: midi ticks).

displayDuration: number;

displayEnd​

The calculated visual end position of this beat in midi ticks.

readonly displayEnd: number;

displayStart​

The timeline position of the voice within the current bar as it is displayed. (unit: midi ticks) This might differ from the actual playback time due to special grace types.

displayStart: number;

dots​

Gets or sets the number of dots applied to the duration of this beat.

dots: number;

duration​

Gets or sets the duration of this beat.

duration: Duration;

dynamics​

Gets or sets the dynamics applied to this beat.

dynamics: DynamicValue;

effectSlurDestination​

(no description)

effectSlurDestination: Beat | null;

effectSlurOrigin​

(no description)

effectSlurOrigin: Beat | null;

fade​

Gets or sets a value indicating whether this beat is fade-in.

fade: FadeType;

fadeIn​

Gets a value indicating whether this beat is fade-in.

fadeIn: boolean;

fermata​

Gets or sets the fermata applied to this beat.

fermata: Fermata | null;

golpe​

The type of golpe to play.

golpe: GolpeType;

graceGroup​

Gets or sets the grace group this beat belongs to. If this beat is not a grace note, it holds the group which belongs to this beat.

graceGroup: GraceGroup | null;

graceIndex​

Gets or sets the index of this beat within the grace group if this is a grace beat.

graceIndex: number;

graceType​

Gets or sets the grace style of this beat.

graceType: GraceType;

hasChord​

(no description)

readonly hasChord: boolean;

hasRasgueado​

Gets or sets a value indicating whether the beat is played in rasgueado style.

readonly hasRasgueado: boolean;

hasTuplet​

(no description)

readonly hasTuplet: boolean;

hasWhammyBar​

(no description)

readonly hasWhammyBar: boolean;

id​

Gets or sets the unique id of this beat.

id: number;

index​

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

index: number;

invertBeamDirection​

Gets or sets a value indicating whether the beam direction should be inverted.

invertBeamDirection: boolean;

isBarre​

Gets a value indicating whether the beat should be played as BarrΓ©

readonly isBarre: boolean;

isContinuedWhammy​

Gets or sets whether this beat continues a whammy effect.

isContinuedWhammy: boolean;

isEffectSlurDestination​

(no description)

readonly isEffectSlurDestination: boolean;

isEffectSlurOrigin​

(no description)

isEffectSlurOrigin: boolean;

isEmpty​

Gets or sets a value indicating whether this beat is considered empty.

isEmpty: boolean;

isFullBarRest​

Gets a value indicating whether this beat is a full bar rest.

readonly isFullBarRest: boolean;

isLastOfVoice​

(no description)

readonly isLastOfVoice: boolean;

isLegatoDestination​

(no description)

readonly isLegatoDestination: boolean;

isLegatoOrigin​

Gets a value indicating whether this beat starts a legato slur.

isLegatoOrigin: boolean;

isLetRing​

Gets or sets whether any note in this beat has a let-ring applied.

isLetRing: boolean;

isPalmMute​

Gets or sets whether any note in this beat has a palm-mute applied.

isPalmMute: boolean;

isRest​

(no description)

readonly isRest: boolean;

isTremolo​

Whether this beat has a tremolo picking effect.

readonly isTremolo: boolean;

lyrics​

Gets or sets the lyrics shown on this beat.

lyrics: string[] | null;

maxNote​

Gets or sets the note with the highest pitch in this beat. Only visible notes are considered.

maxNote: Note | null;

maxStringNote​

Gets or sets the note with the highest string number in this beat. Only visible notes are considered.

maxStringNote: Note | null;

maxWhammyPoint​

Gets or sets the highest point with for the highest whammy bar value.

maxWhammyPoint: BendPoint | null;

minNote​

Gets or sets the note with the lowest pitch in this beat. Only visible notes are considered.

minNote: Note | null;

minStringNote​

Gets or sets the note with the lowest string number in this beat. Only visible notes are considered.

minStringNote: Note | null;

minWhammyPoint​

Gets or sets the highest point with for the lowest whammy bar value.

minWhammyPoint: BendPoint | null;

nextBeat​

Gets or sets the next beat within the whole song.

nextBeat: Beat | null;

notes​

Gets or sets the list of notes contained in this beat.

notes: Note[];

noteStringLookup​

Gets the lookup where the notes per string are registered. If this staff contains string based notes this lookup allows fast access.

readonly noteStringLookup: Map<number, Note>;

noteValueLookup​

Gets the lookup where the notes per value are registered. If this staff contains string based notes this lookup allows fast access.

readonly noteValueLookup: Map<number, Note>;

ottava​

Gets or sets the ottava applied to this beat.

ottava: Ottavia;

overrideDisplayDuration​

The duration in midi ticks to use for this beat on the displayDuration controlling the visual display of the beat. This is used in scenarios where the bar might not have 100% exactly a linear structure between the beats. e.g. in MusicXML when using <forward />.

overrideDisplayDuration?: number;

pickStroke​

Gets or sets the pickstroke applied on this beat.

pickStroke: PickStroke;

playbackDuration​

Gets or sets the duration that the note is played during the audio generation.

playbackDuration: number;

playbackStart​

The timeline position of the voice within the current bar as it is played. (unit: midi ticks) This might differ from the actual playback time due to special grace types.

playbackStart: number;

pop​

Gets or sets a value indicating whether the notes on this beat are played with a pop-style (bass).

pop: boolean;

preferredBeamDirection​

Gets or sets the preferred beam direction as specified in the input source.

preferredBeamDirection: BeamDirection | null;

previousBeat​

Gets or sets the previous beat within the whole song.

previousBeat: Beat | null;

rasgueado​

The Rasgueado pattern to play with this beat.

rasgueado: Rasgueado;

showTimer​

Whether to show the time when this beat is played the first time. (requires that the midi for the song is generated so that times are calculated). If no midi is generated the timer value might be filled from the input file (or manually).

showTimer: boolean;

slap​

Gets or sets a value indicating whether the notes on this beat are played with a slap-style (bass).

slap: boolean;

slashed​

Gets or sets whether this beat should be rendered as slashed note.

slashed: boolean;

style​

The style customizations for this item.

style?: BeatStyle;

tap​

Gets or sets a value indicating whether the notes on this beat are played with a tap-style (bass).

tap: boolean;

text​

Gets or sets the text annotation shown on this beat.

text: string | null;

timer​

The absolute time in milliseconds when this beat will be played the first time.

timer: number | null;

tremoloPicking​

The tremolo picking effect.

tremoloPicking?: TremoloPickingEffect;

tremoloSpeed​

The speed of the tremolo.

tremoloSpeed: Duration | null;

tupletDenominator​

Gets or sets the tuplet denominator.

tupletDenominator: number;

tupletGroup​

(no description)

tupletGroup: TupletGroup | null;

tupletNumerator​

Gets or sets the tuplet numerator.

tupletNumerator: number;

vibrato​

Gets or sets the vibrato effect used on this beat.

vibrato: VibratoType;

voice​

Gets or sets the reference to the parent voice this beat belongs to.

voice: Voice;

wahPedal​

Whether the wah pedal should be used when playing the beat.

wahPedal: WahPedal;

whammyBarPoints​

Gets or sets the points defining the whammy bar usage.

whammyBarPoints: BendPoint[] | null;

whammyBarType​

Gets or sets the whammy bar style of this beat.

whammyBarType: WhammyType;

whammyStyle​

Gets or sets which whammy bar style should be used for this bar.

whammyStyle: BendStyle;

Methods​

addNote​

(no description)

addNote(note: Note): void
ParameterSummary
noteAll

(no description)

addWhammyBarPoint​

(no description)

addWhammyBarPoint(point: BendPoint): void
ParameterSummary
pointAll

(no description)

chain​

(no description)

chain(sharedDataBag?: Map<string, unknown> | null): void
ParameterSummary
sharedDataBagAll

(no description)

finish​

(no description)

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

(no description)

sharedDataBagAll

(no description)

finishTuplet​

(no description)

finishTuplet(): void

getAutomation​

(no description)

getAutomation(type: AutomationType): Automation | null
ParameterSummary
typeAll

(no description)

getNoteOnString​

(no description)

getNoteOnString(noteString: number): Note | null
ParameterSummary
noteStringAll

(no description)

getNoteWithRealValue​

(no description)

getNoteWithRealValue(noteRealValue: number): Note | null
ParameterSummary
noteRealValueAll

(no description)

hasNoteOnString​

(no description)

hasNoteOnString(noteString: number): boolean
ParameterSummary
noteStringAll

(no description)

isAfter​

Checks whether the current beat is timewise after the given beat.

isAfter(beat: Beat): boolean
ParameterSummary
beatAll

(no description)

isBefore​

Checks whether the current beat is timewise before the given beat.

isBefore(beat: Beat): boolean
ParameterSummary
beatAll

(no description)

removeNote​

(no description)

removeNote(note: Note): void
ParameterSummary
noteAll

(no description)

removeWhammyBarPoint​

(no description)

removeWhammyBarPoint(index: number): void
ParameterSummary
indexAll

(no description)

updateDurations​

(no description)

updateDurations(): void