Hello, so basically I have sysex values that contain ascii characters in bome midi translator, for ex :
is keyboard maestro capable of reading the ascii in the above message 31 2F 38 2E (which mean "1/8) and display it (dynamically) in a box ?
Hello, so basically I have sysex values that contain ascii characters in bome midi translator, for ex :
is keyboard maestro capable of reading the ascii in the above message 31 2F 38 2E (which mean "1/8) and display it (dynamically) in a box ?
Here are a couple of ways you could get it done:
One is to execute a script (shell script: "xxd -r -c 32" , suggested by @Airy )
The other is to translate it with a "lookup table" within the macro itself
Hello, thank you, but do you have any idea how keyboard maestro can pull that last sysex line from bome midi translator ? How should I send this message from bome to keyboard maestro ?
trying to send the raw midi sysex from bome to the port "BMT to KM" and receive it in KM but I don't know where to go from there
I'm not familiar with Bome MIDI Translator, but if you have read the MIDI Trigger documentation and it doesn't apply to your situation, it is often possible to execute an AppleScript to read data from the application's window or use the Read a File action if there is a log file.
Your macro is failing because both it and the shell script action are disabled. Furthermore, the script isn't receiving the data it needs to process. You'll need to enable both the macro and the action. Then, make sure you add a step before the shell script to capture the message and save it to the variable the script is expecting as input.
The MIDI Trigger saves its "Packet" data to the %TriggerValue% token. The value is formatted as a string of space-separated hex values, followed by a comma and the source device. To isolate only the hex values, you can use %TriggerValue[1]%
(as shown in the screenshot above).
I tried this macro but I get no displayed text. I even tried to disable the shell script and just try and get a display text of the "MyString" variable but nothing
Bome is sending messages to the port "BMT to KM" as you see on the bome log window, but it's like keyboard maestro isn't receiving anything
The issue might be the "Macro Group" your macro is in, as it's set to be active only "when Cubase 14 is at front". As a troubleshooting step, try moving the macro to a group that is always enabled (one without any conditions) to see if that resolves the problem.
is my macro missing something like what should I write in matches
Have you tried enabling "MIDI Learn (allow recording trigger)"?
yes, it's weird, either bome is telling the truth or another software is grabbing that port
bome is forwarding the sysex message to the midi out BMT to KM
unless keyboard maestro is actually using the input of that port ...
I tried to send the sysex data to a midi IN instead (Quantize to BMT) and use that port directly in Keyboard maestro but still no luck
Is the macro actually triggering? I'm no MIDI expert, but:
The trigger requires that the packet:
F0
, so that should be good7E
, so not the 7D
in the logHopefully @kevinb will pitch (hah!) in real soon...
Hexcellent.
I had not been closely following this topic and had left it to the evidently good advice that everyone was giving regarding debugging. Reading the topic now, though, it seems to me that such debugging, while valuable, might be premature, since it seems that the fundamental problem is still:
So⌠Letâs establish whether KM can receive anything from something.
I see multiple references from the OP to the concept of sending MIDI to ports. In a recent discussion, @Nige_S and I agreed that the term âbroadcastâ was an appropriate way for thinking of most traditional uses of MIDI. For example, a MIDI keyboard outputs (âbroadcastâ) a message and that can then be received by any MIDI input that is using the same port and channel.
Therefore a message can be sent out on a specified port (or ports), but it is not sent to a particular input. (This is separate from any questions of what terms and concepts may apply to routing within Bome MIDI Translator).
If a KM macro has been set up to listen to receive MIDI, the first thing to check is that it can. If no MIDI that is output by BMT is received, plug in a MIDI keyboard or other straightforward MIDI device into the Mac instead (probably needless to say, via USB or a MIDI interface). Can OP get the macro to respond to that?
I think that needs to be established before the problem can be looked at further.
What I hadn't realised is that KM can receive its own sent MIDI messages. Allowing those of us without MIDI setups to play along...
MIDI Receiver.kmmacros (3.9 KB)
Resulting in:
I think it was, at least in the beginning. "MIDI Learn" seemed to be working, which is why I went straight to the (strange-looking, to my uninformed eyes) trigger parameters.
And those parameters break the trigger on my test macro.
Yes, that was a sensible conclusion, and I meant no criticism of anyone by saying that debugging of the macro might have been, while valuable, premature. However, in light of comments by that followed your initial reply (âit's like keyboard maestro isn't receiving anythingâ and speculation that perhaps ââŚother software is grabbing that portâ), I would want, at this stage, to proceed from the basics in order to establish at what point things start going wrong.
Once that problem has been identified and fixed, we can move on to identifying which issue should be addressed next.
Me too, usually -- the old "unplug it all and slowly add bits back in, testing as you go" approach.
But as I know even less about MIDI before KM gets involved than I do about after -- I've leapt straight in at the middle
Until just now, I had the impression that Bome MIDI Translator was a hardware unit, but looking into the matter again, I see that it is a piece of software. Well... nobody explained, did they?
I now understand the question to be in essence about the KM macro's reaction to System Exclusive (SysEx) messages, so yes, I went down the wrong rabbit hole while trying to follow what had been going on with this thread. Iâm sorry if I dragged anyone else down it too!
I would now reinterpret that as meaning that the particular KM macro is not responding to the SysEx message. That is perhaps obvious with hindsightâbut if the wording is not literally correct, it is easy to lose oneâs way.
@Hamza_Bennani_Smires, have you seen this section of the Wiki?
https://wiki.keyboardmaestro.com/trigger/MIDI?s[]=sysex
Packet
This is a rather advanced trigger that requires some knowledge of the MIDI protocol (v8+). You can configure the minimum and maximum size of the packet, as well as the range of the first two bytes, and a regex that matches the specified packet (the format will be a sequence of space-separated hex values).
This should allow you to capture things like SysEx and HUI protocol packets and the like.
So, the answer to the question âcan Keyboard Maestro receive SysEx MIDIâ would be âYesâ, and that page is the guide for that.
Whether it is âBome MIDI translatorâ that is sending the SysEx messages, or another piece of software, does not, of course, affect whether a KM macro can respond to the message. If the macro has been set up correctly with the packet trigger, then any Sysex message that comes its way should be dealt with by the macro.
The difficulty then comes with how to parse that SysEx message, and I regret that I can only refer the OP to the Wiki page that I have mentioned plus any relevant documentation for Bome MIDI Translator.
Remember that the content of SysEx messages is defined by the manufacturer, so trying to analyse the messages will require data that has provided by the manufacturerâin this case, Bome, or whatever software (Cubase, judging by the screenshot?) BMT might be relaying.
So⌠Dealing with MIDI SysEx seems to be the only problem here, unless it is more to do with some sort of routing issue specific to the interaction of the software involved, which is not something that I have experience of. However, yes, we are told that KM macros can respond to SysEx, so that is at least a start!
Good luck, @Hamza_Bennani_Smires, with what will almost certainly not be an easy project, given the nature of SysEx. I hope that at least some of the points I have added to this thread (obviously, far from all, but I hope that I have now interpreted the situation correctly!) help shed a little light on the topic.
thank you for the clarification about the concept of broadcasting instead of sending to an input, it's very insighful.
I just tested a macro that respond to a MIDI trigger, but this time it's not a sysex message, it's a simple midi cc, sent by bome. And the macro works fine, KM receive the midi data when listening to the port "BMT to KM"
I tried reading that wiki page, but my knowledge of MIDI really ends at midi CCs ... I don't really now what's a packet, or what is exactly "two bytes" or even regex ...
....
But hooray ... I changed the length to 10 in the trigger section, and now it is detecting the sysex messages and displaying them on screen
however the script xxd -r -c 32 does not seems to work, if I display text to see "MyResult" it doesn't do anything
exemple : F0 7D 01 01 00 00 31 2F 32 F7
I am only interested in the text "1/2"
Ok I made some progress, I abandonned the idea of a script since I am working with a limited number of quantize values that I want to extract from the sysex (there is only 20) I just added "if then else" and wrote the exact sysex match
That's already huge progress for me, I can now detect and display the quantize value, I need to create 20 if then else and save the current value inside a variable
Now the final and hardest part begins, how to display that text in a beautiful floating square button that I want to keep on screen