@grame/faustwasm 0.5.1 → 0.5.3

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.3",
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);
@@ -75,8 +75,6 @@ export interface UpdatableValueConverter extends ValueConverter {
75
75
  getActive(): boolean;
76
76
  }
77
77
 
78
-
79
-
80
78
  export default class FaustSensors {
81
79
  /**
82
80
  * Function to convert a number to an axis type
@@ -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(" "));