Ableton Live MIDI Remote Script / Control Surface

Thanks for the additional log. It is strange to see that the Convolution Reverb fails to upload in your case - over here (mimicking your setup) it uploads in a 2-3 seconds. I saw in your log that because you have all logging enaled and do not use sendmidi, the remote script was setting a timeout of more than 30 seconds! I have now modified the script to cap any timeout (currently to 5 seconds). But I should still measure timings and set reasonable timeouts.

Restoring all the debug settings fixed my issue! this was what I used before to cause the slowness issue:

Screenshot 2024-06-17 at 17.25.57

Just to confirm: the script doesn’t work for max for live devices right? I can’t get E1 to display my M4L devices even though in the log file it seems to capture the parameters.

However, if I first select the granulator device, and then select the Instrument Rack that contains Granulator, E1 again doesn’t show anything (after five minutes, still dark screen)

The log file shows repetitively this:

2024-06-17T17:33:08.351504: info: RemoteScriptMessage: E1 (debug): === Uploading device InstrumentRack#.
2024-06-17T17:33:08.352210: info: RemoteScriptMessage: E1 (debug): XXX Upload thread starting…
2024-06-17T17:33:08.352927: info: RemoteScriptMessage: E1 (debug): == Main build midi map ignored because E1 not ready.
2024-06-17T17:33:08.410247: info: RemoteScriptMessage: E1 (debug): == Main receive MIDI called.
2024-06-17T17:33:08.410468: info: RemoteScriptMessage: E1 (debug): === Processing incoming SysEx.
2024-06-17T17:33:08.440163: info: RemoteScriptMessage: E1 (debug): XXX Loading preloaded preset failed; revert to upload.
2024-06-17T17:33:08.449872: info: RemoteScriptMessage: E1 (debug): == Main receive MIDI called.
2024-06-17T17:33:08.450106: info: RemoteScriptMessage: E1 (debug): === Processing incoming SysEx.
2024-06-17T17:33:13.540930: info: RemoteScriptMessage: E1 (debug): == Pending build midi map detected.
2024-06-17T17:33:13.541118: info: RemoteScriptMessage: E1 (debug): === Rebuilding MIDI map requested
2024-06-17T17:33:13.552064: info: RemoteScriptMessage: E1 (debug): === Uploading device InstrumentRack#.
2024-06-17T17:33:13.552750: info: RemoteScriptMessage: E1 (debug): XXX Upload thread starting…
2024-06-17T17:33:13.553436: info: RemoteScriptMessage: E1 (debug): == Main build midi map ignored because E1 not ready.
2024-06-17T17:33:13.614084: info: RemoteScriptMessage: E1 (debug): == Main receive MIDI called.
2024-06-17T17:33:13.614242: info: RemoteScriptMessage: E1 (debug): === Processing incoming SysEx.
2024-06-17T17:33:13.640449: info: RemoteScriptMessage: E1 (debug): XXX Loading preloaded preset failed; revert to upload.
2024-06-17T17:33:13.664525: info: RemoteScriptMessage: E1 (debug): == Main receive MIDI called.
2024-06-17T17:33:13.664666: info: RemoteScriptMessage: E1 (debug): === Processing incoming SysEx.

The script also works for M4L devices, depending to what extent they expose their parameters. But for example the ‘Align Delay’ (a Max device in the Audio Effects section of Live), shows its 4 parameters just fine on ym setup.

Can you send me the exact config.py that you used to generate this endless loop? And could you perhaps create a more detailed log setting DEBUG=5 doing the exact same thing you did to generate the log above?

@jhh sure thing! This is my config.py:
config.py.zip (3.0 KB)

In this log file. In config.py, now I set DEBUG=5 as you suggested, start Live and select Granulator which is embedded in an instrument rack, and then select the instrument rack. The E1 display shows nothing:

excerpt.txt (366.3 KB)

It’s strange that E1 has never displayed any M4L device on my system. It always simply hangs and shows a dark screen (the USB DEVICE, HOST, MIDI 1 OUT are still blinking every now and then though)

Thank you. I’ve had a look and I can see two things

  • the remote script sends 6 connection requests to detect your E1, taking 10 seconds in total. This is suspicious, as in my setup it only takes two request and 2 seconds
  • the uploading of the preset for the InstrumentRack# times out after 39 seconds; in my setup it loads within 3 seconds.

Are there any other presets running on your E1 that could explain why it is responding so slowly? @Martin would you have any idea what could cause slowness in responding to an ‘get an Electra Info’ sysex request?

could you try to run the request for E1 info manually? (using wep app MIDI console / sendmidi / sysex librarian / midiox …) and see how long it takes to have the response back?

The message to be sent is:

F0 00 21 45 02 7F F7

It needs to be sent to the E1’s CTRL port.

This is to check if it is the hardware that is slow.

And one more thing to try, could you try to clear contents of the ctrlv2/snaps/ directory on the SD card?

Hi @martin I am happy to try. I just tried with this web app:
Web MIDI Console but it’s unclear to me how to set the CTRL port and send this message.
This is what I’ve tried so far:
Screenshot 2024-06-19 at 09.36.03

I would be very thankful if you can let me know how to change the port and send the message use this app. Thank you!

I tried the tool that you used. I think it expects the midi data in decimal format. But it does not seem to send the sysex out using the raw.

you can use the Midi console in our webapp:

  1. open a preset editor
  2. open the tools (either at the top bar or in the sidebar)
  3. switch to the Midi console tab
  4. pick the CTRL port
  5. send the sysex message

@martin thank you for the detailed info! I just did what you suggested. I got response instantaneously. Here is a screenshot:

I have also cleared the cache folder (there were 112 items there). However, the slowness is still there.

@jhh I have a custom ableton operator preset and a plugin preset (Aalto). Locally I also have many *.pyc files generated. Could they cause any issues?

The .pyc file are normal (this is what Ableton generates when byte compiling the python code).

So according to your tests based on Martins suggestions, it appears the communication to the E1 and the E1 itself are smooth and quick.

Is the Live session you are using perhaps in any way demanding? What happens if you open an empty Live set and load a M4L device? Does that still not show the preset on the E1?

@jhh, can you try to run the same thing too? even 2 seconds are way too long.

Electra Info:

preset /w lua (UltraAnalog):

The 2 seconds delay is an issue with the remote script that I do not know how to fix. The thing is that the first time the remote script sends the connection request, the E1 responds immediately, in fact so fast that the remote script is not even ready yet to process the response :wink: Only the second request response is properly received (but that second request is sent after a 1.5 second delay)

1 Like

@jhh, I actually have tested it with empty Live sets, which contains only 1-3 devices to test the scenario (and to reduce variables as much as I can). I run Ableton Live on an Mac M1 (OS 13.4.1), so it should be able to handle this.

I just realize that I actually already experience this slowness issue with plugins since the very start of using E1. In the past I had reported that it’s very slow to load the default presets for plugins, but it’s actually also the case with M4L devices. I had a workaround where I manually add my Aalto-.epr and Aalto-.ccmap preset to the hardware (ctrlv2/presets/xot/ableton/), but it remains an issue for all the other plugins and M4L devices.

In the following log, it looks to me that the script was able to construct a preset for VUMT but seems to struggle to upload it (ACK not received). Do you think there might be an issue there?


2024-06-19T10:43:14.886004: info: RemoteScriptMessage: E1 (debug): XXXX Upload thread: preset upload failed. Aborted
2024-06-19T10:43:14.886832: info: RemoteScriptMessage: E1 (debug): ==== Getting preset for VUMT.
2024-06-19T10:43:14.886910: info: RemoteScriptMessage: E1 (debug): ==== Constructing preset on the fly...
2024-06-19T10:43:14.887043: info: RemoteScriptMessage: E1 (debug): ==== Dumper for device VUMT (isplugin: True) loaded.
2024-06-19T10:43:14.887091: info: RemoteScriptMessage: E1 (debug): ====== Dumper found the following parameters and their range:
2024-06-19T10:43:14.887408: info: RemoteScriptMessage: E1 (debug): ====== Device On (Device On): Off .. On. Quantized: True.
2024-06-19T10:43:14.887510: info: RemoteScriptMessage: E1 (debug): ====== TrimL (TrimL): -24.0 dB .. 24.0 dB. Quantized: False.
2024-06-19T10:43:14.887575: info: RemoteScriptMessage: E1 (debug): ====== TrimR (TrimR): -24.0 dB .. 24.0 dB. Quantized: False.
2024-06-19T10:43:14.887639: info: RemoteScriptMessage: E1 (debug): ====== TrimMid (TrimMid): -24.0 dB .. 24.0 dB. Quantized: False.
2024-06-19T10:43:14.887700: info: RemoteScriptMessage: E1 (debug): ====== TrimSide (TrimSide): -24.0 dB .. 24.0 dB. Quantized: False.
2024-06-19T10:43:14.887763: info: RemoteScriptMessage: E1 (debug): ====== Link (Link): Off .. On. Quantized: False.
2024-06-19T10:43:14.887811: info: RemoteScriptMessage: E1 (debug): ==== Filter and order parameters
2024-06-19T10:43:14.887858: info: RemoteScriptMessage: E1 (debug): ===== Ignoring parameters: []
2024-06-19T10:43:14.887931: info: RemoteScriptMessage: E1 (debug): ==== Filtered and order parameters: ['Device On', 'TrimL', 'TrimR', 'TrimMid', 'TrimSide', 'Link']
2024-06-19T10:43:14.887978: info: RemoteScriptMessage: E1 (debug): ==== Construct CC map
2024-06-19T10:43:14.888195: info: RemoteScriptMessage: E1 (debug): ===== 5 CC14 parameters found
2024-06-19T10:43:14.888357: info: RemoteScriptMessage: E1 (debug): ===== 1 CC7 parameters found
2024-06-19T10:43:14.888801: info: RemoteScriptMessage: E1 (debug): ==== CC map constructed: {'TrimL': ((-1, 0),11,True,0), 'TrimR': ((-1, 0),11,True,1), 'TrimMid': ((-1, 0),11,True,2), 'TrimSide': ((-1, 0),11,True,3), 'Link': ((-1, 0),11,True,4), 'Device On': ((-1, 0),11,False,5)}
2024-06-19T10:43:14.888866: info: RemoteScriptMessage: E1 (debug): ==== Construct JSON preset
2024-06-19T10:43:14.889147: info: RemoteScriptMessage: E1 (debug): ===== Appending 1 pages.
2024-06-19T10:43:14.889221: info: RemoteScriptMessage: E1 (debug): ===== Appending 1 devices.
2024-06-19T10:43:14.889295: info: RemoteScriptMessage: E1 (debug): ===== Appending overlays.
2024-06-19T10:43:14.889395: info: RemoteScriptMessage: E1 (debug): ===== Appending (at most) 6 controls.
2024-06-19T10:43:14.889456: info: RemoteScriptMessage: E1 (debug): ===== Appending JSON control for Device On, with range: Off..On.
2024-06-19T10:43:14.889596: info: RemoteScriptMessage: E1 (debug): ===== Appending JSON control for TrimL, with range: -24.0 dB..24.0 dB.
2024-06-19T10:43:14.889670: info: RemoteScriptMessage: E1 (debug): ====== Appending fader for TrimL
2024-06-19T10:43:14.889827: info: RemoteScriptMessage: E1 (debug): ====== Generic fader True, -240, 240, formatdB
2024-06-19T10:43:14.889929: info: RemoteScriptMessage: E1 (debug): ===== Appending JSON control for TrimR, with range: -24.0 dB..24.0 dB.
2024-06-19T10:43:14.889996: info: RemoteScriptMessage: E1 (debug): ====== Appending fader for TrimR
2024-06-19T10:43:14.890132: info: RemoteScriptMessage: E1 (debug): ====== Generic fader True, -240, 240, formatdB
2024-06-19T10:43:14.890233: info: RemoteScriptMessage: E1 (debug): ===== Appending JSON control for TrimMid, with range: -24.0 dB..24.0 dB.
2024-06-19T10:43:14.890300: info: RemoteScriptMessage: E1 (debug): ====== Appending fader for TrimMid
2024-06-19T10:43:14.890434: info: RemoteScriptMessage: E1 (debug): ====== Generic fader True, -240, 240, formatdB
2024-06-19T10:43:14.890529: info: RemoteScriptMessage: E1 (debug): ===== Appending JSON control for TrimSide, with range: -24.0 dB..24.0 dB.
2024-06-19T10:43:14.890598: info: RemoteScriptMessage: E1 (debug): ====== Appending fader for TrimSide
2024-06-19T10:43:14.890733: info: RemoteScriptMessage: E1 (debug): ====== Generic fader True, -240, 240, formatdB
2024-06-19T10:43:14.890824: info: RemoteScriptMessage: E1 (debug): ===== Appending JSON control for Link, with range: Off..On.
2024-06-19T10:43:14.890889: info: RemoteScriptMessage: E1 (debug): ====== Appending fader for Link
2024-06-19T10:43:14.890968: info: RemoteScriptMessage: E1 (debug): ====== Generic fader True, None, None, None
2024-06-19T10:43:14.893345: info: RemoteScriptMessage: E1 (debug): === Uploading device VUMT.
2024-06-19T10:43:14.893946: info: RemoteScriptMessage: E1 (debug): XXX Upload thread starting...
2024-06-19T10:43:14.894049: info: RemoteScriptMessage: E1 (debug): XXXXX Thread clearing acks queue (0 pending) on 1718786594.894, wait until 1718786585.209 (preset uploading: True).
2024-06-19T10:43:14.894120: info: RemoteScriptMessage: E1 (debug): XXXXX Thread: acks queue cleared at 1718786594.894 within 0.000 seconds (preset uploading: True).
2024-06-19T10:43:14.894195: info: RemoteScriptMessage: E1 (debug): XXXXX Loading preloaded preset for VUMT into slot (5, 1).
2024-06-19T10:43:14.894423: info: RemoteScriptMessage: E1 (debug): XXXXX ACKS pending incremented to 1 at time 1718786594.8943949
2024-06-19T10:43:14.894488: info: RemoteScriptMessage: E1 (debug): XXXXX Sending SysEx (67 bytes).
2024-06-19T10:43:14.894588: info: RemoteScriptMessage: E1 (debug): XXXXXX Sending MIDI message (first 10): 0xF0 0x00 0x21 0x45 0x04 0x08 0x7B 0x20 0x22 0x62
2024-06-19T10:43:14.894848: info: RemoteScriptMessage: E1 (debug): XXXXX Thread waiting for ACK, setting timeout 32.000 seconds at time 1718786594.895 (preset uploading: True).
2024-06-19T10:43:14.894900: info: RemoteScriptMessage: E1 (debug): XXXXX Thread waiting for ACK, current time is 1718786594.895.
2024-06-19T10:43:14.945754: info: RemoteScriptMessage: E1 (debug): XXXXX Thread waiting for ACK, current time is 1718786594.946.
2024-06-19T10:43:14.945905: info: RemoteScriptMessage: E1 (debug): == Main receive MIDI called.
2024-06-19T10:43:14.945983: info: RemoteScriptMessage: E1 (debug): ====== Main receive MIDI called. Incoming bytes (first 10): 0xF0 0x00 0x21 0x45 0x7E 0x00 0x00 0x00 0xF7
2024-06-19T10:43:14.946024: info: RemoteScriptMessage: E1 (debug): === Processing incoming SysEx.
2024-06-19T10:43:14.946085: info: RemoteScriptMessage: E1 (debug): ==== NACK received (acks still pending: 0, uploading?: True).
2024-06-19T10:43:14.985623: info: RemoteScriptMessage: E1 (debug): XXXXX Thread: ACK not received at 1718786594.986 after 0.091 seconds, operation may have failed (preset uploading: True).
2024-06-19T10:43:14.985732: info: RemoteScriptMessage: E1 (debug): XXX Loading preloaded preset failed; revert to upload.
2024-06-19T10:43:14.985788: info: RemoteScriptMessage: E1 (debug): XXXXX Selecting slot (5, 1).
2024-06-19T10:43:14.985861: info: RemoteScriptMessage: E1 (debug): XXXXX ACKS pending incremented to 1 at time 1718786594.985837
2024-06-19T10:43:14.985913: info: RemoteScriptMessage: E1 (debug): XXXXX Sending SysEx (9 bytes).
2024-06-19T10:43:14.985987: info: RemoteScriptMessage: E1 (debug): XXXXXX Sending MIDI message (first 10): 0xF0 0x00 0x21 0x45 0x14 0x08 0x05 0x01 0xF7
2024-06-19T10:43:14.986162: info: RemoteScriptMessage: E1 (debug): XXXXX Thread waiting for ACK, setting timeout 6.400 seconds at time 1718786594.986 (preset uploading: True).
2024-06-19T10:43:14.986215: info: RemoteScriptMessage: E1 (debug): XXXXX Thread waiting for ACK, current time is 1718786594.986.
2024-06-19T10:43:14.995697: info: RemoteScriptMessage: E1 (debug): == Main receive MIDI called.
2024-06-19T10:43:14.995890: info: RemoteScriptMessage: E1 (debug): ====== Main receive MIDI called. Incoming bytes (first 10): 0xF0 0x00 0x21 0x45 0x7E 0x01 0x00 0x00 0xF7
2024-06-19T10:43:14.995944: info: RemoteScriptMessage: E1 (debug): === Processing incoming SysEx.
2024-06-19T10:43:14.996018: info: RemoteScriptMessage: E1 (debug): ==== ACK received (acks still pending: 0, uploading?: True).
2024-06-19T10:43:15.085612: info: RemoteScriptMessage: E1 (debug): XXXXX Thread: ACK received at 1718786595.086 within 0.099 seconds (preset uploading: True).
2024-06-19T10:43:15.085736: info: RemoteScriptMessage: E1 (debug): XXXXX Uploading preset (size 2183 bytes).
2024-06-19T10:43:15.088346: info: RemoteScriptMessage: E1 (debug): XXXXX ACKS pending incremented to 1 at time 1718786595.088325
2024-06-19T10:43:15.088431: info: RemoteScriptMessage: E1 (debug): XXXXX Sending SysEx (2190 bytes).
2024-06-19T10:43:15.088552: info: RemoteScriptMessage: E1 (debug): XXXXXX Sending MIDI message (first 10): 0xF0 0x00 0x21 0x45 0x01 0x01 0x7B 0x22 0x76 0x65

P.S.: That screenshot with UltraAnalog upload timings is done with fast sysex upload (using sendmidi), right?

Thanks for the additional information. Looking at the logs you sent yesterday it is clear that the remote script is waiting forever for the E1 to send an ACK after uploading the preset. Given the fact that the preset is not even shown on the E1, there appears somethings is wrong when sending it. But I have a hard time figuring out what/why this is.

Have you ever tried using sendmidi to speed up uploading? See the instructions here GitHub - xot/ElectraOne: Ableton Live MIDI Remote Script for the Electra One

@jhh I am following the wiki now, there seems to be a naming difference between wiki and the config file:

In config.py there is E1_PORT_NAME= 'Electra Controller Electra Port 1'

Screenshot 2024-06-19 at 11.38.38

In Wiki, it says E1_CTRL_PORT = 'Electra Controller Electra Port 1'

Should I set E1_CTRL_PORT or E1_PORT_NAME to Port 1?

E1_PORT_NAME is the correct one; I’ve updated the documentation. Thank you for spotting the inconsistency!

1 Like

@jhh I have just installed sendmidi. There is still the waiting for ACK issue though. So it doesn’t speed up the loading.
Sendmidi was used now:

2024-06-19T11:49:30.441852: info: RemoteScriptMessage: E1 (debug): XXXXXX Running external command /usr/local/bin/sendmidi dev 'Electra Con
2024-06-19T11:49:30.541293: info: RemoteScriptMessage: E1 (debug): XXXXXX External command on OS posix returned 0

What looks curious to me is, XXXX Thread did receive ACK (highlighted in the screenshot), but continue to signal that it’s waiting for ACK. I am just guess in the darkness here: is it possible that the thread is not correctly terminated after receiving ACK?