Hi,
I am new to scripting and was trying to write a macro in poi editor to change the video effect depending on how many times a cue was relooped (I've wrote it so that once it reaches the next cue it loops back to the previous cue 4 times). I can't seem to find the variable "looptest" in var_list. I guess there is something wrong with my syntax, as I am probably not right in how I nest commands and use quotes. Any help is appreciated. Thanks.
first cue (sequence-wise ; actually cue 16 toward the end of the song which I activate first):
set 'counter' 0 & var_list & goto_cue 1
second cue (I've made it cue 1):
set 'counter' `param_add "get_var 'counter'" 1`
& set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 3` .25`` & var_equal 'looptest' 0 ? video_fx_select "shader" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 2` .25`` & var_equal 'looptest' 0 ? video_fx_select "cover" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 1` .25`` & var_equal 'looptest' 0 ? video_fx_select "camera" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 0` .25`` & var_equal 'looptest' 0 ? video_fx_select "slideshow"
third cue (actually cue 2):
var_equal 'counter' 4 ? set 'counter' `param_add "get_var 'counter'" 1` : goto_cue 1 & set 'counter' `param_add "get_var 'counter'" 1`
& set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 3` .25`` & var_equal 'looptest' 0 ? video_fx_select "shader" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 2` .25`` & var_equal 'looptest' 0 ? video_fx_select "cover" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 1` .25`` & var_equal 'looptest' 0 ? video_fx_select "camera" :
set 'looptest' 'param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 0` .25`` & var_equal 'looptest' 0 ? video_fx_select "slideshow" :
video_fx_select "slideshow"
I am new to scripting and was trying to write a macro in poi editor to change the video effect depending on how many times a cue was relooped (I've wrote it so that once it reaches the next cue it loops back to the previous cue 4 times). I can't seem to find the variable "looptest" in var_list. I guess there is something wrong with my syntax, as I am probably not right in how I nest commands and use quotes. Any help is appreciated. Thanks.
first cue (sequence-wise ; actually cue 16 toward the end of the song which I activate first):
set 'counter' 0 & var_list & goto_cue 1
second cue (I've made it cue 1):
set 'counter' `param_add "get_var 'counter'" 1`
& set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 3` .25`` & var_equal 'looptest' 0 ? video_fx_select "shader" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 2` .25`` & var_equal 'looptest' 0 ? video_fx_select "cover" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 1` .25`` & var_equal 'looptest' 0 ? video_fx_select "camera" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 0` .25`` & var_equal 'looptest' 0 ? video_fx_select "slideshow"
third cue (actually cue 2):
var_equal 'counter' 4 ? set 'counter' `param_add "get_var 'counter'" 1` : goto_cue 1 & set 'counter' `param_add "get_var 'counter'" 1`
& set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 3` .25`` & var_equal 'looptest' 0 ? video_fx_select "shader" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 2` .25`` & var_equal 'looptest' 0 ? video_fx_select "cover" :
set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 1` .25`` & var_equal 'looptest' 0 ? video_fx_select "camera" :
set 'looptest' 'param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 0` .25`` & var_equal 'looptest' 0 ? video_fx_select "slideshow" :
video_fx_select "slideshow"
Inviato Mon 15 Jun 20 @ 9:21 pm
set 'counter' `param_add "get_var 'counter'" 1`
works but can be written
set 'counter' +1
or maybe even
cycle 'counter' 4
I can't fathom what you're trying to do here,
& set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 3` .25`` &
but you can only use one pair of ` ` [first opens, second closes] there is no nesting of backticks
why even use looptest var when you already have counter, truth be told why use an action on second cue [#1]
cue 16
set 'counter' 0 & goto_cue 1 & video_fx_select "shader"
cue 2
goto_cue 1 & cycle 'counter' 4 & var 'counter' 0 ? video_fx_select "shader" : var 'counter' 1 ? video_fx_select "cover" : var 'counter' 2 ? video_fx_select "camera" : var 'counter' 3 ? video_fx_select "slideshow" : [THIS PART HERE WILL NEVER BE TRUE AS WHEN CYCLE COUNTER IS ABOUT TO HIT 4 IT WRAPS ROUND TO ZERO]
works but can be written
set 'counter' +1
or maybe even
cycle 'counter' 4
I can't fathom what you're trying to do here,
& set 'looptest' `param_cast 'frac' `param_multiply `param_add "get_var 'counter'" 3` .25`` &
but you can only use one pair of ` ` [first opens, second closes] there is no nesting of backticks
why even use looptest var when you already have counter, truth be told why use an action on second cue [#1]
cue 16
set 'counter' 0 & goto_cue 1 & video_fx_select "shader"
cue 2
goto_cue 1 & cycle 'counter' 4 & var 'counter' 0 ? video_fx_select "shader" : var 'counter' 1 ? video_fx_select "cover" : var 'counter' 2 ? video_fx_select "camera" : var 'counter' 3 ? video_fx_select "slideshow" : [THIS PART HERE WILL NEVER BE TRUE AS WHEN CYCLE COUNTER IS ABOUT TO HIT 4 IT WRAPS ROUND TO ZERO]
Inviato Tue 16 Jun 20 @ 10:38 am