| Hi All,
I put together a proof-of-concept web application for using the
Gamepad API [1] together with Webaudio Csound to create a simple web
instrument. The code is hardcoded to work with an Xbox One controller
(I'm using an AmazonBasics version; pretty affordable). The web page
is hosted at:
https://kunstmusik.github.io/gamepad-csound-web/
with source code at:
https://github.com/kunstmusik/gamepad-csound-web/
To run the page, simply load it up and press the "Start App" button
and connect an Xbox One controller to your computer. Button presses
will turn on notes and releases will turn them off. Analog joystick
input is used to affect filter cutoff, pitch bend, and LFO amplitude
and frequency. The instrument is pretty basic but I think was good for
proof-of-concept purposes.
If you're using the gamepad API, I found https://gamepad-tester.com/
to be extremely handy for identifying button numbers and axes values.
Enjoy!
Steven
[1] - https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |