Forum

Converting byte data to actual values

Hi all,

I am trying to understand how to convert a stream of byte-data to usable values.
But I do actually have a massive BrettVormKopf how to to this.
I get per data from a camera slider (eMotimo ST4 that is) formatted as follows:

image

So I receive a raw data stream looking somewhat like this:

Screenshot 2021-07-09 174536

And to be honest: I have no clue how to convert this to usable data. I do get some values by using “Get Bytes” and then converting the split bytes via asValue. But what to do next? I´m lost…

Attach a patch with some sample data (e.g. an iobox with the values saved).

it should be smth like this to get the “currentFrame” assuming it is a (signed) int32, which your docs don’t specify. also i’m not sure about the endianness, could also be BigEndian.
grafik

@bjoern: sorry, not at the studio anymore.
I´ll attach the patch tomorrow.

@joreg: I tried Int32 but the only two formats that actually work are byte and sbyte. Thx for the hint about getting rid of ST_, though. I sorted that out later with some getspread-stuff but this is way more effective :-)

I´ll try again tomorrow and update my findings.

what do you mean by “actually work”? what happens if you specify Int32?

“Actually work” does mean “Not Undefined” in correct term I guess ;-)

image

Edit: this part was actually me not realizing that I do need to set offset to 7 and count to 4 (not 1 or 25) and set the AsValue behind a S+H… seems to work now, the remaining problem seems to be inconsistent data-flow coming from the slider.

To be honest, I have another problem, namely keeping the raw data stored inside the IOBox(Node). The moment I disconnect it, it looses the data and switches back to showing “any type ok”

Just a litlle doodle, don’t know if it is correct though.

Raw_Doodle.v4p (25.0 KB)