While there's already a "only trigger when this nummer is active" option, there's no way to exclude a number. Please add an exclude as well so we can use a certain cc as Shift key, or even better, let us define one number globally as a shift key and add a check box "shift active". Thank you
I think I don't fully understand the request yet. (I'm not too familiar with midi devices etc.). Can you maybe post a concrete example of how you'd like to configure your device?
to make it even better, it would be really nice if the shift function itself could also be defined as toggle (optional) so you don't have to press it permanently. but this is really just nice to have. I'd be more than happy with the basic functionality
Are you sending a midi message when you press the Shift button of your device?
no, i use it purely to trigger other functions in BTT. I'ts not assigned to anything else
Do you mean that the shift button of the console/device that you are showing in the video, is a standard shift button? Is it like a shift button in a mac keyboard?
no it's a regular button with a number.
I would like to help you, but I don't understand the shift button of your device.
Could you post a screenshot of BTT configuration showing the trigger that is triggered when you press that Shift button?
the shift button isn't the problem.
the problem is that I want to use two functions on another button and I can't excluse the shift button so it's not firing both actions.
Button 1 - Function A
Shift + Button 1 - Function B
There is already a "only trigger action when note is active"
But since I there's no "dont trigger action when note is active"
it results in
Shift + Button 1 - Function AB
You can do it using "if/else/end if condition" in the actions list OR the advanced conditions of the trigger using a custom variable.
Let's use "if/else/end if condition" in the actions list, and a new custom variable called "shiftMode".
If you want to configure the Shift button as a toggle button:
Trigger: Shift button -> Action: IF "shiftMode" has the value "enabled" set "shiftMode" to "disabled" ELSE set "shiftMode" to "enabled"
Trigger: Button 1 -> Action: IF "shiftMode" is "enabled" execute function B, ELSE execute function A
If you want to configure the Shift button to be enabled only while it is being pressed:
Trigger: Shift button PRESS -> Action: set "shiftMode" to the value "enabled"
Trigger: Shift button RELEASE -> Action: set "shiftMode" to the value "disabled"
Trigger: Button 1 -> Action: IF "shiftMode" is "enabled" execute function B, ELSE execute function A
If you want to configure the Shift button to be enabled when you press it, and also disable it after pressing another button:
Trigger: Shift button -> Action: IF "shiftMode" has the value "enabled" set "shiftMode" to "disabled" ELSE set "shiftMode" to "enabled"
Trigger:Button 1 -> Action: IF "shiftMode" is "enabled" execute function B and set "shiftMode" to "disabled" , ELSE execute function A
I have seen your video again and finally I have understood what you are looking for.
In sumary:
- The configuration you want to do can be done with the current features of BTT. Just follow the steps I posted previously.
- You can use ANY button of your desk as a modifier, not only the shift button.
- You can set more than one button as a modifier if you need it
Thank you for the solutions. Where exactly would I find the if / else statements?
Edit: I found it, but I must keep doing something wrong. Neither shift on or off shortcuts are working.
Here's what I setup
The Shift key:
If Pressed = 1
Else = 0
shift unpressed:
shift pressed:
It's difficult to me to understand your screenshots because they are in german, but I will do my best.
First, let's focus on the Shift trigger.
Test yourself if the configuration is working correctly using the action "Show HUD overlay" for showing the values of the variable.
Type the name of the variable inside "{}" to show the value of the variable inside the HUD overlay.
Try to copy this configuration for the SHIFT trigger:
Everytime you press the shift button you should see a hud overlay showing 1, 0,1, 0, 1, 0, and so on.
Does it work?
thanks for your effort!
Unfortunately it's not working,
It seems that the problem is in the configuration of the first action:
The first action should be like this:
Take care of the quoted "0" of your IF condition and the unquoted 0 of my IF condition. The quoted zero means that it is written as text. The unquoted zero means that zero is written as number.
As "0" (text) is not equal to 0 (number), every time that Shift button is pressed the value is set to the value defined in the ELSE condition. I guess that is the problem.
To fix it, just do one of these options:
- set the variable type to "text" instead of "number" in the configuration of the two actions "Set/Assign Value For Variable"
- remove the IF condition and add it again. Maybe it is set again as text because it is stored as text. Then you should assign first the variable as a number variable. You can do this restarting BTT after adding the trigger I explain at the end of this post.
Also take care of removing the left_mouse_down condition of the IF condition (I suppose you don't need it).
The IF condition should be like this if you want to use the number variable:
It is also handy to reset the custom variable every time you reboot the computer or restart BTT. Just go to All Apps > Automations, names and other triggers and add this trigger:
Then add an action to assign the initial value you want to assign to the shift button, as a number or as a text.
EDIT: You can always go to BTT Preferences > Scripting BTT to see the variables currently stored in BTT and their values. The "Refresh Variables" button update their values.
Thank you! I finally got it working.
The variables were correctly set as numbers already but I realized the shift value was -12312 . I added another if condition to reset it to zero first if it's lower than -1 and now it's working as expected.
Last question: Is ther a way to set the Shift == 1 condition for a whole folder?
Yes, you could use conditional activation groups
Yes, the actions were you set the variables were correctly configured as numbers. The problem you had before was the IF condition. Now it's working correctly because your IF conditions are working with numbers, not with text as before.
The previous problem of your configuration had no relation with numbers lower than zero.
To explain it better, let's take the configuration I posted previously:
This block of actions executes one of two options:
- If the value of SHIFT is equal to a number zero, SHIFT is set to number 1
- If the value of SHIFT is equal to any number different to zero, or is equal to any text, or is equal to a missing value, SHIFT is set to number 0
If SHIFT has the value of -12312 and you press the shift button, the SHIFT variable will be set to 0 (the ELSE action will be executed). So you shouldn't need to add the new IF-ELSE-END IF actions to detect if the SHIFT value is less than -1.
But if you want to set SHIFT to 1 when the SHIFT variable is lower than zero, the solution is to switch all 0s and 1s in the actions list:
Summary: I recommend you to use this last configuration as it makes more sense, and to remove the added conditions for numbers lower than zero.
Another advice
If you want to configure several buttons of your console with a double function depending of the value of the SHIFT variable, it's important that the value of SHIFT is always under control, in all cases and situations.
You can experience problems/conflicts/unexpected behaviours if the SHIFT variable has a value different to 0 or to 1 in any moment, as you are going to configure several triggers/actions depending of these two values.
In other words, you shouldn't accept that your SHIFT variable could have a value of -12312 at no time.
For that reason, it's important to set your SHIFT variable to 0 or to 1 every time that BTT restarts.
Last advice
I see that you are configuring the BTT midi triggers without filtering the notes by channel or by device.
Are you aware that this could be dangerous?
I understand. I already have multiple shift layers now and most work aside from two buttons. Maybe you could have a look. I appreciate it.
Depending of the context I want a button (it's labeled OK) to activate different shift layers.
When on the editor page (Shift == 1) I want it to open a folder
When on the mixer page (Shift == 2) I want it to open the channep settings and set shift == 4
Below you see a second mapping for the OK button if shift ==1
Although shift ==1 is true when I check, it still sends the function of shift ==2