Page 1 of 1

Autoreset script with multiball

Posted: 25 Sep 2016 22:14
by del_boh
I am using this simple script to auto-reset faders to a default value when the fader is released:

on Expression x, any
if (z==0) x=(5/9);

This works well but if I use the same script to auto-reset the x co-ordinate of a multiball the value output to midi oscillates between the cursor value and the reset value defined in the script.
I am new to this software and, clearly, missing or misunderstanding something.

Re: Autoreset script with multiball

Posted: 26 Sep 2016 21:50
by MrCorba
I think the problem is your script is triggered by x on any change and the script changes x, which creates an infinite loop. Why don't you create a script with expression z, reaches zero? You'll only have to put x = (5/9); in the script and it's only triggered when you release your finger. Is faster and less error-prone.

Hope this helps!

Re: Autoreset script with multiball

Posted: 27 Sep 2016 09:25
by del_boh
Thank you! This is obvious now that you have pointed it out, even to a musician.