[chuck-users] Gyration Air Mouse

Kassen signal.automatique at gmail.com
Fri May 27 08:06:49 EDT 2011

Hey Les,

On 26 May 2011 14:25, Les Hall <lester.hall at comcast.net> wrote:

> Good day ChucKists!  I have finally purchased what looks to be a good
> motion controller for my particular needs.  It is the Gyration Air Mouse
> Elite.  It works great, though my first code attempt at varying a SinOsc
> produced more zipper than actual sine wave, lol.  I know the zipper cannot
> be avoided in practice, so I'll work on ways to minimize it and /or make use
> of it.  Now, to my question:
The simple solution to zipper is to send to value to a Step, the Step to a
LPF and that signal to either a osc straight or poll the .last once per
samp. This is not especially cheap, but it will work and is simple and

> How do I access all of the axes?  This device has a 2-axis gyro and a
> 3-axis accelerometer, which IMHO packs a powerful punch missing only the
> roll gyro.  I can do all sorts of stuff with it, but I need to get at that
> axis data.  I'm sure it's very simple, how do i do it?
I think there are two potential long-term solutions.

* Extend mouse support for a arbitrary number of axis. If the library that
we use has that feature this should be fairly straightforward.
* Create a generalised "raw" hid abstraction that can be polled for its
number of buttons, axis, wheels, etc. This wouldn't have a "type" as such so
that would immediately support all sorts of exotic stuff (magic carpet
controllers, etc).

Especially the first option may be within reach of a dedicated lone hacker.
C++ is quite similar ot ChucK, at least similar enough to figure out what
parts to copy, paste and modify.

The nice thing about the second option (which is of course harder) is that
it should solve all issues with all standard compliant HID devices. I'd
advocate seriously considering it if/when Spencer has some time. We, as a
group, tend to like more exotic devices more so this makes sense to me. We
could even consider working together with the SC folks who also have the
same question on the same range of platforms. It wouldn't be very easy but
the benefits would be quite large.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20110527/71508470/attachment.htm>

More information about the chuck-users mailing list