GLOBAL SCOPE: Variables
Hi John
Im wanting to create a global int to store clip length for session record of audio tracks. I looked at the box code you sent and you mentioned it was global but it seems that Im not understanding it.
For global scope, I would have thought it would need a declaration of type etc before being used; in this case I need to use it to wrap an int from 1 to 4
ie
self.rec_clip_len = int*(self.rec_clip_len + 1) % 5)
but the scope seems to end at the reaction level and not sure how I would add those sorts of user variables to be used?
Cheers
They should be global, there’s 2 possible things to be aware of though:
1. the calling method needs to declare the variable using ‘global variabeName’ in order for it to be available for use. See other methods in the scripts which do this.
2. the reaction may need to be ran/fired before the variable becomes available.
Sign up
User registration is currently not allowed.