@logue/reverb 1.2.3 → 1.2.7
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/README.md +1 -1
- package/dist/Reverb.es.js +145 -43
- package/dist/Reverb.iife.js +320 -218
- package/dist/Reverb.umd.js +322 -220
- package/dist/{Meta.d.ts → src/Meta.d.ts} +3 -4
- package/dist/{NoiseType.d.ts → src/NoiseType.d.ts} +6 -7
- package/dist/{Reverb.d.ts → src/Reverb.d.ts} +143 -144
- package/dist/{interfaces → src/interfaces}/MetaInterface.d.ts +7 -8
- package/dist/{interfaces → src/interfaces}/OptionInterface.d.ts +39 -40
- package/package.json +28 -24
- package/dist/Meta.d.ts.map +0 -1
- package/dist/NoiseType.d.ts.map +0 -1
- package/dist/Reverb.d.ts.map +0 -1
- package/dist/interfaces/MetaInterface.d.ts.map +0 -1
- package/dist/interfaces/OptionInterface.d.ts.map +0 -1
package/dist/Reverb.iife.js
CHANGED
|
@@ -3,248 +3,350 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @description JavaScript Reverb effect class
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
|
-
* @copyright 2019-
|
|
6
|
+
* @copyright 2019-2023 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 1.2.
|
|
8
|
+
* @version 1.2.7
|
|
9
9
|
* @see {@link https://github.com/logue/Reverb.js}
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
var Reverb = (function (random, coloredNoise, transducers) {
|
|
13
|
-
|
|
13
|
+
'use strict';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
BROWN: 'red',
|
|
31
|
-
};
|
|
15
|
+
const defaults = {
|
|
16
|
+
noise: "white",
|
|
17
|
+
scale: 1,
|
|
18
|
+
peaks: 2,
|
|
19
|
+
randomAlgorithm: random.SYSTEM,
|
|
20
|
+
decay: 2,
|
|
21
|
+
delay: 0,
|
|
22
|
+
reverse: false,
|
|
23
|
+
time: 2,
|
|
24
|
+
filterType: "allpass",
|
|
25
|
+
filterFreq: 2200,
|
|
26
|
+
filterQ: 1,
|
|
27
|
+
mix: 0.5,
|
|
28
|
+
once: false
|
|
29
|
+
};
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
peaks: 2,
|
|
38
|
-
randomAlgorithm: random.SYSTEM,
|
|
39
|
-
decay: 2,
|
|
40
|
-
delay: 0,
|
|
41
|
-
reverse: false,
|
|
42
|
-
time: 2,
|
|
43
|
-
filterType: 'allpass',
|
|
44
|
-
filterFreq: 2200,
|
|
45
|
-
filterQ: 1,
|
|
46
|
-
mix: 0.5,
|
|
47
|
-
once: false,
|
|
48
|
-
};
|
|
31
|
+
const meta = {
|
|
32
|
+
version: "1.2.7",
|
|
33
|
+
date: "2023-03-10T12:40:23.409Z"
|
|
34
|
+
};
|
|
49
35
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
const Noise = {
|
|
37
|
+
/** Blue noise */
|
|
38
|
+
BLUE: "blue",
|
|
39
|
+
/** Green noise */
|
|
40
|
+
GREEN: "green",
|
|
41
|
+
/** Pink noise */
|
|
42
|
+
PINK: "pink",
|
|
43
|
+
/** Red noise */
|
|
44
|
+
RED: "red",
|
|
45
|
+
/** Violet noise */
|
|
46
|
+
VIOLET: "violet",
|
|
47
|
+
/** White noise */
|
|
48
|
+
WHITE: "white",
|
|
49
|
+
/** Brown noise (same as red noise) */
|
|
50
|
+
BROWN: "red"
|
|
51
|
+
};
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
53
|
+
class Reverb {
|
|
54
|
+
/** Version strings */
|
|
55
|
+
static version = meta.version;
|
|
56
|
+
/** Build date */
|
|
57
|
+
static build = meta.date;
|
|
58
|
+
/** AudioContext */
|
|
59
|
+
ctx;
|
|
60
|
+
/** Wet Level (Reverberated node) */
|
|
61
|
+
wetGainNode;
|
|
62
|
+
/** Dry Level (Original sound node) */
|
|
63
|
+
dryGainNode;
|
|
64
|
+
/** Impulse response filter */
|
|
65
|
+
filterNode;
|
|
66
|
+
/** Convolution node for applying impulse response */
|
|
67
|
+
convolverNode;
|
|
68
|
+
/** Output gain node */
|
|
69
|
+
outputNode;
|
|
70
|
+
/** Option */
|
|
71
|
+
options;
|
|
72
|
+
/** Connected flag */
|
|
73
|
+
isConnected;
|
|
74
|
+
/** Noise Generator */
|
|
75
|
+
noise = coloredNoise.white;
|
|
76
|
+
/**
|
|
77
|
+
* Constructor
|
|
78
|
+
*
|
|
79
|
+
* @param ctx - Root AudioContext
|
|
80
|
+
* @param options - Configure
|
|
81
|
+
*/
|
|
82
|
+
constructor(ctx, options) {
|
|
83
|
+
this.ctx = ctx;
|
|
84
|
+
this.options = { ...defaults, ...options };
|
|
85
|
+
this.wetGainNode = this.ctx.createGain();
|
|
86
|
+
this.dryGainNode = this.ctx.createGain();
|
|
87
|
+
this.filterNode = this.ctx.createBiquadFilter();
|
|
88
|
+
this.convolverNode = this.ctx.createConvolver();
|
|
89
|
+
this.outputNode = this.ctx.createGain();
|
|
90
|
+
this.isConnected = false;
|
|
91
|
+
this.filterType(this.options.filterType);
|
|
92
|
+
this.setNoise(this.options.noise);
|
|
93
|
+
this.buildImpulse();
|
|
94
|
+
this.mix(this.options.mix);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Connect the node for the reverb effect to the original sound node.
|
|
98
|
+
*
|
|
99
|
+
* @param sourceNode - Input source node
|
|
100
|
+
*/
|
|
101
|
+
connect(sourceNode) {
|
|
102
|
+
if (this.isConnected && this.options.once) {
|
|
76
103
|
this.isConnected = false;
|
|
77
|
-
this.filterType(this.options.filterType);
|
|
78
|
-
this.setNoise(this.options.noise);
|
|
79
|
-
this.buildImpulse();
|
|
80
|
-
this.mix(this.options.mix);
|
|
81
|
-
}
|
|
82
|
-
connect(sourceNode) {
|
|
83
|
-
if (this.isConnected && this.options.once) {
|
|
84
|
-
this.isConnected = false;
|
|
85
|
-
return this.outputNode;
|
|
86
|
-
}
|
|
87
|
-
this.convolverNode.connect(this.filterNode);
|
|
88
|
-
this.filterNode.connect(this.wetGainNode);
|
|
89
|
-
sourceNode.connect(this.convolverNode);
|
|
90
|
-
sourceNode.connect(this.dryGainNode).connect(this.outputNode);
|
|
91
|
-
sourceNode.connect(this.wetGainNode).connect(this.outputNode);
|
|
92
|
-
this.isConnected = true;
|
|
93
104
|
return this.outputNode;
|
|
94
105
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (!this.inRange(value, 1, 50)) {
|
|
113
|
-
throw new RangeError(
|
|
114
|
-
"[Reverb.js] Time length of inpulse response must be less than 50sec."
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
this.options.time = value;
|
|
118
|
-
this.buildImpulse();
|
|
119
|
-
}
|
|
120
|
-
decay(value) {
|
|
121
|
-
if (!this.inRange(value, 0, 100)) {
|
|
122
|
-
throw new RangeError(
|
|
123
|
-
"[Reverb.js] Inpulse Response decay level must be less than 100."
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
this.options.decay = value;
|
|
127
|
-
this.buildImpulse();
|
|
128
|
-
}
|
|
129
|
-
delay(value) {
|
|
130
|
-
if (!this.inRange(value, 0, 100)) {
|
|
131
|
-
throw new RangeError(
|
|
132
|
-
"[Reverb.js] Inpulse Response delay time must be less than 100."
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
this.options.delay = value;
|
|
136
|
-
this.buildImpulse();
|
|
137
|
-
}
|
|
138
|
-
reverse(reverse) {
|
|
139
|
-
this.options.reverse = reverse;
|
|
140
|
-
this.buildImpulse();
|
|
141
|
-
}
|
|
142
|
-
filterType(type = "allpass") {
|
|
143
|
-
this.filterNode.type = this.options.filterType = type;
|
|
144
|
-
}
|
|
145
|
-
filterFreq(freq) {
|
|
146
|
-
if (!this.inRange(freq, 20, 2e4)) {
|
|
147
|
-
throw new RangeError(
|
|
148
|
-
"[Reverb.js] Filter frequrncy must be between 20 and 20000."
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
this.options.filterFreq = freq;
|
|
152
|
-
this.filterNode.frequency.value = this.options.filterFreq;
|
|
106
|
+
this.convolverNode.connect(this.filterNode);
|
|
107
|
+
this.filterNode.connect(this.wetGainNode);
|
|
108
|
+
sourceNode.connect(this.convolverNode);
|
|
109
|
+
sourceNode.connect(this.dryGainNode).connect(this.outputNode);
|
|
110
|
+
sourceNode.connect(this.wetGainNode).connect(this.outputNode);
|
|
111
|
+
this.isConnected = true;
|
|
112
|
+
return this.outputNode;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Disconnect the reverb node
|
|
116
|
+
*
|
|
117
|
+
* @param sourceNode - Input source node
|
|
118
|
+
*/
|
|
119
|
+
disconnect(sourceNode) {
|
|
120
|
+
if (this.isConnected) {
|
|
121
|
+
this.convolverNode.disconnect(this.filterNode);
|
|
122
|
+
this.filterNode.disconnect(this.wetGainNode);
|
|
153
123
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
124
|
+
this.isConnected = false;
|
|
125
|
+
return sourceNode;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Dry/Wet ratio
|
|
129
|
+
*
|
|
130
|
+
* @param mix - Ratio (0~1)
|
|
131
|
+
*/
|
|
132
|
+
mix(mix) {
|
|
133
|
+
if (!this.inRange(mix, 0, 1)) {
|
|
134
|
+
throw new RangeError("[Reverb.js] Dry/Wet ratio must be between 0 to 1.");
|
|
162
135
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
136
|
+
this.options.mix = mix;
|
|
137
|
+
this.dryGainNode.gain.value = 1 - this.options.mix;
|
|
138
|
+
this.wetGainNode.gain.value = this.options.mix;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Set Impulse Response time length (second)
|
|
142
|
+
*
|
|
143
|
+
* @param value - IR length
|
|
144
|
+
*/
|
|
145
|
+
time(value) {
|
|
146
|
+
if (!this.inRange(value, 1, 50)) {
|
|
147
|
+
throw new RangeError(
|
|
148
|
+
"[Reverb.js] Time length of inpulse response must be less than 50sec."
|
|
149
|
+
);
|
|
166
150
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
151
|
+
this.options.time = value;
|
|
152
|
+
this.buildImpulse();
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Impulse response decay rate.
|
|
156
|
+
*
|
|
157
|
+
* @param value - Decay value
|
|
158
|
+
*/
|
|
159
|
+
decay(value) {
|
|
160
|
+
if (!this.inRange(value, 0, 100)) {
|
|
161
|
+
throw new RangeError(
|
|
162
|
+
"[Reverb.js] Inpulse Response decay level must be less than 100."
|
|
163
|
+
);
|
|
170
164
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
165
|
+
this.options.decay = value;
|
|
166
|
+
this.buildImpulse();
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Delay before reverberation starts
|
|
170
|
+
*
|
|
171
|
+
* @param value - Time[ms]
|
|
172
|
+
*/
|
|
173
|
+
delay(value) {
|
|
174
|
+
if (!this.inRange(value, 0, 100)) {
|
|
175
|
+
throw new RangeError(
|
|
176
|
+
"[Reverb.js] Inpulse Response delay time must be less than 100."
|
|
177
|
+
);
|
|
174
178
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
179
|
+
this.options.delay = value;
|
|
180
|
+
this.buildImpulse();
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Reverse the impulse response.
|
|
184
|
+
*
|
|
185
|
+
* @param reverse - Reverse IR
|
|
186
|
+
*/
|
|
187
|
+
reverse(reverse) {
|
|
188
|
+
this.options.reverse = reverse;
|
|
189
|
+
this.buildImpulse();
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Filter for impulse response
|
|
193
|
+
*
|
|
194
|
+
* @param type - Filiter Type
|
|
195
|
+
*/
|
|
196
|
+
filterType(type = "allpass") {
|
|
197
|
+
this.filterNode.type = this.options.filterType = type;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Filter frequency applied to impulse response
|
|
201
|
+
*
|
|
202
|
+
* @param freq - Frequency
|
|
203
|
+
*/
|
|
204
|
+
filterFreq(freq) {
|
|
205
|
+
if (!this.inRange(freq, 20, 2e4)) {
|
|
206
|
+
throw new RangeError(
|
|
207
|
+
"[Reverb.js] Filter frequrncy must be between 20 and 20000."
|
|
208
|
+
);
|
|
198
209
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
210
|
+
this.options.filterFreq = freq;
|
|
211
|
+
this.filterNode.frequency.value = this.options.filterFreq;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Filter quality.
|
|
215
|
+
*
|
|
216
|
+
* @param q - Quality
|
|
217
|
+
*/
|
|
218
|
+
filterQ(q) {
|
|
219
|
+
if (!this.inRange(q, 0, 10)) {
|
|
220
|
+
throw new RangeError(
|
|
221
|
+
"[Reverb.js] Filter quality value must be between 0 and 10."
|
|
222
|
+
);
|
|
202
223
|
}
|
|
203
|
-
|
|
204
|
-
|
|
224
|
+
this.options.filterQ = q;
|
|
225
|
+
this.filterNode.Q.value = this.options.filterQ;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* set IR source noise peaks
|
|
229
|
+
*
|
|
230
|
+
* @param p - Peaks
|
|
231
|
+
*/
|
|
232
|
+
peaks(p) {
|
|
233
|
+
this.options.peaks = p;
|
|
234
|
+
this.buildImpulse();
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* set IR source noise scale.
|
|
238
|
+
*
|
|
239
|
+
* @param s - Scale
|
|
240
|
+
*/
|
|
241
|
+
scale(s) {
|
|
242
|
+
this.options.scale = s;
|
|
243
|
+
this.buildImpulse();
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* set IR source noise generator.
|
|
247
|
+
*
|
|
248
|
+
* @param a - Algorithm
|
|
249
|
+
*/
|
|
250
|
+
randomAlgorithm(a) {
|
|
251
|
+
this.options.randomAlgorithm = a;
|
|
252
|
+
this.buildImpulse();
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Inpulse Response Noise algorithm.
|
|
256
|
+
*
|
|
257
|
+
* @param type - IR noise algorithm type.
|
|
258
|
+
*/
|
|
259
|
+
setNoise(type) {
|
|
260
|
+
this.options.noise = type;
|
|
261
|
+
switch (type) {
|
|
262
|
+
case Noise["BLUE"]:
|
|
263
|
+
this.noise = coloredNoise.blue;
|
|
264
|
+
break;
|
|
265
|
+
case Noise["GREEN"]:
|
|
266
|
+
this.noise = coloredNoise.green;
|
|
267
|
+
break;
|
|
268
|
+
case Noise["PINK"]:
|
|
269
|
+
this.noise = coloredNoise.pink;
|
|
270
|
+
break;
|
|
271
|
+
case Noise["RED"]:
|
|
272
|
+
case Noise["BROWN"]:
|
|
273
|
+
this.noise = coloredNoise.red;
|
|
274
|
+
break;
|
|
275
|
+
case Noise["VIOLET"]:
|
|
276
|
+
this.noise = coloredNoise.violet;
|
|
277
|
+
break;
|
|
278
|
+
default:
|
|
279
|
+
this.noise = coloredNoise.white;
|
|
205
280
|
}
|
|
206
|
-
buildImpulse()
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
281
|
+
this.buildImpulse();
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Set Random Algorythm
|
|
285
|
+
*
|
|
286
|
+
* @param algorithm - Algorythm
|
|
287
|
+
*/
|
|
288
|
+
setRandomAlgorythm(algorithm) {
|
|
289
|
+
this.options.randomAlgorithm = algorithm;
|
|
290
|
+
this.buildImpulse();
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Return true if in range, otherwise false
|
|
294
|
+
*
|
|
295
|
+
* @param x - Target value
|
|
296
|
+
* @param min - Minimum value
|
|
297
|
+
* @param max - Maximum value
|
|
298
|
+
*/
|
|
299
|
+
inRange(x, min, max) {
|
|
300
|
+
return (x - min) * (x - max) <= 0;
|
|
301
|
+
}
|
|
302
|
+
/** Utility function for building an impulse response from the module parameters. */
|
|
303
|
+
buildImpulse() {
|
|
304
|
+
const rate = this.ctx.sampleRate;
|
|
305
|
+
const duration = Math.max(rate * this.options.time, 1);
|
|
306
|
+
const delayDuration = rate * this.options.delay;
|
|
307
|
+
const impulse = this.ctx.createBuffer(2, duration, rate);
|
|
308
|
+
const impulseL = new Float32Array(duration);
|
|
309
|
+
const impulseR = new Float32Array(duration);
|
|
310
|
+
const noiseL = this.getNoise(duration);
|
|
311
|
+
const noiseR = this.getNoise(duration);
|
|
312
|
+
for (let i = 0; i < duration; i++) {
|
|
313
|
+
let n = 0;
|
|
314
|
+
if (i < delayDuration) {
|
|
315
|
+
impulseL[i] = 0;
|
|
316
|
+
impulseR[i] = 0;
|
|
317
|
+
n = this.options.reverse ? duration - (i - delayDuration) : i - delayDuration;
|
|
318
|
+
} else {
|
|
319
|
+
n = this.options.reverse ? duration - i : i;
|
|
226
320
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
this.convolverNode.buffer = impulse;
|
|
230
|
-
}
|
|
231
|
-
getNoise(duration) {
|
|
232
|
-
return [
|
|
233
|
-
...transducers.take(
|
|
234
|
-
duration,
|
|
235
|
-
this.noise(
|
|
236
|
-
this.options.peaks,
|
|
237
|
-
this.options.scale,
|
|
238
|
-
this.options.randomAlgorithm
|
|
239
|
-
)
|
|
240
|
-
)
|
|
241
|
-
];
|
|
321
|
+
impulseL[i] = noiseL[i] * (1 - n / duration) ** this.options.decay;
|
|
322
|
+
impulseR[i] = noiseR[i] * (1 - n / duration) ** this.options.decay;
|
|
242
323
|
}
|
|
324
|
+
impulse.getChannelData(0).set(impulseL);
|
|
325
|
+
impulse.getChannelData(1).set(impulseR);
|
|
326
|
+
this.convolverNode.buffer = impulse;
|
|
243
327
|
}
|
|
244
|
-
|
|
245
|
-
|
|
328
|
+
/**
|
|
329
|
+
* Noise source
|
|
330
|
+
*
|
|
331
|
+
* @param duration - length of IR.
|
|
332
|
+
*/
|
|
333
|
+
getNoise(duration) {
|
|
334
|
+
return [
|
|
335
|
+
...transducers.take(
|
|
336
|
+
duration,
|
|
337
|
+
this.noise(
|
|
338
|
+
this.options.peaks,
|
|
339
|
+
this.options.scale,
|
|
340
|
+
this.options.randomAlgorithm
|
|
341
|
+
)
|
|
342
|
+
)
|
|
343
|
+
];
|
|
246
344
|
}
|
|
345
|
+
}
|
|
346
|
+
if (!window.Reverb) {
|
|
347
|
+
window.Reverb = Reverb;
|
|
348
|
+
}
|
|
247
349
|
|
|
248
|
-
|
|
350
|
+
return Reverb;
|
|
249
351
|
|
|
250
352
|
})(random, colordNoise, transducers);
|