Menu

Reddit - Please wait for verification
πŸ“°
0

Reddit - Please wait for verification

TypeScriptΒ·/u/human_clown_shoeΒ·2 days ago
#mHZ2AMw5
Reading 0:00
15s threshold

I think one of the first instances I've heard people using pd/libpd for something that wasn't strictly about making music was for that classic game Spore. That game used pd as an audio-engine. I was then really surprised to notice it hadn't really, at least not successfully been ported to the browser. So I ported it and created TS-library that wraps libpd β€” Pure Data's embeddable audio runtime β€” compiled to WebAssembly, running inside an AudioWorklet. The API looks roughly like this: `` ts import { createPd } from "libpd-wasm"; import workletUrl from "libpd-wasm/assets/libpd-worklet.js?url"; const pd = await createPd({ packages: ["vanilla", "cyclone"], files: { "patch.pd": patchSource }, entry: "patch.pd", workletUrl, }); pd.connect(); pd.sendFloat("cutoff", 1200); pd.sendFloat("resonance", 0.7); `` The idea is that instead of writing complex DSP or audio logic in TS/JS (which isn't really possible to do…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More