@grame/faustwasm 0.5.1 → 0.5.2

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.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "WebAssembly version of Faust Compiler",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/esm/index.d.ts",
@@ -40,5 +40,4 @@ if ($sr !== -1) sampleRate = +argv.splice($sr, 2)[1];
40
40
 
41
41
  const [inputFile, outputWav, ...argvFaust] = argv;
42
42
 
43
-
44
43
  faust2wavFiles(inputFile, inputWav, outputWav, bufferSize, sampleRate, samples, bitDepth, argvFaust);
@@ -26,7 +26,6 @@ const faust2svgFiles = async (inputFile, outputDir, argv = []) => {
26
26
  const code = fs.readFileSync(inputFile, { encoding: "utf8" });
27
27
  const { name } = path.parse(inputFile);
28
28
  const diagram = new FaustSvgDiagrams(compiler);
29
- if (!argv.find(a => a === "-I")) argv.push("-I", "libraries/");
30
29
  const svgs = diagram.from(name, code, argv.join(" "));
31
30
  console.log(`Generated ${Object.keys(svgs).length} files.`);
32
31
  console.log(`Writing files to ${outputDir}`);
@@ -31,8 +31,7 @@ const faust2wasmFiles = async (inputFile, outputDir, argv = [], poly = false) =>
31
31
 
32
32
  const fileName = /** @type {string} */(inputFile.split('/').pop());
33
33
  const dspName = fileName.replace(/\.dsp$/, '');
34
-
35
- if (!argv.find(a => a === "-I")) argv.push("-I", "libraries/");
34
+ // Flush to zero to avoid costly denormalized numbers
36
35
  argv.push("-ftz", "2");
37
36
  const dspModulePath = path.join(outputDir, `dsp-module.wasm`);
38
37
  const dspMetaPath = path.join(outputDir, `dsp-meta.json`);
@@ -32,7 +32,6 @@ const faust2wavFiles = async (inputFile, inputWav, outputWav, bufferSize = 64, s
32
32
  console.log(`Faust Compiler version: ${compiler.version()}`);
33
33
  console.log(`Reading file ${inputFile}`);
34
34
  const code = fs.readFileSync(inputFile, { encoding: "utf8" });
35
- if (!argv.find(a => a === "-I")) argv.push("-I", "libraries/");
36
35
  const { name } = path.parse(inputFile);
37
36
  const gen = new FaustMonoDspGenerator();
38
37
  await gen.compile(compiler, name, code, argv.join(" "));
package/build DELETED
@@ -1,25 +0,0 @@
1
- node scripts/faust2wasm.js /Users/letz/Developpements/GameLAN/atomicro/atomicro.dsp /Users/letz/Developpements/sletz.github.io/atomicro -pwa
2
-
3
- node scripts/faust2wasm.js /Users/letz/Developpements/GameLAN/attackey/attackey.dsp /Users/letz/Developpements/sletz.github.io/attackey -pwa
4
-
5
- node scripts/faust2wasm.js /Users/letz/Developpements/GameLAN/baliphone/baliphone.dsp /Users/letz/Developpements/sletz.github.io/baliphone -pwa
6
-
7
- node scripts/faust2wasm.js /Users/letz/Developpements/GameLAN/drone/drone.dsp /Users/letz/Developpements/sletz.github.io/drone -pwa
8
-
9
- node scripts/faust2wasm.js /Users/letz/Developpements/GameLAN/sequenceur/sequenceur.dsp /Users/letz/Developpements/sletz.github.io/sequenceur -pwa
10
-
11
- node scripts/faust2wasm.js /Users/letz/Developpements/GameLAN/shakerxy/shakerxy.dsp /Users/letz/Developpements/sletz.github.io/shakerxy -pwa
12
-
13
- node scripts/faust2wasm.js /Users/letz/Developpements/GameLAN/sinusoide/sinusoide.dsp /Users/letz/Developpements/sletz.github.io/sinusoide -pwa
14
-
15
-
16
- #node scripts/faust2wasm.js /Users/letz/Developpements/GameLAN/test.dsp /Users/letz/Developpements/sletz.github.io/out -standalone
17
- #node scripts/faust2wasm.js test/organ.dsp /Users/letz/Developpements/sletz.github.io/organ -poly -standalone
18
-
19
- #node scripts/faust2wasm.js test/organ1.dsp /Users/letz/Developpements/sletz.github.io/organ1 -poly -standalone
20
-
21
- #node scripts/faust2wasm.js test/osc2.dsp /Users/letz/Developpements/sletz.github.io/osc2 -standalone
22
-
23
- #node scripts/faust2wasm.js /Users/letz/Developpements/faust-sampler/sampler.dsp /Users/letz/Developpements/sletz.github.io/sampler -poly -standalone
24
-
25
- #node scripts/faust2wasm.js /Users/letz/Developpements/faust-sampler/piano.dsp /Users/letz/Developpements/sletz.github.io/piano -poly -standalone