Map juce::Sliders to a midi controller knob?

this is how most Juce plugins would handle this.

Basically, you don’t directly handle midi mapping in your plugin. You create a parameter visible to the host that the host can automate, and then the user can use the host’s automation features to control your plugin’s parameters.

So, for example, if you create a juce::Slider and connect it to a juce::RangedAudioParameter, then in Ableton you will be able to use the normal system of Midi map → click on a parameter → move a midi controller. Then when you move your midi controller, the host will be controlling your plugin’s RanngedAudioParameter, which will make your juce::Slider move.