midimsg object can't store data bytes when the data byte value is > 127
古いコメントを表示
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.
回答 (2 件)
Walter Roberson
2019 年 8 月 14 日
0 投票
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
2024 年 8 月 27 日
0 投票
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 件のコメント
Kwang Seob
2024 年 8 月 27 日
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)]
カテゴリ
ヘルプ センター および File Exchange で Musical Instrument Digital Interface (MIDI) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!