Parsing Human Interface Device (HID) data

Jonatan Ewald's icon

Hi,
What is the best way of parsing HID data?
I want to use the "hi" object and get data from moving my SpaceNavigator HID device.
I have tried this with the hi-object help patch and I get a lot of data when moving the 3D joystick, but how do I easily parse this and map it in a convenient way?
What I would like is something like a multislider object where each slider represent one data stream for one joystick axis such as up, down, turn and so on from my 3D joystick.
I also get some very large values as output from the hi-object. Values such as: 4294959498 (10 digits).
What is the resolution of an axis on a HID device?
How do I find information about the maximum and minimum values?
I guess I need some knowledge of this to scale the sliders appropriately?

Luke Woodbury's icon

No point in reinventing the wheel I always say:
https://cycling74.com/forums/spacenavigator-for-windows-patch
You can thank Tarik.

Jonatan Ewald's icon

Thanks a lot!
That is why I love this forum, there is always someone quicker and smarter than me who have solved a lot of the problems already!
And he got the numbers nicely aligned from 0 to 1 with 0.5 in center when the Space Navigator is not touched, just great stuff!

Luke Woodbury's icon

Check out how he is using it to navigate through a 3D audio visual landscape, incredible stuff:
http://tarikbarri.nl/projects/versum
I assume its the same Tarik anyway...

Jonatan Ewald's icon

Wow!
That was way more complicated than the application I had in mind...
I just wanted to use it to send CV voltage to my Eurorack...

Luke Woodbury's icon

I find its best not to compare yourself to Tarik!