Same dial, 2 functions - how to please?

Hi, my dial has a rotary switch (relative) and a push-hat switch.

I want to program it so that: ...if I turn the dial, it does function 1 and ...if I turn the dial while pushing it down, it does function 2 instead.

I figured I could have two states for the dial which I could call with a global variable (eg., If dial is pushed, then "g6=1" and if dial is released, then g6=0").

However, when writing the rotary scripts, if I try to call the global variable (push state) by typing:

"If g6=o then...." or ""If g6=1 then...", I immediately get a syntax error.

How do I incorporate the 2 states for the dial in separate translator functions please? Thank you.


Attachments:
![](upload://uvYbzQsBpwxZ2i7nFsGUXuuN0ri.jpeg)

I know a different alternative that worked for me, make 2 presets lets call the first PUSHUP here add translator as you regular would for the turning aka function1, then add a second preset call it PUSHDOWN in this one add translator for your turn Function2. now do the following, enable the Preset of PUSHUP by default and disable PUSHDOWN… then add a translator the PUSHUP that Enables the Preset PUSHDOWN (when u press the turnknob) then also add Disable Preset PUSHDOWN on activation of PUSHUP… and vice versa for the other (in PUSHDOWN add a translator to activate PUSHUP when the turnknob is pressed and disable PUSHUP as soon as PUSHDOWN is activated) hope this makes sense 🙂 it might be considered cheating but it should work!

Like a toggle between the two functions, perfect! How do I enable/disable the presets in a translator please?

ah yes i forgot assumed you knew that option… ehm if i remember correctly go to output and select something allong the lines of ‘preset/actions’ as soon as you select you’ll see something like: Ativate By Name / Deactive By Name (more of those sorts, don’t have BMT with me know to check) but i’m like 99,9% sure you can find it now… if it doesn’t work, I can send you an example file in a couple hours!

Oh wait now that i think of it, in my case it was a push button that was seperate
from the turnknob… so i didn’t have to hold it down, so if I understand correctly in your case while holding down U would still need to incl some variables (one that would switch to PUSHUP preset as soon as you release) i haven’t checked BMT for ‘pressed’ and ‘release’ states, but you seem clever enough to get it fixed 🙂

I was in a good mood and since Steve helped me so many times…
Thought I do something back for the community, so I present you my first solution haha
When I doublechecked all my mixers I found out that my DJ-TECH Mix-101
Has got 3 PUSHDIALS (if thats even the correct name)
So I opened up a fresh BMT and without further coding/variables etc. all works flawlessly

I’m sure Steve and others know of more efficient ways, but this was my own design hehe

Awesome! Thanks so much. I had got it to work from your first comment, I delved and found the “preset change option” you just mentioned, to enable and disable by name. I used a slightly different method, yours looks more efficient so I’ll probably add yours instead.


Attachments:
1550586311216_Ableton-Live-6-control.txt
1550586416739_PUSH-RELEASE.bmtp

good to hear 🙂 you’re welcome! 🍻

Good job,
Yes this can also be done with variables if you don’t like the preset method but either one works just fine. That is the nice thing about MT Pro. It is powerful and can do things in different ways depending on user design.

The original reason you saw the error is that if you are looking for equality you need to use two equal signs. For assignment it is one equal sign.

For instance this works
if pp==1 then ga=1

But this will not
if pp=1 then ga=1

For the variable method you would have a translator that sets a global variable like ga to one when pushed and then to zero when released

Translator Push button
Incoming: 93 03 qq
Rules:
ga=qq

Then for knob twist input you would have a rule to skip outgoing action if the knob push is not in the right state

Knob Right Push Released
Incoming B3 11 qq
Rules:
// abort if pushed down
if ga!=0 then exit rules, skip outgoing action
// this translator for right only
if qq!=41 then exit rules, skip outgoing action

Outgoing : Physical Key – Right


Again, just a matter of preference. Of course you would have translators for the other 3 states with different comparison operators and outputs.

-Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

thanks i will still study and try your, so i can learn from it… but for some reason even when i finally understand i still can’t come up with it myself, while i did manage mine alternative 🤨 haha ohwell

Yes, we are all still learning here. Looking at other peoples solutions seems to help grasp new techniques that we may not have otherwise thought of.

Thanks again!