Simplistically, I have a MIDI controller with a keyboard, and 8 knobs.
If I record-arm one track, the keyboard will play through that track.
If I MIDI-learn a hardware knob to a software function, it will continue to control that software function, even after I record-arm another track.
In this example, the MIDI keyboard is context/track aware, while the knob sticks to the specifically configured parameter.
I want the active track to have its own assignment of midi functions, so that I can change active tracks, and have an entirely different set of functions mapped to my controller.