There is a newer version of the record available.

Published July 20, 2024 | Version 2.0.0-beta
Software Open

pd4web: Running PureData Patches in Browsers with Web Audio

Authors/Creators

Description

This is a complete rewrite of how pd4web works. I believe it offers a more simple approach, but yet quite similar from a coding perspective. However, it's still far from complete and there are many features still missing.

Main Changes

  • Now we use C++ and emscripten bind;

  • I embbed all necessary js code calls inside the c++ code, this means that now you just need to write the code below to make pd4web work.

<script src="./pd4web.js"></script>
<script>
  let Pd4Web = null;

  Pd4WebModule().then((Pd4WebModulePromise) => {
    Pd4Web = new Pd4WebModulePromise.Pd4Web();
    console.log("Pd4WebModule loaded");
  });

  Pd4Web.init();
</script>
  • Now we use cmake and pd.cmake to compile externals, this make compilation and adding externals more simple.

  • Now we build a Git repo for the PureData project. I believe this can be an excellent way to keep a project running over the years. Everything from the PureData code, the libraries code, the build script will be added to the project. And finally we create a Git repo.

  • Now once you compile the project, you can modify the index.html file that it will not be replaced, you also can add files inside the WebPatch folder. We will just modify these files. pd4web will not delete anything.

  1. pd4web.js
  2. pd4web.gui.js
  3. pd4web.threads.js
  4. pd4web.wasm
  5. pd4web.worker.js
  6. pd4web.ww.js;

In another words, just the 'binary' files.

Notes

If you use this software, please cite it as below.

Files

charlesneimog/pd4web-2.0.0-beta.zip

Files (627.0 kB)

Name Size Download all
md5:fbe0c5f628415f5118ba056d977bdf61
627.0 kB Preview Download

Additional details

Related works