Disclaimer: this turned out into quite a mess and I must say it's probably one of the worst possible ways to get started with open stage control. MIDI is such a pain...
From the little I've read you can only send midi to control the SQ5 so I'll try to start from that. If you can get you hands on a documentation that lists the expected messages as actual midi command names and not as hexadecimal codes you'll find it much easier to work with.
For example, if you wanted to send a control change with a fader you'd set its properties as follow:
- address:
/control
- preArgs:
[1, 40]
(for channel 1, control change number 40)
- range:
{min:0, max:127}
(so that the fader's value can be used as the control change's value which must be between 0 and 127
- target:
midi:my_device
Now lets play detective with your midi command...
B0 63 40 B0 62 44 B0 06 76 B0 26 5C
splits into four messages:
hexadecimal |
decimal |
meaning |
B0 63 40 |
176, 99, 64 |
Control change on channel 1, CC 99, value 64 |
B0 62 44 |
176, 98, 68 |
Control change on channel 1, CC 98, value 68 |
B0 06 76 |
176, 6, 118 |
Control change on channel 1, CC 6, value 118 |
B0 26 5C |
176, 38, 92 |
Control change on channel 1, CC 38, value 92 |
and now things get messy because that's how midi manages to get more precision than the usual 0-127 range provides (up to a 0-16383 range, 128*128 possible values instead of 128), that is by combining two control changes to control a single parameter:
- CC 99 and 98 are combined to determine the NRPN parameter number
- CC 6 and 38 are combined to determine that parameter's value
Open stage control does not pack nor unpack these kind of message sequence out of the box, you have to build them yourself : to send such a command you'll need a single widget to send 4 midi messages every time its value changes, that can be done using scripting :
// fader's onValue property
// assuming range is set to {min: 0, max: 16383}
// assuming target is set to midi:my_device
// assuming bypass is set to true (because the widget's default message is irrelevant here)
send('/control', 1, 99, 64)
send('/control', 1, 98, 68)
// "unpack" 0-16383 range in two 0-127 ranges
send('/control', 1, 6, value >> 7)
send('/control', 1, 38, value & 0x7F)
If the SQ5 uses this kind of message to control most of its parameters (which is fairly possible), building a exhaustive and efficient control surface for it with open stage control will be painfully complicated if you're not familiar with Javscript and with how MIDI works in general. Partly because MIDI is admittedly - on purpose - a second class citizen in open stage control I'm afraid.