Skip to content

Installation

pd4web can be installed as a Pure Data object or as a Python Package.

If you are a Pure Data user, use the Pd Patch (Graphical Interface). If you know how to do Python code (write code), them use the Python Package.


Pd Patch (Graphical Interface)

On Pure Data, pd4webprovides a simple GUI. To use the pd4web object in Pure Data, follow these steps:

  • 1) Open Pure Data.
  • 2) Go to ToolsFind Externals.
  • 3) Search for pd4web.
  • 4) Click Install.
  • 5) A patch will open automatically. Keep it open until you see the message [pd4web] Pd4Web initialized successfully.
  • 6) After you see the message, close Pd, open it again, them create a pd4web object. You will see a Graphical Interface similar to the image below.

pd4web


Python Package (Command Line)

If you're comfortable with the command line, you can use the pd4web package to compile your patches.

  • Set up in 10 seconds


    Use pip to install the pd4web package:

    pip install pd4web
    
  • Command Line Use


    You will get a executable script called pd4web.

    usage: pd4web <PureData Patch Path>
    

The options of the CLI are:

Flag Description Default
--help Print usage information -
--pd4web-folder <PATH> Pd4Web folder (with libraries, sources, etc.) -
-m, --initial-memory <MB> Initial memory size in megabytes 32
-z, --patch-zoom <ZOOM> Set patch zoom level 1
-o, --output-folder <PATH> Output folder Same as the patch being compiled
-c, --clear-before-compile Clear WebPatch and Pd4Web folders before compilation false
-t, --template-id <ID> Set template ID. See templates 0
-s, --server Start server for the given patch or current folder -
--evnk <LIST> Register extra PdLua objects for a virtual number keyboard on touch devices "nbx,floatatom"
--evtk <LIST> Register extra PdLua objects for a virtual text keyboard on touch devices "listatom,symbolatom"
--export-es6-module Export Pd4WebModule as an ES6 module for native import/export and TypeScript support false
--nogui Disable GUI interface false
--debug Activate debug compilation (faster compilation, slower execution, more error info) false
--devdebug Activate development debug compilation false
--failfast Fail on first error message true