Csound Csound-dev Csound-tekno Search About

[Csnd] Joystick opcodes on Linux

Date2012-05-28 16:53
Fromjohn ffitch
Subject[Csnd] Joystick opcodes on Linux
I have code by Justin Glenn Smith that provides opcode linuxjoystick
to read input values from a joystick.  As the name suggests the code
is linux only and needs real work for Windows and OSX.

I have been sitting on this code for a while and was wondering if it
was of use/interest to anyone; what should I do with it?

==John ffitch


  USAGE:
  kresultmask linuxjoystick kdevice ktab

  kdevice = The index of the joystick device, either /dev/js or
            /dev/input/js

  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.

  kresultmask: A bitmask, with a 1 bit for each table index with a new input
               received.

Date2012-05-28 17:13
Frommenno
Subject[Csnd] Re: Joystick opcodes on Linux
i use Linux, i like the opcode, i use it so it and made a more or less
private manual page for it in an older beta csound manual( heavily based on
information i found on Justin's site): 
http://members.home.nl/mag.knevel/csound_betamanual/manual_Xmas/linuxjoystick.html

Menno



--
View this message in context: http://csound.1045644.n5.nabble.com/Joystick-opcodes-on-Linux-tp5713434p5713435.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2012-05-28 18:16
FromJustin Smith
SubjectRe: [Csnd] Re: Joystick opcodes on Linux
I have not been able to find the time to work on that code for a
while, it has bugs regarding multiple joysticks, though it works fine
for one joystick AFAIK.

The storage of results in a table may not be the most convenient API I
could have implemented.

On Mon, May 28, 2012 at 9:13 AM, menno  wrote:
> i use Linux, i like the opcode, i use it so it and made a more or less
> private manual page for it in an older beta csound manual( heavily based on
> information i found on Justin's site):
> http://members.home.nl/mag.knevel/csound_betamanual/manual_Xmas/linuxjoystick.html
>
> Menno
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Joystick-opcodes-on-Linux-tp5713434p5713435.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2012-05-28 18:50
FromTarmo Johannes
SubjectRe: [Csnd] Joystick opcodes on Linux
hello,

joystick opcode - yes! I have used a joystick so far thoru external library 
(in c++) through osc messages or csound API: An opcode would be very nice!

greetings,
tarmo

On Monday 28 May 2012 16:53:53 john ffitch wrote:
> I have code by Justin Glenn Smith that provides opcode linuxjoystick
> to read input values from a joystick.  As the name suggests the code
> is linux only and needs real work for Windows and OSX.
> 
> I have been sitting on this code for a while and was wondering if it
> was of use/interest to anyone; what should I do with it?
> 
> ==John ffitch
> 
> 
>   USAGE:
>   kresultmask linuxjoystick kdevice ktab
> 
>   kdevice = The index of the joystick device, either /dev/js or
>             /dev/input/js
> 
>   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.
> 
>   kresultmask: A bitmask, with a 1 bit for each table index with a new input
> received.
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"