Controls changing other controls

Similar to the active/inactive and variable control requests, but maybe a bit more general.

There are times I’d like to change the text of a control and the NRPN/CC number (and possibly the ranges) it is using based on the state of a different control element.
For example, The Micron has the option for filter 2 to either have an absolute frequency or an offset frequency based on the Filter 1 frequency. The Micron defines two separate NRPNs to adjust the absolute frequency and the offset frequency. To implement this currently, I need 3 controls - a pad to toggle between absolute and offset and then 2 separate frequency faders to adjust the two controls.

It would be great to have a single frequency control that has their info toggled based on the status of the pad.

Or is it possible to defined two faders in the same location and make one or the other visible based on the state of the pad?

1 Like

apparently there’s something called LUA that might be useful to implement this type of functionality. I need to track down the info/docs/examples and look into it.

1 Like

yes, I added the Lua script to handle situations like that. Doing such thing with JSON would be quite messy.

I spent some time on your Alesis Micron preset already and got familiar with it a bit. I will make a copy for myself and will try to add the Lua functions there for what you described and will share it with you. That could help to get you going faster…

Just to make sure… the Lua script extension docs are available at Preset Lua extension | Electra One Documentation.

Thanks. I will read it and work through some things here when I can.
I am familiar with scripting in general, having spent a couple years writing some templates for the Liine Lemur application running on my iPad. (and working as a programmer for too many years now).

It’s just a matter of learning the LUA syntax and figuring out the best way to apply it.

1 Like

So I’ve been playing around with LUA scripting and in general it is going well. However, I wanted to reach out to see if I’m missing something that would help me.

The goal – have two different controls (Control A and Control B) occupy the same slot (slot 1) and switch between them based on the status of a Pad Control C located in slot 12.

So, if the Pad is ‘on’, then Control A occupies slot 1 and if the Pad is ‘off’, Control B occupies slot 1.

My first thought was to define both controls in the same slot and make on visible and one hidden. That way, the Pad would simply toggle the visibility flag. This does not work - when you load the template to the E1, it moves the second control to the first free slot in the template.

OK, next thought - use Page 12 to hold hidden versions of Control A and Control B and then use control:setSlot() to move A or B into Slot 1 depending on the state of the Pad. This does not work since setSlot() is limited to only the 36 slots on the current page.

Third time - use things like getValues(), getValue(), getMessage() to save the current Control configuration and the use setValues(), setValue(), setMessage() to change them to the other Control definition. That does not work since there are no corresponding set…() methods available.

It looks like currently the only way to have two controls in the same space is to use an empty slot on the current page, hide the ‘other’ control and then when the Pad changes state, move/unhide, move/hide the two controls to swap locations.

Have I missed any options?


This is the way I intended. I will check why the Control is moved to the next slot. Will let you know. I assume it might be done by the editor when the preset is sent to the controller.

OK. I can try a manual edit to the EPR file and upload that to see what happens. For now, I am using a ‘blank’ slot in my preset to swap between controls.

While working on a preset for Elektron’s SID Station, I went through pretty much the same steps. If I had only seen this conversation before :see_no_evil:

While trying to stack invisible controls into one slot in the JSON file, I notices something interesting. It appears that the Web Editor not only moves the controls around, it also changes their Id.
My understanding was that Ids are configurable. But once loaded into the Web Editor, the Id of a control is basically just a plain representation of the position on the grid. A control in slot 1 on page 1 gets Id 1. A control in slot 1 on page 2 gets Id 37 and so forth.
Since the Ids need to be unique, it is currently by design impossible to stack controls into the same slot (at least once a preset goes through the Web Editor).
By the way, the change does not appear to be happening only when sending the preset to the device. I could observe the change just after downloading, editing and uploading a preset.

Here are my thoughts about the potential solutions:

Make controls stackable

  • no need to move around controls


  • impossible to see in the Web Editor what’s going on

Allow controls being moved across pages

  • flexibility


  • preconfigured controls eat up slots

Make controls configurable through Lua

  • flexibility
  • clear separation between static config in the JSON and dynamic configuration through Lua


  • complexity

While being the most complex solution, my favorite option would be to having complete control through Lua over the configuration of a control (Min MIDI Value, Max MIDI Value, Sysex Message, Parameter Number, etc.)

Background of the mentioned use case:
The SID Station has four so called Direct Controllers with adjustable range. The range (and also polarity) differs depending on the selected Destination of the Direct Controller. There are five different ranges (-63/+63, -24/+24, 0/15, 0/99, 0/127). So for each of the Direct Controllers, there are three controls, one selecting the destination, one adjusting the lower limit and the third one adjusting the upper limit.
With the current possibilities, I need to preconfigure five pairs of limit controls per Direct Control, which are displayed dynamically.
Since the preconfigured controls need to sit on the same page where they are finally displayed, the page appears half empty when loaded into Electra.
The most elegant solution in this particular case would be to being able to adjust the Min/Max MIDI Values through Lua.

1 Like

In most of the situations where I wish to have one knob controlling different things depending on the state of another parameter it would be sufficient to have a new type of pad like " Toggle control" where I can put the desired knob I want to manipulate and two states ON/OFF each with a parameter number. For example if a toggle pad controlling knob “X” is pressed X is controlling parameter Nr.53 an if its depressed X is controlling parameter Nr.113. Without the need to do LUA scripting. I guess the challenge will be how to identify the desired knob. By name? By position in the grid?

Hello ! thanks for this method report ! it will save me a lot of time in experimenting ! :wink:
I exactly needed that to simulate the behavior of the “rate” button for the “arp” Ableton native plugin.
I will switch the “sync” and “free” clock behavior on the same slot :wink:
Until we can have 2 controls (if possible) in same slot i will show/hide/move controls .

Lua is cool finally .
And the E1 in really the most incredible midi device i met :slight_smile:

Actually, there is a much easier solution for that: map both the synced and unsynced version of the rate control in Ableton to the same MIDI CC and create one controller in patch that sends out/listens to this CC. Clicking the sync button in the Ableton Arp will swap which of the two versions of the rate control is actually controlled.

Thanks ! But if i share the same CC for the 2 versions of the rate (quantified and in ms) it will also assign the same value (CC value) ? and it has to be independant .
Does i miss Something ?

…But i don’t understand why/how it would swap ? :laughing:
Does it swap in the same slot ?

In fact i don’t understand why if i create a controller in the patch that would listen to the rate CC ( sync or free) it would swap depending the Sync/free button that is not assigned (have no CC) ?!? …i bug…