Parameter ID issues

After being busy with other things a long time, yesterday I started working again on the E1. I continued working with my 14 bit SysEx controls. As usual I copied existing controls and adapted them accordingly. With the copy of a control also the Parameter ID of the source is copied.

While writing I wonder if it were possible to automatically create a new - unused - Parameter ID with the copy of a control.

If the Parameter ID is the same for more than one control all the controls are following the movement but obviously (at least in my case) just the one that is actively turned sends data.

After I re-assigned all the Parameter ID’s from the copied to individual ones I couldn’t get all my copies to work at all. Searching the forums for quite some time I then learned the very hard way that changing the Parameter ID in the referring field does NOT change the “parameterNumber” in the JSON SysEx editor accordingly. And the difference between the Parameter ID and the “parameterNumber” sets the control obviously to be inactive.

My related questions are:

• What is the Parameter ID/ “parameterNumber” ?
• Are they they kind of the same or where and why are they different?
• If they meant to be the same to let the control work wouldn’t it be possible to synchronize them in the JSON editor accordingly?
• Why do all the controls with the same Parameter ID move simultaneously but not sending what one might expect?

Apologies but for me as a simple guy with no knowledge in development this all kind of doesn’t look logical to me.

And I just can repeat myself that if a searchable documentation would exist it’d probably avoid these kind of questions. I wasn’t able to find something helpful even though I really took a long time to search before I asked this questions.

Thanks in advance.

I’ll try to help you here. The parameter ID’s do basically two things, one on the inside of the electra one, and one with to the outside, external world. Keep that in mind!

On the inside, a parameter ID (or parameter number, it’s the same) is something you give to a control, that allows you to control it independently from other controls. Try it out by giving two controls, whatever type they are, the same parameter ID. If you change one, and the change lies within the range of the other control with the same parameter ID, that second one shlall change as well in real time.
This is very annoying if they are meant to do two completely different things, so make sure you keep those controls on separate parameter numbers.
Now, sometimes it is handy you can give 2 controls exactly the same number. I do this for instance to have the same control on two different pages on the Electra One. When I change the one, the other will be changed accordingly.
I typically do this for my synths on what I call a ‘performance page’, where the main controls are repeated, so you 'll find controls there with the same parameter numbers as elsewhere in the preset, on purpose! Not a mistake!

However, there is an outside effect as well !
If the control is a CC, NRPN or RPN type control, the control will use that parameter to transmit it in its MIDI messages. You cannot choose a random ID here! You for instance need to know that all CC’s ly between 0 and 127, so never ever give a control that is not a CC a parameter number in that range. in doing so you guarantee you won’t collide with any undocumented CC control your synth might be listening to, you were unaware of.
A bit the same with NRPN and RPN controls, but these don’t have 127 combinations, but rather 16383 combinations (128 MSB values , combined with 128 on a LSB). If your synth uses these, be sure to use the appropiate MSB and LSB as documented. Together they will give you the parameter number. For instance , try combining MSB = 3 with LSB = 25 in a NRPN control, and it should tell you the parameter number equals 409 which is 3*128+25.
All other controls you make like SysEx and Program controls should be kept outside the controls you need for CC and for NRPN / RPN, but for them the exact parameter number is less relevant for extrenal use. However, allthough you should avoind the 0-127 range of CC’s, it is of no use, and even not possible to avoid the 128-16383 range of NRPN/RPN controls. You need to check yourself you don’t make twins incedentally.

The parameter number doesn’t do anything on its own when transmitting MIDI from a Sysex or Program control. in case of Sysex, it is the JSON that dictates what is send out, rather than the parameter. For a program control, it depends on what you did within its lua function that will define what happens .

Long story, but I hope it sheds some light.

2 Likes

Hi Ignace,
thanks again so much for this explantation. Where did you get this knowledge from? Is this documented somewhere you can point me to or is this something I had to grew up with my “Mother’s milk” to know it? :rofl:

I mean especially the ranges to avoid would have been good to know BEFORE assigning the Parameter ID’s to 8 pages with 36 controls each which I finished just right now and of course started with ID 1 on page 1, controller 1. :roll_eyes:

Indeed, long story and some things are still not clear to me.

So if I get you right this is meant to be that they also just send exactly the same data. It is not possible to combine i.e. two controls using the same ID but each of them controls a different parameter on the target instrument, right?

For what you wrote about “outside” I just have experiences with SysEx so far. And as mentioned I started with ID 1 and ended up with 288.

And this is what confuses me: As mentioned if there is a difference between the “Parameter Number” “at the front” (like shown in my screenshot) and the “parameterNumber” in the JSON editor it simply doesn’t work. And that in a way seems to be kind of relevant to me. :wink:
I needed to set them both to the exact same value to get my controllers to work. Believe it or not…

Anyway, thanks again for your help. Highly appreciated. I’ll now change my Parameter Numbers again to a new range. Luckily I have macros to help me for these kind of tasks and with this necessary correction the time spent creating them was even more worth it. :joy:

Have a great Sunday!

Cheers,

HaPe

Well, the json allow you to refer to any other parameter ID to grab values from and send them in the SysEx. This is very flexible of course, but makes the SysEx harder to maintain.

For instance the code

[
“04”,
“08”,
“1C”,
{
“type”: “value”,
“rules”: [
{
“parameterNumber”: 239,
“byteBitPosition”: 0,
“bitWidth”: 2
}
]
}
]

could be assigned to any control (with any parameterID), but it would take the value of parameter 239, regardless of its own parameter ID.

But it you want the control to always refer to its own parameter, you can simplify that code into

[
“04”,
“08”,
“1C”,
{
“type”: “value”
}
]

So when you add a value into a json of a control, without any rules as to what parameterNumber it should come from, it will implicitly take the value of the control itself.

And that, my friend, if what you need to do in your case, i.e. to link the SysEx value to the parameterNumber without all the hassle.

Let’s dive a bit deeper into the matter. I see you are ready for it :slight_smile:

If you gave two controls the same ID, they will move together, but only the one you tweak will execute its command. The other one won’t do anything, only move along. As default behaviour we do not want the double control also to execute its function, otherwise multiple (probably the same) MIDI messages would be sent?
But yes, you could have two controls with the same ID doing different things. But you are going to end up with strange (and in most cases unwanted) side effects, as inside the E1 there is only one memory slot per parameterNumber (actually it is unique per DeviceID + parameterType +parameterNumber, but I assume here were are controlling only one Device, correct?). For instance

  • if you load a preset in the E1, you will notice that both controllers will get the default values of the last controller.
  • If you look up such parameter to add it into a json, you won’t be able to select only one of both controls.

I have probably some good news: looking up the exact way the parameters are stored (see Preset Lua extension | Electra One Documentation), I now recall the parameters are also unique per parameterType. So number 1 in a SysEx control will be unique versus number 1 in CC7 control.
So you do not really need to renumber the SysEx below 128 for you preset to work. But thread careful here. In my experience there are lots of cases where you will want to change the parameterType (from CC7 to CC14, from SysEx to Virtual and vice versa), and it will become confusing if beforehand you didn’t ensure the parameterIDs are unique on their own.

So while not entirely needed in your case, it is good practice to rename all those SysEx controls between 1 and 127 to for instance 301-427

I can recommend :

  • Read a bit about MIDI protocol version 1 (not version 2!), specifically about MIDI channels, MIDI CC’s, MIDI NRPN, System Exclusive, MIDI Note On/Off, Aftertouch, Pitch Bend and Program Change.
  • Read the “User Guide” and “Developers” in the E1 documentation https://docs.electra.one/. Stop reading the parts you get lost in, if they are not relevant to you, and leave this for another day
  • Practice.Practice.Practice. During practice you may recall you saw somewhere in the documentation a mention to a probable solution you first did not grasp. But if you now really need it, it will make much more sense to you
  • If you get into lua, there is lots a lua documentation on the internet
  • Search, read and ask on the forum; a lot of great people out there that will want to help you
1 Like

Thanks again so much for the detailed expectations.

The kind of “problem” here is that I of course didn’t create this JSON code on my own. It has been automatically created by using the “SysEx Visual Editor” which obviously no one else uses except of me. :joy:
I tried to simplify my SysEx messages referring to your example but it didn’t work at all. Probably your example works just with the “bitWidth”: 2 while my have “bitWidth”: 7 for one part and 14 for the entire message. As soon as I only delete the entry “parameterNumber”: the control immediately stops working. That’s what the current working script looks like…

…
{
“type”: “value”,
“rules”: [
{
“parameterNumber”: 1,
“parameterBitPosition”: 7,
“byteBitPosition”: 0,
“bitWidth”: 7
}
]
},
{
“type”: “value”,
“rules”: [
{
“parameterNumber”: 1,
“parameterBitPosition”: 0,
“byteBitPosition”: 0,
“bitWidth”: 7
}
]

But please don’t waste your time to maybe recommend to improve even this message. I am fine with the current status and if I need to re-assign the Parameter Numbers (synced in front and JSON) I can pretty much automate the process so that it doesn’t hurt that much again than getting where I am now.

Especially with the “User Guide” and “Developers” part I really have my issues as mentioned before. I don’t have enough time to read tons of pages before I maybe can find the tiny one that is relevant for me in that particular moment. I am used to use PDF documentations for decades now and are as fast as I need in just typing a relevant search term into it (or into a web documentation that allows it) to get where I need to in seconds. But of course I have to live with this situation here and will try to make the best out of it. But this definitely prevents me from progressing faster with the E1 at all.

I also searched about lua through the web and figured out that it is definitely not that easy to get into it if one has simply no scripting experiences. Unfortunately I don’t have enough time to start with a script that writes “Hello” on my screen and then add knowledge part by part with each line of code.

And even looking into your awesome projects to use them as an example doesn’t help because I don’t even can differentiate what is part of the language, the specific E1 vocabulary or user defined terms.

I wish I could spend more time on that because it’s very interesting. But I need to focus on other things and have to be quick with this kind of extra “construction sites” to get my main work done.

Thanks again for your kind help!

1 Like