Quick Sign In:  

Forum: Wishes and new features

Topic: Add Query and ON/OFF functionality to Multibutton
Very small wish:

Currently multibutton "my_button" cannot be queried or turned ON or OFF.

IE
multibutton "my_button" ? Action A : Action B <<<< DOES NOT WORK
AND
multibutton "my_button" ON <<<< DOES NOT WORK
multibutton "my_button" OFF <<<< DOES NOT WORK

would allow for more scripting possibilities, if any of the above were possible.

Seems currently multibutton, can only toggle itself ON and OFF.

 

Posted Tue 05 Sep 23 @ 1:51 pm
AdionPRO InfinityCTOMember since 2006
Looks like it should work, which action was assigned?
 

Posted Tue 05 Sep 23 @ 2:08 pm
was continuing to work on this topic:
https://www.virtualdj.com/forums/254324/VirtualDJ_Technical_Support/Quick_Filter_for_2X_current_BPM.html

thought I had it working, actually it does work.. but not in every case, let me explain.

I created a quick_filter with:
get_text "( Bpm < `param_multiply 1.04 'deck master get_bpm'` and Bpm >`param_multiply 0.96 'deck master get_bpm'` and Key Difference <= 2 ) or ( Bpm < `param_multiply 2.08 'deck master get_bpm'` and Bpm >`param_multiply 1.92 'deck master get_bpm'` and Key Difference <= 2 ) or  ( Bpm < `param_multiply 0.52 'deck master get_bpm'` and Bpm >`param_multiply 0.48 'deck master get_bpm'` and Key Difference <= 2)" & param_cast 'text' & quick_filter




then was playing with the quick_filter, to query it, with 2 custom buttons (first works, second does not):

1) WORKS:
get_text "( Bpm < `param_multiply 1.04 'deck master get_bpm'` and Bpm >`param_multiply 0.96 'deck master get_bpm'` and Key Difference <= 2 ) or ( Bpm < `param_multiply 2.08 'deck master get_bpm'` and Bpm >`param_multiply 1.92 'deck master get_bpm'` and Key Difference <= 2 ) or  ( Bpm < `param_multiply 0.52 'deck master get_bpm'` and Bpm >`param_multiply 0.48 'deck master get_bpm'` and Key Difference <= 2)" & param_cast 'text' & quick_filter ? deck 3 play_pause  : deck 4 play_pause 


2) DOES NOT WORK
get_text "( Bpm < `param_multiply 1.04 'deck master get_bpm'` and Bpm >`param_multiply 0.96 'deck master get_bpm'` and Key Difference <= 2 ) or ( Bpm < `param_multiply 2.08 'deck master get_bpm'` and Bpm >`param_multiply 1.92 'deck master get_bpm'` and Key Difference <= 2 ) or  ( Bpm < `param_multiply 0.52 'deck master get_bpm'` and Bpm >`param_multiply 0.48 'deck master get_bpm'` and Key Difference <= 2)" & param_cast 'text' & quick_filter ? blink 500ms : off


both are the same, just different actions.


NOTE: all other tested less complicated quick_filters work as expected.
such as:
quick_filter 4 ?  blink 500ms : off

and
quick_filter "key difference = 0" ? blink 500ms : off



Now to the Multibutton
and the multibutton action, I had created was:

action="get_text &quot;( Bpm < `param_multiply 1.04 'deck master get_bpm'` and Bpm >`param_multiply 0.96 'deck master get_bpm'` and Key Difference <= 2 ) or ( Bpm < `param_multiply 2.08 'deck master get_bpm'` and Bpm >`param_multiply 1.92 'deck master get_bpm'` and Key Difference <= 2 ) or  ( Bpm < `param_multiply 0.52 'deck master get_bpm'` and Bpm >`param_multiply 0.48 'deck master get_bpm'` and Key Difference <= 2)&quot; & param_cast 'text' & quick_filter"


and the multibutton could not be queried, or turned ON/OFF

The multibutton does work .. toggling ON/OFF the quick_filter.


and now with above troubleshooting... maybe there is something about the action.. itself, since it does not behave all the time as expected, and thus causes the multibutton NOT be queried or turned ON/OFF.

Hope the above, is not too confusing..


Let me know if you there is explanation why 1) would work and 2) does NOT.

Again maybe the same reason there was an issue with querying the multibutton.




PS
would be much easier, as you mentioned earlier, if "BPM difference" automatically/naturally, allowed for the 2X BPM in the quick_filter construction.
"hint .. hint"
 

Posted Tue 05 Sep 23 @ 3:07 pm
locoDogPRO InfinityModeratorMember since 2013
to query it's
quick_filter 0 ?

I honestly don't think multibuttons can be directly queried, like pads can't [other than down/up] .
you can set a variable in the button and use that as a proof of state.
 

Posted Tue 05 Sep 23 @ 4:12 pm
Thanks locodog for your awesome help..... always so appreciated !

locodog wrote :
to query it's
quick_filter 0 ?

I have had no issues querying both the quick filters set with the skin, (numbered quick filters)
Or those written with script. (example of both above)

and this is first case, a query has not worked, the above case, (and it works for one query and NOT for the other). strange, could it be that an implicit is causing an issue? (first time creating a quick_filter with a param_cast)



locodog wrote :
I honestly don't think multibuttons can be directly queried, like pads can't .

hence the reason for the Wish.

will have to test a simpler mulitbutton, at some point, to see if all behave the same.


And great suggestion to set a variable. (the wish is that the the state could be determined or set innately)
 

Posted Tue 05 Sep 23 @ 4:47 pm