If I in a midi file see a port value of 11111111, how should i interpret it?
What is most likely the midi authors intention with that number?
Right now I am simply allocating it to port 255 in my app, since then it at least does not interfere with any of the 'normal' ports.
AI suggests it could mean its connected to all ports at same time, omni. Or that it means unassigned, which I guess is port 0, but what if there is tracks with port
0.
PS. I know ports is not part of standard midi 1.0 spec, but I hope one of you still knows the answer.
Thanks for any answers.
As you said, the Port event is non-standard MIDI event. I do not know of any official documentation about it, but I would enjoy investigating further.
Can you link to an example MIDI file that has a Port event with data of hex FF? The MIDI file might contain other data that helps us tell what software was used to make the MIDI file, or helps us tell what the author intended this Port event to represent.
I'm not sure, but I think the Port meta event was invented by Cakewalk. I did a quick test with the version of Cakewalk I have (Cakewalk by BandLab version 2022.06 Build 034, 64 bit).
When the Port event contains data of hex 00 it shows up in Cakewalk as Port 1, and when it contains hex FF it shows up as Port 256. Presumably all the other values in between work the same way, so it seems like there is not anything special about hex FF.
(By the way, I also tested making the Port event have two data bytes, but in that case, it looks like Cakewalk only uses the first byte and ignores the second byte.)
I don't have cakewalk so I couldn't check that.
Thank you very much, that confirms that they use all the bits for the number.
Yes, its single data byte. It gets tied to track so all messages in the track belong to same port.
Its not confined to a couple of DAWs though, tons of midi apps, and as I get it, even hardware uses ports to get around the 16 channel limit.
Beside 0x21 they use 0x09 for giving names to the ports some times.
I'm curious: Did you encounter a MIDI file that has a Port event with data of hex FF? Can you link to an example MIDI file like this?
Perhaps it might be possible that there is some MIDI file software that does something special with a Port event with data of hex FF. If you found some MIDI file somewhere that has a Port event like this, I would enjoy looking at it. Perhaps the file might have other data in it that helps us tell what software was used to make the MIDI file, or helps us tell what this Port event is intended to do.
Yes, I agree the Port event is popular. But since it is not an official message defined by the MIDI Manufacturers Association, when you have a question about it, there is no official documentation to turn to to get an answer. Perhaps you might have to compare different MIDI file software to see if there is something special that happens. (?)
Note: Meta event hex 09 is the Device Name event, which is an official event defined by the MIDI Manufacturers Association. The Device Name seems to be the MMA's version of a Port event. Here is a previous thread discussing it: Device Name Best Practice?
Here is some with both high port numbers and some with 0x09
https://drive.google.com/file/d/1UmdceJpd7LmNHcpqFsvLzaG-79fLn7lE