Code: Select all
// public byte[] GetStateInformation()
// Gets called when the module's state gets saved, typically when the user saves a preset with
// this module in it. Voltage Modular will automatically save the states of knobs, sliders, etc.,
// but if you have any custom state information you need to save, return it from this function.
//
- Stop = ON (127)
- Start = OFF (0)
- Pause = OFF (0)
These variables are checked inside the GUI_Update_Timer and turn the related buttons on/off by setting the Toggle Buttons value to 1 or 0.
Inside SetStateInformation, I restore all my variables from previous sessions and there I set the variables to the state I want them:
Stop = 127, Play = 0 and Pause = 0. Of course, I checked inside the Debugger if the right values are restored here, btw.
Because of this the next time the GUI_Update_Timer runs, the Stop, Start, and Pause buttons should be updated to the state I wanted them. BUT they don't they always will be overwritten by VM's automatically saved states! It drives me a little crazy.
Please do not tell me, that VM restores automatically stored values AFTER SetStateInformation, this wouldn't be logical in any way to me. How can I overwrite the autosaved states of knobs & buttons?
Any hints, what I could do?
Andreas