This works but it's a bit janky. Can you suggest a more efficient way to do it? Use case is an 'erase' fader: Swipe the fader to activate Erase - but only when a track is armed. I'm sure there's a more elegant way to code this - or perhaps calling a script when the fader is swiped?
Side-issue: Fader 'spring' is normally reliable for me, but with this script it doesn't always 'reset'. Hence the 'manual reset' attempt at the end. Any ideas on this?
Thanks!
if (value >= 120 && @{Looper1ControlsFXrow1Arm}==1024) {
set("Looper1Controlsaction_rowerase_panelErase", 127)
set("Looper1Controlsaction_rowerase_panelErase", 0)
}
if (value >= 120 && @{Looper2ControlsFXrow1Arm}==1024) {
set("Looper2Controlsaction_rowerase_panelErase", 127)
set("Looper2Controlsaction_rowerase_panelErase", 0)
}
if (value >= 120 && @{Looper3ControlsFXrow1Arm}==1024) {
set("Looper3Controlsaction_rowerase_panelErase", 127)
set("Looper3Controlsaction_rowerase_panelErase", 0)
}
if (value >= 120 && @{Looper4ControlsFXrow1Arm}==1024) {
set("Looper4Controlsaction_rowerase_panelErase", 127)
set("Looper4Controlsaction_rowerase_panelErase", 0)
}
if (value >= 120 && @{Looper5ControlsFXrow1Arm}==1024) {
set("Looper5Controlsaction_rowerase_panelErase", 127)
set("Looper5Controlsaction_rowerase_panelErase", 0)
}
if (value >= 120 && @{Looper6ControlsFXrow1Arm}==1024) {
set("Looper6Controlsaction_rowerase_panelErase", 127)
set("Looper6Controlsaction_rowerase_panelErase", 0)
}
if (value >= 121) {
set("@{this.id}", 0)
}