-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGetCEWeights.m
66 lines (64 loc) · 1.58 KB
/
GetCEWeights.m
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
function weights = GetCEWeights(note)
if note >= 100 && note < 499
% 1.25s hPre and 1.75s hPost
end
switch mod(note,100)
case 1 % original os
weights = struct( ...
"pos", 1, ...
"posy", 0, ...
"simTx", 1, ...
"simMo", 0, ...
"smth", 0, ...
"cntr", 1);
case 5
weights = struct( ...
"pos", 0, ...
"posy", 0, ...
"simTx", 1, ...
"simMo", 0, ...
"smth", 0, ...
"cntr", 1);
case 12
weights = struct( ...
"pos", 1, ...
"posy", 0, ...
"simTx", 1, ...
"simMo", 0, ...
"smth", 0, ...
"cntr", 0);
case 21
weights = struct( ...
"pos", 10, ...
"posy", 0, ...
"simTx", 10, ...
"simMo", 0, ...
"smth", 0, ...
"cntr", 10);
case 25
weights = struct( ...
"pos", 0, ...
"posy", 0, ...
"simTx", 10, ...
"simMo", 0, ...
"smth", 0, ...
"cntr", 10);
case 32
weights = struct( ...
"pos", 10, ...
"posy", 0, ...
"simTx", 10, ...
"simMo", 0, ...
"smth", 0, ...
"cntr", 0);
end
if note >= 100 && note < 199
weights.afloss = "mean";
elseif note >= 200 && note < 299
weights.afloss = "sum";
elseif note >= 300 && note < 399
weights.afloss = "mean";
elseif note >= 400 && note < 499
weights.afloss = "sum";
end
end