Still trying to fight with bi-directional mappings too

Hi guys,

I’m still trying to get the state of a switch in a VST to reflect on my controller keyboard.

I’ve set this up:

Which produces, at the MIDI out of this embedded rack a note which toggles the light of the button from green to red, via a binding in the rack a level ‘above’ this one. All fine and dandy. However, when I go away from the rack a level above, it’s easy to get the light out of sync with the actual state of the switch in the plugin.

What I need explaing, in words of one syllable, @brad, is why, if I can map the state of the button (0.000,1.000) to note velocity values (0,127 etc) why I can’t map 0.000,1.000 button state as reported by the VST to Rack states by index (Red or Green lights in this case) I can map the VST button state to a note, then map the note to the rack state with 2 different bindings, but I can’t map the state of the VST button to a rack state? Like I said, I’m sure there’s some clever explanation, and you did try to explain it @brad with the fact that Cantabile can’t know what the plugin is reporting, in terms of Integer, Boolean etc, but surely I’m mapping that with the (0.000,1.000 → 0,127) mapping at the end of the note producing binding anyway, so what’s stopping the binding from 0.000,1,000 mapping to a rack state index?

I’m getting really confused here, but throughoughly enjoying the deepness of the rabbit hole I seem to fallen down!
As always, thanks to all for the knowledge, time and effort people share here…

Pierce
(still confused but smiling)

Hi @Toaster

The above is allowed because it’s a known range to known range mapping. ie: 0.0 maps to 0, 1.0 maps to 127 and everything else is linearly mapped between.

This is a known range to unknown range mapping. The number of states by index isn’t fixed or necessarily known. ie: 0.0 maps to 0, but what does 1.0 map to?

ie: There would need to be a UI to specify exactly what 0.0 maps to, what 1.0 maps to and what every value in between maps to.

eg: suppose the target rack has 5 states. which floating point values between 0.0 and 1.0 map to those 5 states. What happens if you add a 6th, 7th, 8th, 100th or 1000th state… how does that affect the mapping?

Does this help?

(I’m not denying this is a deficiency and I’m open to improving it - just explaining why it doesn’t work at the moment).

Yes, that makes sense, thanks for the explanation @brad!

So, how trivial or otherwise would it be to make If/Then bindings? IE, If state of button is this Then produce this value?

Then, in this example, I could make a binding like this:

Plugin Name Parameter Value -> Rack Selected Rack State (or whatever)

Where the value of the parameter could be a discreet value or a Boolean argument.

Knowing the way things work when I find something that I need to do, this would probably mean a complete rewrite of the entire bindings system and the collapse of civilisation but you can only ask…

Thanks as always.

Pierce

Hey @Toaster,

It’s perfectly reasonable request, just need to figure out the best way to do it, taking all (or most) the various usage scenarios into consideration. It’s on my list… but keep reminding me about it if you don’t see something new soon.

:slight_smile:

Brad

1 Like

Hi @Toaster,

I’ve been thinking about how to better support this, and I know I’ve mentioned this before but what was the issue with Rack State Scaled binding?

See this example of mapping a boolean parameter to a rack state:

I’m open to improving this but want to understand the exact usage scenario better.

Brad

Hi Brad,

Yes that’s kind of the idea, but it would be perfect (in my case - just to show you my usage scenario) if you could map 2 discrete values of what the plugin reports back to Cantbile - in the case of a switch, it seems that 0.000 and 1.000 are the values reported by the plugin for off and on - to states selected by index as in these bindings to the state of the Bypass I’ve got already:

So, kind of like I said before, an IF/THEN instruction, IF plugin output is 0, THEN Rack state 1. IF plugin output is 1, THEN Rack State 2. I completely understand that it causes issues if the plugin output is 0.436 etc, but it seems that most of the toggle switches in the Plugins output 0 or 1 depending on on or off status. Like you said though, Cantabile can’t know that as it seems that they’re reported as continuous values between 0 and 1. Obviously the internal parameter of the Bypass state in Cantabile is a discrete On/Off value which enables the binding of it to States by Index, but hopefully this gives you some idea of what I’m trying to achieve, essentially, turning lights on and off on my master keyboard dependant of the states of switches in a Plugin. I can bind the light states to the button pushes themselves but it’s very easy then to get them out of sync with what’s actually going on in the plugin…

Cheers as always.

p

Hi @Toaster,

OK, leave it with me and I’ll see what I can come up with. Given that these source values are floating point how about instead of testing for equality, test for less than a specified value - selects one value, greater than selects another value.

For a boolean value you could just configure it so that < 0.5 maps to state A and >= 0.5 maps to state B.

(No promises - not sure off hand how easily this fits into the existing binding framework, but I’ll look into it)

Brad

That would be amazing Brad!

Thanks as always.

P

OK, I’ve implemented this but not as originally described…

Instead, I’ve made the standard mapping options available for this kind of binding and a new “curve” that selects between two different values:

If you choose a curve kind “Select” it will select either the min or max target range value. In the above example if the source value is < 0.5 it’ll select 20, otherwise 30. You can adjust the actual switch over point using the curve amount slider.

You can use this mapping in a binding like the following to select a state by program (or index) from a floating point parameter source value:

Here’s a video showing mapping a parameter to two states by program number 20 and 30:

This will be in the build 3677 available now.

Brad

1 Like

That’s incredible Brad!

I’ll have a play with that later!

Thanks a lot as always.

P

Brad, you’re a genius! That’s changed my life!

P