joystickInstrument Control:Sensing and Controljoystickjoystick
Reads data from a joystick controller.
DescriptionPlugin opcode in joystick.
Reads data from a Linux joystick controller
Syntaxkres joystick kdevice, ktabPerformance
Please note that this opcode is currently only supported on
GNU/Linux.
kdevice -- the index of the joystick device, either /dev/jsN or
/dev/input/jsN.
ktab -- A table to hold input results,
should be at least enough elements to store one value for each
stick axis and one for each button + 2. The first two elements
of the table are initialized with the number of axes and the
number of buttons, respectively, when a joystick is opened. If a
joystick is unplugged during performance, the opcode will
repeatedly attempt to reopen the device with a delay between
attempts.
Examples
Here is an example of the joystick opcode. It uses the file joystick.csd.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
Here is another example of the joystick opcode. It uses the file joystick-2.csd.
See alsoSensing and Control: Keyboard and mouse sensingnon-MIDI devicesCreditsAuthor: Justin Glenn Smith2010New in version 5.17.12