Sending multiple MIDI commands and bidirectional updates

Hello everyone,

I’m trying to understand a few things that aren’t clear:

  1. How can I have one control (knob/button) send multiple MIDI messages?
  2. How can I achieve bidirectionality so that when I turn a knob on a device, the E1 picks up and updates that same value on the interface?

Perhaps these could be added to a beginner’s FAQ.

  1. Yes.
    The E1 allows you to use “lua”, a programming language for which you can find lots of tutorials on the internet. @martin from Electra then has foreseen the necessary extensions in lua to use exclusively with the E1 making it do things that are pretty nice :slight_smile: .
    For instance instead of using a regular MIDI CC or NRPN control, you could create a “Virtual control” and assign it a lua function you create yourself. In that function you can make the control do whatever you like. An example could indeed be you send two MIDI signals at the same time.

Here’s an already more complicated but useful example Electra One App

You’ll find a macro at the left and two CC’s at the right. For each of those two CC’s you give at a left and right boundary and a CC number. When you then change the macro you will change and send both CC 's simultanously, each respecting their own boundary. With it you could for instance change a resonance together volume, or balance two timbres against each other.

  1. Of course. The simplest examples are using MIDI CC or MIDI NRPN: when the E1 receives the right message on the right MIDI channel and port, it will react acccordingly. Because of Lua you can even make it react to incoming sysEx parameter changes, but this involves programming, and this programming is different per synth / instrument you want to control, as each manufacturer has their own style of (not) using SysEx.
  1. Thank you, I’ll check the Virtual option, in the meanwhile I managed to use Lua to send multiple midi commands, although it would be nice if the editor allowed to do this without writing code (simple commands that is).

  2. Do you know of a simple example showing this? Is this different than the Patch Request functionality or do they tie up together?

No example needed: If you make a MIDI CC control, and you send the corresponding MIDI signal from your MIDI device to your E1, it should respond automatically.
The same with pitch bend, and the same with NRPN.
Do ensure you send the MIDI information on the right Channel, CC number and port as you configured on the E1, if not it will not react.

This is indeed different than a Patch Request.
A patch request is meant to send out a Request for a data dump in SysEx. It is very specific to one type of Device (hence the name SysEx = “System Exclusive”).
A patch request is meant to be followed by a Sysex Patch Dump coming from the Device as a response. That dump consists of a string of bytes, starting with a header that allows you to recognize if you are looking at the right Sysex message and then the data, that needs to be parsed byte by byte, sometimes even bit by bit, and again very specific to that type of Device. Usually the data contains multiple values each destined for other controls. It is a nice way to obtain all setting of a patch at once, but it is not very usable for real time tweaking of a single control.

Bidirectional communication of MIDI CC or MIDI NRPN is the opposite and needs none of that specific SysEx. It usually does not require any lua programming as both are standard MIDI messages and foreseen as control types on the E1. They are intended to send/receive the value for one parameter at a time, with the same format in both directions.They are very handy for real time tweaking.

And yes, they can be used together:

  • when you change a patch , you can use SysEx to request all parameters at once, and set all your controls on the E1 according to the patch settings.
  • when you tweak a patch, you then use the MIDI CC or NRPN for immediate control.

There are exceptions to this rule of thumb, but I hope you catch the generic concept here that applies to a lot of MIDI devices.
Mind you:the behaviour described above is not typical for the E1, but for MIDI. The E1 just ensures you can exploit those concepts.

Thanks for the detailed reply! I’ll have to investigate further next time, I had a device from which I could learn it’s CC (via the midi learn capability in the editor), but whenever I changed the said values on the device the E1 didn’t update them.

so probably the device did not send any MIDI messages, or the path to the E1 was not established.

it’s always good to have some monitoring tool like midi-Ox where you can see what messages a device transmits.