Forums > MaxMSP

Sudden Motion Sensor

April 19, 2006 | 7:33 pm

I am trying to use the Sudden Motion Sensor built-in to my Apple Powerbook G4 for a max patch by using AMSTracker and the shell 3rd party object in max/msp. So far, I have worked out how to open AMSTracker from within maxmsp using the shell object by sending the message: open "/Volumes/AMSTracker 0.31/amstracker" which opens in a new terminal window. The shell object uses perl commands to communicate with the terminal and I only came across this programming language yesterday and this patch has to be submitted for my degree very soon, hence I need some help stringing together code to do what I want this max patch to do.

I want this max patch to read data from AMSTracker in the terminal so I can use the X,Y and Z axis data to manipulate data and audio in maxmsp. If anyone can help me, no matter how much, I’d really appreciate it.

Many thanks,

Jazz


April 22, 2006 | 8:10 pm

Hey, heres a simple decoder that gives you x y & z. I built a theremin too with this if you want it? but that uses some jitter and is alot of code if you just want a simple decoder. This version is alot simpler than what you meant, it just opens it in max and packs out decoded numbers. so no need to be termanaling (If thats really a word).
One small warning though, the use of this seems to be unstable, so it often stops max closing properly. Also you may need a different tracker for other powerbooks etc.
Good luck, anything else I can do, dont hesitate to ask.
T

max v2;
#N vpatcher -1 44 1023 717;
#P origin 24 100;
#P window setfont "Sans Serif" 9.;
#P flonum 423 317 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 381 317 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 339 317 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 444 208 15 0;
#P window linecount 1;
#P newex 253 202 26 196617 r on;
#P newex 253 224 29 196617 gate;
#P newex 251 82 45 196617 loadbang;
#P newex 251 246 61 196617 unpack f f f;
#P newex 251 178 63 196617 fromsymbol;
#P message 251 116 173 196617 /Applications/amstracker -u 0.1 -s;
#P newex 251 157 30 196617 shell;
#P connect 4 0 1 0;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P fasten 5 0 3 0 258 245 256 245;
#P connect 7 0 5 0;
#P connect 6 0 5 0;
#P fasten 2 0 5 1 256 202 277 202;
#P fasten 3 0 8 0 344 263;
#P fasten 3 1 9 0 386 263;
#P fasten 3 2 10 0 428 263;
#P pop;


April 22, 2006 | 10:59 pm

on my computer, this patch tracks mouse movement, not AMS.

Anybody know whats wrong?

thanks.


April 23, 2006 | 11:15 am

Hey, I cant find the link on google but there is 2 versions of the Ams tracker. I presume you have placed the ‘ams tracker’ program in your applications folder.
If this is the case, you probably need the other version, which is meant for the other SMS system.
you may well be able to find it somewhere around this site http://www.kernelthread.com/software/ams2hid/ams2hid.html or this one http://www.kernelthread.com/software/ams/ams.html.
Hope this sorts your problem.
T


April 24, 2006 | 4:32 am

those are where I got my copy of AMS tracker, so thats not it…

Anyone have the app?

surely its small enough to include as an attachment.

Thanks,
Comp


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