@logue/reverb 1.2.7 → 1.2.8

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/dist/Reverb.es.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2019-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.2.7
8
+ * @version 1.2.8
9
9
  * @see {@link https://github.com/logue/Reverb.js}
10
10
  */
11
11
 
@@ -30,8 +30,8 @@ const defaults = {
30
30
  };
31
31
 
32
32
  const meta = {
33
- version: "1.2.7",
34
- date: "2023-03-10T12:40:23.409Z"
33
+ version: "1.2.8",
34
+ date: "2023-03-17T13:26:16.751Z"
35
35
  };
36
36
 
37
37
  const Noise = {
@@ -319,8 +319,8 @@ class Reverb {
319
319
  } else {
320
320
  n = this.options.reverse ? duration - i : i;
321
321
  }
322
- impulseL[i] = noiseL[i] * (1 - n / duration) ** this.options.decay;
323
- impulseR[i] = noiseR[i] * (1 - n / duration) ** this.options.decay;
322
+ impulseL[i] = (noiseL[i] ?? 0) * (1 - n / duration) ** this.options.decay;
323
+ impulseR[i] = (noiseR[i] ?? 0) * (1 - n / duration) ** this.options.decay;
324
324
  }
325
325
  impulse.getChannelData(0).set(impulseL);
326
326
  impulse.getChannelData(1).set(impulseR);
@@ -335,11 +335,11 @@ class Reverb {
335
335
  return [
336
336
  ...take(
337
337
  duration,
338
- this.noise(
339
- this.options.peaks,
340
- this.options.scale,
341
- this.options.randomAlgorithm
342
- )
338
+ this.noise({
339
+ bins: this.options.peaks,
340
+ scale: this.options.scale,
341
+ rnd: this.options.randomAlgorithm
342
+ })
343
343
  )
344
344
  ];
345
345
  }
@@ -5,7 +5,7 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2019-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.2.7
8
+ * @version 1.2.8
9
9
  * @see {@link https://github.com/logue/Reverb.js}
10
10
  */
11
11
 
@@ -29,8 +29,8 @@ var Reverb = (function (random, coloredNoise, transducers) {
29
29
  };
30
30
 
31
31
  const meta = {
32
- version: "1.2.7",
33
- date: "2023-03-10T12:40:23.409Z"
32
+ version: "1.2.8",
33
+ date: "2023-03-17T13:26:16.751Z"
34
34
  };
35
35
 
36
36
  const Noise = {
@@ -318,8 +318,8 @@ var Reverb = (function (random, coloredNoise, transducers) {
318
318
  } else {
319
319
  n = this.options.reverse ? duration - i : i;
320
320
  }
321
- impulseL[i] = noiseL[i] * (1 - n / duration) ** this.options.decay;
322
- impulseR[i] = noiseR[i] * (1 - n / duration) ** this.options.decay;
321
+ impulseL[i] = (noiseL[i] ?? 0) * (1 - n / duration) ** this.options.decay;
322
+ impulseR[i] = (noiseR[i] ?? 0) * (1 - n / duration) ** this.options.decay;
323
323
  }
324
324
  impulse.getChannelData(0).set(impulseL);
325
325
  impulse.getChannelData(1).set(impulseR);
@@ -334,11 +334,11 @@ var Reverb = (function (random, coloredNoise, transducers) {
334
334
  return [
335
335
  ...transducers.take(
336
336
  duration,
337
- this.noise(
338
- this.options.peaks,
339
- this.options.scale,
340
- this.options.randomAlgorithm
341
- )
337
+ this.noise({
338
+ bins: this.options.peaks,
339
+ scale: this.options.scale,
340
+ rnd: this.options.randomAlgorithm
341
+ })
342
342
  )
343
343
  ];
344
344
  }
@@ -5,7 +5,7 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2019-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.2.7
8
+ * @version 1.2.8
9
9
  * @see {@link https://github.com/logue/Reverb.js}
10
10
  */
11
11
 
@@ -32,8 +32,8 @@
32
32
  };
33
33
 
34
34
  const meta = {
35
- version: "1.2.7",
36
- date: "2023-03-10T12:40:23.409Z"
35
+ version: "1.2.8",
36
+ date: "2023-03-17T13:26:16.751Z"
37
37
  };
38
38
 
39
39
  const Noise = {
@@ -321,8 +321,8 @@
321
321
  } else {
322
322
  n = this.options.reverse ? duration - i : i;
323
323
  }
324
- impulseL[i] = noiseL[i] * (1 - n / duration) ** this.options.decay;
325
- impulseR[i] = noiseR[i] * (1 - n / duration) ** this.options.decay;
324
+ impulseL[i] = (noiseL[i] ?? 0) * (1 - n / duration) ** this.options.decay;
325
+ impulseR[i] = (noiseR[i] ?? 0) * (1 - n / duration) ** this.options.decay;
326
326
  }
327
327
  impulse.getChannelData(0).set(impulseL);
328
328
  impulse.getChannelData(1).set(impulseR);
@@ -337,11 +337,11 @@
337
337
  return [
338
338
  ...transducers.take(
339
339
  duration,
340
- this.noise(
341
- this.options.peaks,
342
- this.options.scale,
343
- this.options.randomAlgorithm
344
- )
340
+ this.noise({
341
+ bins: this.options.peaks,
342
+ scale: this.options.scale,
343
+ rnd: this.options.randomAlgorithm
344
+ })
345
345
  )
346
346
  ];
347
347
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@logue/reverb",
4
- "version": "1.2.7",
4
+ "version": "1.2.8",
5
5
  "description": "JavaScript Reverb effect class",
6
6
  "keywords": [
7
7
  "webaudio",
@@ -41,36 +41,39 @@
41
41
  "node": ">=18.15.0",
42
42
  "yarn": ">=1.22.19"
43
43
  },
44
- "packageManager": "yarn@3.4.1",
44
+ "packageManager": "yarn@3.5.0",
45
45
  "sideEffects": false,
46
46
  "scripts": {
47
47
  "dev": "vite",
48
48
  "clean": "rimraf node_modules/.vite",
49
49
  "type-check": "tsc --noEmit --composite false",
50
50
  "build": "run-p type-check build-only",
51
+ "build:docs": "vite build --mode=docs",
51
52
  "build:analyze": "vite build --mode=analyze",
52
53
  "build:clean": "rimraf dist",
53
54
  "build-only": "vite build",
54
55
  "lint": "eslint . --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint && prettier . --write",
56
+ "preview": "vite preview --mode=docs",
55
57
  "prepare": "husky install"
56
58
  },
57
59
  "dependencies": {
58
- "@thi.ng/colored-noise": "^1.0.11",
59
- "@thi.ng/transducers": "^8.3.37"
60
+ "@thi.ng/colored-noise": "^1.0.12",
61
+ "@thi.ng/transducers": "^8.3.38"
60
62
  },
61
63
  "devDependencies": {
62
64
  "@tsconfig/node18-strictest-esm": "^1.0.1",
63
- "@types/node": "^18.15.0",
64
- "@typescript-eslint/eslint-plugin": "^5.54.1",
65
- "@typescript-eslint/parser": "^5.54.1",
66
- "eslint": "^8.35.0",
67
- "eslint-config-google": "^0.14.0",
65
+ "@types/node": "^18.15.3",
66
+ "@typescript-eslint/eslint-plugin": "^5.55.0",
67
+ "@typescript-eslint/parser": "^5.55.0",
68
+ "eslint": "^8.36.0",
68
69
  "eslint-config-prettier": "^8.7.0",
70
+ "eslint-config-standard-with-typescript": "latest",
69
71
  "eslint-import-resolver-alias": "^1.1.2",
70
72
  "eslint-import-resolver-typescript": "^3.5.3",
71
73
  "eslint-plugin-import": "^2.27.5",
72
- "eslint-plugin-jsdoc": "^40.0.1",
74
+ "eslint-plugin-n": "^15.6.1",
73
75
  "eslint-plugin-prettier": "^4.2.1",
76
+ "eslint-plugin-promise": "^6.1.1",
74
77
  "eslint-plugin-tsdoc": "^0.2.17",
75
78
  "husky": "^8.0.3",
76
79
  "lint-staged": "^13.2.0",
@@ -79,7 +82,7 @@
79
82
  "rimraf": "^4.4.0",
80
83
  "rollup-plugin-visualizer": "^5.9.0",
81
84
  "typescript": "^4.9.5",
82
- "vite": "^4.1.4",
85
+ "vite": "^4.2.0",
83
86
  "vite-plugin-banner": "^0.7.0",
84
87
  "vite-plugin-checker": "^0.5.6",
85
88
  "vite-plugin-dts": "^2.1.0"