Yes, a local variable “lives” within the incoming event. So even if two translators have different incoming action, they will use the same local variables if once event triggers both.
Translator 1 Incoming: Note On any channel, Note 60, any velocity, set pp to velocity
Translator 2 Incoming: Note On Channel 1, Any Note, any velocity
Now if Note On, Channel 1, Note 60, Velocity 100 is received on a MIDI IN port, first Translator 1 is triggered and sets pp to 100. In the rules, it sets qq to 27.
Then Translator 2 is triggered, and you can count on pp being 100 and qq 27.
Beware: in Translator 1, the values of pp and qq are not defined and can be anything. They’re not specified to be 0 by default.
Also, of course, a translator can only pass on local variables to following translators.
This behavior is also very useful to circumvent concurrency issues: the MIDI engine in MT Pro is heavily multi-threaded (i.e. can process incoming MIDI data simultaneously using all processor cores), so when using local variables, you can be sure that no other simultaneous incoming MIDI event can change the local variable of another incoming event (even if the same translator!). Don’t worry if that sounds abstract 🙂 These are difficult concepts in general.