Can one controller change values of another?

I have a Roland System-8. One controller is called VARIATION. Goes from 1-4. When VARIATION is 1 another controller named WAVE should have the following 6 values. SAW, SQR, TRI, SAW2, SQR2, TRI2. When VARIATION is set to 2, the WAVE should have 6 other values and so on. Is this possible in Electra? If not, please consider it for future updates.

1 Like

It is possible and there are examples on how to do this in existing presets and code comments here.
Iirc @NewIgnis has done plenty of those

1 Like

Thanks. I will look at his examples :slight_smile:

1 Like

here’s the part in the documentation you should look for. This is way better than I did myself, but I 'll be trying it as well.

Thanks NewIgnis. The LUA value api preset is very interesting. A good starting point for me. I only need to learn how to set values in a option list from LUA. Do you know how? Or maybe I should store multiple lists i JSON and copy them to the option list with the code above when I need them?

At this moment the lists need to be defined in JSON. It means in the editor. Lua can only swap the lists for given List control. It was done this way due to limited memory resources on mk1. mk2 makes things much easier, there will be additions to Lua that will make this possible.

There are 4 ways to create option lists:

Start with the two basic methods below and get yourself acquainted with it:

  1. Create a new list by clicking on EDIT in the LIST ITEMS of a control
  2. Once you made one, you want to use elsewhere (for instance OCS1 and OSC2 have the same or almost the same list entries), use the copy and paste symbols at the right side under the LIST ITEMS. Once pasted elsewhere , you then use EDIT to tweak it further. Be aware a copied list will act independently from the source list.

Two more advanced ways to work with lists, if the standard way can’t fulfill specific needs.

  1. Use lua code to make the control do other stuff than defined by a basic list.
    Ensure you learn a bit of lua before diving in. To be found on internet. Typically you will add some lua in a function, and then call that function whenever the control is tweaked.
    Also, you probably will want to ensure E1 does not send out CC’s the regular way in parallel. You do this by using a “Virtual” message type, instead of a CC or NRPN message type

Below an example of such lua code

  1. Tweak the JSON
    Ensure you understand Json syntax and how E1 deals with it. Here you can tweak content of an option list directly, but ensure you know what you are doing, because now you may be superceeding the normal way the E1 editor works. Experiment, test and verify is the message here. I haven’t done this myself with succes yet!

Here is how the control with parameter virtual 32 links to overlay option list number 2:

image

Here is how option list 2 looks like:

@Electrolove
I tried the 4th method today, but couldn’t get it to work. So there are still some mysteries into tweaking the preset json directly, I need to discover myself.

EDIT 22/06/2023
I’ve just reviewed the pulse 2 preset. Take a look there into the way the LFO1 shape is changing the shown speed control from non sync’d to sync’d on this on page 3 and 6 simultaneously.

In the lua I’ve tried to comment as much as possible how it works. Per page It’s an interplay between 3 controls and their slots.
The original control shown on start will be hidden when changing the shap, never to appear anymore. From then on one of the two hidden controls will be moved to that slot in a visible way.

Hi @martin,

for the sake of this thread I’ve tried to change the logic in the Pulse Preset Electra One App where LFO1 parameter CC 25, found on pages 3 and 6, should change the overlay of control ‘SPEED’ in page 3, slot 1 and in page 6, slot 13.

I just couldn’t get it to work based on the example in the documentation (so I kept the logic working with 2 controls that a move beteween slots)

Can you elaborate a bit more on how overlays works and how to reassign overlays?
IOn the exmaple above:

  • listA = a control object?
  • valueA : what kind of object is this ?
  • valueA:getOverlayId() = the idnumber of an overlay list ?

=> valueA:setOverlayId (1) : what does this exactly ?

In my case: if a want to assign control #12 with the overlay of control #91, and the latter has an overlay with ID 20 , how should the code look like?

Are the overlay ID’s in the preset json fixed, or can the ID number change dynamically everytime you add or delete a control that has an overlay attached to it?
If you assign an overlay to a control that also has a formatter, what gets priority in the view: the value of the formatter or the one in the list?

Martin, do you know approximately in terms of time when that function will be implemented? I am building a Access Virus TI2 preset right now and really need this :slight_smile: