nottooloud
2015-08-20 21:23:24
Behringer's new XR18 mixer has a handful of parameters available as MIDI CCs, but it's fully controllable via OSC. They've given us a workaround, in that it can read OSC text embedded in MIDI SysEx.
This is a patch that reads CC 0-15 on MIDI ch 1, and builds the correct string to control Effect Send 4 for all 16 channels. I'm running it from a Novation LaunchControl, although it should work from any 16 channel controller.
It has functional limitations that don't bother me. It only does Effect 4, with no bank switching, but that's fine because my default set up is one reverb. It doesn't do controller feedback, which is fine because the controller's knobs aren't motorized, and is also fine because I never leave reverb up, so recalling levels isn't important to me. The resolution is limited to 1dB steps. It's pretty laggy, which doesn't bother me for most reverb applications. No way I could do dub effects with it, though. I don't know if the lag is at my end, or in the "SysEx to text evaluation to OSC to data" mess that's happening at the other end.
It works, and does what I want. My question is, how can I make it more efficient? I'm looking for any pointers I can get either. More efficient methods, ways to prune the data, places I'm being sloppy and making things hard for BMTP, or whatever.
This is a patch that reads CC 0-15 on MIDI ch 1, and builds the correct string to control Effect Send 4 for all 16 channels. I'm running it from a Novation LaunchControl, although it should work from any 16 channel controller.
It has functional limitations that don't bother me. It only does Effect 4, with no bank switching, but that's fine because my default set up is one reverb. It doesn't do controller feedback, which is fine because the controller's knobs aren't motorized, and is also fine because I never leave reverb up, so recalling levels isn't important to me. The resolution is limited to 1dB steps. It's pretty laggy, which doesn't bother me for most reverb applications. No way I could do dub effects with it, though. I don't know if the lag is at my end, or in the "SysEx to text evaluation to OSC to data" mess that's happening at the other end.
It works, and does what I want. My question is, how can I make it more efficient? I'm looking for any pointers I can get either. More efficient methods, ways to prune the data, places I'm being sloppy and making things hard for BMTP, or whatever.
Code: Select all
Project: XR18 Novation FX6
Author: Dan Richardson
Contact: tech@nottooloud.com
Comments:
Novation Launch Control to Behringer XR18
16 knobs control channels to effects send 4
4 buttons mute aux sends 1-4, 4 buttons mute FX sends 1-4
Novation knobs MIDI ch 1 CC# 0-15, captured and altered here
Novation buttons MIDI ch 2 CC# 21-24 & 27-30, toggle, pass through
patch also passes through MIDI Fighter Twister unchanged.
Project MIDI IN ports: Launch Control, X18/XR18, Midi Fighter Twister
Project MIDI OUT ports: X18/XR18, Launch Control, Midi Fighter Twister
_____________________________________________________________
[x] Preset 0: New Preset
[x] Translator 0.0: all channels FX4 send
Options: swallow
Incoming: LaunchControl, on port Launch Control
Rules:
// qq is incoming CC#, using 0-15 on MIDI ch1
if qq>15 then exit rules, skip Outgoing Action
// rr is incoming MIDI CC value
// OSC send level range is -90 to +10
rr=rr*100
rr=rr/127
rr=rr-90
// rr has been converted to outgoing OSC level
// generate OSC text hex string from rr
// uu is pos/neg place
// 45 is 0x2d is "-", 48 is 0x30 is "0"
uu=45
if rr>=0 then uu=48
// absolute value
if rr<0 then rr=rr*-1
// tt is 10s place
tt=rr/10
// ss is 1s place
vv=tt*10
ss=rr-vv
// convert to hex
ss=ss+48
tt=tt+48
// qq is CC#, 0-15
// convert to inputchannel #, 1-16
qq=qq+1
// generate OSC text, yy is 10s place, 48 is 0x30 is "0"
yy=48
if qq>9 then yy=49
//zz is 1s place, oo is rounded to 10
oo=qq/10
oo=oo*10
zz=qq-oo
// convert to hex
zz=zz+48
Outgoing: OSC: /ch/yy zz/mix/10/level uu tt ss, to port X18/XR18
F0 00 20 32 32 2F 63 68 2F yy zz 2F 6D 69 78 2F 31 30 2F 6C 65 76 65 6C 20 uu tt ss F7