Callback function on device port/channel changes

Since we have the possibility of changing the Midi Channels and Ports on the E1 itself, most of my presets don’t deal well with that option, because the devChannel and devPort are read in a variable and used on my places in lua.

The easiest way to make all presets compliant with this new device change optio, would be a callback function, that is invoked whenever Devices are being changed on the E1.
this it’s quite easy to build this into all existing presets.

Why do you do this? Is it to improve performance?

Good question,
it is indeed to keep my lua coding readable and efficient. In almost all my presets, I make use of lua to trigger bespoke commands, such as:

  • a standard way of provide program changes
  • listening to received program or bank changes and then request a SysEx dump when the MIDI channel and Port are as expected.
  • listening to received MIDI pitch bend or AfterTouch, when I use that to control other parameters
  • send note On of note Off commands in bespoke ARP’s or to enforce non-legato playing styles on mono synths where the synth itself does not provide envelope retriggering
  • perform special actions on note On info, like changing the PCM waveform
  • requesting sysEx dumps where the MIDI channel is involved
  • configure bespoke NRPN commands via lua
  • etc
1 Like

yes, there could be a callback. Another option is to restart/reload a preset when user changes a channel. Possibly with a notification to give the user a chance to save the work…

1 Like