@grame/faustwasm 0.0.58 → 0.0.59

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grame/faustwasm",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "description": "WebAssembly version of Faust Compiler",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/esm/index.d.ts",
@@ -31,6 +31,7 @@ const faust2wasmFiles = async (inputFile, outputDir, argv = [], poly = false) =>
31
31
  const dspName = fileName.replace(/\.dsp$/, '');
32
32
 
33
33
  if (!argv.find(a => a === "-I")) argv.push("-I", "libraries/");
34
+ argv.push("-ftz", "2");
34
35
  const dspModulePath = path.join(outputDir, `${dspName}.wasm`);
35
36
  const dspMetaPath = path.join(outputDir, `${dspName}.json`);
36
37
  const effectModulePath = path.join(outputDir, `${dspName}_effect.wasm`);
@@ -58,7 +59,6 @@ const faust2wasmFiles = async (inputFile, outputDir, argv = [], poly = false) =>
58
59
  dspModule = voiceFactory.code;
59
60
  dspMeta = JSON.parse(voiceFactory.json);
60
61
  mixerModule = mixerBuffer;
61
-
62
62
  if (effectFactory) {
63
63
  effectModule = effectFactory.code;
64
64
  effectMeta = JSON.parse(effectFactory.json);
package/test/bug/bug.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "bug",
3
3
  "filename": "bug",
4
4
  "version": "2.72.4",
5
- "compile_options": "-lang wasm-e -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0",
5
+ "compile_options": "-lang wasm-e -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 2",
6
6
  "library_list": [
7
7
  "/usr/share/faust/stdfaust.lib",
8
8
  "/usr/share/faust/oscillators.lib",
@@ -17,12 +17,11 @@
17
17
  "."
18
18
  ],
19
19
  "size": 76,
20
- "code": "yEOP",
21
20
  "inputs": 0,
22
21
  "outputs": 2,
23
22
  "meta": [
24
23
  {
25
- "compile_options": "-lang wasm-e -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0"
24
+ "compile_options": "-lang wasm-e -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 2"
26
25
  },
27
26
  {
28
27
  "envelopes.lib/adsr:author": "Yann Orlarey and Andrey Bundin"
@@ -63,6 +62,9 @@
63
62
  {
64
63
  "name": "bug"
65
64
  },
65
+ {
66
+ "options": "[midi:on][nvoices:12]"
67
+ },
66
68
  {
67
69
  "oscillators.lib/name": "Faust Oscillator Library"
68
70
  },
package/test/bug/bug.wasm CHANGED
Binary file
@@ -2,7 +2,7 @@
2
2
  "name": "bug",
3
3
  "filename": "bug",
4
4
  "version": "2.72.4",
5
- "compile_options": "-lang wasm-e -inpl -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0",
5
+ "compile_options": "-lang wasm-e -inpl -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 2",
6
6
  "library_list": [
7
7
  "/usr/share/faust/stdfaust.lib",
8
8
  "/usr/share/faust/oscillators.lib",
@@ -22,7 +22,7 @@
22
22
  "outputs": 2,
23
23
  "meta": [
24
24
  {
25
- "compile_options": "-lang wasm-e -inpl -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0"
25
+ "compile_options": "-lang wasm-e -inpl -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 2"
26
26
  },
27
27
  {
28
28
  "envelopes.lib/adsr:author": "Yann Orlarey and Andrey Bundin"
@@ -63,6 +63,9 @@
63
63
  {
64
64
  "name": "bug"
65
65
  },
66
+ {
67
+ "options": "[midi:on][nvoices:12]"
68
+ },
66
69
  {
67
70
  "oscillators.lib/name": "Faust Oscillator Library"
68
71
  },
Binary file
@@ -3645,16 +3645,13 @@ var _FaustPolyDspGenerator = class {
3645
3645
  if (this.effectFactory) {
3646
3646
  const effectJSON = JSON.parse(this.effectFactory.json);
3647
3647
  const dspCode = `
3648
- // Voice output is forced to 2 as soon as effect has 2 ins or 2 outs,
3648
+ // Voice output is forced to 2, when DSP is stereo or effect has 2 ins or 2 outs,
3649
3649
  // so that the effect can process the 2 channels of the voice
3650
3650
  adaptOut(1,1,1) = _;
3651
3651
  adaptOut(1,1,2) = _ <: _,_;
3652
3652
  adaptOut(1,2,1) = _ <: _,_;
3653
3653
  adaptOut(1,2,2) = _ <: _,_;
3654
-
3655
- //adaptOut(2,1,1) = _,_ :> _;
3656
3654
  adaptOut(2,1,1) = _,_;
3657
-
3658
3655
  adaptOut(2,1,2) = _,_;
3659
3656
  adaptOut(2,2,1) = _,_;
3660
3657
  adaptOut(2,2,2) = _,_;
@@ -3669,9 +3666,7 @@ var _FaustPolyDspGenerator = class {
3669
3666
  adaptIn(1,1,2) = _,*(0) :> _; // The voice output was duplicated, so only one channel has to be kept
3670
3667
  adaptIn(1,2,1) = _,_;
3671
3668
  adaptIn(1,2,2) = _,_;
3672
-
3673
3669
  adaptIn(2,1,1) = _,_ :> _;
3674
-
3675
3670
  adaptIn(2,1,2) = _,_ :> _;
3676
3671
  adaptIn(2,2,1) = _,_;
3677
3672
  adaptIn(2,2,2) = _,_;