-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonirisation.qml
100 lines (94 loc) · 2.82 KB
/
onirisation.qml
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
/*
* This example comunicates with the arduino sketch of the same name
* you can find this corresponding example sketch on the arduino website
* visit: https://www.arduino.cc/en/Tutorial/BuiltInExamples
* These examples are included in the Arduino IDE
* as well as in the Web Editor under Examples/BUILT IN
* for any issue on the ossia-score side, please report to:
* https://github.com/OSSIA/score-user-library/issues
*/
import Score 1.0
import Ossia 1.0 as Ossia
Ossia.Serial
{
function openListening(address) {}
function closeListening(address) {}
function onMessage(message) { // evaluated each time a message is received
//console.log(message);
return [{ address: "/FSR", value: parseInt(message) }];
}
function createTree() {
return [
{
name: "FSR",
type: Ossia.Type.Int,
min: 0,
max: 1023,
access: Ossia.Access.Get,
bounding: Ossia.Bounding.Clip,
repetition_filter: Ossia.Repetitions.Filtered
},
{
name: "PanelLed",
type: Ossia.Type.Int,
min: 0,
max: 255,
access: Ossia.Access.Set,
bounding: Ossia.Bounding.Clip,
request: "p$val",
repetition_filter: Ossia.Repetitions.Filtered
},
{
name: "ServoL",
type: Ossia.Type.Int,
min: 0,
max: 90,
access: Ossia.Access.Set,
bounding: Ossia.Bounding.Clip,
request: "l$val",
repetition_filter: Ossia.Repetitions.Filtered
},
{
name: "ServoC",
type: Ossia.Type.Int,
min: 0,
max: 90,
access: Ossia.Access.Set,
bounding: Ossia.Bounding.Clip,
request: "c$val",
repetition_filter: Ossia.Repetitions.Filtered
},
{
name: "ServoR",
type: Ossia.Type.Int,
min: 0,
max: 90,
access: Ossia.Access.Set,
bounding: Ossia.Bounding.Clip,
request: "r$val",
repetition_filter: Ossia.Repetitions.Filtered
},
{
name: "VentiloV",
type: Ossia.Type.Bool,
access: Ossia.Access.Set,
request: "v$val",
repetition_filter: Ossia.Repetitions.Filtered
},
{
name: "VentiloW",
type: Ossia.Type.Bool,
access: Ossia.Access.Set,
request: "w$val",
repetition_filter: Ossia.Repetitions.Filtered
},
{
name: "VentiloX",
type: Ossia.Type.Bool,
access: Ossia.Access.Set,
request: "x$val",
repetition_filter: Ossia.Repetitions.Filtered
}
];
}
}