Forums > MaxMSP

examples of wii remote integration?

August 26, 2007 | 6:12 pm

Hi, all.
I borrowed my sister’s boyfriend’s wii remote recently to try it out with Max/MSP. I dwonloaded the aka object and built this simple patch:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 351 248 50 196617 sel 4096;
#P newex 610 262 34 196617 + 15.;
#P newex 643 209 40 196617 split;
#P flonum 597 235 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 351 269 29 196617 stop;
#P newex 108 313 32 196617 * 25;
#P newex 108 289 27 196617 + 6;
#P newex 108 265 23 196617 abs;
#P newex 108 240 36 196617 – 130;
#P toggle 257 261 15 0;
#P newex 257 340 38 196617 sel 16;
#P message 257 363 51 196617 startloop;
#P message 450 497 37 196617 loop 1;
#P button 240 333 15 0;
#P newex 240 309 32 196617 sel 8;
#P button 221 307 15 0;
#P newex 221 281 32 196617 sel 4;
#P message 235 382 19 196617 -1;
#P message 305 318 14 196617 1;
#P newex 531 485 29 196617 sig~;
#P user ezdac~ 530 534 574 567 0;
#P newex 530 508 77 196617 groove~ test 2;
#P message 503 270 45 196617 set test;
#P user waveform~ 503 292 200 74 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P newex 276 138 31 196617 adc~;
#P newex 279 224 85 196617 unpack 0 0 0 0 0;
#P toggle 315 261 15 0;
#P newex 481 250 101 196617 buffer~ test 1000 2;
#P newex 276 162 76 196617 record~ test 2;
#P toggle 239 261 15 0;
#P toggle 221 261 15 0;
#P newex 185 223 85 196617 unpack 0 0 0 0 0;
#P number 144 217 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 108 217 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 71 217 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 33 217 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 70 191 76 196617 unpack 0 0 0 0;
#N vpatcher 349 132 990 373;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 50 51 45 196617 & 8095;
#P outlet 344 188 15 0;
#P newex 344 161 209 196617 pack 0 0 0 0 0;
#P outlet 50 186 15 0;
#P newex 50 159 256 196617 pack 0 0 0 0 0 0;
#P window linecount 1;
#P newex 50 77 40 196617 change;
#P toggle 540 133 15 0;
#P newex 540 106 45 196617 & 4096;
#P comment 555 135 38 196617 Plus;
#P toggle 491 133 15 0;
#P newex 491 106 45 196617 & 2048;
#P comment 506 135 38 196617 Up;
#P toggle 442 133 15 0;
#P newex 442 106 45 196617 & 1024;
#P comment 457 135 38 196617 Down;
#P toggle 393 133 15 0;
#P newex 393 106 39 196617 & 512;
#P comment 408 135 38 196617 Right;
#P toggle 344 133 15 0;
#P newex 344 106 39 196617 & 256;
#P comment 359 135 38 196617 Left;
#P toggle 295 133 15 0;
#P newex 295 106 39 196617 & 128;
#P comment 310 135 38 196617 Home;
#P toggle 246 133 15 0;
#P newex 246 106 33 196617 & 16;
#P comment 261 135 38 196617 Minus;
#P toggle 197 133 15 0;
#P newex 197 106 27 196617 & 8;
#P comment 212 135 38 196617 A;
#P toggle 148 133 15 0;
#P newex 148 106 27 196617 & 4;
#P comment 163 135 38 196617 B;
#P toggle 99 133 15 0;
#P newex 99 106 27 196617 & 2;
#P comment 114 135 38 196617 1;
#P toggle 50 133 15 0;
#P newex 50 106 27 196617 & 1;
#P comment 65 135 38 196617 2;
#P inlet 50 25 15 0;
#P connect 0 0 39 0;
#P connect 39 0 34 0;
#P fasten 34 0 2 0 55 100 55 100;
#P connect 2 0 3 0;
#P connect 3 0 35 0;
#P connect 35 0 36 0;
#P fasten 34 0 5 0 55 100 104 100;
#P connect 5 0 6 0;
#P connect 6 0 35 1;
#P fasten 34 0 8 0 55 100 153 100;
#P connect 8 0 9 0;
#P connect 9 0 35 2;
#P fasten 34 0 11 0 55 100 202 100;
#P connect 11 0 12 0;
#P connect 12 0 35 3;
#P fasten 34 0 14 0 55 100 251 100;
#P connect 14 0 15 0;
#P connect 15 0 35 4;
#P fasten 34 0 17 0 55 100 300 100;
#P connect 17 0 18 0;
#P connect 18 0 35 5;
#P fasten 34 0 20 0 55 100 349 100;
#P connect 20 0 21 0;
#P connect 21 0 37 0;
#P connect 37 0 38 0;
#P fasten 34 0 23 0 55 100 398 100;
#P connect 23 0 24 0;
#P connect 24 0 37 1;
#P fasten 34 0 26 0 55 100 447 100;
#P connect 26 0 27 0;
#P connect 27 0 37 2;
#P fasten 34 0 29 0 55 100 496 100;
#P connect 29 0 30 0;
#P connect 30 0 37 3;
#P fasten 34 0 32 0 55 100 545 100;
#P connect 32 0 33 0;
#P connect 33 0 37 4;
#P pop;
#P newobj 185 191 66 196617 p buttons;
#P newex 70 157 103 196617 route motion buttons;
#P newex 70 127 69 196617 route remote;
#P newex 134 107 32 196617 print;
#P toggle 164 28 15 0;
#P newex 164 51 52 196617 metro 50;
#P message 99 50 57 196617 disconnect;
#P message 47 50 44 196617 connect;
#P newex 70 78 74 196617 aka.wiiremote;
#P connect 19 0 17 0;
#P connect 21 0 17 0;
#P connect 21 1 17 1;
#P connect 24 0 25 0;
#P connect 26 0 24 0;
#P connect 33 0 24 0;
#P connect 34 0 24 0;
#P connect 41 0 24 0;
#P connect 24 1 25 1;
#P connect 22 2 24 1;
#P connect 22 3 24 2;
#P connect 42 0 22 2;
#P connect 42 0 44 0;
#P connect 44 0 43 2;
#P connect 40 0 43 0;
#P connect 43 1 22 3;
#P connect 23 0 22 0;
#P connect 28 0 26 0;
#P connect 27 0 26 0;
#P connect 32 0 28 0;
#P connect 30 0 27 0;
#P connect 45 0 41 0;
#P connect 29 0 30 0;
#P connect 31 0 32 0;
#P connect 35 0 34 0;
#P connect 20 2 19 0;
#P connect 15 0 29 0;
#P connect 16 0 31 0;
#P connect 20 4 45 0;
#P connect 36 0 35 0;
#P connect 8 1 20 0;
#P connect 14 4 36 0;
#P connect 14 3 16 0;
#P connect 14 2 15 0;
#P connect 8 0 14 0;
#P connect 4 0 3 0;
#P connect 7 1 8 0;
#P connect 39 0 40 0;
#P connect 38 0 39 0;
#P connect 37 0 38 0;
#P connect 0 1 5 0;
#P connect 12 0 37 0;
#P connect 9 3 13 0;
#P connect 9 2 12 0;
#P connect 9 1 11 0;
#P connect 7 0 9 0;
#P connect 3 0 0 0;
#P connect 2 0 0 0;
#P connect 1 0 0 0;
#P connect 0 0 6 0;
#P connect 6 0 7 0;
#P connect 9 0 10 0;
#P window clipboard copycount 46;

All this really does is allow me to record a sample, set a loop of the sample, and move the end point of the loop by turning my wrist, as well as playing the loop backwards. Pretty simple, but I was just trying it out for the first time.
I’m looking for advice on how to treat the incoming data from the remote. Button assignment is an easy one, but the movement data is a little perplexing to me. Unless the movements are sharp, it seems to be a pretty limited range (about 130-160 per axis) and tends to be unstable. I’ve seen videos of people using the remote successfully, but have never seen what their patches are doing to handle the data. Just some basic advice would be appreciated.
Thanks!



o s
August 26, 2007 | 9:05 pm

http://ftm.ircam.fr/index.php/Wiimote

best

ole


August 27, 2007 | 11:28 am

hello.

scale object lets you transform that 130-160 range to a 0 – 127 range.

handle numbers with max is full of endless possiblilities. if you have those numbers, then you can do whatever you want… just look for the apropiate object (or make it your self!).


August 27, 2007 | 11:52 am

gamuso skrev:
> hello.
>
> scale object lets you transform that 130-160 range to a 0 – 127 range.
>
> handle numbers with max is full of endless possiblilities. if you have those numbers, then you can do whatever you want… just look for the apropiate object (or make it your self!).
With all due respect, Gamuso, it isn’t that simple with accelerometers…
andreas


August 27, 2007 | 12:32 pm

> With all due respect, Gamuso, it isn’t that simple with accelerometers…
> andreas
>
—————————————————-

ok, it?s true… I was excited being the first time I was to "help" some one in the forum (I should at least wait until I go beyond the max "demo" mode).

I have no idea of accelerometers, could you link or tell me something? (not a crazy math formula, in school time I wasn?t there!).

Anyway I have "scaled" the inclinations of my wii that simple way and it has worked to me (to control a fader, a pan, or to play clips in live, etc.)

Too much time in the forum, I,ll go to eat something…

Have a nice day!


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