@grame/faustwasm 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +10 -4
  2. package/assets/standalone/faust-ui/index.js +177 -247
  3. package/assets/standalone/faust-ui/index.js.map +1 -1
  4. package/assets/standalone/faustwasm/index.d.ts +6 -0
  5. package/assets/standalone/faustwasm/index.js +12 -4
  6. package/assets/standalone/faustwasm/index.js.map +2 -2
  7. package/assets/standalone/icon.png +0 -0
  8. package/assets/standalone/index-poly.js +11 -0
  9. package/assets/standalone/index.html +4 -2
  10. package/assets/standalone/index.js +11 -0
  11. package/assets/standalone/manifest.json +18 -0
  12. package/assets/standalone/service-worker.js +48 -0
  13. package/dist/cjs/index.d.ts +6 -0
  14. package/dist/cjs/index.js +12 -4
  15. package/dist/cjs/index.js.map +2 -2
  16. package/dist/cjs-bundle/index.d.ts +6 -0
  17. package/dist/cjs-bundle/index.js +12 -4
  18. package/dist/cjs-bundle/index.js.map +2 -2
  19. package/dist/esm/index.d.ts +6 -0
  20. package/dist/esm/index.js +12 -4
  21. package/dist/esm/index.js.map +2 -2
  22. package/dist/esm-bundle/index.d.ts +6 -0
  23. package/dist/esm-bundle/index.js +12 -4
  24. package/dist/esm-bundle/index.js.map +2 -2
  25. package/package.json +2 -2
  26. package/src/FaustAudioWorkletNode.ts +0 -3
  27. package/src/SoundfileReader.ts +16 -2
  28. package/src/copyWebStandaloneAssets.js +11 -1
  29. package/test/faustlive-wasm/faust-ui/index.js +177 -247
  30. package/test/faustlive-wasm/faust-ui/index.js.map +1 -1
  31. package/test/faustlive-wasm/faustwasm/index.d.ts +6 -0
  32. package/test/faustlive-wasm/faustwasm/index.js +12 -4
  33. package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
  34. package/test/osc2.dsp +1 -1
  35. package/0001-Invert-x-y-z-accelerometer-on-Android.patch +0 -194
  36. package/build +0 -17
package/README.md CHANGED
@@ -4,6 +4,10 @@ The FaustWasm library presents a convenient, high-level API that wraps around [F
4
4
 
5
5
  The library offers functionality for compiling Faust DSP code into WebAssembly, enabling its utilization as WebAudio nodes within a standard WebAudio node graph. Moreover, it supports offline rendering scenarios. Furthermore, supplementary tools can be employed for generating SVGs from Faust DSP programs.
6
6
 
7
+ Synthesizer and effect mono nodes, as well as [polyphonic](https://faustdoc.grame.fr/manual/midi/#midi-polyphony-support) poly nodes can be created. MIDI support is activated as soon as [MIDI metadata](https://faustdoc.grame.fr/manual/midi/#configuring-midi-in-faust) are used in the DSP code for mono nodes, and always in polyphonic mode.
8
+
9
+ [Sensors](https://faustdoc.grame.fr/manual/syntax/#sensors-control-metadatas) (accelerometer and gyroscope) are supported, as well as the [Progressive Web Application](https://en.wikipedia.org/wiki/Progressive_web_app) model.
10
+
7
11
  ## Usage
8
12
 
9
13
  Please use a stable version of [Node.js](https://nodejs.org) 16+ to work with this project.
@@ -55,21 +59,23 @@ node scripts/faust2wasm.js test/poly.dsp test/out -poly
55
59
  ```
56
60
  will create a set of files: `poly.js`, `poly.wasm`, `poly.json`, `poly.html` (and possibly `poly_effect.wasm`, `poly_effect.json`) in the `out` folder.
57
61
 
58
- You can create a standalone DSP on a web page using the same command line:
62
+ You can create a standalone Progressive Web Application using the same command line:
59
63
 
60
64
  ```bash
61
65
  rm -rf test/out # make sure you are under the faustwasm directory.
62
66
  node scripts/faust2wasm.js test/rev.dsp test/out -standalone
63
67
  ```
64
- will create a set of files: `rev.js`, `rev.wasm`, `rev.json`, `rev.html`, and the `faustwasm`, `faust-ui` folders in the `out` folder .
68
+ will create a set of files: `icon.png`, `service-worker.js`, `manifest.json`, `rev.js`, `rev.wasm`, `rev.json`, `index.html`, and the `faustwasm`, `faust-ui` folders in the `out` folder.
69
+
70
+ The folder contains the necessary ressources to deploy the Faust application as a PWA on a server, to be installed and used offline. Note that audio files used by the `soundfile` primitives in the DSP code will have to be mannually added in the folder.
65
71
 
66
- Or a standalone polyphonic DSP on a web page with:
72
+ A standalone polyphonic and MIDI standalone Progressive Web Application can be created with:
67
73
 
68
74
  ```bash
69
75
  rm -rf test/out # make sure you are under the faustwasm directory.
70
76
  node scripts/faust2wasm.js test/organ1.dsp test/out -standalone
71
77
  ```
72
- will create a set of files: `organ1.js`, `organ1.wasm`, `organ1.json`, `organ1_effect.wasm`, `organ1_effect.json`, `organ1.html`, and the `faustwasm`, `faust-ui` folders in the `out` folder.
78
+ will create a set of files: `icon.png`, `service-worker.js`, `manifest.json`, `organ1.js`, `organ1.wasm`, `organ1.json`, `organ1_effect.wasm`, `organ1_effect.json`, `index.html`, and the `faustwasm`, `faust-ui` folders in the `out` folder.
73
79
 
74
80
  #### Generate SVG Diagrams of a Faust DSP
75
81