Sharing patch is caring

Hi,
here is a spat revolution patch, hope it helps
I think the container for knob is pretty useful

Spat_Revolution_v22.json (679.0 KB)

Nice! Thanks for sharing.

Interesting to see you made a number of faders on top of eachother of which only is visible at a time, by using #{@{dropdown_select_r} == x}

Recently I tried a different approach where a single fader controls one of several parameters at a time. The parameters are selected by their corresponding buttons. I think your solution is a little less complicated.

variableFader.json (26.8 KB)

1 Like

Thank you for sharing this !
Your approach using variables for all the parameters is really interesting, even the css part learnt me some new tips.
I thought to a solution using array in JS
Two reasons of my approach : once is that I start learning code quiet recently and I missing skills, second is that I have to manage different range, for each functions and osc address

Well, I'm missing skills too. A lot. I also started to learn some relevant coding only recently. I just try and learn and do the best I can. That means the implementations I make may not be the best possible solutions or best coding examples. They might inspire though.

Here is an updated version with a few lines added to provide for variable ranges and step on/off.

variableFader2.json (27.5 KB)

Unfortunately I stumbled on a problem of non-initialized values. I can't find a way to initialize variables before they are set in the script field. The result is they are undefined until the widget is activated for the first time. I'm not sure if there is a solution.

1 Like

The VAR{} syntax accepts an extra parameter to that effect :
VAR{foo, 1}
VAR{foo, green}

I was looking to use your solution, my problem was that I need to get a variables number in the OSC address set by a switch. It needs to be activated twice to set it.
I hope to make it works as it's a more elegant way.
variableFader_test.json (32.2 KB)