Interface to a Guitar Hero controller.
var controllers = require('guitar-controller')();
var player1 = controllers[0];
player1.on('green.press', function() {
console.log('green was pressed');
});
player1.on('green.release', function() {
console.log('green was released');
});
See the example.js file for more detailed usage.
The controller has the following buttons:
- green
- red
- yellow
- blue
- orange
- start
- back
- up
- down
- left
- right
- xbox
For each button, a press and release event exist:
green.pressgreen.releasered.pressred.releaseyellow.pressyellow.releaseblue.pressblue.releaseorange.pressorange.releasestart.pressstart.releaseback.pressback.releaseup.pressup.releasedown.pressdown.releaseleft.pressleft.releaseright.pressright.releasexbox.pressxbox.release
xywhammy
Range events receive a value. For example:
player1.on('x', function(val) {
console.log(val);
});- Plug in the guitar's USB cable.
node [script]to test scripts in examples folder.- Click buttons on your remote and commence mad science.
Here's a sample integration with baudio. (NOTE: the lag is from spawning a child-process, not from the driver).
If you have a Guitar Hero controller that isn't supported, plug your controller in and run examples/explorer.js. Create an issue and paste in the console results. Pull requests welcome.