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.

댓글 수: 1

In Addition to this would it be possible to create a 'Tempo' tag.
This meta event has a significant impact on the playback of a Midi file.
Many files will have tempo changes which change the way the Ticks per Quater Note
value will be used.
Thanks.

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
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
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

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에서 Simulation, Tuning, and Visualization에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2019년 8월 13일

댓글:

2024년 8월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by