Forums > MaxMSP

TouchOSC Accelerometer Patch — more functionality required


Anonymous
September 8, 2009 | 11:08 am

Ok so I’m a bit of a noob here. I’ve manage to get my accelerometer in my iphone with TouchOSC to control a slider

however it seems that both the X and the Y movement of the accelerometer are controling the slider.

How can i have the X control one slider? and the Y control another slider??

many thanks in advance


September 8, 2009 | 3:48 pm

Looks like the accelerometer is sending out a list comprised of three numbers (x y z). If you use "unpack" each member of the list should come out of a different outlet.

This a very basic example:

[route /accxyz ]
|
|
[unpack 0. 0. 0.]
| | |
| | |

Attach the outlets of the [unpack ] object to flonum boxes (float number boxes). Or, you can attach the outlets to sliders or whatever.

Hope this helps,
Mitch


Viewing 2 posts - 1 through 2 (of 2 total)