Using accelerometer movement type as a trigger.

May 8, 2007 at 3:50pm

Using accelerometer movement type as a trigger.

Hi,
I am wanting max to be able to understand when an object with an accelerometer attached is shaken violently. Is there an object than can sense certain types of x,y values and translate them into a cue that will trigger an event, effect or command ect? I have had a good look through the reference menu but have had no luck. Hope someone can help. Thanks in advance. Mike.

#31810
May 8, 2007 at 4:15pm

Something like this works:

Keith

#P window setfont “Sans Serif” 9.;
#P number 161 151 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 129 150 23 196617 abs;
#P window linecount 2;
#P comment 184 198 100 196617 if that difference is bigger than 5 , bang;
#P button 129 224 15 0;
#P window linecount 1;
#P newex 129 198 44 196617 togedge;
#P newex 129 174 42 196617 > 5;
#P number 129 128 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 129 106 27 196617 – 0;
#P newex 129 82 27 196617 t i i;
#P user hslider 129 54 18 128 128 1 0 0;
#P comment 132 39 100 196617 “shake” this;
#P window linecount 2;
#P comment 167 91 100 196617 comparing current number to last;
#P window linecount 1;
#P comment 201 151 100 196617 change threshold;
#P connect 3 0 4 0;
#P connect 4 1 5 0;
#P connect 5 0 6 0;
#P connect 6 0 11 0;
#P connect 11 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 4 0 5 1;
#P connect 12 0 7 1;

On 5/8/07, Mike Andrews wrote:
>
> Hi,
> I am wanting max to be able to understand when an object with an accelerometer attached is shaken violently. Is there an object than can sense certain types of x,y values and translate them into a cue that will trigger an event, effect or command ect? I have had a good look through the reference menu but have had no luck. Hope someone can help. Thanks in advance. Mike.
>

#103780
May 8, 2007 at 5:04pm

You da man! Much appreciated!

#103781
May 10, 2007 at 4:41am

http://us.wii.com/experience_gallery.jsp

http://www.iamas.ac.jp/~aka/max/#aka_wiiremote

object’s a little less functional on ppc macs than on intel. no
rumble, ir or nunchuk. otherwise everything else works fine.

On May 8, 2007, at 11:50 AM, Mike Andrews wrote:

>
> Hi,
> I am wanting max to be able to understand when an object with an
> accelerometer attached is shaken violently. Is there an object than
> can sense certain types of x,y values and translate them into a cue
> that will trigger an event, effect or command ect? I have had a
> good look through the reference menu but have had no luck. Hope
> someone can help. Thanks in advance. Mike.
>

#103782

You must be logged in to reply to this topic.