diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..894be30 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +## Introduction +csound-jstick was created in response to the builtin joystick opcode being a bit inefficient and not ideal to use. This attempts to make it a bit easier by presenting the output in two arrays (buttons and axes). A maximum of 4 axes and 12 buttons is supported. +The opcode uses evdev so only works on Linux. + + +## Requirements + - Csound development libraries + - Cmake 3.8 or later + + +## Building +Create a build directory at the top of the source tree, execute *cmake ..*, *make* and optionally *make install* as root. If the latter is not used/possible then the resulting module can be used with the *--opcode-lib* flag in Csound. eg: + + cd csound-jstick + mkdir build && cd build + cmake .. + make && sudo make install + + +## Opcode overview +### jstick +*kaxes[] kbuttons[] jstick inum + +Obtain joystick data at k-rate. + + - kaxes[] : array containing axis data normalised to between 0 and 1, size is 4 + - kbuttons[] : array containing button data normalised to between 0 and 1, size is 12 + - inum : the joystick number corresponding to /dev/input + |