I’m continuing to work on my MIDI activate script and I’m having a problem.
I guess I don’t understand the context in which the lua code is running.
It is a “dsp” script.
Is "dsp_run() I want to set a boolean to true, and then check it on subsequent calls to dsp_run.
Is my script working like a module? What is the global context?
I’ve looked at some of the other scripts but I’ve not been able to figure it out.
A ‘dsp’ script is equivalent to a VST, or LV2 plugin.
It runs in realtime context as part of a track (or bus, aka route).
Each Lua DSP script has its own interpreter, so they cannot interfere with each other.
You can declare that variable outside of the dsp_run function.