Is there a way to fire a user function after a certain number of milliseconds? Kind of like SendLater but with a function instead of a midi message?
Yes: start a one stop timer in GP script TriggerOneShotRamp()
and catch it with the On GeneratorEndCycle()
callback
There are ways to do it with ramp functions but there’s currently no “official” approach.
The ability to write
Schedule(callbackName, args....)
is on my list but unfortunately has not been a priority relative to other needs.
Perfect! Thanks a bunch
@rthkeys You are welcome!
BTW: I uploaded a sample script even at the moment, as I was working on something similar the last days
Nice! I ended up not using the TriggerOneShotRamp() but was able to achieve what I was trying to do.
Here’s the script. It holds the notes that are played and prevents new notes when the sustain pedal is down. I’m using it to hold pad chords while playing the piano.
Ah, I see. Nice.
Maybe an alternative: Thorsten Hillmann - #36 by tripleB