RPE Chart Utils
    Preparing search index...

    Function scaleEventTimes

    • Scale all event times around a pivot beat (mutates in place).

      Each event's startBeat and endBeat are rescaled relative to pivot. A factor of 2 doubles the duration; 0.5 halves it.

      Parameters

      Returns void

      // Slow down a phrase to half speed, anchored at beat 0
      scaleEventTimes(layer.rotateEvents ?? [], 0, 2);

      // Double tempo from beat 8 onwards, pivoting at beat 8
      scaleEventTimes(layer.moveYEvents ?? [], 8, 0.5);