API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classPitchShiftEffect

@codexo/exojs-audio-fx / audio / stable

Real-time pitch shifter (WorkletEffect) using SOLA — synchronized overlap-add. Each synthesis grain is realigned by waveform cross-correlation, so grain restarts stay phase coherent and the output pitch tracks the `pitch` ratio exactly across the whole 0.25x–4.0x range (a naive granular delay drifts the pitch instead). Quality: clean, in-tune shifting for tonal material. As with any time-domain method, sharp transients can smear or double slightly; for those a phase vocoder would do better at the cost of much more CPU and latency. Latency: ~one frame + search ≈ 30ms at the default 1024-sample grain (at 48kHz). Not suitable for live monitoring; fine for games / playback. Use cases: - Sound variation: random ±200 cent pitch on each footstep / bullet - Voice effects: chipmunk (1.5x) or demon (0.7x) for game NPCs - Detune layering: stack 0.99x and 1.01x for thick chorused sound

5
props
2
methods
0
events
Import
import { PitchShiftEffect } from '@codexo/exojs-audio-fx'

Real-time pitch shifter (WorkletEffect) using SOLA — synchronized overlap-add. Each synthesis grain is realigned by waveform cross-correlation, so grain restarts stay phase coherent and the output pitch tracks the `pitch` ratio exactly across the whole 0.25x–4.0x range (a naive granular delay drifts the pitch instead).

Quality: clean, in-tune shifting for tonal material. As with any time-domain method, sharp transients can smear or double slightly; for those a phase vocoder would do better at the cost of much more CPU and latency.

Latency: ~one frame + search ≈ 30ms at the default 1024-sample grain (at 48kHz). Not suitable for live monitoring; fine for games / playback.

Use cases: - Sound variation: random ±200 cent pitch on each footstep / bullet - Voice effects: chipmunk (1.5x) or demon (0.7x) for game NPCs - Detune layering: stack 0.99x and 1.01x for thick chorused sound

Constructors 1
new(options: PitchShiftEffectOptions): PitchShiftEffect
Methods 2
_onWorkletReady(): void
destroy(): void
Properties 5
inputNode: AudioNode
outputNode: AudioNode
pitch: number
ready: Promise<void>
wet: number
Source