-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
110 lines (104 loc) · 1.31 KB
/
app.js
File metadata and controls
110 lines (104 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
const winston = require("winston");
const rpc = require('json-rpc2');
const client = rpc.Client.$create(59870, 'localhost');
const mzData = [
568.241,
603.553,
666.158,
682.259,
757.62,
761.134,
876.964,
892.867,
1046.523,
1047.52,
1048.541,
1233.616,
1296.713,
1297.698,
1298.708,
1347.743,
1348.772,
1349.75,
1350.779,
1363.738,
1364.747,
1365.757,
1366.741,
1385.716,
1386.707,
1619.749,
1620.736,
1635.777,
1636.741,
1759.9,
1760.811,
1782.784,
1830.373,
2094.048,
2303.011,
2394.803,
2408.52,
2449.797,
2466.135,
2480.665,
2488.138,
2504.292,
2526.562
];
const iData = [
3039.063,
2859.375,
3562.5,
2800.781,
2265.625,
2898.438,
2960.938,
2410.156,
42371.094,
27281.25,
10652.344,
5675.781,
31449.219,
24406.25,
10714.844,
57121.094,
51101.563,
28371.094,
9441.406,
56699.219,
51152.344,
28496.094,
8726.563,
7851.563,
6687.5,
6296.875,
7160.156,
4816.406,
5660.156,
31539.063,
37117.188,
3121.094,
13589.844,
1417.969,
2078.125,
3089.844,
1812.5,
1960.938,
78921.875,
1527.344,
10050.781,
4468.75,
2277.344
]
console.log(mzData.length, iData.length);
// Call add function on the server
client.call('monoIso', [mzData, iData], function(err, result) {
if(err) {
winston.error("error:", err);
} else {
for (i=0; i<mzData.length; i++) {
winston.info(`[${i}]:${mzData[i]},${iData[i]}:${result[i]}`);
}
}
});