API reference

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

C

classAudioGenerator

@codexo/exojs / audio / stable

Procedural tone generator — produces audio from an `OscillatorNode` without any decoded asset. Good for prototyping, game-jam SFX, retro bleeps, and synth-style tones. `AudioGenerator` is a **data descriptor**: it holds the current synth settings (`frequency`, `type`, `detune`, `envelope`) and default playback parameters. Each `AudioManager.play(generator, options)` snapshots those settings into a fresh AudioGeneratorVoice and returns it. For per-note playback, set `generator.frequency` (or use AudioGenerator.setNote) before playing: ```ts generator.setNote(69); // A4 const voice = app.audio.play(generator); // ...later voice.frequency = 880; // retune the live voice voice.stop(); // triggers the envelope release, if any ``` Routes through the manager's `sound` bus by default.

9
props
5
methods
0
events
Import
import { AudioGenerator } from '@codexo/exojs'

Procedural tone generator — produces audio from an `OscillatorNode` without any decoded asset. Good for prototyping, game-jam SFX, retro bleeps, and synth-style tones.

`AudioGenerator` is a **data descriptor**: it holds the current synth settings (`frequency`, `type`, `detune`, `envelope`) and default playback parameters. Each `AudioManager.play(generator, options)` snapshots those settings into a fresh AudioGeneratorVoice and returns it. For per-note playback, set `generator.frequency` (or use AudioGenerator.setNote) before playing:

```ts generator.setNote(69); // A4 const voice = app.audio.play(generator); // ...later voice.frequency = 880; // retune the live voice voice.stop(); // triggers the envelope release, if any ```

Routes through the manager's `sound` bus by default.

Constructors 1
new(options: AudioGeneratorOptions): AudioGenerator
Methods 5
_createVoice(manager: AudioManager, options: PlayOptions): Voice
destroy(): void
setNote(midiNote: number): this
stopAll(): this
midiToFrequency(midiNote: number): number
Properties 9
detune: number
envelope: Envelope | null
frequency: number
muted: boolean
priority: number
type: OscillatorType
volume: number
poolSize: number
poolStrategy: SoundPoolStrategy
Source