-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmidimix example.sbr
More file actions
338 lines (335 loc) · 8.55 KB
/
midimix example.sbr
File metadata and controls
338 lines (335 loc) · 8.55 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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StreamByter-Rules</key>
<string>
if load
Alias 0 TRUE
Alias 1 FALSE
Alias 0 OFF
Alias 1 ON
Alias L1 chanCom
Alias L2 isXKey
Alias L3 togCount
Alias L4 tLen
Alias L5 tLoop
Alias L6 tbId
Alias L7 curBank
Alias L8 vType
Alias L9 vCC
Alias LA vStat
Alias LB vOthStat
Alias LC vVal
Alias LD vGrp
Alias LE vRef
Alias LF vOthRef
Alias L10 vChan
Alias 19 s0
Alias 1A s1
Alias 1B s2
Alias 1C s3
Alias 1D s4
Alias 1E s5
Alias 1F s6
Alias 20 s7
Alias 21 bg0
Alias 2A bg1
Alias 33 bg2
Alias 3C bg3
Alias 45 bg4
Alias 4E bg5
Alias 57 bg6
Alias 60 bg7
Alias 1 bankLeft
Alias 2 bankRight
Alias 0 tb
Alias 1 bt
Alias 2 ta
Alias 3 sb
Alias 19 bankLeftBtn
Alias 1A bankRightBtn
Alias 1B soloBtn
Alias 1 BtnType
Alias 19 BtnRef
Alias 31 BtnSndVal
Alias 49 BtnGroup
Alias 1 DataCC
Alias 31 DataStat
Alias 61 DataChan
Alias 61 Ctrls
Alias 79 CtrlSld
Alias 82 CtrlChans
Alias 9A CtrlSldChans
Define NoteOn MT == 90
Define NoteOff MT == 80
Define isCC MT == B0
Define bankLeftBtnPressed M1 == bankLeftBtn
Define bankRightBtnPressed M1 == bankRightBtn
Define soloBtnPressed M1 == soloBtn
Define isBankLeft curBank == bankLeft
Define isBankRight curBank == bankRight
Alias 0 recChan
Ass IBtnType = sb tb tb sb tb tb sb tb tb sb tb sb sb tb bt sb tb bt sb tb bt sb tb ta
Ass IBtnGroup = s0 bg0 0 s0 bg0 0 s0 bg0 0 s0 bg0 s0 s0 bg0 0 s0 bg0 0 s0 bg0 0 s0 bg0 bg0
Ass IBtnRef = 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18
Ass IBtnSndVal = 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f
Ass ICtrls = 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18 31 32 33 34 35 36 37 38 39
Ass ICtrlChans = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ass JBtnType = sb tb tb sb tb tb sb tb tb sb tb sb sb tb bt sb tb bt sb tb bt sb tb ta
Ass JBtnGroup = s1 bg1 0 s1 bg1 0 s1 bg1 0 s1 bg1 s1 s1 bg1 0 s1 bg1 0 s1 bg1 0 s1 bg1 bg1
Ass JBtnRef = 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18
Ass JBtnSndVal = 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f
Ass JCtrls = 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 31 32 33 34 35 36 37 38 39
Ass JCtrlChans = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ass KDataCC = 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ass KDataChan = b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 b0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ass Lbg0 = 8 2 5 8 b e 11 14 17
Ass Lbg1 = 8 2 5 8 b e 11 14 17
Ass KDataChan = B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 91 91 91 91 91 91 91 91 91
Sub setLED ID stat delay
Mat chanCom = 90 + recChan
snd chanCom ID stat +Ddelay
End
Sub LED_ON ID
Mat chanCom = 90 + recChan
snd chanCom ID ON
End
Sub LED_OFF ID
Mat chanCom = 90 + recChan
snd chanCom ID OFF
End
Sub getBtnField base index to
Mat I0 = base + index
Mat I0 = I0 - 1
If isBankLeft
ASS to = II0
Else
Ass to = JI0
End
End
Sub getOtherBtnField base index to
Mat I0 = base + index
Mat I0 = I0 - 1
If isBankLeft
ASS to = JI0
Else
Ass to = II0
End
End
Sub setDataField base index val
Mat I0 = base + index
Mat I0 = I0 - 1
Ass KI0 = val
End
Sub getDataField base index to
Mat I0 = base + index
Mat I0 = I0 - 1
Ass to = KI0
End
Sub getDataByButton base btnIdx to
getBtnField BtnRef btnIdx J0
getDataField base J0 to
End
Sub setDataByButton base btnIdx val
getBtnField BtnRef btnIdx J0
setDataField base J0 val
End
Sub fireBtn index val
getBtnField BtnRef index vRef
getDataField DataCC vRef vCC
getDataField DataChan vRef vChan
Mat chanCom = B0 + vChan
Snd chanCom vCC val
End
Sub getBtnSend index valcc valch
getBtnField BtnRef index vRef
getDataField DataCC vRef valcc
getDataField DataChan vRef valch
End
Sub fireBtnPressed index
getBtnSend index vCC vChan
getBtnField BtnSndVal index vVal
Snd vChan vCC vVal
End
Sub fireBtnRelease index
getBtnSend index vCC vChan
Mat I0 = vChan & F0
If I0 == 90
Mat J0 = vChan & 0F
Mat vChan = 80 + J0
End
Snd vChan vCC 0
End
Sub switchBtnStats targetBank
Ass curBank = targetBank
Ass J0 = 1
While J0 < 19
getBtnField BtnRef J0 vRef
getOtherBtnField BtnRef J0 vOthRef
getDataField DataStat vRef vStat
getDataField DataStat vOthRef vOthStat
getBtnField BtnType J0 vType
If vRef != vOthRef
If vStat != vOthStat
setLED J0 vStat 0
End
End
If vType == sb
If vStat == ON
getBtnField BtnGroup J0 vGrp
Ass K0 = vGrp
Ass LK0 = J0
End
End
Mat J0 = J0 + 1
End
End
Sub handleSpecialKeys result
ASS result = FALSE
If bankLeftBtnPressed
If isBankRight
LED_ON bankLeftBtn
LED_OFF bankRightBtn
switchBtnStats bankLeft
end
ASS result = TRUE
End
If bankRightBtnPressed
if isBankLeft
LED_ON bankRightBtn
LED_OFF bankLeftBtn
switchBtnStats bankRight
End
ASS result = TRUE
End
If soloBtnPressed
ASS result = TRUE
End
End
Ass J0 = 1
While J0 < 1B
LED_ON J0
Mat K0 = J0 * $10
Mat K0 = K0 + $200
setLED J0 OFF K0
Mat J0 = J0 + 1
End
setLED bankLeftBtn ON $450
Ass curBank = bankLeft
End
If NoteOn
handleSpecialKeys isXKey
If isXKey == FALSE
getBtnField BtnType M1 vType
If vType == bt
LED_ON M1
fireBtnPressed M1
Else
if vType == tb
fireBtnPressed M1
getBtnField BtnRef M1 vRef
getDataField DataStat vRef vStat
If vStat == ON
LED_OFF M1
setDataField DataStat vRef OFF
Else
LED_ON M1
setDataField DataStat vRef ON
End
Else
if vType == sb
fireBtnPressed M1
Else
LED_ON M1
End
End
End
End
End
If NoteOff
If bankLeftBtnPressed
Else
If bankRightBtnPressed
else
if soloBtnPressed
else
getBtnField BtnType M1 vType
getBtnField BtnGroup M1 vGrp
If vType == bt
fireBtnRelease M1
LED_OFF M1
Else
If vType == ta
LED_OFF M1
ass K0 = vGrp
Ass tLen = LK0
ass tLoop = 1
ass togCount = 0
while tLoop <= tLen
mat K0 = vGrp + tLoop
Ass tbId = LK0
getDataByButton DataStat tbId vStat
mat togCount = togCount + vStat
mat tLoop = tLoop + 1
end
if togCount == tLen
ass tLoop = 1
while tLoop <= tLen
mat K0 = vGrp + tLoop
Ass tbId = LK0
setDataByButton DataStat tbId OFF
LED_OFF tbId
fireBtnPressed tbId
mat tLoop = tLoop + 1
end
Else
ass tLoop = 1
while tLoop <= tLen
mat K0 = vGrp + tLoop
Ass tbId = LK0
getBtnField BtnRef tbId vRef
getDataField DataStat vRef vStat
if vStat == OFF
LED_ON tbId
setDataField DataStat vRef ON
fireBtnPressed tbId
end
mat tLoop = tLoop + 1
end
End
Else
If vType == sb
setDataByButton DataStat M1 ON
fireBtnRelease M1
Ass J0 = vGrp
Ass tbId = LJ0
If tbId != M1
If J0 > 0
LED_OFF tbId
setDataByButton DataStat tbId OFF
End
End
Ass J0 = vGrp
ass LJ0 = M1
LED_ON M1
Else
End
End
End
End
End
End
End
If isCC
If M1 < 22
getBtnField Ctrls M1 vCC
getBtnField CtrlChans M1 vChan
Mat I0 = B0 + vChan
Send I0 vCC M2
Block
End
End
NX = XX +B</string>
</dict>
</plist>