Unfortunately variables do not persist in MT Pro between sessions, however you can initialize them to the values you want at startup with rules. I usually create a series of translators that do this.
First I create one with incoming trigger of Opening a project file with output of one shot timer called Init. Then I create a number of translators that I want to execute at startup that have an incoming trigger of Init timer. One of these translators which I call "Initialize Global Variables" handles this.
So if I want something to persist I would.
- Set the stops which would set the global variables I want.
- Dump the global variables in the log window.
- Copy and paste the values in a text editor.
- Copy and paste only the global values I want back into the rules of my "Initialize Global Variables" translator.
Then the next time my project starts, the variable will be reset the way I want them.
You can also record any other registrations this way and use different timer to recall them again using rules.
If you want them to persist in a different way, you would need to use some sort of "helper" application to send the global variables (as MIDI data) when you want to store them and the receive MIDI to restore them.
A native feature to persist ("store" and later "retrieve" global variables) has been requested but I'm not sure of the schedule to implement this feature.
A few users have figured out how to store and retrieve data from external MIDI controllers to do this but alas this is also not ideal.
For a helper application to do this reliably would need at least 5 MIDI data bytes since global variables are 32 bit signed integers (5 bytes x 7 bits each = 35 bits). Then you would need another 1 or 2 bytes to represent the global variable name (IE "ga")you wish to store and retrieve. Then maybe more data to represent the filename to store the data to.
The format of this data would probably be best to be handled as a System Exclusive data stream.
I know this is not an ideal situation but hopefully this will give you some ideas until such time that a persistent global variable feature is available.
Bome Customer Care
Also available for paid consulting services: firstname.lastname@example.org