Anyway to set control type from Lua script?

Hi

I’m trying to find a way to set a controls “type”, eg whether it’s’ a fader or a list .. etc, from within a Lua script.

I’m building a preset for the Lexicon PCM 70, which has different patch parameters depending which reverb algorithm it uses. I want to set the controls to match those in the PCM 70; I’m successfully using an array to hold colour and name, but can’t find a way to set the controls type.

In a perfect world I’d be using setType(“fader”) or setType(“list”) etc but that doesn’t exist! I can see the each controls “type” defined in the JSON, but have no idea how to manipulate it.

Any help much appreciated!

A few years ago I created a PCM 70 preset. You are free to grab that and improve things. When I sold my 70 I could not really do any updates.

For the PCM 70 and 80 I had to create many pages, hide controls, and do other things to cover all possible parameters. You can change a lot of things, but not the type.

I was able to cover all parameters for the 80/81 so you should be able to do the same for the less complex 70 if you choose to start a preset from scratch.

Appreciate your help, thank you :slightly_smiling_face:

I suspected that might be the case, which is a shame, as I wanted to build the preset dynamically from an array, after parsing the sysex dump. I will definitely grab your PCM 70 patch and see what I can learn and incorporate from that.

Cheers, J

There is a work around without you needing to change control type. For these dynamic assignments, keep using the fader control, for which it is doable to change not only min and max values, names, colour…. but you can also assign value lists to a fader, effectively showing a different value name for each chosen value.
In other words, it doesn’t need to be an option list control to show a value from a predefined list.