We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
HID and Processing? (Read 2280 times)
HID and Processing?
Jan 8th, 2006, 4:10am
 
Hi,

I am about to purchase a controller card to allow me to control Max and PureData with sensors. These apps have objects that allow them to interact with any HID-compliant device, like this controller card.

Can Processing talk HID? I didn't find any reference to it. Is there any library supporting it?

Thanks in advance,
Nuno
Re: HID and Processing?
Reply #1 - Jan 8th, 2006, 3:14pm
 
As far as I understand it, HID interfaces are handled at a fairly low level in the system, and Java (and therefore Processing) can't access that data directly.

If you're running linux, the jUSB project may be of interest (http://jusb.sourceforge.net/). I believe there's a Windows-specific library for joysticks, as well.

If neither of those do the trick, you'll probably want to read the HID input in Max or PD.  Then, you'd have several options.  If you're using Max and want to tie the input directly to methods and/or variables in Processing, my Maxlink library might be easiest (http://jklabs.net/maxlink).  Otherwise, I'd recommend using the oscP5 library (http://www.sojamo.de/iv/index.php?n=11) or the proMIDI library (http://www.texone.org/promidi/), although I haven't personally used either of those.

If you're on a Mac and want to go with MIDI, you can skip the Max/PD step entirely by using junXion by STEIM (http://www.steim.org/steim/junxion_v2.html).
Re: HID and Processing?
Reply #2 - Jan 13th, 2006, 7:28pm
 
Thanks for the useful information.
Re: HID and Processing?
Reply #3 - Jul 9th, 2006, 1:21pm
 
I recently discovered that there's a tool (for the Mac, at least) that will automatically generate OSC mappings for HID devices.

Check out hid2osc at http://kwlive.dev.waag.org/download.html
Re: HID and Processing?
Reply #4 - Jul 9th, 2006, 7:10pm
 
another option is to get one of the serial based sensor boards like arduino or wiring - these can be programmed in language much like processing.

They will also talk to Max and PD.

HTH

Page Index Toggle Pages: 1