We are trying to implement a preset system in OSC.
toggle_preset is a widget the allow/disallow this machine (defined with variables.n) state to be store in preset (defined with variables.p). Preset switch is used to recal presets.
Is there a way in pure-JS to do concatenation of ids ? We tried multiples way to do it and counldn’t succeed to do this.
Example code shown below (not working, syntax error)
JS{{
var toggle_v = @{umc_@{parent.variables.n}_@{parent.variables.p}_toggle_preset.value};
if (@{preset_switch.value} == @{parent.variables.p}) and (toggle_v == 1) {
set("umc_@{parent.variables.n}_position", @{umc_@{parent.variables.n}_@{parent.variables.p}_position_preset});
}
}}