libpd-wasm
v0.1.6
Published
Run Pure Data patches in browser AudioWorklets with libpd/WebAssembly.
Downloads
37
Readme
libpd-wasm
Run Pure Data patches in browser AudioWorklets with libpd/WebAssembly.
This package is browser-focused. It provides a small TypeScript API plus prebuilt AudioWorklet runtime assets for vanilla Pd, cyclone, ELSE, and a full bundle containing both external libraries.
import { createPd } from "libpd-wasm";
import workletUrl from "libpd-wasm/assets/libpd-worklet.js?url";
const pd = await createPd({
packages: ["vanilla"],
files: {
"patch.pd": patchSource,
},
entry: "patch.pd",
workletUrl,
});
pd.connect();
pd.sendBang("start");The worklet URL must be served by your browser bundler or app server. With Vite,
the ?url import form above serves the file from the installed npm package.
See the repository README for build details, bundled external-library notes, and current limitations: https://github.com/hyrfilm/libpd-wasm
