Skip to content

charlesneimog/pd4web

Repository files navigation

PdWebCompiler

Logo

Running Pd Patches in Your Web Browser.

Release Downloads Version

License

Intro


PdWebCompiler allows to run PureData patches in web browsers using Web Audio technologies. This tool stands out from other approaches like hvcc and WebPd because it compiles the libpd source, this is possible mainly because of the work of claudeha. You can compile any PureData vanilla patch and most of the externals.

⚠️ Warning: Breaking Changes Ahead ⚠️

The project is very recent, so can be very hard breaking changes for sometime.

Already Supported Library Externals


Library Not Supported Number of Objects
else sfont~, plaits~, sfz~ 509
cyclone - ± 197
convolve~ - 1
timbreIDLib - 109

So, for now, we have more than 800 supported externals objects.

  • Note: Some objects, mainly due to dynamic libraries or GUI componets, are not supported yet. Feel free to submit a Pull Request to add support for them.

Running Your Patch on the Internet


To make your patch available online, follow these steps:

1. Install Python (first-time setup)

  • Linux: apt install python3.11, dnf install python3.11, etc.
  • MacOS: Download and install Python from the Python website.
  • Windows: winget install -e --id Python.Python.3.11 or go to Python website

2. Then Install pd2wasm (first-time setup)

pip install pd2wasm

3. Now, it is just to compile your patch

pd2wasm --patch ./YOUR_PATCH.pd --server-port 8080

Making a Pull Request


Join us in contributing to this repository! Explore the primary areas for your valuable contributions:

  • The pd2wasm/lib/ folder, which contains files with special steps for compiling certain externals/libraries.
  • The pd2wasm/src/template.c, used to PdWebCompiler to build the main.c file.
  • The pd2wasm/resources/PdWebCompiler.py, which configures the main.c file.