naplesisnotmyhome
2020-05-26 20:20:28
So What I am looking for is to Translate a range of notes, So All Incoming Notes from a Drum pad get their channel Changed.
Incoming Any Note.
What I am not sure of is changing the channel and processing the entire range of notes, Without individual translators At the output side.
Thanks
Attachments:
Steve-Bome Forum Moderator
2020-05-26 21:00:50
Hi, you can do this with 2 translators. One that handles note-on and the other that handles note-off. You capture the incoming note number in a local variable "pp" and then set the range of the notes you want in rules as such.
// put note range here
if pp<10 then exit rules, skip Outgoing Action
if pp>80 then exit rules, skip Outgoing Action
In my example I use note-off to set the next channel as follows. You only do that in note off as you always want note-on and note-off to align. In my example I start with MIDI CH 1 (ga=0) and go up to MIDI CH 16 (ga=15). But you can create any logic you want for setting the MIDI channel. I store the outgoing MIDI ch number in local variable oo.
I use ga (which is a global variable) since it will be persistent across incoming triggers. Local variables oo,pp,qq,rr,ss,tt,uu,vv,ww,xx values do not survive once the translator has executed its outgoing action.
Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz
Attachments:
naplesisnotmyhome
2020-05-26 21:36:43
Thats what I was actually going to ask about was Variable scope. Thanks that is what I was looking for.
Steve-Bome Forum Moderator
2020-05-26 22:39:49
comment
Great, glad to help!