Quick Sign In:  

Forum: General Discussion

Topic: doubleclick & holding
MrJackyPRO InfinityMember since 2015
Why can I not use Holding when using doubleclick?

I think I should be able to combine vdjs verbs of this type, for example:
doubleclick ? nothing: holding 300ms ? nothing: play

holding 300ms ? up ? pause: nothing: stop
 

Posted Fri 30 Aug 19 @ 12:26 pm
locoDogPRO InfinityModeratorMember since 2013
doubleclick works like this, you press it and it asks is this the first or second time I've been clicked?, if its the first time it sets a variable to true for a time [300ms by default] which if it isn't pressed again in that time it performs the single click action when the time is up.

Generally all the queries that need clickEvent to happen [holding,up,down,repeat] don't play nice together because they're all looking at the same cause but wanting a different effect, to be honest I've not tried doubleclick with the others but I think it will just lead to headaches.
 

Posted Fri 30 Aug 19 @ 12:52 pm
MrJackyPRO InfinityMember since 2015
locodog wrote :
Generally all the queries that need clickEvent to happen [holding,up,down,repeat] don't play nice together because they're all looking at the same cause but wanting a different effect, to be honest I've not tried doubleclick with the others but I think it will just lead to headaches.


thanks locodog

I begin to understand the reason why it doesn't work
it's a shame that this happens

I try to configure the "sample mode" button on my MC2000.
This button serves as a switch for the 4-button pad, alternating hotcues and samples ... In my hotcue1 do I have pad_bank2 ? pad 9: pad 1 and in sample1 do I have pad_bank2 ? pad 13 : pad 5
In this button I also have added a set 'ctrl' 1 while_pressed as if using the CTRL key on my keyboard

I would like to have this switch set up like this
set 'ctrl' 1 while_pressed & doubleclick ? setting 'sixteenPadsMode' 'On' & pad_bank2 : holding 10000ms ? nothing :  toggle 'sample_mode'



do you think I could do something similar with the help of a repeat?
 

Posted Fri 30 Aug 19 @ 3:31 pm
locoDogPRO InfinityModeratorMember since 2013
Well you're not really using holding, but while_pressed is another clickEvent so I don't know if this will work, up to you to try it

set 'ctrl' 1 while_pressed & doubleclick ? setting 'sixteenPadsMode' 'On' & pad_bank2 : toggle 'sample_mode'
 

Posted Fri 30 Aug 19 @ 3:39 pm
NicotuxHome userMember since 2014
@locodog
This is an extended version of your "DOUBLECLICK" simulation script
This one handles single and double clicks as well as holding in both cases
Another one monstrosity

CUSTOM CLICK, DOUBLECLICK, HOLDING, HOLDINGDOUBLE - FOR TOUCH SCREENS

up ? repeat_start dblhld ? repeat_stop dblhld & DOUBLECLICK ACTION : var doubleclick ? nothing : set doubleclick 1 : repeat_start dblrep ? repeat_stop dblrep & set doubleclick 2 & repeat_start dblhld 250ms 1 & HOLDINGDOUBLE ACTION : set doubleclick 0 & repeat_start dblrep 500ms 1 & var doubleclick ? SINGLECLICK ACTION : HOLDING ACTION
 

Posted Fri 30 Aug 19 @ 4:40 pm
MrJackyPRO InfinityMember since 2015
locodog wrote :
Well you're not really using holding, but while_pressed is another clickEvent so I don't know if this will work, up to you to try it

set 'ctrl' 1 while_pressed & doubleclick ? setting 'sixteenPadsMode' 'On' & pad_bank2 : toggle 'sample_mode'


actually if it does its job
sample mode more than a button is an on / off switch
with your line I can't use the while_pressed without exchanging the hotcue for the sample, while nothing allows me to combine the switch with another button

tomorrow I will try to get it by repeat to see if I get it to work as desired

thanks Nicotux, you gave me an idea
 

Posted Fri 30 Aug 19 @ 5:29 pm
MrJackyPRO InfinityMember since 2015
Thanks again Nicotux, your vdjs works great! I'm about to leave it as is
set 'ctrl' 1 while_pressed & up ? repeat_start 'dblhld' ? repeat_stop 'dblhld' & setting 'sixteenPadsMode' 'On' & pad_bank2 : var 'doubleclick' ? nothing : set 'doubleclick' 1 : repeat_start 'dblrep' ? repeat_stop 'dblrep' & set 'doubleclick' 2 & repeat_start 'dblhld' 250ms 1 & nothing : set 'doubleclick' 0 & repeat_start 'dblrep' 500ms 1 & var 'doubleclick' ? toggle 'sample_mode' : nothing


Holding down the switch and releasing it changes the hotcue to sample without altering the variable 'sample_mode'

This is not a problem when combined with another button! When combined, it doesn't work like a switch

Therefore, it is just what I intend to achieve. I intended to do it myself, but you saved my work.
 

Posted Sat 31 Aug 19 @ 8:06 am
LuillyLE userMember since 2003
sorry wrong comment
 

Posted Wed 16 Jun 21 @ 4:56 pm