midimsg object can't store data bytes when the data byte value is > 127
Afficher commentaires plus anciens
I'm very green to programming with mat lab (just a week) but I'm very excited about all the potiential things I can do with it.
I feel I'm pretty cometent when it comes to MIDI programming and so far for with what I'm trying to do, I think there might be Bug/Limitation with the
current way the midimsg object is designed.
So far I can not create messages with data bytes using the Data or the SystemExclusive tags.
The issue lies with the limitalion that the array values for the Data Bytes have to be in the range 0 to 127.
An actual data byte, which is really an unsigned 8 bit value, will contain a value in the range of 0 to 255.
Because of the range limitation, I can't store actual data with these tags.
Is there a way to work around this problem?
Thanks.
1 commentaire
Cornell Cummings
le 13 Août 2019
Réponses (2)
Walter Roberson
le 14 Août 2019
0 votes
https://users.cs.cf.ac.uk/Dave.Marshall/Multimedia/node158.html
The most significant bit of data bytes are set to 0. This is part of the midi message definition.
Kwang Seob
le 27 Août 2024
0 votes
Did you find a solution to this? The interesting thing is that it works fine with Octave's midimsg. But then I just tried it on Matlab (2024a) and ran into the same issue as you did.
1 commentaire
Kwang Seob
le 27 Août 2024
Okay I think I figured it out. I noticed that only Bytes that are larger than 127, in my case, was F0 at the beginning (SysEx) and F7 (End of SysEx , EOX). So then I followed the matlab example to replace those two bytes with Matlab's example (https://www.mathworks.com/help/audio/ref/midimsg.html#d126e110584)
msg = [midimsg('SystemExclusive',timestamp), ...
midimsg('Data',bytes,timestamp), ...
midimsg('EOX',timestamp)]
Catégories
En savoir plus sur Musical Instrument Digital Interface (MIDI) dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!