Using One Translator To Skip Outgoing Action Of Another Translator

ibanman555

2016-09-27 23:57:39

Hej Hej!... So I've been contemplating an idea to hopefully reduce a problem I have been having with my motorized fader's, but it requires the need to temporarily stop a translator from operation. I'll do my best to explain and hopefully there is a simple rule I can use to complete the puzzle.

I have 2 (actually 3) translators per fader;

the 1st sends controller fader messages to move the onscreen fader it's matched to.

Code: Select all

Incoming: B7 07 pp B7 27 qq
Outgoing: B0 07 pp B0 27 qq
the 2nd sends onscreen fader movements back to controller fader.

Code: Select all

Incoming: B0 07 pp B0 27 qq
Outgoing: B7 07 pp B7 27 qq
The fader is also a momentary touch switch, we'll call this the 3rd translator

Code: Select all

Touch: B0 4A 7F
Release: B0 4A 00
What I am looking to do here is when I touch the fader, sending B0 4A 7F, I want to deactivate the 2nd translation from occurring, until I release the fader (B0 4A 00), and that will resume translator #2. Is this possible?

PS: All the translators are in different presets....

TomViolenz

2016-09-30 12:27:40

Hey I'm just another user, but here is what I do in these situations.

Have the one Translator that you want to use to set the other to skip set a global variable.
Probably via using the velocity value.

so instead of:

Touch: B0 4A 7F
Release: B0 4A 00

you use:

Touch: B0 4A qq
Release: B0 4A qq

and then add:

If qq=0 then zz=0
If qq=127 then zz=1


And in the other translator, the one to be skipped, you then add a line:

If zz=1 exit rules skip outgoing action.

Hope this helps 8)

ibanman555

2016-09-30 16:15:14

Hmmm this one is tricky. I tried something like this, and used Jump and Label rules to get to the other translation. The problem I am having is that it deactivated the Translator using "exit rules, skip outgoing action", and another Translator with rules "execute outgoing action" but it seems the Translator remains disabled... Not sure what I'm missing.

TomViolenz

2016-09-30 16:54:37

Hm, I'm not sure I understand your problem.
Maybe you should post the code to your translators here.

The code I posted should solve the issue such as you described it in your OP.

Basically what you are doing is to record the state that fader is in (touched or not touched / qq=127 or qq=0 / zz=1 or zz=0)
And then you use that recorded state to determine if that other translator is executed or not (via conditionally skipping the outgoing action depending on the value of zz in that one). zz here is the global variable that can transfer that state information to the other translator, since it does not get reset when the translator is finished like your local variables do like qq in your case.
Important of course is that you record that touched state via changing:
Touch: B0 4A 7F
Release: B0 4A 00

to
Touch: B0 4A qq
Release: B0 4A qq

Did you forget to change that?


Anyways there is no need for jump and label rules, unless you need to do something else with it. (that's why I asked for your code). Also jump and label are internal to a translator. They allow you to jump to different regions in your ruleset (bypassing others). They don't work between translators if that is what you thought.

TomViolenz

2016-09-30 18:47:50

To make it easier I just write it up for you in the simplest way
Translator 1:

Code: Select all

Incoming: B7 07 pp B7 27 qq
Outgoing: B0 07 pp B0 27 qq
Rules:
If za==0 exit rules skip outgoing action


Translator 2:

Code: Select all

Incoming: B0 07 pp B0 27 qq
Outgoing: B7 07 pp B7 27 qq
Rules:
If za==0 exit rules skip outgoing action



Translator 3:

Code: Select all

Incoming: B0 4A qq
Outgoing: NA
Rules:
za=qq


I changed zz to za. Both are global variables, but maybe you got confused because zz kinda looks like a local one.
I also simplified the setting of za since you don't actually need two if/then statements you can just write the qq value to za and use that value (0 or 127) as the state.
So za is 0 when qq is 0 and qq is 0 when you haven't touched (=released) that fader. Which in turn means Translators 1 and 2 get skipped when you haven't touched the fader.

I hope that solves your issue 8)

BTW the above approach is exactly what you do if you want to set up a shift button. With Translator 3 being the actual shift button and the conditional skipping in the other translators leading to the alternative rules to execute when shift is pressed.
So it comes in very handy very often :D

ibanman555

2016-09-30 21:22:35

Ok thanks for taking the time to try and explain this process to me. I'm not with the controller or BMT now, but I'll test this out tomorrow evening. I do however have a few questions regarding the global variable, and I'd like to explain in more detail what I'm looking to do.

When I move my controller fader, BMT receives incoming data from the controller fader, translates and sends the outgoing data to my software fader. This is translator 1 action.

At the same time, while the fader on software is moving, it is looping back, and sending the Translator 2 data back to the controller fader. So, this is what I am trying to avoid, the "loopback" that is occurring. (this is causing a lot of unnecessary data flow)

I need Translator 1 to always remain active, meaning when I touch the controller fader and move it, only Translator 1 is functioning. When I "touch" the fader, I only need to deactivate Translator 2, preventing this loop from occurring. "Releasing" the fader will now let Translator 2 operate...

Now, if I use the mouse to move the software fader, it will move the controller fader, that is the function of Translator 2. There appears to be no looping in this action.

So would I just need to remove the rule from Translator 1 to make it continuously active? Also, I want to skip outgoing of Translator 2 when touched... So it should be "If za==127,skip..."? When I release, za==0, should I make another rule in translator 2 to reflect that?

Sakis

2016-10-01 13:51:24

Controller->BMT->Software port
Translator 1 (always active). Must be first on the project and preset

Code: Select all

Incoming: B0 4A za
Software->BMT2->Controller port
Translator 2

Code: Select all

Incoming: B0 07 pp B0 27 qq
Outgoing: B7 07 pp B7 27 qq
If za==127 exit rules skip outgoing action
That's it.

Now (just a guess), if I understand your setup, then moving the faders on your hardware controller ,your software will also (unnecessarily) send the data back to the controller. If you don't want ,there are some options ,but it depends if you have other hardware connected to the software which you may want to reflect their state to your main controller.

ibanman555

2016-10-02 00:23:36

Thanks to you both for the help and guidance, this makes sense now and I will give it a try. I'll post back here if I seem to be having issues.