Quick Sign In:  

Forum: General Discussion

Topic: Setting variable while holding
EphoraPRO InfinityMember since 2023
Hello!

I'm new to VDJ and loving it so far! I've been making my custom mapping for the Mixtrack Platinum FX and wouldn't be able to live without that feature.
Now I'm having a bit of a problem with using buttons to act as secondary shift keys of sorts while keeping their primary binding working.

For example, I'm trying to get my rotary encoder to zoom the waveform in and out while it's pressed, but if just clicked, it should cycle between my songs and folders.

I tried this:
holding ? set_var $waveform_zoom 1 while_pressed : up ? set_var $waveform_zoom 0 : browser_window 'songs,folders'

The problem is that (I assume) the "holding" condition prevents the "up" from working, so it doesn't go back to 0.
Other than that, it works to prevent my library from switching.

Trying this instead:
set_var $waveform_zoom 1 while_pressed & up ? set_var $waveform_zoom 0 : browser_window 'songs,folders'

Now the hold and release work, but it also switches between my folders and songs because it lacks the "holding" condition, and also when I do click to switch between folders, the variable does get set to true for a split second. Not the end of the world but it's not very neat and if I go too fast I might zoom the waveform by accident.

Is there a way to keep the "holding" condition and check for "up" too?

So to recap: I need the rotary encoder to set the variable to 1 while pressed and 0 when released, without registering the single press that switches my folders. (unless I do single press, then do the opposite)

Hopefully that's possible, cause it would make VDJ so much better to use with the controller.

EDIT: how do you format text on here? I tried to use BBcode but it didn't work
 

geposted Wed 20 Dec 23 @ 9:38 pm