-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
MS3000.proto
209 lines (171 loc) · 4.98 KB
/
MS3000.proto
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
//
// proto definitions for MS3KOS 2.0 release
//
// each MS3KOS Mode implementation (src/Modes/*) can declare
// its own persistent protocol buffer values as needed.
// careful of putting too much stuff in here - i.e. use locals
// and consider the global pBuf entry as a 'use as needed'
// way to sync.
//
// changes to this file propagate to the web interface,
// which generates the relevant GUI.
//
// MS3KOS also uses the protocol buffer for wire sync.
//
syntax = "proto2";
import "nanopb.proto";
message RGB {
// !J! safety orange TODO: s/255, 121, 0/ -> 0/
required int32 R = 1 [default = 255];
required int32 G = 2 [default = 121];
required int32 B = 3 [default = 0];
}
//
// MIDI Note #'s are 0 .. 127:
//
// Octave C C# D D# E F F# G G# A A# B
//
// -1 0 1 2 3 4 5 6 7 8 9 10 11
// 0 12 13 14 15 16 17 18 19 20 21 21 23
// 1 24 25 26 27 28 29 30 31 32 33 34 35
// 2 36 37 38 39 40 41 42 43 44 45 46 47
// 3 48 49 50 51 52 53 54 55 56 57 58 59
// 4 60 61 62 63 64 65 66 67 68 69 70 71
// 5 72 73 74 75 76 77 78 79 80 81 82 83
// 6 84 85 86 87 88 89 90 91 92 93 94 95
// 7 96 97 98 99 100 101 102 103 104 105 106 107
// 8 108 109 110 111 112 113 114 115 116 117 118 119
// 9 120 121 122 123 124 125 126 127
//
message MIDI_OCTAVE {
required int32 o = 1 [default = 5]; // (5+1)
}
message MIDI_INTERVALS{
required int32 v = 1 [default = 0]; // C
}
message MIDI_STEP {
required MIDI_INTERVALS interval = 1;
required MIDI_OCTAVE octave = 2;
required int32 mode = 3;
}
message MIDI_SEQUENCE {
repeated MIDI_STEP steps = 1 [(nanopb).max_count = 8];
}
// MS3000 Global object
message MS3KG {
message SysPref {
message AP_INFO {
optional string networkName = 1;
optional string password = 2;
}
}
optional App apps = 1;
//optional AP_INFO apInfo = 2;
message App {
enum T {
_Shake= 0;
_Light= 1;
_Magnet= 2;
_System = 3;
_Remote =4;
_Beat= 5;
_Countdown= 6;
_Arpi = 7;
_Sequi = 8;
}
optional T current = 1;
optional Shake shake = 2;
optional Light light = 3;
optional Magnet magnet = 4;
optional System system = 5;
optional Remote remote = 6;
optional Beat beat = 7;
optional Countdown countdown = 8;
optional Arpi arpi = 9;
optional Sequi sequi = 10;
optional Updater updater = 11;
message Shake {
optional string image = 1;
optional int32 colorIndex = 2;
optional int32 bounce = 3;
}
message Light {
enum Mode {
RAINBOW = 0;
NORMAL = 1;
SCANNER_RGB = 2;
SCANNER_BW = 3;
}
optional Mode mode = 1 [ default = RAINBOW ];
optional RGB color = 2;
optional int32 colorIndex = 3;
optional int32 triggerSpeed = 4;
}
message Magnet {
enum Mode {
BARS = 0;
BARS_DOT = 1;
DOTS = 2;
OTHER = 3;
}
optional Mode mode = 1 [ default = BARS ];
}
message System {
enum Mode {
VERSION = 0;
WIFI = 1;
SSID = 2;
IP = 3;
SOFTIP = 4;
POWER_LO = 5;
POWER_HI = 6;
POWER_VALUE = 7;
CALIBRATION = 8;
}
optional Mode mode = 1 [ default = VERSION ];
}
message Remote {
}
message Beat {
enum Mode {
SIDE = 0;
CENTER = 1;
}
optional Mode mode = 1 [ default = SIDE ];
optional int32 sensitivity = 2 [ default = 2 ];
optional RGB color = 3;
}
message Countdown {
enum Mode {
DOWN_1S = 0;
DOWN_5S = 1;
DOWN_10S = 2;
DOWN_30S = 3;
DOWN_1M = 4;
DOWN_5M = 5;
DOWN_10M = 6;
DOWN_30M = 7;
}
optional Mode mode = 1 [ default = DOWN_1M ];
}
message Arpi {
enum Mode {
ARP1 = 0;
ARP2 = 1;
ARP3 = 2;
ARP4 = 3;
ARP5 = 4;
ARP6 = 5;
ARP7 = 6;
ARP8 = 7;
}
optional Mode mode = 1 [ default = ARP8 ];
}
message Sequi {
optional MIDI_SEQUENCE sequence = 1;
}
message Updater {
optional int32 shouldReset = 1;
}
}
}