A toolkit for Web Audio

Web Audio primitives.

Use what you need.

Playback, scheduling, effects, and reactive state for audio applications. Add individual primitives to your existing code, or compose them into an engine.

TypeScript APIs · Agent skills · Working examples
THE LANDING PAGE IS AN INSTRUMENT01—04
Loading the rhythm console…
Four voices. One shared audio engine.

Start a beat. Samplers, a clock, and effects keep it playing as you explore.

PlaybackReactive stateSchedulingDSP effectsSpatial audio

01 / Shared state

One source of
audio state.

Move the point in the canvas. The React controls follow. Both read and write the same audio parameters, so changes reach both views without a second store or synchronization code.

Loading the shared controls…

02 / Timing

Schedule ahead.
Stay on the beat.

Edit the beat you started above. Change tempo while it plays. The clock schedules notes ahead of playback using Web Audio time. The interface follows the time you hear.

Loading the pattern editor…

03 / Signal processing

Connect your
signal path.

Filter the beat, add an echo, or bypass the filter. The graph helper manages connections between processors as routing changes. Reactive parameters control each effect.

Loading the effects strip…

04 / The toolkit

Pick the pieces
your app needs.

Wrap one native audio parameter, add a player, or compose an engine like the groovebox above. Start with core and add packages when you need them.

One parameter. Your existing graph.

A standalone SchedulableParam wraps a native AudioParam. Keep your AudioContext and nodes, schedule changes with the Web Audio API, and expose a reactive value to your interface.

This example uses only @audiorective/core and its installed dependencies. It needs no engine, processor subclass, or UI binding.

Explore SchedulableParam ↗
IN YOUR EXISTING BROWSER AUDIO CODE
import { SchedulableParam } from "@audiorective/core";

const volume = new SchedulableParam({
  audioContext: ctx,
  audioParam: gain.gain,
  default: 0.5,
});

volume.setValueAtTime(0.5, ctx.currentTime);
volume.linearRampToValueAtTime(0, ctx.currentTime + 1);

Here, ctx is your AudioContext and gain is a connected GainNode. Read volume.value in your UI; call volume.destroy() when you remove the wrapper.

More than live playback

Render audio offline, align parallel paths with automatic delay compensation, and use sampler fades, reverse playback, and polyphony.

Playback, routing, and rendering ↗

Use your own renderer

The canvas above uses PixiJS with core directly. No Pixi-specific package is needed. Keep UI code separate from the audio engine.

Read the PixiJS guide ↗

05 / Build with agents

The patterns behind the API.

Agent skills guide your coding assistant through choosing primitives, scheduling audio, managing processor lifecycles, and connecting UI frameworks.

The skills link to the API documentation and explain how the pieces work together. You can read the same guidance and inspect the code your agent produces.

INSTALL THE AGENT SKILLS
npx skills add audiorective/audiorective

From a primitive to an application

The app-building skill covers playback, timing, and integration. The processor-authoring skill covers parameters, graph wiring, and cleanup for custom instruments and effects.

Read the skills ↗

Make it yours

Start with one primitive.

Install core, choose a primitive, and add it to your browser audio code. Follow the guide for a first playable tone, or explore the complete groovebox source.

START WITH CORE
npm install @audiorective/core

The groovebox also uses clock, effects, and React bindings.

Read the demo source ↗