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
/
dft-test.js
15 lines
(10 loc)
•
283 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
load
(
'audio-harness.js'
);
load
(
'dsp.js'
);
var
iterations =
100
;
var
dft =
new
DFT
(frameBufferLength / channels, rate);
var
calcDFT =
function
(
) {
var
fb =
getFramebuffer
(), signal =
DSP
.
getChannel
(
DSP
.
MIX
, fb); dft.
forward
(signal); };
runTest
(calcDFT, iterations);