<div dir="ltr">On Mon, Jul 11, 2016 at 9:32 AM, Winfried Ritsch <span dir="ltr"><<a href="mailto:ritsch@iem.at" target="_blank">ritsch@iem.at</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
1) Had anyone experience with or used the tag type "m" for transmitting MIDI<br>
over OSC ?<br>
<br>
from <a href="http://opensoundcontrol.org/spec-1_0" rel="noreferrer" target="_blank">http://opensoundcontrol.org/spec-1_0</a> :<br>
<br>
" m 4 byte MIDI message. Bytes from MSB to LSB are: port id, status byte,<br>
data1, data2"<br>
<br>
2) Is there a defined protocol for MIDI over OSC ?<br>
<br>
3) How to implement this in Pd ?<br>
 since there are no 'm' typetags defined for [oscformat] and [packOSC]<br>
<br></blockquote><div>I can add 'm' to [packOSC] and [unpackOSC], it's not too  difficult...<br></div><div>How would a MIDI message be specified? I can add a selector like [sendmidi /some/path 1 2 3 4( where 1 2 3 4 are the four bytes. Would the MIDI channel be in the portID or the status byte as usual? [unpackOSC] would emit the path and a (multiple of 4)-byte list.<br></div><div>The [sendmidi( message would accept any amount of MIDI quads. MIDI sysex messages would be better sent as blobs. <br></div><div>Single-byte MIDI messages would still need to be sent as four bytes.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I ask, because someone want to send MIDI over OSC to my Robot-Pianoplayer<br>
driven by Pd and I do not know if this is used by other software this way, if<br>
it is "worth" to implement.<br>
<br></blockquote><div>It's a bit more efficient than sending four integers. In Pd you can't make every possible 32-bit integer from four bytes since it has to be converted to a 32-bit float first, so the simple method of packing a MIDI message into one integer won't work.<br><br></div><div>Martin<br><br></div></div></div></div>