Midi data format Help Please!!!

Hello my name is Rod. I am trying to build a control surface for my pro tools 11 software using the HUI protocol. I have found some docs online regarding HUI. I am having some problems trying to understand how I can send the messages that need to be sent using the midi library in arduino. One of the messages I need to send is for Play function when button is pressed, it as is follows: "B0 0F 0E B0 2F 44". how can I program this in the arduino using midi.send it is a CC message. I need to send both sets of code at the same time as one describes the zone and the other describes the play function. Any help on this would be greatly appreciated. I havethis command working in Bomes Midi Translator but I would rather have this come from the arduino and not use a third party software to communicate back and forth to Pro tools.

Any help, please??

That is two Control Change messages. You can send them with send() but it would make your code clearer if you used sendControlChange().

MIDI.sendControlChange(0x0f,0x0e,1);
MIDI.sendControlChange(0x2f,0x44,1);

Pete

Thank you, the format you used in your example, "0x0f,0x0e,1" how did you come about this format? Did you take the b0 and use that as channel 1 and the last two parts as the data bits? I'm sorry if this sounds like a dumb question but I am very very new to midi and am still trying to understand how to format the messages. I have used the codes formatted in the example I gave, bomes midi translator and it works but I'm not understanding the format in you example. I get confused because I am seeing a lot of different messages, ex. 0x90 0x00 0x 7f, 7f 00 00 00 01 02 03 04 f7, 90 00 00, b0 2f 04. With all these examples of midi formatting of messages I'm finding it very difficult to find what actually works and i s a good default format. Again I'm sorry if any of this sounds stupid.

In the first byte "B0", the 'B' indicates that it is a Control Change message.
When you use MIDI with synths and other equipment, they always refer to MIDI channel numbers from 1 to 16. Internally these numbers are changed to 0 to 15. So, the B0 is Control Change on "internal" channel zero. The MIDI library uses the channel numbers 1-16 (and changes them for you to 0-15) so the whole command becomes

MIDI.sendControlChange(0x0f,0x0e,1);

If you wanted to use the send command it would be:

MIDI.send(ControlChange,0x0f,0x0e,1);

or

MIDI.send(0xb0,0x0f,0x0e,1);

In the MIDI protocol, the first byte is always a command byte and that byte always has its high-order bit set and the remaining bytes of the command never have the high bit set - there is (inevitably) an exception to this rule but let's not worry about it yet.
So, when reading "B0 0F 0E B0 2F 44", we look at the first byte. This byte, B0, is a command byte because as a bit string it is 11010000 with the high order bit set and 'B' means it is a control change. The low order four bits of this command are "0000" which refer to channel 1. The command byte is followed by two bytes 0F and 0E which are the controller number (0f = 15) and control value (0e = 14).
The next byte is B0, so we have another control change command and its controller number and value are 2F and 44.
The string "0x90 0x00 0x 7f, 7f 00 00 00 01 02 03 04 f7, 90 00 00, b0 2f 04" starts with 90 which has the high order bit set. It is a Note On message on channel zero. The next two bytes are the note's number and then its velocity. The rest of the string doesn't look correct - it looks like you've left out parts of it.

This page and this page have info about the message formats.

Pete

The message 7f 00 00 00 01 02 03 04 f7 is referencing a sysex message so with all these different formats I was getting confused on proper way to send these messages. I will try the format you outlined and see if I get better results.