UNPKG

mosfez-synth

Version:

A microtonal-aware synth engine library for web.

41 lines (36 loc) 1.2 kB
declare type ParamValue = number | string; declare type ParamValueObject = Record<string, ParamValue>; declare type ParamDefinition = number | string; declare type ParamDefinitionObject = Record<string, ParamDefinition>; declare type DspNodeSerialized = DspNodeFaustSerialized | DspNodePolySerialized; declare type DspNodeFaustSerialized = { type: "faust"; dsp: string; inputs: DspNodeSerialized[]; paramDefs: ParamDefinitionObject; }; declare type DspNodePolySerialized = { type: "poly"; input: DspNodeSerialized; polyphony: number; paramCacheSize?: number; release: ParamDefinition; gate: ParamDefinition; }; declare type InputSetEvent = { type: "set"; time: number; params: Partial<ParamValueObject>; }; declare type InputStopEvent = { type: "stop"; time: number; }; declare type InputEvent = InputSetEvent | InputStopEvent; declare type Props = { initialParams: Partial<ParamValueObject>; dspNodeSerialized: DspNodeSerialized; events: InputEvent[]; }; declare function offlineRenderSynthInner(offlineCtx: OfflineAudioContext, _source: AudioBufferSourceNode, props: Props): Promise<void>; export { offlineRenderSynthInner };