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

Method nextNoteOnSameLine

packages/alphatab/src/model/Note.ts:1101–1112  ·  view source on GitHub ↗
(note: Note)

Source from the content-addressed store, hash-verified

1099 private static readonly _maxOffsetForSameLineSearch: number = 3;
1100
1101 public static nextNoteOnSameLine(note: Note): Note | null {
1102 let nextBeat: Beat | null = note.beat.nextBeat;
1103 // keep searching in same bar
1104 while (nextBeat && nextBeat.voice.bar.index <= note.beat.voice.bar.index + Note._maxOffsetForSameLineSearch) {
1105 const noteOnString: Note | null = nextBeat.getNoteOnString(note.string);
1106 if (noteOnString) {
1107 return noteOnString;
1108 }
1109 nextBeat = nextBeat.nextBeat;
1110 }
1111 return null;
1112 }
1113
1114 static findHammerPullDestination(note: Note): Note | null {
1115 // For Hammer-Pull destinations we have 2 potential candidates

Callers 1

finishMethod · 0.80

Calls 1

getNoteOnStringMethod · 0.80

Tested by

no test coverage detected