How to get variables with keystroke incoming ?

  • Forum
  • [RESOLVED] How to get variables with keystroke incoming ?
0
0

Hi.

I’d like to control a digital console mute channel with my computer keyboard.

The mute is midi controlable via a choosen cc. When the cc vlue = 127, the channel is muted, when the cc value is less than 127, it’s unmuted.

I already achived to do that with 2 different keystroke. But I’d like to use the same keystroke for muting and unmuting.

I had the idea to do something like that : if CC value = 127, output 126 … And if the CC value = 126, output 127.

But I would need to put the cc value in a variable ! And when using keystroke incoming, no variable appears ! And also, I would need to check the value of this particular cc on this particular midi output. So, I really don’t know how to do.   HELP !

Thanks a lot !

RESOLVED
Marked as spam
Posted by (Forum: 4, Answers: 10)
April 10, 2019 6:34 pm
39 views

Sh…t ! When cubase is the active application, shortcut like W (A) doesn’t work ! Cubase don’t allow other application shortcut working unless there is the windows as part of the shortcut. And when using the windows key, it becomes a mess since all windows shortcuts use it !

( at April 10, 2019 6:56 pm)

Yep, Windows issue, you will need to find another shortcut key.

( at April 10, 2019 8:29 pm)
0
Private answer

Hi, the below example shows toggling of the global variable ga.

If you look at the rules

ga=ga^1

This is the same as

pp=ga

if pp==1 then ga=0

if pp==0 then ga=1

Then we check the value of ga and if it is 0 we leave it alone and if it is 1 we change the local variable qq to 127

on output we send the local variable qq.

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

 

Marked as spam
Posted by (Forum: 43, Answers: 2903)
April 10, 2019 8:21 pm

Did this help?

( at April 11, 2019 1:55 pm)
Yeah ! Many thanks ! The xor logical gate… I’m not a computer programmer… But I work in automation of big industrial machines, so I get the concept. Excellent. Thanks again ! Just one question : how this command works : ga=ga^1, since the variable ga has not been assigned to anything, why does its value changes when I enter my keystroke ?
( at April 11, 2019 2:43 pm)

ga is a global variable. All global variables are guaranteed to be value of 0 at project start.
If you want to toggle other global variables, you can do that as well. There are 360 global variables available. For more information on global variables and their naming conventions, press one or look at the help menu on MT Pro and a PDF file will open up with the manual.

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

( at April 11, 2019 3:24 pm)

Thank you ! I already have the pdf manual openned ! And indeed, I used another global variable in the same way. I finnally achieved my goal : I first press on the windows key, then I’ve got one second before the start menu closes itself for typing my key stroke. It works pretty well :
I added 2 translators : one to outgoing windows key key stroke delayed of 1000ms and the second one, exactly the sme but delayed of 1100ms in order to completly close the start menu. Indeed, as my mute/unmute key stroke is based on keyboard letters W(A), the start menu searches stuff begenning with ‘wa’, so bome must send twice the outgoing windows key key stroke to close the start menu completly.
Anyway, it works perfectly !
Many thanks ! Bome is a great and much useful soft and the support is perfect !

( at April 11, 2019 4:15 pm)

Glad to have been of help! Could you mark this thread as resolved?

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

( at April 11, 2019 4:20 pm)