[PD] MIDI and opensoundcontrol: type m for OSC ?

Martin Peach chakekatzil at gmail.com
Mon Jul 11 18:10:21 CEST 2016


On Mon, Jul 11, 2016 at 9:32 AM, Winfried Ritsch <ritsch at iem.at> wrote:

> Hello,
>
> 1) Had anyone experience with or used the tag type "m" for transmitting
> MIDI
> over OSC ?
>
> from http://opensoundcontrol.org/spec-1_0 :
>
> " m 4 byte MIDI message. Bytes from MSB to LSB are: port id, status byte,
> data1, data2"
>
> 2) Is there a defined protocol for MIDI over OSC ?
>
> 3) How to implement this in Pd ?
>  since there are no 'm' typetags defined for [oscformat] and [packOSC]
>
> I can add 'm' to [packOSC] and [unpackOSC], it's not too  difficult...
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.
The [sendmidi( message would accept any amount of MIDI quads. MIDI sysex
messages would be better sent as blobs.
Single-byte MIDI messages would still need to be sent as four bytes.

>
> I ask, because someone want to send MIDI over OSC to my Robot-Pianoplayer
> driven by Pd and I do not know if this is used by other software this way,
> if
> it is "worth" to implement.
>
> 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.

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160711/82ba7bcf/attachment.html>


More information about the Pd-list mailing list