Binding a midi knob to gain fader only on selected track

I’m trying to bind one of the knobs on my midi controller in such a way, that it would control gain level only on currently selected track.
It sends CC100 on channel 1 (both miditracker and a-midi monitor says so) and works ok if bound to specific track like this:
<Binding channel="1" ctl="100" uri="/route/gain 1"/>

I’m pretty sure I saw this kind of binding in one of Ardour’s midimaps but I cannot find it.
Anyway this entry in my midimap doesn’t work:
<Binding channel="1" ctl="100" uri="/route/gain"/>

Thats close, try:
<Binding channel="1" ctl="100" uri="/route/gain S1"/>
(assuming Ardour 5.12)
see: http://manual.ardour.org/using-control-surfaces/generic-midi/midi-binding-maps/

Perfect! Thank you.

Can I also somehow bind a knob to currently selected automation lane?
Maybe some variation of this? :
<Binding channel="1" ctl="100" uri="/route/plugin/parameter S1"/>

S1 is the same as a 1 or a B1. So to use /route/plugin/parameter you would have to tell the map which parameter you wish to use. so uri="/route/plugin/parameter S1 1 1" would control the first parameter of the first plugin in the currently selected strip.

Yes i see.
But I was wondering if, in Editor View, when you add some arbitrary automation lanes so they are visible (and selectable) as those “sub-strips” beneath track to which they belong - if there is a way to bind a knob in such a way that it controls only the currently selected automation lane (this “sub-strip” with its own fader)?

Internally, there are different kinds of select, the selected strip is available to the controller code and easy to implement. The selected control/automation lane is not. Also, all developers are busy on other projects and no one has volunteered to extend generic MIDI. Still, asking for such a feature via https://tracker.ardour.org/ would be worth while. When someone gets the itch to extend generic midi, that is where they would look for ideas.

Ok, thanks for the answer.
I guess one can just ctrl+middle mouse on particular automation fader, do the job, then move to another one and so on. But there is this little latency issue - when you are assigning a knob to something new without unbinding it first, the previously assigned fader will move slightly before the new one will take over. So you have to always remember to unbind first, which can be inconvenient or even impossible - if you are like me and just cant remember to which automation lane it was binded 1h ago :^)

Maybe it would be a good idea to have this other “unbind” method, something like:
ctrl+shift+middlemouse and move a midi knob to unbind it from whatever it was binded to.

Or maybe something like this is already there and I just don’t know about it?

That is a bug. It needs to be fixed. That of course will not help you now but hopefully Ardour 6.0 will fix this.

I think you might be better served by creating a MIDI binding map for your device. Not sure, but that’s my gut feeling.

Yes I’ve already created a midimap for it. But among many other things it (Novation Zero sl mk2) has this big fat single crossfader and I don’t really know what should I bind to it.

My first thought was to bind it to pan-direction on currently selected track:
<Binding channel="1" ctl="100" uri="/route/pandirection S1"/>

But then I thought that it would be perfect to bind it to currently selected automation lane. Sadly as Len said this is impossible via midimap. So the only way to achieve this is to use ctrl+middlemouse on particular automation lane fader.
But then there is this bug causing previously binded fader to move before new binding take over control…

BTW
If anyone is interested I’ll gladly share this Zero Sl mk2 midimap, it’s pretty extensive. But it’s based on custom Zero Sl mk2 template which have to upload to the device first.

[quote=“roithamer, post:10, topic:100349”]
If anyone is interested I’ll gladly share this Zero Sl mk2 midimap, it’s pretty extensive. But it’s based on custom Zero Sl mk2 template which have to upload to the device first.
[/quote] If we don’t have a map for it already (and maybe even if we do) we could add it to the list included maps. Uploading it as a “patch” at https://tracker.ardour.org/ is the best way.