Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: How do you set implicit so you can param_cast on a rotary encoder
seanPRO InfinityMember since 2018
This one is still stumping me, if I put the following on a button it works great:
get_clock & param_cast & debug

But on rotary encoder this doesn't work:
param_bigger 0 ? get_clock & param_cast & debug

From what I've heard from LOCODOG you need to set implicit? using one of the param_* verbs? So I tried placing all of the param_* verbs before get_clock but I'm having no luck getting this to work it always outputs the value of the encoder.

What am I missing here?
 

geposted Sat 09 Sep 23 @ 9:14 am
locoDogPRO InfinityModeratorMember since 2013
param_bigger 1 ? set b `get_clock` & nothing & param_cast 'text' 0 & nothing & param_add `get_var b` & nothing & debug :

the "nothing"s are not needed in the script, they're there to show you how the implicit works.
param_bigger 1 ? set b `get_clock` pretty simple
& nothing & param_cast 'text' 0 nothing shows we're not grabbing the info for the cast from the script , ***when there's an implicit there is no casting values from a script*** we're grabbing the implicit - therefore making the implicit a zero length string with param_cast 'text' 0.
nothing & param_add `get_var b` nothing, for the same reasons, then we add our b variable to the implicit [which was an empty string so we need the backticks to parse the value of b, quote marks would be understood as the literal text "get_var b" ]
& nothing & debug : nothing is to again prove once there's an implicit you're stuck with it & debug


*** you can still do stuff with other values with script but only inside `` '' or "", it depends on the case, the implicit doesn't penetrate inside, it is always written after a verb, every verb.***

clean version
param_bigger 1 ? set b `get_clock` & param_cast 'text' 0 & param_add `get_var b` & debug :


I wish there was just a set_implicit verb, it can be set to right now anything, all this hoop jumping could be hidden away, but it's advanced stuff, most users wouldn't need it. If you run into implicit problems, it's within your abilities to learn the fix.

But that said, maybe there's more to it.

Anywho, lesson over, I'll invoice you later XD


*edit I suppose this should work too
param_bigger 1 ? param_cast 'text' 0 & param_add `get_clock` & debug :
 

geposted Sat 09 Sep 23 @ 5:01 pm
seanPRO InfinityMember since 2018
Thanks a heap, I do appreciate it... I feel like none of my programming prepared me for this... that's really something. This might be where I tap out.

I did however test those 3 code snippets to see if I could make sense of it and unfortunately didn't see anything output to debug.
 

geposted Sat 09 Sep 23 @ 6:23 pm
locoDogPRO InfinityModeratorMember since 2013
I'll check again
 

geposted Sat 09 Sep 23 @ 6:29 pm
locoDogPRO InfinityModeratorMember since 2013
maybe a bug with debug, instead of debug inspect via the var_list

param_bigger 1 ? param_cast 'text' 0 & param_add `get_clock` & set result
 

geposted Sat 09 Sep 23 @ 6:43 pm