OSC BLOB message syntax

hello friends,

In order to drive some LED hardware from V4, I’d need to talk to the LEDs preferably using “OSC Blob messages”.

The OSC specifications, says that one of the fundamental OSC data types is OSC BLOB message. The data type is described as follows:

An int32 size count, followed by that many 8-bit bytes of arbitrary binary data, followed by 0-3 additional zero bytes to make the total number of bits a multiple of 32.

Unfortunately this data type doesn’t seem to be supported by the native OSC encoder node. Maybe the syntax of this datatype can be put together ‘by hand’ and sent via UDP?

Any ideas on this anybody?

jo, you can do it with + (Raw)

  1. osc address:
    /myaddress convert to raw, add 0 bytes at the end until the lenght is a multiple of 4
  2. type tag:
    start with a , then a b for type blob, add two 0 bytes to have a length of (multiple of) 4
  3. osc blob:
    3.1) get the lenght of your blob, convert it via asRaw
    3.2) blob data as raw, and again add the 0 bytes until it’s a multiple of 4

add everything together and send
that should be it

Hey woei,

Thanks!! Big thumbs up.
I put together a little patch that hopefully does what you describe.

Unfortunately I cant test it at the moment, because I don’t have the hardware at hand, but I will report back as I do.


Thanks again Woei!
That actually worked exactly as you’ve described.

Here is an updated little module that is tested with that fine LED controller hardware from Lumigeek.


OSCEncoder (Blob Message).v4p (19.5 kB)

hey zepi,

is this really working for you? the specs say a blob should have a leading integer (LittleEndian) giving the total length of the blob. so this is not like string.

i know that a lot of implementations are not to the letter of the spec, but your solution was making me wonder what the most used ways to implement bytestreams actually are.

OSCEncoder (Blob Message).v4p (21.7 kB)

hey velcrome,
hm, not really sure about the specs. I kind of tucked the syntax together until the LEDs where blinking as they should.