@logue/reverb 1.2.11 → 1.2.13
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 +10 -10
- package/dist/Reverb.iife.js +10 -10
- package/dist/Reverb.umd.js +10 -10
- package/dist/src/NoiseType.d.ts +1 -1
- package/dist/src/Reverb.d.ts +1 -1
- package/dist/src/interfaces/OptionInterface.d.ts +14 -28
- package/package.json +18 -17
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.
|
|
8
|
+
* @version 1.2.13
|
|
9
9
|
* @see {@link https://github.com/logue/Reverb.js}
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -30,25 +30,25 @@ const defaults = {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
const meta = {
|
|
33
|
-
version: "1.2.
|
|
34
|
-
date: "2023-
|
|
33
|
+
version: "1.2.13",
|
|
34
|
+
date: "2023-05-19T02:38:39.637Z"
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
const Noise = {
|
|
38
38
|
/** Blue noise */
|
|
39
39
|
blue: "blue",
|
|
40
|
+
/** Brown noise (same as red noise) */
|
|
41
|
+
brown: "red",
|
|
40
42
|
/** Green noise */
|
|
41
43
|
green: "green",
|
|
42
44
|
/** Pink noise */
|
|
43
45
|
pink: "pink",
|
|
44
46
|
/** Red noise */
|
|
45
|
-
|
|
47
|
+
red: "red",
|
|
46
48
|
/** Violet noise */
|
|
47
49
|
violet: "violet",
|
|
48
50
|
/** White noise */
|
|
49
|
-
white: "white"
|
|
50
|
-
/** Brown noise (same as red noise) */
|
|
51
|
-
red: "red"
|
|
51
|
+
white: "white"
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
class Reverb {
|
|
@@ -80,7 +80,7 @@ class Reverb {
|
|
|
80
80
|
* @param ctx - Root AudioContext
|
|
81
81
|
* @param options - Configure
|
|
82
82
|
*/
|
|
83
|
-
constructor(ctx, options
|
|
83
|
+
constructor(ctx, options) {
|
|
84
84
|
this.ctx = ctx;
|
|
85
85
|
this.options = Object.assign(defaults, options);
|
|
86
86
|
this.wetGainNode = this.ctx.createGain();
|
|
@@ -315,9 +315,9 @@ class Reverb {
|
|
|
315
315
|
if (i < delayDuration) {
|
|
316
316
|
impulseL[i] = 0;
|
|
317
317
|
impulseR[i] = 0;
|
|
318
|
-
n = this.options.reverse ? duration - (i - delayDuration) : i - delayDuration;
|
|
318
|
+
n = this.options.reverse ?? false ? duration - (i - delayDuration) : i - delayDuration;
|
|
319
319
|
} else {
|
|
320
|
-
n = this.options.reverse ? duration - i : i;
|
|
320
|
+
n = this.options.reverse ?? false ? duration - i : i;
|
|
321
321
|
}
|
|
322
322
|
impulseL[i] = (noiseL[i] ?? 0) * (1 - n / duration) ** this.options.decay;
|
|
323
323
|
impulseR[i] = (noiseR[i] ?? 0) * (1 - n / duration) ** this.options.decay;
|
package/dist/Reverb.iife.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.
|
|
8
|
+
* @version 1.2.13
|
|
9
9
|
* @see {@link https://github.com/logue/Reverb.js}
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -29,25 +29,25 @@ var Reverb = (function (random, coloredNoise, transducers) {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const meta = {
|
|
32
|
-
version: "1.2.
|
|
33
|
-
date: "2023-
|
|
32
|
+
version: "1.2.13",
|
|
33
|
+
date: "2023-05-19T02:38:39.637Z"
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
const Noise = {
|
|
37
37
|
/** Blue noise */
|
|
38
38
|
blue: "blue",
|
|
39
|
+
/** Brown noise (same as red noise) */
|
|
40
|
+
brown: "red",
|
|
39
41
|
/** Green noise */
|
|
40
42
|
green: "green",
|
|
41
43
|
/** Pink noise */
|
|
42
44
|
pink: "pink",
|
|
43
45
|
/** Red noise */
|
|
44
|
-
|
|
46
|
+
red: "red",
|
|
45
47
|
/** Violet noise */
|
|
46
48
|
violet: "violet",
|
|
47
49
|
/** White noise */
|
|
48
|
-
white: "white"
|
|
49
|
-
/** Brown noise (same as red noise) */
|
|
50
|
-
red: "red"
|
|
50
|
+
white: "white"
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
class Reverb {
|
|
@@ -79,7 +79,7 @@ var Reverb = (function (random, coloredNoise, transducers) {
|
|
|
79
79
|
* @param ctx - Root AudioContext
|
|
80
80
|
* @param options - Configure
|
|
81
81
|
*/
|
|
82
|
-
constructor(ctx, options
|
|
82
|
+
constructor(ctx, options) {
|
|
83
83
|
this.ctx = ctx;
|
|
84
84
|
this.options = Object.assign(defaults, options);
|
|
85
85
|
this.wetGainNode = this.ctx.createGain();
|
|
@@ -314,9 +314,9 @@ var Reverb = (function (random, coloredNoise, transducers) {
|
|
|
314
314
|
if (i < delayDuration) {
|
|
315
315
|
impulseL[i] = 0;
|
|
316
316
|
impulseR[i] = 0;
|
|
317
|
-
n = this.options.reverse ? duration - (i - delayDuration) : i - delayDuration;
|
|
317
|
+
n = this.options.reverse ?? false ? duration - (i - delayDuration) : i - delayDuration;
|
|
318
318
|
} else {
|
|
319
|
-
n = this.options.reverse ? duration - i : i;
|
|
319
|
+
n = this.options.reverse ?? false ? duration - i : i;
|
|
320
320
|
}
|
|
321
321
|
impulseL[i] = (noiseL[i] ?? 0) * (1 - n / duration) ** this.options.decay;
|
|
322
322
|
impulseR[i] = (noiseR[i] ?? 0) * (1 - n / duration) ** this.options.decay;
|
package/dist/Reverb.umd.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.
|
|
8
|
+
* @version 1.2.13
|
|
9
9
|
* @see {@link https://github.com/logue/Reverb.js}
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -32,25 +32,25 @@
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
const meta = {
|
|
35
|
-
version: "1.2.
|
|
36
|
-
date: "2023-
|
|
35
|
+
version: "1.2.13",
|
|
36
|
+
date: "2023-05-19T02:38:39.637Z"
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
const Noise = {
|
|
40
40
|
/** Blue noise */
|
|
41
41
|
blue: "blue",
|
|
42
|
+
/** Brown noise (same as red noise) */
|
|
43
|
+
brown: "red",
|
|
42
44
|
/** Green noise */
|
|
43
45
|
green: "green",
|
|
44
46
|
/** Pink noise */
|
|
45
47
|
pink: "pink",
|
|
46
48
|
/** Red noise */
|
|
47
|
-
|
|
49
|
+
red: "red",
|
|
48
50
|
/** Violet noise */
|
|
49
51
|
violet: "violet",
|
|
50
52
|
/** White noise */
|
|
51
|
-
white: "white"
|
|
52
|
-
/** Brown noise (same as red noise) */
|
|
53
|
-
red: "red"
|
|
53
|
+
white: "white"
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
class Reverb {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
* @param ctx - Root AudioContext
|
|
83
83
|
* @param options - Configure
|
|
84
84
|
*/
|
|
85
|
-
constructor(ctx, options
|
|
85
|
+
constructor(ctx, options) {
|
|
86
86
|
this.ctx = ctx;
|
|
87
87
|
this.options = Object.assign(defaults, options);
|
|
88
88
|
this.wetGainNode = this.ctx.createGain();
|
|
@@ -317,9 +317,9 @@
|
|
|
317
317
|
if (i < delayDuration) {
|
|
318
318
|
impulseL[i] = 0;
|
|
319
319
|
impulseR[i] = 0;
|
|
320
|
-
n = this.options.reverse ? duration - (i - delayDuration) : i - delayDuration;
|
|
320
|
+
n = this.options.reverse ?? false ? duration - (i - delayDuration) : i - delayDuration;
|
|
321
321
|
} else {
|
|
322
|
-
n = this.options.reverse ? duration - i : i;
|
|
322
|
+
n = this.options.reverse ?? false ? duration - i : i;
|
|
323
323
|
}
|
|
324
324
|
impulseL[i] = (noiseL[i] ?? 0) * (1 - n / duration) ** this.options.decay;
|
|
325
325
|
impulseR[i] = (noiseR[i] ?? 0) * (1 - n / duration) ** this.options.decay;
|
package/dist/src/NoiseType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Impulse response noise generation algorithm */
|
|
2
2
|
declare const Noise: Record<NoiseType, string>;
|
|
3
3
|
/** Noise Type */
|
|
4
|
-
export type NoiseType = 'blue' | 'green' | 'pink' | 'red' | 'violet' | 'white'
|
|
4
|
+
export type NoiseType = 'blue' | 'brown' | 'green' | 'pink' | 'red' | 'violet' | 'white';
|
|
5
5
|
/** Noise */
|
|
6
6
|
export default Noise;
|
package/dist/src/Reverb.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export default class Reverb {
|
|
|
33
33
|
* @param ctx - Root AudioContext
|
|
34
34
|
* @param options - Configure
|
|
35
35
|
*/
|
|
36
|
-
constructor(ctx: AudioContext, options
|
|
36
|
+
constructor(ctx: AudioContext, options: Partial<OptionInterface>);
|
|
37
37
|
/**
|
|
38
38
|
* Connect the node for the reverb effect to the original sound node.
|
|
39
39
|
*
|
|
@@ -6,48 +6,34 @@ export default interface OptionInterface {
|
|
|
6
6
|
* IR (Inpulse Response) colord noise algorithm (BLUE, GREEN, PINK, RED, VIOLET, WHITE)
|
|
7
7
|
* @see {@link https://github.com/thi-ng/umbrella/tree/develop/packages/colored-noise}
|
|
8
8
|
*/
|
|
9
|
-
noise
|
|
9
|
+
noise: NoiseType;
|
|
10
10
|
/** IR source noise scale */
|
|
11
|
-
scale
|
|
11
|
+
scale: number;
|
|
12
12
|
/** Number of IR source noise peaks */
|
|
13
|
-
peaks
|
|
13
|
+
peaks: number;
|
|
14
14
|
/**
|
|
15
15
|
* Randam noise algorythm
|
|
16
16
|
* @see {@link https://github.com/thi-ng/umbrella/tree/develop/packages/random}
|
|
17
17
|
*/
|
|
18
|
-
randomAlgorithm
|
|
18
|
+
randomAlgorithm: INorm;
|
|
19
19
|
/** Decay */
|
|
20
|
-
decay
|
|
20
|
+
decay: number;
|
|
21
21
|
/** Delay until impulse response is generated */
|
|
22
|
-
delay
|
|
22
|
+
delay: number;
|
|
23
23
|
/** Filter frequency applied to impulse response[Hz] */
|
|
24
|
-
filterFreq
|
|
24
|
+
filterFreq: number;
|
|
25
25
|
/** Filter quality for impulse response */
|
|
26
|
-
filterQ
|
|
26
|
+
filterQ: number;
|
|
27
27
|
/** Filter type for impulse response */
|
|
28
|
-
filterType
|
|
28
|
+
filterType: BiquadFilterType;
|
|
29
29
|
/** Dry/Wet ratio */
|
|
30
|
-
mix
|
|
30
|
+
mix: number;
|
|
31
31
|
/** Invert the impulse response */
|
|
32
32
|
reverse?: boolean;
|
|
33
33
|
/** Impulse response length */
|
|
34
|
-
time?: number;
|
|
35
|
-
/** Prevents multiple effectors from being connected. */
|
|
36
|
-
once?: boolean;
|
|
37
|
-
}
|
|
38
|
-
/** デフォルト値 */
|
|
39
|
-
export declare const defaults: {
|
|
40
|
-
noise: NoiseType;
|
|
41
|
-
scale: number;
|
|
42
|
-
peaks: number;
|
|
43
|
-
randomAlgorithm: INorm;
|
|
44
|
-
decay: number;
|
|
45
|
-
delay: number;
|
|
46
|
-
filterFreq: number;
|
|
47
|
-
filterQ: number;
|
|
48
|
-
filterType: BiquadFilterType;
|
|
49
|
-
mix: number;
|
|
50
|
-
reverse: boolean;
|
|
51
34
|
time: number;
|
|
35
|
+
/** Prevents multiple effectors from being connected. */
|
|
52
36
|
once: boolean;
|
|
53
|
-
}
|
|
37
|
+
}
|
|
38
|
+
/** Default Value */
|
|
39
|
+
export declare const defaults: OptionInterface;
|
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.
|
|
4
|
+
"version": "1.2.13",
|
|
5
5
|
"description": "JavaScript Reverb effect class",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"webaudio",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": ">=18.
|
|
41
|
+
"node": ">=18.16.0",
|
|
42
42
|
"yarn": ">=1.22.19"
|
|
43
43
|
},
|
|
44
|
-
"packageManager": "yarn@3.5.
|
|
44
|
+
"packageManager": "yarn@3.5.1",
|
|
45
45
|
"sideEffects": false,
|
|
46
46
|
"scripts": {
|
|
47
47
|
"dev": "vite",
|
|
@@ -57,36 +57,36 @@
|
|
|
57
57
|
"prepare": "husky install"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@thi.ng/colored-noise": "^1.0.
|
|
61
|
-
"@thi.ng/transducers": "^8.4.
|
|
60
|
+
"@thi.ng/colored-noise": "^1.0.16",
|
|
61
|
+
"@thi.ng/transducers": "^8.4.5"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@tsconfig/
|
|
65
|
-
"@types/node": "^
|
|
66
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
64
|
+
"@tsconfig/node-lts": "^18.12.2",
|
|
65
|
+
"@types/node": "^20.2.1",
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
|
67
67
|
"bootstrap": "^5.3.0-alpha.3",
|
|
68
|
-
"eslint": "^8.
|
|
68
|
+
"eslint": "^8.40.0",
|
|
69
69
|
"eslint-config-prettier": "^8.8.0",
|
|
70
70
|
"eslint-config-standard-with-typescript": "^34.0.1",
|
|
71
71
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
72
72
|
"eslint-import-resolver-typescript": "^3.5.5",
|
|
73
73
|
"eslint-plugin-html": "^7.1.0",
|
|
74
74
|
"eslint-plugin-import": "^2.27.5",
|
|
75
|
-
"eslint-plugin-n": "^
|
|
75
|
+
"eslint-plugin-n": "^16.0.0",
|
|
76
76
|
"eslint-plugin-promise": "^6.1.1",
|
|
77
77
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
78
78
|
"eslint-plugin-yaml": "^0.5.0",
|
|
79
79
|
"husky": "^8.0.3",
|
|
80
|
-
"lint-staged": "^13.2.
|
|
80
|
+
"lint-staged": "^13.2.2",
|
|
81
81
|
"npm-run-all": "^4.1.5",
|
|
82
|
-
"prettier": "^2.8.
|
|
83
|
-
"rimraf": "^5.0.
|
|
82
|
+
"prettier": "^2.8.8",
|
|
83
|
+
"rimraf": "^5.0.1",
|
|
84
84
|
"rollup-plugin-visualizer": "^5.9.0",
|
|
85
85
|
"typescript": "*",
|
|
86
|
-
"vite": "^4.
|
|
86
|
+
"vite": "^4.3.8",
|
|
87
87
|
"vite-plugin-banner": "^0.7.0",
|
|
88
|
-
"vite-plugin-checker": "^0.
|
|
89
|
-
"vite-plugin-dts": "^2.
|
|
88
|
+
"vite-plugin-checker": "^0.6.0",
|
|
89
|
+
"vite-plugin-dts": "^2.3.0"
|
|
90
90
|
},
|
|
91
91
|
"husky": {
|
|
92
92
|
"hooks": {
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
"*": "prettier -w -u"
|
|
99
99
|
},
|
|
100
100
|
"resolutions": {
|
|
101
|
+
"http-cache-semantics": "^4.1.1",
|
|
101
102
|
"json5": "^2.2.3",
|
|
102
|
-
"
|
|
103
|
+
"yaml": "^2.2.2"
|
|
103
104
|
}
|
|
104
105
|
}
|