webpd
Version:
WebPd is a compiler for audio programming language Pure Data allowing to run .pd patches on web pages.
14 lines (13 loc) • 834 B
TypeScript
import { PdJson } from '@webpd/pd-parser';
import { AbstractionLoader } from '../compile-dsp-graph/instantiate-abstractions';
import { Artefacts } from './types';
/**
* A helper to build an abstraction loader.
* @param pdFileLoader takes a node type and returns the corresponding pd file.
* If the pd file could not be found, the function must throw an UnknownNodeTypeError.
*/
export declare const makeAbstractionLoader: (pdFileLoader: (nodeType: PdJson.NodeType) => Promise<string>) => AbstractionLoader;
export declare class UnknownNodeTypeError extends Error {
}
export declare const getArtefact: <K extends "pd" | "pdJson" | "dspGraph" | "javascript" | "assemblyscript" | "wasm" | "wav" | "app">(artefacts: Artefacts, outFormat: K) => Artefacts[K];
export declare const stringifyArrayBuffer: (buffer: ArrayBuffer) => string;