Pro tools: How to toggle between two shortcuts using single key

Hi everyone!

New here and wondering how I can do the following:

I have a shortcut for continuous scrolling and one for no scrolling. I don’t want to use separate shortcuts for each option, rather, I would like to have one shortcut that toggles between the two. So if continuous is active, hitting the key selects no scrolling and vice versa. Is there a macro available for this already? I’m not sure how exactly to do this.

Thanks!

You can flip a named Keyboard Maestro calculation value FALSE (0) ⇄ TRUE (1) using the ternary operator.

Here we toggle between playing two different sounds:

Toggle.kmmacros (5.5 KB)

1 Like

Are these two “modes” evoked via a ProTools menu option? I.e. Is there a menu option that changes when one or the other mode is selected? If so, then Keyboard Maestro Action can probably be set to toggle between the two using the same hotkey.
Can you provide some more details amd maybe a screenshot of what the menu items looks like?

1 Like

There are some methods of toggling a variable between 0 and 1 which automatically handle the case where the variable might be blank (i.e., uninitialized), and a blank is treated as a zero. This is useful because it means you don't have to initialize the variable. For lazy people like me, who hate to initialize variables, it's very helpful.

image

I placed it into a large loop to see how it compares in terms of speed to simpler methods (like X=0?1:0, or 1-X, or 1 XOR X, etc.) and I found that not only was my method 5% faster, but there wasn't as much variance in the time it did take. I was surprised, as it looks visually like my method should be slower.

To be fair, 5% faster may not be statistically significant in this case. That could be within the margin of error for my testing methodology. I'm not a statistician.

1 Like