/**
 * Builds the Web Audio graph for an FX chain, one builder per `web` id in the
 * core registry.
 *
 * Every node exposes `update`, so turning a dial re-parameterises the running
 * graph instead of rebuilding it. That is the whole point of previewing in the
 * browser: an AudioParam change lands on the next 128-sample render quantum,
 * about 2.7 ms at 48 kHz, so the knob-to-ear loop is immediate.
 */
import { type HfAudioFxChain, type HfAudioFxParamValues } from "../audioFx.js";
import { audioFxWorkletsReady, ensureAudioFxWorklets } from "./audioFxWorklets.js";
/**
 * Deterministic reverb impulse, shared by both engines so the browser and the
 * render convolve the identical response. Exponentially-decaying noise with a
 * one-pole lowpass standing in for air absorption; the PRNG is seeded from the
 * parameters so the same room always produces the same tail.
 */
export declare function synthesizeReverbImpulse(sampleRate: number, size: number, damping: number): Float32Array;
/**
 * Where an automation lane writes when it drives one knob.
 *
 * A knob is not always one AudioParam. A wet/dry mix is two gains moving in
 * opposition, and a knob in milliseconds drives a delay time in seconds, so
 * each target carries its own mapping out of the knob's declared unit.
 */
export interface FxParamTarget {
    param: AudioParam;
    map?: (value: number) => number;
}
export interface FxNodeHandle {
    input: AudioNode;
    output: AudioNode;
    update(params: HfAudioFxParamValues): void;
    /**
     * AudioParams behind the knobs the registry marks `automatable`, keyed by
     * parameter key. Absent for a node whose values cannot be scheduled.
     */
    automation?: Record<string, FxParamTarget[]>;
    dispose(): void;
}
/** Effect ids whose Web Audio node needs a worklet module registered first. */
export declare function chainNeedsWorklets(chain: HfAudioFxChain): boolean;
export declare function buildFxNode(ctx: BaseAudioContext, type: string, params: HfAudioFxParamValues, elapsed?: number): FxNodeHandle;
export interface FxChainHandle {
    input: AudioNode;
    output: AudioNode;
    /** Built effects in chain order, carrying the node ids lanes address. */
    nodes: {
        id?: string;
        type: string;
        handle: FxNodeHandle;
    }[];
    /**
     * The wet/dry blend around each preset run, by preset id — where a
     * whole-preset lane writes. Two gains in opposition, the same shape
     * `mixTargets` builds for an effect's own mix knob.
     */
    presets: Record<string, FxParamTarget[]>;
    /** Re-parameterise in place when the shape is unchanged; false if a rebuild is needed. */
    update(chain: HfAudioFxChain): boolean;
    dispose(): void;
}
/**
 * Build the whole chain in series. Returns a handle whose `input`/`output` can
 * be spliced into any graph; an empty chain yields a pass-through.
 *
 * `elapsed` is where in the clip this is being built — see `Builder`. It only
 * reaches the modulated effects, and only matters when the graph is built after
 * the audio has already started.
 */
export declare function buildFxChain(ctx: BaseAudioContext, chain: HfAudioFxChain, elapsed?: number): FxChainHandle;
export { audioFxWorkletsReady, ensureAudioFxWorklets };
//# sourceMappingURL=audioFxGraph.d.ts.map