Forums > MaxMSP

extended mousestate on max/msp/jitter

June 10, 2007 | 1:13 am

hi,
i’m trying to create a pressure-sensitive patch with max/msp/jitter and hacked a mouse to bypass using a basic stamp to connect pressure pads to my computer. is there a way to extend the mousestate button so that it serves as a momentary switch rather than an on/off signal? in other words, i’d like the patch to recognize when i am standing on the pressure pad but stop as soon as i am off.

cheers,
billy tran


June 10, 2007 | 2:04 am

At 7:14 PM -0600 6/9/07, billy tran wrote:
>hi,
>i’m trying to create a pressure-sensitive patch with max/msp/jitter and hacked a mouse to bypass using a basic stamp to connect pressure pads to my computer. is there a way to extend the mousestate button so that it serves as a momentary switch rather than an on/off signal? in other words, i’d like the patch to recognize when i am standing on the pressure pad but stop as soon as i am off.

I may be misunderstanding the question, but the mousestate object already sends a 1 while the button is down, and a 0 when the button is released.

-C


Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." – Brian Eno


June 10, 2007 | 6:00 am

but i’ve only managed to interface the mousestate button in such a way that it just registers single click events… is there a way to make the patch recognize the mouse button being held down as one distinct timed event? does that make sense? so basically as long as i hold down the mouse button X occurs and as soon as i let go of the mouse, X stops.


June 10, 2007 | 8:01 am

At 12:00 AM -0600 6/10/07, billy tran wrote:
>but i’ve only managed to interface the mousestate button in such a way that it just registers single click events… is there a way to make the patch recognize the mouse button being held down as one distinct timed event? does that make sense? so basically as long as i hold down the mouse button X occurs and as soon as i let go of the mouse, X stops.

#P window setfont "Sans Serif" 36.;
#P number 62 291 91 36 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N counter;
#X flags 0 0;
#P newobj 62 269 66 196617 counter;
#P newex 62 249 58 196617 metro 100;
#P newex 62 122 62 196617 metro 200;
#P toggle 62 164 15 0;
#P newex 62 144 66 196617 mousestate;
#P comment 78 106 101 196617 enable mouse polling;
#P toggle 62 104 15 0;
#P hidden newex 62 83 60 196617 loadmess 1;
#P window linecount 3;
#P comment 154 296 73 196617 Increments while mouse button is down;
#P hidden connect 1 0 2 0;
#P connect 5 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 2 0 6 0;
#P connect 6 0 4 0;
#P connect 4 0 5 0;
#P window clipboard copycount 10;


Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." – Brian Eno


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