Convert keystrokes to hex and insert these into a sysex

Hi since we are now getting working solutions to question… Keepup the good support :+1:t2:
Here another one…

Can I convert a keystroke string (send from a streamdeck) in to hex an insert this as data in a sysex ??

Thanks

Well, you can send text from StreamDeck but I don’t know of a way to convert it to SysEX MIDI Stream.

However you send MIDI SysEX directly from StreamDeck with their MIDI module. You would have to convert the ascii text to hex to input it.

I would use something like google sheets to enter the ASCII and then use formulas to convert to the hex code that you want.

image

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hi Steve,
Thanks for you r reply, Converting text to Hex would be great but I can understand that this is outside the scope of MT. Although it would give you a great option to do things. But I of course sending the Sysex directly form the streamdeck is always an option but al lot of work and not that flexible. But I have still some Ideas I have to try… The best way could would be to çatch the sysex from Cubase as soon as the name textfield is changed, but since there is no “trigger” in /from cubase that this textfield is changed, this is not possible. But trick you send me is already working. I now just look if I can simplify the process.

Thanks

Steve, Short question…
Can MT store a keystrokes (sequence) into a variables.
(If Yes how ?)

Thanks

You would need to set up triggers for every keystroke that you may be using for input and in the rules of the translators, set a global variable to the value you want to set it to. So with all of the alphabet, it would be 26x2 translators (if using upper and lower case) plus translators for numbers etc. You would have to store them in global variables and then when hitting the enter key, have a translator that sends them all out as part of a SysEX message. You would probably also need to calculate the number of characters so that you know how long the SysEX message needs to be.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

I found this project file that might be able to help you. It has all the incoming translators that I think you would need but you would need to modify them to store the global variables instead of directly sending MIDI as they come in.

You might also be able to disable either key down or key up and only use 1/2 of the translators.

Also probably set the ASCII value of the keystroke in rules.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Keystroke_to_MIDI_by_channel.bmtp (55.2 KB)

Hi,

@r.f.tilanus

I put this together and it might help.
Any invalid keystroke will be ignored.
It can handle up to 10 characters. If it goes over it will send whatever is in the queue.

The SysEX goes out to the alias ‘MIDI-SysEX’.
I left Key to MIDI alias alone but unassigned it. This does not send you ASCII values, just some arbitrary index values that I pulled from the original file I had.

Preset 0 handles the keystroke handling
Preset 1 handles sending SysEx messages.

I use the shift key to send to upper case. Don’t use CapsLock as it will not work.

Then Num Enter Key terminates the message and send the SysEX.

The normal Enter Key does not as I think I found a bug in MT Pro that I will report. [Edit] Actually the problem was not in MT Pro. It was in Logitech Setpoint software.

It has some logging turned on so you can see what is happening as you type.

Of course non-printable keys do not get sent.
Incoming keystrokes are not suppressed. So you may want to open an editor and type while you are entering them or something that doesn’t otherwise do anything.

Keystroke-to-SysEX-2024-02-02.bmtp (21.8 KB)

Enjoy!

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz