Reply To: LUA Scripts in Positive Feedback Loop

Home Forums General Programming LUA Scripts in Positive Feedback Loop Reply To: LUA Scripts in Positive Feedback Loop

#118867
goodweather
Participant
  • Topics: 45
  • Replies: 550
  • Total: 595
  • ★★★

The “source” parameter is working fine.

To prevent Lua functions to be fired you indeed need to set a boolean, add a test at the beginning of all your “OnChange” methods, launch a timer to reset the boolean after all methods have gone through the test.

I’m using this for loading data in all modulators from a file.
Before starting the load, I set bLoadingProgram=true. In each OnChange methods i’m testing if bLoadingProgram == true and doing a direct return in that case.
All methods will be triggered due to the load of each parameters.
I also start a timer at load. Set it to enough time to have all your methods processed but not too much.
When stopping the timer, reset the boolean to false so your methods are executed nicely on manual turn of a button.

Do NOT follow this link or you will be banned from the site!