Is there a way to make the MIDI In Map CHOP retain its last received value instead of resetting to 0 when TouchDesigner restarts?
I’m working on a permanent LED installation that’s controlled via MIDI, and I need certain parameters—especially intensity—to come back exactly as they were when the system is powered off. Ideally, the installation should resume with the same animation settings rather than starting in an “off” state every time the program launches.
Has anyone found a good way to save and restore these MIDI-controlled values across sessions?
There’s a lot of ways to do this, but in the past I’ve set up a script in an executeDAT that triggers a fileOutCHOP to save the midi value channels to a file like defaults.chan whenever the project is saved, then use a fileInCHOP to recall the values. A chopExecuteDAT switches back to live midi values whenever the midi values actually change.
Someone might have a simpler node-only solution but I find when it comes to preserving state across file re-openings, saving to a file or operator storage is the most reliable.
Here’s a quick example of how it behaves. MidiFallback.tox (1.3 KB)