Midi Sysex for dummies

Hi everyone,

I would like to ask how exactly I assign an exclusive message to trigger a button and vise versa
I basically want the button to trigger my machine and the machine to trigger the button.

I keep getting error messages so I probably not writing something in the right place

I’m attaching a screen capture for the main setting. The midi that is connected to my machine called “mio”

The message that the machine is producing is F0 43 73 01 52 25 00 01 01 00 01 01 F7

How exactly do I fill the OSC editor to assign this simple button?

1 Like
  • address: /sysex
  • preArgs: leave empty
  • typeTags: leave empty (we’ll be sending a string actually, but osc will manage)
  • on: F0 43 73 01 52 25 00 01 01 00 01 01 F7
  • mode: `tap
1 Like

I did everything as instructed.

Here’s a picture side by side of what I put in and the error message the OSC is giving me.

It should work, the error you see is raised by the underlying midi driver so this may come from the system. Can you try

  • with a different midi output port
  • with a different midi message type (eg: address: /note, preArgs: [1, 60], on: 127)

Edit: please enable the debug option so that if a message actually get sent it appears in the logs.

OMG! Just a funny remark: I did what you said and replaced it with /note etc and I clicked on the button
and a loud piano sound burst out of my speakers LOL - I JUMPED from my chair! LOL that was hilarious.

Ok, so we now confirmed that the cable works and all other settings are Good!

So why the Sysex message doesn't work?

Maybe I’m writing it wrong, with space without space?

This is a picture of two different software and both listened to the message and this is how it is written:

I made a 20seconds video to show my screen

Thank you Jean for the Dubug tip. Now, i don't need any other software to see what message is coming in. In the video you can see me going through the buttons on my Synth. I randomly toggled between them just to see the messages. Eventually i would like to have these 10 Bottons activate the OSC button and vise versa. It's seems that everything is OK on the Midi communication but it's still doesn't activate the button

Any thoughts on how we solve this?

Thank you so much for you help

loud piano sound burst out of my speakers

Wow maybe 127 was a bit too much :slight_smile:

Maybe I’m writing it wrong, with space without space?

With spaces, at least in open stage control

It’s seems that everything is OK on the Midi communication but it’s still doesn’t activate the button

I think lowercasing the letters in the button's on property should do.

So why the Sysex message doesn’t work?

I don't know why sending sysex fails here..

Ok. a partial success but it is a HUGE step forward.

The purpose was to build a button that will trigger may Pad on my synth and the Pad on the synth should trigger the button.

After your advice Jean, I was able to click on the Synth and it indeed triggered the button. Yeh!!!
But when clicking on the button the Synth did not respond despite confirmation of midi out.

After I researched this I discovered that the Synth listens to a different income message to trigger the PAD.

Clicking on the Pad with this message f0 43 73 01 52 25 00 01 01 00 01 01 f7 will trigger the button in OSC

But for the same PAD number to be triggered the message going out from the button should be:
f0 43 73 01 52 25 11 00 02 00 01 f7 - This triggers the PAD successfully !

How can we tell the button to listen to one SysEx message but transmit a different SysEx message?

So sending sysex does work ? Great !
The easiest way is to use the button’s script property:

// script property
send("/sysex", "f0 43 73 01 52 25 11 00 02 00 01 f7")

This will send the appropriate message when the button is clicked, but won’t prevent the default message that’s already being sent (that’s a limitation I’ve not fixed yet).

Not sure what you mean by that or what you are referring to. Your script worked amazingly well!!!!!
The button and the Pad are now activating each other! You are amazing!!!

There's only one tiny problem: The behavior of the button is stuck on tap.
Even if I change it to push or toggle it's still behaving like a tap.

This occurs immediately upon pasting your script. When the script is removed, the button behaves according to the parameters set (tap, toggle etc).

Any idea how to solve this?

What did you put in the off property ? A toggle/push button will turn off when it receives this value.

This is a short recording of the behavior.
It seems that the scripts alter the button behavior that was set up.

Now, this might be the reason why this is happening but you can confirm that.
In my Synth, once you press a PAD you can NOT! undo it. The only way to undo/deselect a PAD is by selecting another PAD and that is exactly the behavior I need for the entire array of buttons. I believe that the behavior is dictated by the Synth. If the Synth doesn't "let go" of the button OSC will behave the same. But again, this is actually a good thing! :slight_smile:
All i need to do now is to tell OSC that only one button can be triggered at a time (Only in this particular group of buttons)

Here's the short video but it only leads to the main question:

Telling OSC to activate only 1 button at at a time in this specifc group of buttons

Really hope you could help with that :slight_smile:

It’s not behaving like a tap, it reacts to incoming messages, your synth is probably sending a feedback message that lights the toggle on. Note that the script here sends the message regardless of the button’s state.

Managing control and feedback with different messages is always tricky, especially with sysex. A way to handle this is to separate each control into 2 widgets:

Remove the buttons and create blank ones, with

  • on: the control sysex string
  • mode: tap
  • address: /sysex
  • target: midi:your_device

Beneath each button we’ll create another button widget that will be used only as a feedback indicator:

  • id: feedback_1, feedback_2, etc
  • interaction: false
  • mode: toggle
  • on: the feedback sysex string
  • off: 0
  • address: /sysex
  • target: midi:your_device
  • script: set("feedback_script", value) (send value to “feedback_script”)

Now all we need is a little script that turns the feedback toggles off when one is activated: we’ll just create a script widget:

  • id: feedback_script (it will receive the values of all feedback buttons)
  • script:
// note : variables id and value are pre-allocated
// id = id of the widget that triggered the script
// value = received value
if (value != 0) { // only when sysex is received

  for (var i = 1; i <= 10; i++) { // loop through feedback buttons

    var widget = "feedback_" + i

    if (id != widget) set(widget, 0) // set to 0 except for the one that got activated

  }

}

Reference: https://openstagecontrol.ammd.net/docs/widgets/scripting/

1 Like

OMG ! :scream:

Ok, Jean, You are unbelievably talented. UNREAL! :slight_smile:

It took me literally 30 times (i counted, LOL) to understand how to follow your directive. I toggled between the OSC and the webpage to make sure i’m doing it right. Word for word, letter for letter.

IT WORKED !!!

I must ask you Jean: You write and explain so beautifully and concisely VERY complex concepts, codes, and scripts. Do you get the pleasure I just experienced? The pleasure where you write a certain thing that seems unrelated and it does a function for you? Because I’m experiencing this pleasure right now and it’s absolutely an amazing feeling.

Altogether, I need to take a week off now to digest all this :slight_smile:
First, I don’t want to be selfish and take you away from other users. I’m containing myself. LOL
Secondly, I feel I was in a desert for a few years, seeking and researching Lemue , Shmimer, and a bunch of other stuff and trying to work with everyone’s limitation. Then, one day I found an OASIS!
I found OSC. This OASIS had so much water and food that I’m afraid if I jump in and eat everything it has to offer, it will have negative consequences :slight_smile:

This is extraordinaire! and I can’t thank you enough

Not only for helping me out but for introducing me to this wealth of yours.
Ok, I’m done!
For the next week, I will try to digest everything and make some tutorials to benefit others

This community is going to be very successful and I hope you’ll be able to keep it up.

In summary:
Problem Solved! My Button functions the way I wanted it to!

Thanks for you enthusiasm !

Hi Jean, How are you?

I’m back!! and I will be spending some time here as my school is off for a whole month!

I followed all your steps and everything seemed to work fine. But
I discovered a problem and I hope you’ll be able to help me out. I attached my file so you can see what I’m experiencing.
I created buttons 1 - 10, placed the feedback button behind as you said.
When I press buttons 1-6 the synth responds perfectly! When I click the synth buttons 1-6, the OSC responds perfectly, but when I press 7 - 10 I encounter problems where my press is not registered the first time and I’m forced to press again. This happens both ways and only happensAmazing.json (9.0 KB) in buttons 7-10.

Just to simplify what i said above and maybe to try speak in an OSC Language:
Buttons 1-6 Toggles at first time like it should. Buttons 7-10 : first press button responds as a tap and only with second press it toggles

Would appreciate your help

It’s hard to see the issue in the attached session, but the button_11’s mode seems wrong (push instead of tap)

I’m referring to this group of buttons. 1-10. I don’t see the 11th button
Either way, after restarting my synth it seems that from OSC there are no problems but when i click on my synth sometimes the SysEx message is not going through, forcing me to hit the button again.
This happened before from the OSC where I had to press twice for the button to toggle. For some reason, I don’t experience it anymore. Would you think it’s any hardware issue? I’m using loopmidi. Could that be a reason for messages not going through consistenley?

I also noticed something that i’m not sure if it’s normal. When device is not connected to the computer anymore - all the buttons turn into tap buttons. When synth is connected again, buttons function as a push. Is this normal?

These buttons do not exist in the session file you posted above.

I'm not sure to understand, but I guess it's just the lack of feedback from the hardware that make button behave different (a button's mode is not gonna change on its own unless explicitely configured to this way)

I honestly have no idea yet :slight_smile: