Program Change Special Fader

I would to see a special program change fader that in one slot does the job of the four separate controls that have been used in presets for example by @NewIgnis : Previous program, Program Number select, Send Program Change, Next Program.

It would look like a normal fader, default, thin, or rotary, and show the selected program number 0-127.

Rotating left or right would select and send the previous/next program change, but with a slow acceleration to avoid overshooting. A bit like like how the list control selects previous/next.

To select a particular number quickly and avoid having to scroll through/transmit a lot of them:

On the E1, touch the control on the screen, on the Mini, press the associated encoder. A small pop-up with the program number appears, turning the encoder then allows selecting the desired number with a faster acceleration. With the correct number selected, to activate it, on the E1 press the pop-up again, on the Mini press the encoder, after which the PC is sent and the pop-up closes.

Unfortunately, the currently list control is not really good for program changes as you have to manually add 125 list items to the default 3.

Maybe a custom pre-configured version on the list control would be easier to implement.

The idea is that it is ready to be used by anyone without having to know about Lua or virtual controls.

Interesting idea. One approach that might get you close is to use a trick I learned from @oldgearguy which has a pot release action as the trigger. If I overshoot my patch selection with a fader, as long as I stay touching the knob I can turn back since nothing fires until the E1 senses I have released the knob. I use it for example here. In this case I’m not sending any MIDI because the patch data are all hardcoded in the preset. But the basic idea applies. Generally useful if you are sending out messages but only want it to send once you have selected the parameter value to send rather than a stream of messages for every value as you turn the knob. Of course, stuff will happen when you release so you need to turn the pot with that in mind. If space isn’t an issue then the @NewIgnis approach is the way I usually do patch selection so then I don’t have to remember to not let go :grin:.

Thank you for the suggestion. I took a look at Patch Selector control in your editor, but it appears to operate on a level that is far beyond my understanding, and I have no idea how to replicate it. My knowledge is limited to dragging and dropping basic cc faders and lists. For my Proteus 2000, a basic PC fader manages OK as the Proteus doesn’t choke on a rapid stream of changes, and if careful, overshooting can be kept within acceptable limits. Older synths would probably struggle though.

Can controls be copied and pasted between different presets? If yes, I’d be more inclined to make a 128 entry list PC control that can be reused on other stuff. (Edit: they can, so I’ll do that) But to make one from scratch each time would be a bit annoying.

I understand. The lua programing can look pretty daunting. I definitely did to me at first. Anyway, I made a drop in program change fader that uses just 20 lines of lua code here (it was made with fw 5.0.0 but I don’t think editing in the webapp on an earlier fw will be a problem - it doesn’t use any 5.0.0 specific stuff). You can paste the code into your preset’s lua console and you will then just need to change the first 3 lines to match your program change fader and device set up. You can drag the fader control into your preset, or if you want to use your own just note that I made it a “VIRTUAL” control so it wouldn’t clash with any CC controls you have in the preset with the same number. I think you will find the fader much more usable than a 128 item list control. Let me know if you have any problems if you decide to try it.

-------------------- Program change on knob release ----------------------------------

local CTRL_SELECT = 1 -- set to the reference id # of the virtual program change fader
local CHANNEL = 1 -- set to MIDI channel the receiving device is listening on
local PORT = PORT_1 -- set to MIDI port the PC message is being sent from

-- activeTouchedControlId holds which of the control knobs was touched
local activeTouchedControlId   = -1

-- send program change messag eonly after control knob is released
function events.onPotTouchChange(potId, controlId, touched)
if controlId ~= CTRL_SELECT then return end
if (touched == true) and (activeTouchedControlId ~= controlId) then
activeTouchedControlId = controlId
return
end
if (touched == false) and (activeTouchedControlId == controlId) then
local midiValue = controls.get(controlId):getValue():getMessage():getValue()
-- send a program change
midi.sendProgramChange(PORT, CHANNEL, midiValue)
print("program change " .. midiValue .. " sent")
activeTouchedControlId = -1
end
end

function preset.onLoad()
events.subscribe(POTS)
end

@martin One thing that I think could be a resource for E1 users is a dedicated repository of lua snippets. Pieces of code to do “a” thing. Most presets use code that do many things and can be bit overwhelming for new users IMO. Your tutorial series and the documentation has a lot of good examples and I highly recommend. @Roomi’s widget collection is fantastic. But I’m thinking more of a collection of simple things like this. Of course, I also don’t want to create more work so this would perhaps just be a room in the public library dedicated to snippets/examples that people can place and take from. Currently, examples and snippets live in the main library and can be a bit hard to find. Just a thought. Free disposal.

2 Likes

That is exactly the direction where I am heading. I briefly touched the topic with @jhh and @Roomi. I will set up a repository where users will be able to make pull requests with generic Lua modules and presets. Electra already supports that such shared data. The content of that repository will be used to provision the SD card shipped with the E1 and here will be tools to make it in sync. I will work on that later when this new editor and firmware are out and confirmed to work ok.

2 Likes

regarding the program change itself… it has been asked many times and I tried to come up with something generic (bank select + program change combo). when working on it I never reached a point I’d feel that a generic version like that deserves to be one of the standard controls. The gear I have always has something non-standard. A custom control tailored to specific synth might be a better approach.

It is a bit extreme, but this is what I have for my Kawai K5:

the beauty is that it 100% matches the HW. And it can pull and display the patch names

Cool! I find that @NewIgnis approach works for a lot of more recent synths. Adapted here for my Peak. The Bank and patch fader identifies the patch and the patch select button does the work. Get patch names populates the fader using the persist/recall functions.

1 Like

Thank you for taking the time to make this kiwigrass. I have copied the control and lua into my preset. But, after making sure the 3 top line values look correct, the control does not work.

The preset is here: Electra One App

Maybe you can see where I have gone wrong?

The port is 2, channel 1, and the Program control reference is #46. I also tried 1 for the CTRL_SELECT, in case you actually meant for me to use the virtual control parameter number.

There are also my own two existing PC controls to the right of your one that do function OK: ‘Patch Fast’ is a standard fader set to PC, and Prev / Next is the 128 entry list object, also set to PC.

For some reason I got an error trying to open your preset. IIRC the port numbering starts at 0. So port 2 is 1. So, try setting PORT = 1. Or, I think PORT = PORT_2 will work since PORT_2is the name for port 2. Other than that, it sounds like you did what I said.

1 Like

That was it. I set port to 1, and it works! Thank you so much. It is much more useful to have a control that it is not hosing out messages.

1 Like

I’m with @martin on this one - custom controls is the way for librarians

I normally dedicate a whole page to the purpose, e.g.

3 Likes

These tables look great! Can you pls share how you created them?

1 Like

Claude

Do you mind sharing the LUA?

IIRC they share some libs and widgets - but I should be able to prompt Claude to extract whatever is needed to work as an individual preset…

Which one are you interested in?

Thanks! Any of the two tables that you showed in your screenshots, I just wanted to see what type of LUA formatting is used.

There has been a lot done on the custom controls in firmware 5.0.0. I am preparing one extra update to the web editor that will allow users to take full advantage of that by creating custom controls that can be reused and shared with others. Of course, creating such a custom control will require using Lua. But using it, will not. There will be a simple library of custom controls and using them will be merely a drag&drop action.


I hope that this will unlock things like program change controls, envelopes, etc. I would like to take the same approach as we did with the presets in the past - instead of me hardcoding everything in the firmware, use the power and knowledge of the community to get it going. The only difference will be that a custom control will require my approval before going public. I want to review them, at least in the beginning…

5 Likes