Can I do this with SetTimer

Can I do this:

SetTimer("callbackFunction", 10)

You want to call a function delayed?

Yes :slight_smile:

Essentially yes. I want function “callbackfunction” to be invoked when 10ms has gone by after I do a


What I am trying to do is: when MIDI notes are coming in, I want to queue them into an array until 10ms has gone by. Then I want to do something with those notes. So, when the first MIDI note is received, I would start the timers running … but I need a function that will be called in 10ms after this event.

With the script function

SendLater(<p : MidiInBlock>, <m : midiMessage>, <delayInMS : double>)

you can send a for axample a CC Message to a MIDI In Block and then with the callback

On ControlChangeEvent(m : ControlChangeMessage) Matching [CC] from <MidiInBlock>

you can react on that

Very very cool! That should do the trick. Thank you very much :slight_smile: