Accesso rapido:  

Forum: VirtualDJ Technical Support

Topic: Question about variable precision

Questo argomento è obsoleto e potrebbe contenere informazioni obsolete o errate.

HermeiControlleristMember since 2013
Side note - thanks to everyone who helped with the scripting questions I had before, apologies for anyone who had to read my beginner nonsense. I've managed to get the hang of it (at least for my use) now.

There seems to be a bug which doesn't really define the slot a sampler is assigned to (e.g. scripting a button with sampler_rec 3, and another button with sampler_play 3, the second button won't play the sample I recorded and designated to slot 3 but instead another sample in my bank (sometimes not even the third one on the list but the first or second one))

So instead I've just managed to assign active cues from the track ( on the left deck - from which I was recording my sampler) to a few variables using "set '@$myVar' `get_cue`" and then script a few poi actions on a silent track (right deck) with "deck left goto_cue `get_var 'myVar'` & deck left play". However this doesn't work for all of the pois.

Using trial and error (param_bigger, var_equal) I figured some variables are not exactly defined precisely as indicated in var_list or even the global variables I found in the settings file. For example if I executed "set 'myVar' 1.2701", "var_equal 'myVar' 1.2701 ? " would return false but "var_equal 'myVar' 1.2700999 ? " would be the only query which returns true. Which doesn't make sense since the value is 1.2701 in var_list and 1.27010 in the settings xml document. Ideally I would like the actual value to be set to 1.2701 (mind you this only happens with only a few variables and I have no idea why - but I have set about 100 other variables and corresponding pois for this purpose and this error usually happens after I've set the 10th variable). Is it because I need to cast the correct data type? Am I using too many variables or missing something else here? Any help would be greatly appreciated.
 

Inviato Mon 10 Aug 20 @ 4:42 pm
HermeiControlleristMember since 2013
edit : okay I managed to see what was wrong, var_equal doesn't work too well with decimal value comparisons due to rounding errors in float-type variables. It probably happened when I modified those variables (Adding 1.0001), I could have clarified my modification in the OP. Sorry for any confusion
 

Inviato Mon 10 Aug 20 @ 11:01 pm


(Vecchi argomenti e forum sono automaticamente chiusi)