RPE Chart Utils
    Preparing search index...

    Function addNote

    • 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.

      Parameters

      • chart: RpeJson

        The RPE chart (modified in place).

      • lineIndex: number

        Index of the target line.

      • beat: number

        Start beat (fractional number, e.g. 2.5 = beat 2 and a half).

      • options: CreateNoteOptions = {}

        Note creation options.

      Returns number

      The index of the new note within line.notes.

      addNote(chart, 0, 2);                               // tap at beat 2
      addNote(chart, 0, 4, { type: 3 }); // flick at beat 4
      addNote(chart, 0, 6, { type: 2, endBeat: 8 }); // hold beats 6–8
      addNote(chart, 0, 8, { positionX: -200, above: 2 }); // below the line, offset left