RPE Chart Utils
    Preparing search index...

    Function offsetChart

    • Offset the entire chart by a number of beats.

      Shifts all note start/end times and all events (standard and extended) in every layer of every line by beatOffset. This is useful for inserting an intro or adjusting chart sync.

      Parameters

      • chart: RpeJson

        The RPE chart (modified in place).

      • beatOffset: number

        Beats to shift (positive = push later, negative = pull earlier).

      Returns RpeJson

      The chart (for chaining).

      // Add 4 beats of silence at the start
      offsetChart(chart, 4);

      // Trim 2 beats from the beginning (dangerous if notes exist before beat 2!)
      offsetChart(chart, -2);