Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sysex message sender #1064

Open
Vahen1981 opened this issue Aug 22, 2024 · 1 comment
Open

Sysex message sender #1064

Vahen1981 opened this issue Aug 22, 2024 · 1 comment

Comments

@Vahen1981
Copy link

Hello!
Actually I don't know if this is a bug or it is something that I ignore about sysex messages, but my problem is when I try to send a sysex message using the sender of the library it works very good until I send a sysex message that contains a byte like 0x90 or 0x80...
In that point the sysex broke and disappear... and many time when this happen I receive a note on or note off message in the midi receptor...

I know 0x90 or 0x80 are notes on and notes off messages, so that's the reason because I don't know if this is a bug or is just forbidden to send this values inside a sysex message. What do you know about this?

@tttapa
Copy link
Owner

tttapa commented Aug 23, 2024

SysEx data can be 7 bits at most, the most significant bit should always be zero, as per the MIDI specification. Values of 0x80 and higher are reserved to encode the message types.

If you have to send values over 0x7F, you'll need to use a 7-bit encoding scheme. Depending on the type of data you want to send, you could use some kind of escape sequence to identify 8-bit values (e.g. 0x7F 0x12 means 0x92, but you'll need some additional tricks to represent 0x7F itself), or you could use a standard ASCII encoding scheme like Base64 or Base85.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants