midi learn for panel
-
I could really need some help to understand how to set up midi learn in a panel with several parameter areas
If someone could make a minimal snippet how to do that, I would be most grateful :)
This is a small example, a panel with 2 areas controlling 2 different values.
How do I setup the different parameters to be controlled via midi cc?
There is no components, only effect modules involved, is it possible?
If yes, can someone please show me?HiseSnippet 1281.3ocsVstaaaCEVJIpq1aEaEXO.D9WxMNNxItsCMKnNwIYKXMoF0YsEHHqfVhVhKxjdRT9BVy61dT1ivdB11gj5la8xRMP8erNW9N7iGdHOmdQbWRbLOxvrxEyGSLL+Jq9yYhftAXJy3ziLLumkfDKLNb9XbbLwyvzb8ePZyrxFFpe+0yODGhYtjBUFFulScIufNhJJz1qyOQCCOA6QtfNpj2s6bpKm0kGxS.drtkiwXr60Xex4XoaqYAj3XOpfG0WfAxXXtwgbu48C3SYZ+eMMlNHjHEZYzGBjV8I7POIikZM5FPC85kseiMfnzqX2utd2+sVmQ8n45KxBeix.p.Q47g4Z2F8Z8+SOmkQOyRzaCM8dnUe2H5XQgEI29RqSYBRzPLbDTlVZeMV6usr5xAOXhlivWSNIBDxQX+DGmFnG63TeupvoPr.MAGg5gYjPz9nLb9DQW9nwbFHXWSYsF.nZDwGwG7qDWAZ+p+d0J0lfCSHw0dF5xqZ.hinL42vJ3nkwyjx6.J1w4pp2.gPErlwDwqkPs0QqdYC8fCAwq3IBJiXOLg4Jnblsec4BJI6Tfnh.Zrjkug5IBrA3JKAkr7iDpefH2zjRlzqrzBXqodKzLjv7EP.1G4fdNJSMfRuaPOCUqlFADs3PtPZam8JjAwons0lTN52bHT+ePXncMmYsaeh5Ws54AgBeMjGgro.Tm8PTz2mhFQ2by5Uq.6WkiQXlOA74LrHnIdPr8D3fc1kzqPaADEx4vmxvpyNxLB3rsLTa0tN5Q4aFIhs0QS5suLYquFZq+Kt4TpH3fvwA3bMgxz3..NjEZ9z500Hk6L3HhAEzuBN+fPFRrubGzl5TwiPzFncgDmhMMPAasKTPfZW++ZcwLA82RHSCnBR9VQwZXqbLyGJEZ5wSfaUWv6KhnLe6R6Jn5JMxdQ3oG.TlQ7tfLSXqboA5xBVAjRJ.bZ6c.f0bgR7Hhm5b4F3n4lEpEOimDS5hCCG.OQUTLRl.n9LUPdWKunCQZdzzMj5dMwC892izJfrfeZ8yG4EnWYnhZw8vBbN98SgOauEsS8lkU8MLjyiRC3rT5T+CbO6XK+.ZgHckzaHQWYAxkxXMyTWNTq4BH2KyFD1EroWvMKGq2BbqkilYEEJvpmsQT2BjkGMxtBAFUeKuYAeWZWEQFKeRRc.Io9MxhjrZADmcNWPdIyVUOT8lpnOzzvgK0l7w1HdXHIZolkMMitMf1rjQCHQMz2SxcD5drX6o6c2ZO4pe6ujib1oLp3kiIox2d+UizlGvW+7oGAmKxdZo5.+FShDTIcLOhLAFVP2gqh0Qj3qE7wJeS63XXdegx5Cx5+IuNZPgk9KrzeOKebh+3MclmKz4W5ndwIWwelzIPcuqX7iy6.Wm4SytTCL5qsfGoQEJHLLjejC.7BBNB17lqY7wMmgQD3dIgXwhyMHGVJ0.bZsPCZYSXVLULu7vTeBCS3bmm04tR2GZ0iJbCVNeWaI7ENS+by2zQydf0wCGBsVJH6FVm71UcNrOApnm7vGdkHhBkYVmmLpOzixk.LgA0dvBYAEDRnJYGorLyzmv7TB+C7K0XKorYpwVYFMFgci3uyUeOVN728UZ.NwTy.Ww5LoLpkg5tMfyxooiwHnj7cttxTwV.2WNlcVAL6tBXZuBXd7Jf4Iq.lmtBX9taEi70fCRD7Q5qIfhdGqdjyz7X0yEpJRi+UPHFr3
-
You'd have to roll your own MIDI learn solution, the inbuilt MIDI learn will apply to the entire panel.
-
@d-healey do you have a minimal example, or a hint on how think?
-
@d-healey said in midi learn for panel:
You'd have to roll your own MIDI learn solution, the inbuilt MIDI learn will apply to the entire panel.
you mean set up midi controller modules for each area?
-
You need to decide how you want to start the MIDI learn, does the user click a button or do they right click a section of the panel, for example.
Once they've started MIDI learn, you need to set a flag to indicate you are in MIDI learn mode for the selected section of the panel.
Then when the user moves a MIDI controller you save the CC number somewhere and turn off your MIDI learn mode flag.
Then in your on controller callback you can check if the CC number matches the one assigned to the section of the panel and if it does you update the panel and perform whatever action is required.
Why don't you just use sliders?
-
@d-healey
sliders? this is my way of learning the interesting parts, learning from the masters :)
thank you David -
interesting parts, learning from the masters
Panels were interesting last year. This year we use sliders + LAF :p
-
@d-healey Haha
-
@d-healey Sliders+ LAF were interesting last year. This year we use custom OpenGL shaders.
-
@Christoph-Hart uhh, I'm 2 years behind ðĪŠ
-
@Christoph-Hart @d-healey
I'm catching up, after 20 hours I'm only one year behind :)@d-healey I've implemented a custom midi learn system, and yes it works fine but I have to get rid of some stupid loops inside the on controller callback, I think they interrupt processing in the plugin, at least that how it sounds
Thank you David for the tips on how to do it, much appreciated
-
@ulrik Hey Ulrik. I am facing a similar problem. A bit simpler probably. I want to assign my panel value to CC1 for example. How can I do that? My guess was in the panel timer callback to listen for isController() or something!? Do you have a hint for me? thx, u
Edit: Never mind... I put this in the onController callback. It is working for now.
function onController() { if (Message.getControllerNumber() == 1) { pnlPosition.setValue(Message.getControllerValue()/127); pnlPosition.repaint(); } }
-
@UrsBollhalder try in "on controller" callback
if (Engine.getControllerNumber() == 1) { Panel.setValue(Engine.getControllerValue()); Panel.changed(); }
then in the Panels CB you deal with the values the way you need