First time here? Check out the FAQ!

How do I unpack data from a OSC blob ?

0 votes
My monitor in OSCulator tells me that Kyma is returning

/vcs <8 byte blob>

from a particular VCS in response to the /osc/notify/vcs/... message

What would be the correct way to unpack this message?

Also, I noticed, for others that might be working with OSC ... this page gives more information than the Kyma 7 manual appendix ...

Worth saving as PDF to refer to...
asked Mar 24, 2017 in Controllers, OSC & MIDI by cristian-vogel (Master) (8,370 points)

1 Answer

0 votes

Thanks for reminding everyone of the link to the Open Sound Control Documentation.  If you search for 'blob' in that document, you'll find:

⇐ /vcs,b { byteCount, int_id0, float_value0, ... }  Notification of change of value of one or more VCS widgets

The Paca(rana) sends this message to your software (OSCulator in your case) if VCS notifications have been turned on and one or more VCS widgets have changed value. The blob argument contains big-endian data in the following format: 

byteCount is a 32-bit integer (also big endian) that represents the size of the blob in bytes; byteCount / 8 is the number of EventID/value pairs in the blob. It doesn't look like you've included the full message, but from your shorthand (or OSCulator's shorthand), it appears to be the change in a single VCS widget (since 8/8 = 1). 

int_id0, float_value0

After that, you should see a 32-bit  integer followed by a float.  The 32-bit integer is the EventID. And the 32-bit float is the new value of the widget. There could be additional EventID and value pairs, one pair for each widget that changed value, but in your case, it appears to be only one widget.

answered Mar 24, 2017 by ssc (Savant) (120,590 points)