UNPKG
@neurosity/dsp
Version:
latest (1.0.1)
1.0.1
Digital Signal Processing for Javascript
github.com/neurosity/dsp.js
neurosity/dsp.js
@neurosity/dsp
/
test
/
adsr-test.js
16 lines
(10 loc)
•
295 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
load
(
'audio-harness.js'
);
load
(
'dsp.js'
);
var
iterations =
1000
;
var
envelope =
new
ADSR
(
0.01
,
0.1
,
0.5
,
0.1
,
0.2
,
44100
);
var
calcADSR =
function
(
) {
var
fb =
getFramebuffer
(), signal =
DSP
.
getChannel
(
DSP
.
MIX
, fb); envelope.
process
(signal); };
runTest
(calcADSR, iterations);