Razer hydra

Jul 9, 2011 at 6:12pm

Razer hydra

Hi

I just got my razer hydra controller – and one can download of of steam a (little bit crappy) midi app for it which I am having a hard time trying to get it to work in Max

I also tried using the Hi object and it sees the controller but doesnt give any data out when I try to poll it

Has anyone had any success with this

Also I would much rather want to use OSC for the hydra if that was possible – if anyone is doing something like that

all the best

#57938
Jul 9, 2011 at 8:05pm

Small update

I have managed to get the x vector out of the hydra, using midiparse and this midi learn subpatch made by mr_mapes that I found on the forum;

http://cycling74.com/forums/topic.php?id=33785

btw. thanks mr_mapes :)

But I can only get one control parameter, if I try to have two midilearn subpatches (differently named (saved)) then I always just get the same parameter , using the midi app from sixense

I cant understand why they would build a midi app for such a precise controller (Why not OSC or just HID) – midi sucks balls :)

– Pasted Max Patch, click to expand. –

`
mr_mapes subpatch:

– Pasted Max Patch, click to expand. –
#207883
Jul 9, 2011 at 10:28pm

Hi Edsonedge,

Sixense recently published a tutorial video for setup of the MIDI app on youtube. As I am unaware of the linking rules of this forum I’ll have to ask you to Google “sixense MIDI app setup”, this should yield the video as the first result.

If you have any additional questions or need further assistance please post on the Sixense forums, we’ll get one of our MIDI app specialists connected with you immediately. Thanks :).

_________________
Dan Paullus
QA/Production Manager, Sixense MotionCreator
Lead Production Artist
Sixense Entertainment Inc.

#207884
Jul 10, 2011 at 6:15am

thanks for the reply

Yeah I did see the video before – and made it work with massive

If the Midi specialist can help to get this to work in max, thats well appriciated

But midi vs OSC is sort of what VGA vs HDTV is in sound controller terms. The one parameter (x position) that I got to work proberly in Max – still I was getting just 127 steps – and with a controller that has the range of over 2 meters, with 1 mm precisioan accuray, I could use those extra steps

Just saying, it would be awsome if you could take the raw data from the SDK and pack it into OSC (I would do it myself if I had gotten passed page 100 of C++ for dummies)

all the best

#207885
Jul 10, 2011 at 4:55pm

Hey there, I’m the guy who wrote the Sixense MIDI app. I’m going to take a pass at getting it working with OSC, are there any Max samples or documentation you could point at to help get me started? There doesn’t seem to be much in the documentation about it.

#207886
Jul 10, 2011 at 5:32pm

Awsome! thanks alot :)

If you want to make an external for max I guess you need the Max msp SDK

http://cycling74.com/products/sdk/

But maybe it is simpler, and more generally usful just to make an OSC exacutable with the Razer Hydra SDK and a library such as this: http://code.google.com/p/oscpack/

If the motion paramters and trigger floats, along with the button int´s can be packed as OSC and sent out as data to 127.0.0.1 on a specific port, then the Hydra can be used with loads of programs (not just Max but also PD, Proccessing, Supercollider and many others) and it is real easy to get a feed of the data using the Osc-route object http://cnmat.berkeley.edu/patch/4029

Thanks again :)

#207887
Jul 10, 2011 at 5:34pm

Oh and P.s dont forget to include the Analog sticks as OSC messages – they could be very usefull I think

#207888
Jul 10, 2011 at 6:31pm

Thanks, that helps a lot. Should I define my own messages like /sixense/joystick/x and /sixense/position/x or are there specific messages that Max is expecting?

#207889
Jul 10, 2011 at 6:46pm

I am pretty sure you define them yourself

then one just writes in the osc route object a “/” followed by a defenition of each parameter (that is what you define them as)

Here is an example of a OSC exacutable someone did for the emotiv BCI headset

http://www.emotiv.com/store/apps/applications/119/1446

and here is an example Max patch for it

– Pasted Max Patch, click to expand. –
#207890
Jul 10, 2011 at 6:58pm

Here is a picture of the patch if you dont have Max

[attachment=166044,2422]

Attachments:
  1. OSCpatch.jpg
#207891
Jul 10, 2011 at 7:02pm

And here is a picture of the MindYourOSC program

[attachment=166045,2423]

Attachments:
  1. MYOSC.jpg
#207892
Jul 10, 2011 at 7:28pm

@sixensejeff : if you create an Hydra-to-OSC app or a Max external, do you think you could build a MacOS X version ?

#207893
Jul 10, 2011 at 8:02pm

Well that was easy.

[attachment=166051,2424]

Attachments:
  1. sixenseosc.jpg
#207894
Jul 10, 2011 at 8:04pm

Awsome!

Can I try; Purty please with sugar on top :)

#207895
Jul 10, 2011 at 8:10pm

edsonedge – I should be able to put something together this evening (PST), would you mind testing it out a bit? If you don’t mind send me an email at @sixense.com :)

Roald Baudoux – Yes, we’ll have a mac version soon, but not right away. Hopefully in the next month or two.

#207896
Jul 11, 2011 at 3:27am

Here's a pic of where it is tonight. A bit more testing and I'll include this in the Sixense MIDI app on Steam.

[attachment=166077,2427]

Attachments:
  1. sixenseosc.jpg
#207897
Jul 11, 2011 at 6:30am

Nice to learn that Mac users will join the party ! Trop bien !

#207898
Jul 11, 2011 at 11:01am

thanks alot Jeff and Sixense

to other Max user – The Razer hydra is the most Precise motion controller I have used – knocks the wiimote, playstation move and kinect out of the park in terms 1to1 position accuracy

#207899
Jul 11, 2011 at 6:38pm

Hey Jeff,

Thanks for taking the time to add OSC support. I can not wait for my Hydra to arrive so I can hook it up to Max.

#207900
Sep 23, 2011 at 9:07am

Any further reports on how this is working out?

I’m tempted to invest…

Also, anyone have any idea how many degrees of precision are usable here, I can’t seem to find any actual statistics?

#207901
Sep 23, 2011 at 4:55pm

Ive been trying out all sorts of ways of using it as a controller – haven´t settled on anything yet though – but it has great possibilites

Ive also been thinking about modding it so that one can use fingers to play individual notes

I am not home so I can´t check degrees of precision, but it is very precise (i think its something like 500-600 degrees for x/y/z position vectors – and 360 degrees for rotational vectors)

Here is me testing out FM synthesis with it

the sound quality is poor though

http://www.youtube.com/watch?v=hvPZ9yB9Hm8

#207902
Sep 23, 2011 at 6:11pm

Thanks for getting back, and thanks for pointing out the video.

I’m not surprised you’ve not settled on anything – that’s a lot of different controls to think about.

Great that Sixense are involved on the forum, but have they released the OSC patch officially yet?

#207903
Sep 23, 2011 at 7:09pm

I think you can get the OSC bridge with the midi sdk on Steam (you need to use the midi software to calibrate/turn on the Hydra)

So you just need to register on steam and go to their sdk download page (last time I checked it was nr 9 counting from the bottom of on the sdk download page)

But if you can´t find it check out sixensejeff in this forum – he leves his email in the post above the picture of the max OSC patch, and he´s a nice guy – I´m sure he can help you out

All the best

#207904
Jul 24, 2013 at 7:02am

hey,

currently i can’t connect to Steam, because, well, there is in this university’s network something that blocks any website related to gaming… which is kind of a pain. So is there any way to get that razer hydra osc max object somewhere without Steam ?

#257007
Jul 24, 2013 at 8:15am

Turns out steam’s app is windows only, plus MIDI only ; after a bit of searching found a github for an osc app here :

https://github.com/MrMormon/hydra-osc

compiled for zindows only though, but osx should be neaaaarly straightforward ?.. plus this dates back to some time so it could be that so;eone has done it already
forum here

http://sixense.com/forum/vbulletin/archive/index.php/t-3669.html

#257014
Jul 24, 2013 at 8:40am
#257017
Aug 1, 2013 at 7:21am

well, there’s that too now http://sixense.com/forum/vbulletin/showthread.php?4147-Sixense-SDK-wrapper-object-for-Max-MSP-and-Pure-data
not compiled for osx10.6.8 yet, i will report that.

(the irony…)

#257784
Aug 1, 2013 at 8:01am

soo actually the git includes the compiled binary .mxo, which works like a charm… there is also a pd external.

#257790
Aug 3, 2013 at 4:50pm

How does it run? Like, what’s the data speed/resolution like? The hydra is really quite an affordable system…

#257946
Aug 3, 2013 at 5:49pm

speed/resolution is, eh, very good, i think you can poll at a minima of 1ms ? Resolution is very good too… hard to tell tbh, it would be accurate to compare with a wiimote maybe, but i didn’t.
But, it seems to be very cpu heavy (takes one of my 4 cores)… and the max object crashes easily, ie if you create 2 instances of the thing, only one will work, the first you will send a “poll” message ; and in one max session it will always be the same (also meaning that if you close the patcher then reopen then poll it will crash…) those problems seem to be more related to the razer pilots than the object itself.

#257949
Aug 4, 2013 at 6:59am

thanks – idk, it looks like it would be great for a solo instrument.

#257966
Aug 4, 2013 at 5:26pm

it’s undoubtedly worth a try.

I’m using it, and now i think that maybe it would be better to port the osc app to mac and use that, than use the max external, given that you must reopen max each time you erase/recreate said external… i tried to make on osc app, but replaced the timing provided by the glfw library (i couldn’t compile it on osx) by something with a usleep(10000), anyway that application is a bit too much cpu heavy.

#258008
Aug 23, 2013 at 7:10am

Ookay, so… now what i do is use a compiled max application embedding the [hydra] external, with which i communicate through udp, because the max external is sort of more flexible than the osc application. Plus i finally compiled that glfw on mac, but the resulting original osc application is heavier on cpu load than the version tweaked with usleep(3000 now – which means one frame of hydra data each 3 miliseconds). And the max external has the advantage of not having an osc layer, which is maybe less obvious to use but less heavy on the rest of the max patch.
I was wondering though if that cpu load is normal or if i did somehting wrong. Whatever thing i try to do with the hydra, it doesn’t seem to be able using less than one core, on an intel core i7 quadcore. Does anyone here have experience with that thing ? it’s a gaming device so it theoricaly should be much more optimised than this… i’m guessing on Windows it’s probably smoother…

#259692

You must be logged in to reply to this topic.