Send SysEx data to different devices

I’ve never needed to work with more than one instrument—which is obviously called devices—simultaneously on the E1 before.

Today I tried it. I spent a lot of time reading the manuals and searching the forum. Unfortunately, I couldn’t find an example that fit my—in my personal view, very simple—requirement. I found the tutorial “[LUA] Send multiple,” but that only covers different ports, not devices. I’ve now set up a second device in E1, #2.

In my humble simplicity, I imagine one could write:

midi.sendSysex(PORT_1, DEVICE_2, {67, 16, 127, 28, 04, 00, 00, 00, 16})

…but unfortunately, that doesn’t work. During my experiments, I even discovered that USB-connected ports are recognized in the editor.

Again, since most devices are connected via USB nowadays I’m wondering if these ports couldn’t be directly recognized as separate devices. But that’s probably all far too simple, yet apparently too complicated for me. :man_shrugging:t3:

I simply want to send a MIDI command via a function, as in the example above which works for device 1, and send a few similar ones to a different device.

It would be great if someone could “enlighten” me. Maybe only with a hint to the manual reference or a forum post that contains a simple working example. Thank you in advance.

Hello, as Sysex devices have specific addresses (set by the manufacturer ID and device ID), could you not just forward all messages to both devices? Device A will ignore any messages meant for Device B and vice versa.
This is assuming you can send multiple Sysex messages from one control on the E1 (If so, I guess you would just paste one after another).
I find the Visual Editor is useful for getting started with a message and the JSON is quicker for copy/pasting/editing.

Here’s some info on Sysex formatting in case you are new to it:

Basic SysEx Structure

  • Start: F0 (hexadecimal)

  • Manufacturer ID: A 3-byte code identifying the device manufacturer (e.g., 41 for Roland).

  • Device ID (Optional): Identifies a specific device on a channel (e.g., 7F for universal, 00-7F for specific).

  • Data Bytes: The actual command and parameters, using values 00-7F.

  • Checksum (Optional): A calculated value (often Z in editors) to verify data integrity, placed before F7.

  • End: F7 (hexadecimal)

Thanks @J-Ox for your answer. I’m not really new to SysEx and know these facts. :wink:

If only the E1 would send commands to multiple devices simultaneously! But it doesn’t. At least mine doesn’t. Using a MIDI monitor, I can confirm that all MIDI data is being sent to only one device, presumably by default.

And even if your suggestion worked for SysEx data, it wouldn’t be possible to use simple CC commands in the same way, right? So there must be a way to specify which device the data is sent to.

It would even be helpful to know if I could use one of the existing presets as an example to see how it works. But unfortunately, I don’t have time to check them all. :man_shrugging:t3:

I’ve not played with it but there’s an option to control existing knobs/parameters on the E1 (performance page), so you may be able to assign one control to many that are already set up. For instance, the ‘new control’ affects VCF, VCA & Reverb amount all with one turn (and each affected control could be for a different synth).

1 Like

Sysex commands are like broadcasts; they are sent to all devices, as a kind of ‘to whom it concerns’.
That is why these commands first start with a byte indicating the brand of the device you talk to. Brands will immediately disregard someone else’s sysEx message.

The rest of the message construction is up to that manufacturer to ensure the message for his instruments are understood correctly. Typically the subsequent bytes will identify model and submodel for that reason.

Good implementors will also provide a sysEx deviceID, you then need to set on both sides (instrument and E1). This is done in case you have more than one instrument of the same brand, model and submodel to distinguish between them. Without it, both instruments would handle the same sysEx command, which is usually not desired.

But there are still manufacturers out there that don’t respect those rules, and then end up with issues once customers buy multiple instruments from them.

Anyway, the only traffic control variable you have in the command, is the physical port you want the message to be sent out on. Any E1-device you have in your preset will typically be assigned to one of two ports. Example:

So be sure you transmit your message to the same port your instrument is connected to.
Furthermore:

  • the internal MIDI routing in the E1 might influence that behaviour, but I’m not acquainted sufficiently with that part of the E1 to guide you there.
  • be sure you don’t have any sysEx filters set on the physical path between the E1 and the instrument, that might block any sysEx traffic.

An example of such message:

First of all, I insert same initialisation on the device I work with in LUA:

local deviceId = 1
local deviceSysex = parameterMap.get(deviceId, PT_VIRTUAL, 35)
local devPort = devices.get(deviceId):getPort ()

Above, I set my port variable to E1’s device nr 1.
You see I also have the sysEx device Id set up via control 35, so I read that one too in memory

 midi.sendSysex (devPort, {0x43, 2*16 + deviceSysex, 0x5C,0x00,0x00,0x00})

The example above is for a Yamaha (0x43). As it is for an AN1X, it expects as second byte 32+deviceSysex, and as third byte the constnat 0x5C.
The rest of the message is payload (in this case 0x00,0x00,0x00)

1 Like

Thank you so much @NewIgnis.

I think I am fine with the SysEx basics. Today I just tested some things again and recognized that I obviously had an external MIDI routing issue. I now see that messages are sent to all connected instruments on the same port simultaneously.

Just to confirm I got this right:

Is the only separation of MIDI messages for multiple instruments connected to the same port (1 or 2) for i.e. CC data the MIDI channel?

The device ID in your example: Does it refer to this ID (#3 in my example)?

good questions
.

  1. Yes, for MIDI CC, RPN and NRPN signals, the separation for multiple instruments is only the MIDI channel. If you need to address more than 16 instruments, you need extra separate transmission paths. That’s one of the reasons Martin gave two DIN MIDI OUT ports to his Electra one. Now you can control 32 MIDI channels.
  2. Yes, the concept of devices within the Electra One, is to be compared with an ‘instrument’ you want to assign its own channel and port to. That’s is why it is so easy on the Electra one to make one preset that controls multiple instruments via CC. My example referred indeed to deviceId 1, because I use that Device as a default in all my presets. So if I want to give one of my instruments a different MIDI channel I don’t change the device in all Electra controls, bur rather the Port and MIDI channel assigned to device 1.

in my example the ‘deviceSysex’ corresponds to with the MIDI standard usually refers to as a (optional) differentiator in sysEx messages

1 Like

Hi @hape, the number shown on the device selection list is the MIDI channel. It is a good point to have the device Id visible in the editor too. I will add it there.

From the above communication, I assume @NewIgnis @J-Ox helped you to get it going, right?

The list of USB devices you mentioned in your first post is what editor sees because it it running on the computer. Electra does not have access to those unless you route Electra’s Port 1 / 2 to them on your computer.

1 Like

Thanks a lot again @NewIgnis and @martin for your answers. Much appreciated.

Unfortunately, I have to focus on different work starting today and will not have the chance to check something or get back to your answers. I will do as soon as I can.

1 Like