Variable persistence

If I declare a variable EG: Var xyz Integer

Is xyz public, private or local? In other words, does it retains its value across repetitions of my script?

I want to write a script that will look at an incoming note and only play that note every third time it is played. In addition, every second time the note is played I want to also emit: the note played plus the same note 8VA. If the variable xyz is public then it is a piece of cake as I can use it as a switch otherwise I don’t know how to write this script. Any info here would help?

The variable is global in the script and as long as you do not initialize it in the on activate event it keeps the value - I think.
But you can test that very easy.

I should have read a little further in the documentation. Evidently, you define a variable to be global if you declare it outside of the callback. :slight_smile: