For each case statement block, do I need to provide unique counters and temporary variables (like midiTmp, for holding the current tMidi when iterating over the midi array, or throwaway counters like m,x,p etc) ?
I've been playing it safe so far and creating new counters and temp variables for each block because I'm worried what might happen if two callbacks are initiated and both are using 'x' as a counter in a for loop, but maybe this isn't actually something I need to worry about?
variable scope in the callback code block
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
hi ceasless,
you are speaking about script right ?
just to be sure
if so,
each time the callback function is called, it end up in only one case block and this block is guaranteed to be executed plainly before another callback call
thus, you can use only one counter variable for the callback function
for infos, it's not the same for the process function
hope it help
you are speaking about script right ?
just to be sure
if so,
each time the callback function is called, it end up in only one case block and this block is guaranteed to be executed plainly before another callback call
thus, you can use only one counter variable for the callback function
for infos, it's not the same for the process function
hope it help
Martin FLEURENT - Usine Developer - SDK maintainer
Yes, talking about fastscript for sure.
So no matter how complex the input streams get, callbacks are called one at a time? What if all params receive input at exactly the same time?
I was imagining it to have a more asynchronous nature.
Anyway, thanks for the clarification!
So no matter how complex the input streams get, callbacks are called one at a time? What if all params receive input at exactly the same time?
I was imagining it to have a more asynchronous nature.
Anyway, thanks for the clarification!
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
it's engine events internal
but one way or another, the engine end up by calling param callback multiple time, one for each param who need it, one after one
but one way or another, the engine end up by calling param callback multiple time, one for each param who need it, one after one
Martin FLEURENT - Usine Developer - SDK maintainer
Who is online
Users browsing this forum: No registered users and 150 guests
