MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / addBeat

Method addBeat

packages/alphatab/src/model/Voice.ts:116–126  ·  view source on GitHub ↗
(beat: Beat)

Source from the content-addressed store, hash-verified

114 }
115
116 public addBeat(beat: Beat): void {
117 beat.voice = this;
118 beat.index = this.beats.length;
119 this.beats.push(beat);
120 if (!beat.isEmpty) {
121 this._isEmpty = false;
122 }
123 if (!beat.isRest) {
124 this._isRestOnly = false;
125 }
126 }
127
128 private _chain(beat: Beat, sharedDataBag: Map<string, unknown> | null = null): void {
129 if (!this.bar) {

Callers 15

insertNewBarMethod · 0.95
buildScoreFunction · 0.95
_buildModelMethod · 0.95
addGraceBeatMethod · 0.95
consolidateMethod · 0.95
readBeatMethod · 0.45
_parseVoiceMethod · 0.45
_clearBarMethod · 0.45
_insertBeatToVoiceMethod · 0.45
_barMethod · 0.45
_beatMethod · 0.45

Calls 1

pushMethod · 0.45

Tested by 1

buildScoreFunction · 0.76