So I'm working on a modified MIDI Fighter Twister mapping where if you press the encoder it either kills (0) or resets a STEM (0.5)
($enc_buffer is set to 0.03, the idea is that if you have the stem low you probably don't want it to go lower but reset to normal. enc_buffer determins how close to low you can be)
My issue is that when I run this action it works for going from no stem (0) to full, but not in reverse
Relevant code parts:
Interestingly, what does work is this:
The only difference I can tell is the addition of the variable in the second. I'm sure I'm doing something wrong I just don't see it
($enc_buffer is set to 0.03, the idea is that if you have the stem low you probably don't want it to go lower but reset to normal. enc_buffer determins how close to low you can be)
My issue is that when I run this action it works for going from no stem (0) to full, but not in reverse
Relevant code parts:
<map value="MD1_ENC_1_1" action="deck 3 stem Vocal " />
<map value="MD1_PUSH_1_1" action="var_smaller `deck 3 stem Vocal` $enc_buffer ? deck 3 stem Vocal 0.5 : deck 3 stem Vocal 0 "/>
Interestingly, what does work is this:
<map value="MD1_ENC_1_1" action="deck 3 stem Vocal & set_var $md1_1_1 `deck 3 stem Vocal ` " />
<map value="MD1_PUSH_1_1" action=" var_smaller $md1_1_1 $enc_buffer ? deck 3 stem Vocal 0.5 & set_var $md1_1_1 0.5 : deck 3 stem Vocal 0 & set_var $md1_1_1 0 "/>
The only difference I can tell is the addition of the variable in the second. I'm sure I'm doing something wrong I just don't see it
Posted 10 hours ago
you have params wrong way round for the verb, valid version
var_smaller VARNAME `ACTION`
var_smaller `ACTION` `ACTION`
var_smaller VARNAME `ACTION`
var_smaller `ACTION` `ACTION`
Posted 8 hours ago
locoDog wrote :
you have params wrong way round for the verb, valid version
var_smaller VARNAME `ACTION`
var_smaller `ACTION` `ACTION`
var_smaller VARNAME `ACTION`
var_smaller `ACTION` `ACTION`
So for my example, i would need to to this: (?)
<map value="MD1_PUSH_1_1" action="var_smaller $enc_buffer `deck 3 stem Vocal` ? deck 3 stem Vocal 0.5 : deck 3 stem Vocal 0 "/>
That did not work.
This also did not work:
<map value="MD1_PUSH_1_1" action="var_smaller `$enc_buffer` `deck 3 stem Vocal` ? deck 3 stem Vocal 0.5 : deck 3 stem Vocal 0 "/>
Posted 7 hours ago
Your replies are the wrong way round.
var_smaller $enc_buffer `deck 3 stem Vocal` ? deck 3 stem Vocal 0.0 : deck 3 stem Vocal 0.5
deck 3 var_smaller $enc_buffer `stem Vocal` ? stem Vocal 0.0 : stem Vocal 0.5
Also a good habit is use 0.0 for zero, this case it doesn't matter but there are some cases when it does, and it can be hard to spot the error, so best to use it, if it's a float then write X.Y then the script engine can't misunderstand it as an integer.
var_smaller $enc_buffer `deck 3 stem Vocal` ? deck 3 stem Vocal 0.0 : deck 3 stem Vocal 0.5
deck 3 var_smaller $enc_buffer `stem Vocal` ? stem Vocal 0.0 : stem Vocal 0.5
Also a good habit is use 0.0 for zero, this case it doesn't matter but there are some cases when it does, and it can be hard to spot the error, so best to use it, if it's a float then write X.Y then the script engine can't misunderstand it as an integer.
Posted 6 hours ago
I see many extra spaces in your code. Not sure where or when it matters, but it can cause problems.
Posted 4 hours ago





