Trigger MIDI and UI events programmatically?

Hello,

I’m wondering if it is possible to use Lua to trigger MIDI and/or UI events programmatically with the grid? For example, I could press a button which causes an LED to light in a different location and playback a series of midi messages that are stored in a Lua variable?

I’m guessing this is outside of the scope of the Lua environment, but it would be pretty cool and would open up a lot of possibilities if so.

From poking around the reference manual it seems like this is possible with the midi_send and led_value functions.

Ultimately what I would love to do is create a midi looper that would work something like this:

  1. Press a button to begin recording midi events
  2. Turn a bunch of knobs
  3. Press button again to stop recording and playback knob midi events from step 2

I realize this is somewhat complex, but is it theoretically possible?

1 Like

Should be quite possible, yes!

You would have to create some kind of buffer that records the events that happen then run through that buffer and play them back with a timer event.

I could create some kind of demo for this…