Hello,
On Monday 11 July 2016 12:10:21 Martin Peach wrote: > On Mon, Jul 11, 2016 at 9:32 AM, Winfried Ritsch <[email protected]> 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. > Thanks for the offer, this seems a proper way to implement this. But first I want to evaluate if it is really needed. if there is the opportunity, people will use it and complicate things in future ;-). > > 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. > native MIDI is 3bytes=24Bit (except SYSEX) so it could work. (to be exact since data bytes are 7 bits and status also with bit 8 set, a MIDI message is 21Bit long) mfG Winfried -- -- - ao.Univ.Prof. DI Winfried Ritsch - [email protected] - http://iem.at/ritsch - Institut fuer Elektronische Musik und Akustik - University of Music and Dramatic Art Graz - Tel. ++43-316-389-3510 (3170) Fax ++43-316-389-3171 -- _______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
