Hi,
Well I’ll give a few examples. See the attached project file.
I use the global variable ga to determine the toggle state of channel mapping for incoming on MIDI channel 7/
I use the global variable gb to determine if we are in split set mode or normal mode.
I use the global variable gc for the split point.
For the control message translators, I set the ‘Stop Processing’ option so that once triggered the other translators do not do anything.
The ‘Remap’ preset remaps all incoming MIDI on channel 7 to either channel 8 or 9 depending on the state of ga. I can do this with 2 translators, one for incoming two byte message and the other for incoming 3 byte messages. They both use similar rules and look at the incoming MIDI channel and the with bitwise masking, I can re-combine the status byte with the outgoing MIDI channel to create a new status byte (local variable oo)
Here are the rules with oo being the incoming status byte. These are in the ‘Remap’ preset in both translators.
// get MIDI channel into uu 0x0f
uu=oo&15
// get Status nibble into tt 0xf0
tt=oo&240
// is it channel 7 (Zero based)
if uu!=6 then exit rules, skip Outgoing Action
// check if toggle is set to 9
// default to 8
if ga==0 then ss=7
// otherwise MIDI CH 9
if ga==1 then ss=8
// combine status byte with new MIDI Channel
oo=tt|ss
For keyboard split, I toggle gb to determine if in split set mode or normal mode. In split set mode the next incoming keystroke is set to the split point and it then automatically takes you back out of split set mode for normal processing of notes only. Here are the rules. This translator is in Prest 2 "Split).
// Look for note-on or off
rr=oo&224
if rr!=128 then exit rules, skip Outgoing Action
// Look for MIDI CH 8
rr=oo&15
if rr!=7 then exit rules, skip Outgoing Action
// Are we setting the split point
if gb==1 then Goto "Set Split"
Label "Process note"
// Split point in gc
// send to channel 4 if below split point
tt=rr
if pp<gc then tt=3
oo=oo&240
oo=oo|tt
Goto "Done"
Label "Set Split"
// get note number
gc=pp
Log "Split point set to %gc%"
// turn off set split
gb=0
Log "Split Set Function Off"
exit rules, skip Outgoing Action
Label "Done"
I also set up some housekeeping translators in the ‘Control and Init’ preset to set global variables on project start (and document them).
I hope this gets you started.
Channel-Remap-and-Split-Demo.bmtp (3.7 KB)
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz