Persist value when parameter mode changes

Hi there!

So, a few times I’ve come up against this problem when trying to build something that dynamically changes exports, either scripting changes to the export table DAT or exporting from a CHOP in the ‘Channel Name is Path:Parameter’ export mode.

Say I have some channels that come from my midi controller, fed into a null CHOP with the export flag on, and the channels are renamed like base1:scale, base1:speed etc. They will be exported to the matching custom parameters on my component called base1.

And then I hit another button on my controller or click a panel in my UI, and that fires a callback that changes my rename CHOP so that the channels now are named like base2:scale, base2:speed etc.

The channels are now controlling the parameters on my second component, no problems there, but since the exports on base1 get removed, those parameters instantly default to ‘constant mode’ and snap to whatever the last value entered for them in constant mode was.

The behavior that I would prefer here is, at the moment the export is deactivated, for the export value to be copied to the constant value, so you can momentarily deactivate or remove an export, and have the value persist so you don’t get a ‘snap’ back to the old constant value.

This most common use case for me is having control channels that I want to point at different things in my network, so I can navigate from component to component and tweak parameters on the fly. Or when I launch a clip, have the focus of my midi controller channels automatically updated to point at the parameters of what I just launched. As it is now, unless I do a bunch of scripting to store the values before I break the export, the tweaks I just made to the last component are lost when my focus changes, and I get an ugly snap on my visuals.

It’s certainly possible to get around this with some python scripting, but I think having a toggle on operators to set the behaviour when changing parameter modes would be super convenient. I pitched this to Ivan during his excellent workshop at the TouchSummit (thanks again!) and he suggested it could be implemented per parameter for even greater flexibility, which I agree is the smartest solution.

Is this something that anyone else has encountered? Thanks for reading!

Corey.