any way to schedule events in time in Plug'n Script?

Official support for: bluecataudio.com
Post Reply New Topic
RELATED
PRODUCTS
Plug'n Script

Post

I'd like to build a MIDI-level arpeggiator in Plug'N Script. This would require me to schedule events in time that would occur separately from the MIDI stream.

Has anyone managed to schedule events to be processed later in time in Plug'N Script?

I'm aware of how to do this with the MIDI metronome signals, but seek something more flexible. The target MIDI controller doesn't generate these.

Thanks everyone!

Post

One approach would be to create a buffer of MIDI notes each time a note is received in the input stream. Process that buffer to delay the notes as desired. If a new note comes in at the input stream, clear the buffer and fill it with new notes.

It would be nice to see an official example that shows how to delay MIDI events, or schedule future events. An arp, MIDI echo / delay, etc would be welcome.

Post

To schedule events in the future you indeed have to store them in a buffer, and wait until enough time has passed by. Each note in the buffer should have a timestamp in the future, and you subtract the length of the audio buffer until it reaches a value below the length of the audio buffer. When this happens it is time to send the event to the output.

Post Reply

Return to “Blue Cat Audio”