Any way to know what Midi CC is connected to a slider?
-
Hi everyone,
Is there a way to get access to the MIDI CC that is attached to a knob in the Code?
Like I Midi Learn a specific slider, and then in the code I can know which Midi CC it is attached to.
Thanks again for the help!
-
Since this returns the index of the control you should be able to compare it against the controls you have to find the correct match.
-
Then it's doable if I put this in the "OnController" and get to know which index it is controlling?
-
@Alex-Paradis If you're using it in a deferred callback that should be ok but it might not be so good in a real-time script.
-
@d-healey I see, I will check on this quickly on my side.
-
I just tested and the function doesn't seem to be returning anything... weird.
-
Hmm it's strange, it just returns -1. Also what will it return if there is more than once control using the same CC.
-
@d-healey
It works on my side but it gives me only the position of the CC in the Midi Learn Panel, not which element it is attached to.I can know if the controller is attached to a CC, but I cannot know which one it is.
-
Things are really strange in my version, Message.getControllerNumber() is returning 33 when I move my mod-wheel and 11 and 43 when I move expression pedal.
Can you post a snippet?
-
So I had no choice to create a new little hack in Hise to be able to get the CC Number that is attached to a Automated Parameter.
I will probably gonna need to send it to @Christoph-Hart and see if he wants to implement it in future Hise Releases :P