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

Method insertBeat

packages/alphatab/src/model/Voice.ts:105–114  ·  view source on GitHub ↗
(after: Beat, newBeat: Beat)

Source from the content-addressed store, hash-verified

103 public shortestDuration = Duration.DoubleWhole;
104
105 public insertBeat(after: Beat, newBeat: Beat): void {
106 newBeat.nextBeat = after.nextBeat;
107 if (newBeat.nextBeat) {
108 newBeat.nextBeat.previousBeat = newBeat;
109 }
110 newBeat.previousBeat = after;
111 newBeat.voice = this;
112 after.nextBeat = newBeat;
113 this.beats.splice(after.index + 1, 0, newBeat);
114 }
115
116 public addBeat(beat: Beat): void {
117 beat.voice = this;

Callers 1

finishMethod · 0.80

Calls 1

spliceMethod · 0.45

Tested by

no test coverage detected