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

Winfried Ritsch ritsch at iem.at
Tue Jul 12 10:07:41 CEST 2016


Hello,

On Monday 11 July 2016 21:56:13 Roman Haefeli wrote:
> On Mon, 2016-07-11 at 15:32 +0200, Winfried Ritsch 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 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.
> 
> I can see how it might make sense to use OSC as a proxy protocol
> between MIDI devices. Other than that, I don't see the point of
> restricting oneself to MIDI while using OSC.
> 
I agree,  but MIDI is old-aged and not dying, MIDI is a Protocol and OSC a 
synthax, so I have to find a protocol with OSC synthax.

To precise my main questions:

Is anybody aware of any other (relevant) soft- or hardware which uses the type 
'm'   for MIDI ?

or more general:

 Is somewhere out there and does  know of an (un)official MIDI-Protocol 
definition for OSC Synthax (like TUIO is for sensoric data) ?

Because if someone wants to send MIDI over OSC, I would prefer to be 
compatible and not proprietary.

Since I did not find anything convincing (see addendum) and in favor for 
existing implementations dropping type 'm', I propose to define the MIDI 
protocol not with a type 'm' in REST-style (even MIDI is stateful):

 "/midi" ",iii"  status  data1 data2     

or shorter 12 bytes instead of 28 bytes:

 "/m" ",i"  (status<<16 + data1<<8 + data2)   

and for sysex to be complete:
  "/midi/sysex" ",b"  [n*data]    
short: 
  "/ms" ",b"  [n*data]


> Although [packOSC] and [oscformat] do not directly support the m tag,
> you could still cook your own format using 'b' (blob) type and four
> bytes. And if you really need it to be proper 'm', you could still
> write it as an abstraction (as long as it supports only one tag, it
> should be fairly simple with [list tosymbol] and some [list append]s
> and [list prepend]s).
> 
Thanks, yes I did its, not to hard especially without regex-rules. Anyhow I 
have to implement it on the other side in the escher-microcontroller also.

Addendum:

a) Why MIDI is better than OSC is stated here :-)

 https://www.midi.org/articles/white-paper-comparison-of-midi-and-osc

b) There is on midi.org a lot of specifications and recommendations for a 
various set of transport of MIDI data:

 Serial MIDI Ports, 5 Pin DIN, Wireless MIDI, RTP MIDI, USB MIDI, OSX MIDI,
 iOS MIDI, Web MIDI, Bluetooth MIDI

but none for OSC

mfG
 Winfried

-- 
--
- ao.Univ.Prof. DI Winfried Ritsch 
- ritsch at iem.at - 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 
--



More information about the Pd-list mailing list