@suaveplan/audio-fx-plugin-base - Foundation for the @suaveplan/audio-fx-plugin-family. Exports the AudioFxPlugin contract, PluginChain primitive, ChainContext, AmbientState, BusRegistry, PluginRegistry, ChainSnapshot, ChainEventBus, ParameterSchedule, PresetSnapshot, and the shared AUDIO_FX. error-code registry. Runs identically in browser, server, offline, and worklet contexts.
Foundation for the @suaveplan/audio-fx-plugin-* family. Universal (browser / server / offline / worklet identical). Zero @suaveplan/audio-fx-plugin-* deps — concrete plugins depend on this package, never the other way around.
Documentation tree
- plugin-internals — The
plugin-internalsmodule owns the boundary guards + parameter validation helpers consumed by `AbstractAudioFxP…- plugin-internals — The
plugin-internalsmodule owns the boundary guards + parameter validation helpers consumed by `AbstractAudioFxP…
- plugin-internals — The
- audio-fx-plugin — This module defines the universal
AudioFxPlugincontract every plugin in the audio family implements, plu… - capabilities —
PluginCapabilitiesis the explicit feature-flag declaration everyAudioFxPlugincarries. Engines route audio th… - parameter-schedule —
ParameterScheduleis the per-parameter automation evaluator every plugin uses. One instance per `(plugin, paramet… - plugin-io — The
plugin-iomodule declares the channel-topology contract everyAudioFxPlugincarries (PluginIo, `ChannelSp… - preset — The
presetmodule owns the plugin preset envelope —PresetSnapshot— and the three boundary guards every plugin… - biquad — The
eq.biquadmodule owns the RBJ Audio EQ Cookbook coefficient maths and the per-band biquad state shapes consum…- biquad — The
eq.biquadmodule owns the RBJ Audio EQ Cookbook coefficient maths and the per-band biquad state shapes consum…
- biquad — The
- chain —
PluginChainis the universal insert-list primitive that engines and headless callers use to compose, host, and re…- context —
ChainContextFactorybuilds oneChainContextper plugin slot for thePluginChainclass. The handed-out reference i…- context —
ChainContextFactorybuilds oneChainContextper plugin slot for thePluginChainclass. The handed-out reference i…
- context —
- event-bus — The
chain-event-busmodule owns the typed pub/sub plumbing consumed byPluginChain. Splitting it out of the cha…- event-bus — The
chain-event-busmodule owns the typed pub/sub plumbing consumed byPluginChain. Splitting it out of the cha…
- event-bus — The
- insert — The
chain-insertmodule owns the structural validation + slot-index resolution + scratch-buffer allocation helper…- insert — The
chain-insertmodule owns the structural validation + slot-index resolution + scratch-buffer allocation helper…
- insert — The
- lifecycle — The
lifecyclemodule owns the per-block / per-setup helpers thatPluginChaincalls duringsetup,process, `…- lifecycle — The
lifecyclemodule owns the per-block / per-setup helpers thatPluginChaincalls duringsetup,process, `…
- lifecycle — The
- snapshot — The
chain-snapshotmodule owns thePluginChainserialisation envelope and the boundary helpers that round-trip…- snapshot — The
chain-snapshotmodule owns thePluginChainserialisation envelope and the boundary helpers that round-trip…
- snapshot — The
- ambient-state — This module owns the engine-pushed ambient state every
PluginChaincarries and forwards to every plugin via `Chai… - bus-registry — The
BusRegistryis the project-level sidechain routing surface that every chain hosted by an engine adapter consu… - chain —
PluginChainis the universal insert-list primitive that engines and headless callers use to compose, host, and re…
- context —
- error-codes — The
error-codesmodule declares the complete error code surface for@suaveplan/audio-fx-plugin-basevia `defineCode…- error-codes — The
error-codesmodule declares the complete error code surface for@suaveplan/audio-fx-plugin-basevia `defineCode…
- error-codes — The
- registry — The
PluginRegistryis the session-restore lookup table that maps a serialisedpluginTypestring (a plugin's `me…- registry — The
PluginRegistryis the session-restore lookup table that maps a serialisedpluginTypestring (a plugin's `me…
- registry — The
What's in here
./base— theAudioFxPlugincontract,AbstractAudioFxPluginhelper,PluginCapabilities/PluginIo/PluginMetadata/PluginParametertypes,ParameterSchedule,PresetSnapshotZod schema, and channel-layout utilities../chain—PluginChainprimitive,ChainContext,AmbientStatepropagation,DefaultBusRegistry,ChainSnapshot(parse + serialise),ChainEventBus, insertion / lifecycle helpers../registry—PluginRegistryfor factory-driven plugin instantiation../error-codes— the sharedAUDIO_FX.*error-code registry viadefineCodes,AudioFxErrorcarrier,AUDIO_FX_ERROR_METADATAtable, andregisterAudioFxErrorCodes()for early-registration callers.
Composition
Every concrete @suaveplan/audio-fx-plugin-<name> package depends on this one and imports the contract:
import { AbstractAudioFxPlugin } from "@suaveplan/audio-fx-plugin-base/base";
import { PluginChain, DefaultBusRegistry } from "@suaveplan/audio-fx-plugin-base/chain";
import { PluginRegistry } from "@suaveplan/audio-fx-plugin-base/registry";
import { AUDIO_FX_CODES, AudioFxError } from "@suaveplan/audio-fx-plugin-base/error-codes";
Consumers compose a chain from per-plugin packages:
import { EqPlugin } from "@suaveplan/audio-fx-plugin-eq";
import { CompressorPlugin } from "@suaveplan/audio-fx-plugin-compressor";
import { ReverbPlugin } from "@suaveplan/audio-fx-plugin-reverb";
import { PluginChain, DefaultBusRegistry } from "@suaveplan/audio-fx-plugin-base/chain";
const chain = new PluginChain({
buses: new DefaultBusRegistry(),
plugins: [new EqPlugin(), new CompressorPlugin(), new ReverbPlugin()],
});
The chain accepts any AudioFxPlugin without per-plugin glue — the contract is the single point of agreement.
Subpath exports
| Subpath | Surface |
|---|---|
. |
Re-exports every public symbol from the four feature folders below |
./base |
AudioFxPlugin, AbstractAudioFxPlugin, capabilities, IO, parameter, preset |
./chain |
PluginChain, ChainContext, AmbientState, BusRegistry, ChainSnapshot, event-bus, insert, lifecycle |
./registry |
PluginRegistry, PluginFactory |
./error-codes |
AUDIO_FX_CODES, AudioFxError, AUDIO_FX_ERROR_METADATA, registerAudioFxErrorCodes |
Status
Replaces the foundation surface previously bundled inside @suaveplan/audio-plugins-fx.