Forums > MaxMSP

Hi object problems

May 17, 2006 | 11:01 am


May 17, 2006 | 2:43 pm

Well I looked at your patch, but I am on a mac and it appears the Gamepad controller ranges and ID numbers are very different in OSX, so your patch didn’t really route any values anywhere, but it didnt crash. I would test this on windows, but I dont have a windows machine. Anyway, I did mess around with changing some values to route data. I am doing something similar with a dual action controller right now, I would suggest some changes in your approach which may make your life easier, namely use route and sel(ect) like this:
(you may have to change some numbers for your controller numbers and/or data ranges)

Good luck,
j5

max v2;
#N vpatcher 10 61 619 641;
#P window setfont "Sans Serif" 9.;
#P number 167 230 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P comment 253 369 115 196617 Right (v_nster) Stick;
#P toggle 129 294 15 0;
#P toggle 113 294 15 0;
#P toggle 97 294 15 0;
#P toggle 81 294 15 0;
#P number 235 477 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 145 477 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 161 340 37 196617 + 128;
#P newex 161 318 31 196617 * -1;
#P newex 161 294 36 196617 – 128;
#P newex 81 267 106 196617 route 5 6 7 8 20 21;
#P user pictslider 145 367 100 100 4 4 4 4 SliderDefaultKnob.pct 1 SliderDefaultBkgnd.pct 1 2163 0 16711680 255 1. 1.;
#P button 172 169 15 0;
#P toggle 150 230 15 0;
#P newex 150 203 43 196617 route 5;
#P button 151 169 15 0;
#P newex 151 144 53 196617 sel 0 255;
#P newex 151 119 49 196617 route 18;
#P newex 99 39 48 196617 loadbang;
#P message 99 62 33 196617 menu;
#P user umenu 183 91 100 196647 1 64 107 1;
#X add "Logitech Dual Action";
#X add Trackpad;
#X add Keyboard;
#P message 203 62 35 196617 poll 0;
#P message 151 62 41 196617 poll 10;
#P newex 151 90 27 196617 hi;
#P window linecount 3;
#P comment 205 121 213 196617 routes x axis vaslue of left analogue stick (h__ger , the __ were characters my computer didnt understand);
#P comment 205 161 110 196617 use select for "snapshots" when value equals 0 or 255;
#P window linecount 5;
#P comment 37 113 100 196617 I would do this instead of all the if statements with gates or value tests for bangs;
#P window linecount 2;
#P comment 204 204 100 196617 routes button 1 to toggle;
#P comment 194 260 100 196617 or do something like this;
#P window linecount 1;
#P comment 46 314 100 196617 buttons 1 2 3 4;
#P window linecount 7;
#P comment 41 368 100 196617 on mac the joysticks axes are controllers 18 , 19 and 20 , 21 with ranges 0 – 255 the buttons start at controller 5 and give values of 0 and 1;
#P window linecount 1;
#P comment 203 298 135 196617 the y axis is inverted;
#P window linecount 2;
#P comment 151 36 227 196617 youll have to select logitech dual action from the menu and then poll after;
#P fasten 9 0 22 0 156 110 26 110 26 249 86 249;
#P connect 22 0 28 0;
#P connect 22 1 29 0;
#P connect 14 0 13 0;
#P connect 22 2 30 0;
#P connect 22 3 31 0;
#P connect 22 4 21 0;
#P connect 21 0 26 0;
#P fasten 9 0 18 0 156 113 143 113 143 189 155 189;
#P connect 18 0 19 0;
#P fasten 13 0 9 0 104 85 156 85;
#P fasten 11 0 9 0 208 80 156 80;
#P fasten 12 1 9 0 278 110 293 110 293 84 156 84;
#P connect 10 0 9 0;
#P connect 9 0 15 0;
#P connect 15 0 16 0;
#P connect 16 0 17 0;
#P connect 22 5 23 0;
#P connect 23 0 24 0;
#P connect 24 0 25 0;
#P fasten 18 0 33 0 155 225 172 225;
#P connect 16 1 20 0;
#P fasten 9 1 12 0 173 109 180 109 180 88 188 88;
#P fasten 25 0 21 1 166 362 240 362;
#P connect 21 1 27 0;
#P pop;


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