Midi Learn button

Hi Everyone. I have an interesting question

If I wanted to create a button that respond to Sysex string i would have to create the button and define it within the button setting menu.
I was wondering if I can create a button that upon clicking will “listen” to my midi message coming in and once the message is in the info will be automatically saved within the button’s properties. Like when we assign a button in a DAW by midi learn.

Really hope this is possible and would appreciate it if someone can assist me with that. Have a blessed weekend

It should be possible using a custom module, but you’ll need to dive into Javascript a bit more because things will start getting very obscure if you just copy-paste some code.

The module’s general idea would be:

  • creating a variable that tells whether the learning mode is enabled
  • using the oscOutFilter function, catch the “learn” button’s message to update that variable
  • using the oscInFilter function, catch incoming messages and – if the learning mode is on – use the receive function to edit the session on the fly (using remote control commands) or feed an osc listener .

And where can I find someone who understands what you just said?

Do I need to look for a java scripter?

I wish I could reach out to someone over here and support the OSC community instead.

Please let me know what is the best course of action. I have all my ideas in mind and they are very clear to me in terms of envisioning it. But when it comes to scripting I’m in the dark.

Please help :pray:

I’d advise to learn Javascript instead :). The above instructions will seem a lot clearer once you’re familiar with this syntax (as will the custom module’s documentation). I’m not willing to write code for every use case that’s not supported out-of-the box in O-S-C, the custom module allows user to extend the software’s features at the cost of learning Javascript. It may seem rude but otherwise I’d spend my life on this forum :slight_smile:

That’s completely understandable.

I will try to keep my questions within the boundaries of OSC usage.