RPE Chart Utils
    Preparing search index...

    Function addSpeedEvent

    • Add a speed (note scroll speed) event to a specific event layer of a line.

      Speed controls how fast notes approach the line. The default is 10. Speed events only accept a constant easingType of 1 (linear — they step, not interpolate, in most RPE engine versions).

      Parameters

      • chart: RpeJson

        Chart (modified in place).

      • lineIndex: number

        Line index.

      • layerIndex: number

        Event layer index (0 = first layer).

      • startBeat: number

        Fractional beat where the speed takes effect.

      • endBeat: number

        Fractional beat where this segment ends.

      • startVal: number

        Speed at startBeat.

      • endVal: number

        Speed at endBeat.

      • easingType:
            | number
            | "linear"
            | "sineOut"
            | "sineIn"
            | "quadOut"
            | "quadIn"
            | "sineInOut"
            | "quadInOut"
            | "cubicOut"
            | "cubicIn"
            | "quartOut"
            | "quartIn"
            | "cubicInOut"
            | "quartInOut"
            | "quintOut"
            | "quintIn"
            | "expoOut"
            | "expoIn"
            | "circOut"
            | "circIn"
            | "backOut"
            | "backIn"
            | "circInOut"
            | "backInOut"
            | "elasticOut"
            | "elasticIn"
            | "bounceOut"
            | "bounceIn"
            | "bounceInOut" = 1

        Easing type (default: 1 = linear).

      • options: SpeedEventOptions = {}

      Returns void

      // Constant speed 10 for the whole chart
      addSpeedEvent(chart, 0, 0, 0, 999, 10, 10);

      // Slow section: speed 5 for beats 8–16
      addSpeedEvent(chart, 0, 0, 8, 16, 5, 5);