@RCJacH Oh you're doing something fun. I spent several months of 2019 working on a still unfinished guitar strumming engine. :D
When you include a script it's the same as if you've copied/pasted the script directly in to the MIDI processor's on init callback. So yes, each one is independent. You should use a namespace in your external script too so that a) you get access to more reg variables and b) it's easier to see where various function calls are coming from.
If you edit the external script though those changes will be reflected wherever you have included it.