Hello,
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"
Is there a defined protocol for MIDI over OSC ?
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.
mfg winfried
On Mon, Jul 11, 2016 at 9:32 AM, Winfried Ritsch ritsch@iem.at wrote:
Hello,
- 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"
Is there a defined protocol for MIDI over OSC ?
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
Hello,
On Monday 11 July 2016 12:10:21 Martin Peach wrote:
On Mon, Jul 11, 2016 at 9:32 AM, Winfried Ritsch ritsch@iem.at wrote:
Hello,
- 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"
Is there a defined protocol for MIDI over OSC ?
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
On 2016-07-12 09:57, Winfried Ritsch wrote:
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.
why don't you (martin) just provide an "m" type for the "sendtyped" message? [sendtyped /foo m 1 72 72 129( [sendtyped /bar mm 1 72 72 129 1 1 72 76 120(
gfmasdr IOhannes
On Mon, 2016-07-11 at 15:32 +0200, Winfried Ritsch wrote:
Hello,
- 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"
Is there a defined protocol for MIDI over OSC ?
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.
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).
Roman
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,
- 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"
Is there a defined protocol for MIDI over OSC ?
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
On 2016-07-12 10:07, Winfried Ritsch wrote:
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) ?
i forwarded the question to the OSC mailinglist. they probably have an answer.
fgamsdf IOhannes