I am looking to teach how to implement the above in Processing 4 and seems the Game Control Plus Library is not functional in Processing 4. I can’t see any alternative way to get simple input from such devices into Processing. Question – will this library ever be updated to work in Processing 4 or does anyone have any alternative and simple cross platform workflows for this?
I will not be updating this library for V4 because the low level code was created by someone else and is very, very old technology. You can read more about it on my website lagers.org.uk
Hi Peter! Many thanks for getting back and confirming. I did read your site and appreciate it is built on ancient code. No problem – I understand – just needed confirmation. So there is no alternative you know to easily implementing USB game controllers in modern Processing? If not (can’t believe nobody uses external controllers in Processing in 2025!) I’m tempted to created a general purpose standalone Processing 3 background helper app to hand off user input from your library and send via OSC – although I had difficulty in trying to get your library to silently load the configuration on start – any pointers?
I suspect one of the problems is that reading USB devices is OS / hardware specific and the original author created / provided the low level system libraries for Windows, OSX and Linux.
Replacing these with modern versions is well beyond anything I could do. It might be worth searching for suitable libraries and create a Java wrapper app.
The ControlIO
class provides the getMatchedDeviceSilent(...)
and I have just looked at the source code and cannot see any console output statements so I am not sure what output you are getting. Perhaps you could copy the outp message here?
// works but have to manually link each launch
gpad = control.filter(GCP.GAMEPAD).getMatchedDevice("gamecontrollerInput01");
// I took this from a previous post on the forum, and hacked it to try to make work
// but this bit: Configuration.makeConfiguration(app, "gamecontrollerInput01")); is wrong – don't know what 'app' should be and generally confused as to implementation
gpad = control.filter(GCP.GAMEPAD).getMatchedDeviceSilent(Configuration.makeConfiguration(app, "gamecontrollerInput01"));
I assume gamecontrollerInput01
is the name of the configuration file. The problem is if can’t find a matched device then it will launch the configurator so you can select and configure a different device.
If you use
gpad = control.filter(GCP.GAMEPAD).getMatchedDeviceSilent("gamecontrollerInput01");
gpad
will be null
if a matched device can’t be found and the configurator will not be called (hence silent). In that situation the user has to decide what to do.
Configuration.makeConfiguration(app, "gamecontrollerInput01");
This will launch the configurator to create a new configuration based an existing configuration file. Basically called if it can’t find a matched device (non silent mode). The method returns a Configuration object which can be saved to file with the saveConfiguration
method
The parameter app
is the Processing applet object so when calling this method from your sketch code it should have the value this
I haven’t tried it but you might have some luck with JInput.
Thanks for this info – I haven’t had a chance to try your suggestion but it looks straightforward enough.
Update – I wrote a simple Processing 3 sketch and compiled to runtime application which simply gets input from the connected input device and forwards it to OSC (using oscP5 library). This allows me to look for OSC input from it in Processing 4 and map to variables there. It works well and is my workaround hack for the moment! It’s clearly silly to have a standalone runtime app only doing a simple input/output but I’m just happy to be able to control sketches in Processing 4 with a gamepad! Thanks again for your help and for your original work on the library
I do not understand why people say that the your library “is not functional in Processing 4.” I am using a wireless Logitech F710 gamepad with Processing 4.3 on a Win10 machine, and so far, I don’t have any problems. All of the Sliders and the Hat appear to work correctly and I expect the Buttons to work, too. I must be doing something wrong. In the end, I’ll need it to work on an Rpi4 running Ubuntu 25.04, but I haven’t tried that yet. Wish me luck!
I want to thank you, Quark, and complement you on your outstanding and amazingly useful library. When I purchased my gamepad, I didn’t expect programming support to be so completely non-existent. Your library is exactly what I need right now. I hope that you or someone will continue to develop it.
Finally, my gamepad has vibration (rumble) feedback. Does your library support that?
Thanks again,
Bud Ryerson
San Francisco
Hi Bud welcome to the forum.
I don’t like taking credit for work done by others if you visit my website you will find that the library was based on proCONTROLL a library written by another and my involvement was to simply to update it for Processing V3 and to add the configuration options. I did this because I had an Xbox gamepad doing nothing and I thought it might be fun. I have no plans to update the library and people can use it as is.
proCONTROLL never supported rumble feedback so GCP didn’t either. I have only ever tried GCP on an iMac so I am glad you have it working in windows and hope you have the same luck with Linux.
I purchased a Logitech F710 gamepad to use as a controller for my Raspberry Pi projects. I expected there would be a ton of programming support. I was wrong. The only Processing library for a gamepad is “Game Control Plus” (GCP) and, although GCP seems to still work with Windows, it fails to initialize with Ubuntu 25.04 or Raspian Bookworm.
However, GCP appears to be based on the Java library “JInput.” With JInput installed on my RPis, both Ubuntu and Raspian recognize the gamepad. All the buttons and controllers test correctly with the command line app “jstest-tdk”. So, is it possible to use the JInput library in Porcessing to get input from a gamepad? Sadly, Processing does not list JInput in the Contribution Manager. Any tips or guidance would be appreciated.