Create a note and add it to a line.
Automatically converts the beat to a [measure, num, den] tuple and increments line.numOfNotes. For hold notes (type: 2), pass endBeat in options; it defaults to beat + 1.
[measure, num, den]
line.numOfNotes
type: 2
endBeat
options
beat + 1
The RPE chart (modified in place).
Index of the target line.
Start beat (fractional number, e.g. 2.5 = beat 2 and a half).
Note creation options.
The index of the new note within line.notes.
line.notes
addNote(chart, 0, 2); // tap at beat 2addNote(chart, 0, 4, { type: 3 }); // flick at beat 4addNote(chart, 0, 6, { type: 2, endBeat: 8 }); // hold beats 6–8addNote(chart, 0, 8, { positionX: -200, above: 2 }); // below the line, offset left Copy
addNote(chart, 0, 2); // tap at beat 2addNote(chart, 0, 4, { type: 3 }); // flick at beat 4addNote(chart, 0, 6, { type: 2, endBeat: 8 }); // hold beats 6–8addNote(chart, 0, 8, { positionX: -200, above: 2 }); // below the line, offset left
Create a note and add it to a line.
Automatically converts the beat to a
[measure, num, den]tuple and incrementsline.numOfNotes. For hold notes (type: 2), passendBeatinoptions; it defaults tobeat + 1.