CresPatch


 max v2;

#N vpatcher 71 46 1289 794;

#P origin -537 -402;

#P window setfont "Sans Serif" 9.;

#P number 405 468 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P window linecount 1;

#P newex 349 514 81 196617 scale 48 64 0 0;

#P number 402 549 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 549 342 93 196617 scale 60 80 48 64;

#P hidden newex 103 -107 45 196617 loadbang;

#P hidden newex 118 166 45 196617 loadbang;

#P message 103 -59 14 196617 2;

#P message 118 187 14 196617 3;

#P window linecount 2;

#P comment 829 735 261 196617 stripped down versio n of demo patch in MaxMSP>examples>sampling>poly-anti-click>clickless-intro.pat;

#P window linecount 5;

#P comment 194 69 100 196617 self referential metro: metro adds/subtracts from counter at the rate of the counter;

#P window linecount 4;

#P comment 531 120 100 196617 unpacks wiimote values and scales them into 4 nice sounding note values;

#P window linecount 1;

#P comment 185 -58 186 196617 max tempo (time between notes) in ms;

#P newex 587 295 27 196617 +;

#P newex 587 244 27 196617 +;

#P newex 587 196 23 196617 abs;

#P newex 595 217 23 196617 abs;

#P newex 598 271 23 196617 abs;

#P number 589 321 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#N counter;

#X flags 0 0;

#P newobj 89 60 66 196617 counter;

#P number 145 -59 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 163 441 49 196617 speedlim;

#P toggle 424 -72 15 0;

#P newex 450 268 98 196617 scale -40 40 48 64;

#P newex 404 235 98 196617 scale -40 40 48 64;

#P newex 354 200 98 196617 scale -40 40 48 64;

#P window setfont "Fixedwidth Serif" 10.;

#P newex 137 308 160 1441802 if $i1 == 2 then 1 else 2;

#B color 5;

#P window setfont "Sans Serif" 9.;

#P number 144 340 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 272 363 67 196617 switch 1 1 1;

#P flonum 452 161 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 452 133 27 196617 -;

#P flonum 403 162 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 403 134 27 196617 -;

#P flonum 355 162 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 355 134 27 196617 -;

#P toggle 62 121 15 0;

#P newex 62 145 37 196617 metro;

#P window setfont "Fixedwidth Serif" 10.;

#P newex 77 288 160 1441802 if $i1 == 1 then 1 else 2;

#B color 5;

#P button 62 180 15 0;

#P window setfont "Sans Serif" 9.;

#N counter;

#X flags 0 0;

#P newobj 62 210 66 196617 counter;

#P window setfont "Fixedwidth Serif" 10.;

#P newex 65 264 160 1441802 if $i1 == 0 then 1 else 2;

#B color 5;

#P window setfont "Sans Serif" 9.;

#P number 75 377 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 62 238 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 140 376 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 219 387 67 196617 switch 1 1 1;

#P number 164 473 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 163 415 67 196617 switch 1 1 1;

#N vpatcher 10 59 651 300;

#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 424 -151 66 196617 p buttons;

#P number 696 490 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P hidden message 954 602 50 196617 target 0;

#P hidden newex 771 355 224 196617 bangbang;

#N vpatcher 19 537 419 837;

#P window setfont "Sans Serif" 9.;

#P newex 180 78 41 196617 t b 0;

#P newex 247 78 21 196617 t 1;

#P newex 180 54 144 196617 sel 0 1;

#P newex 247 148 41 196617 flush;

#P hidden message 247 104 50 196617 enable \$1;

#P newex 247 124 73 196617 notein;

#P message 52 212 75 196617 midinote \$1 \$2;

#P newex 52 190 99 196617 pack;

#P newex 52 136 99 196617 makenote 127 500;

#N comlet MIDI note out;

#P outlet 52 235 15 0;

#N comlet pitches;

#P inlet 52 34 15 0;

#N comlet enable/disable MIDI in;

#P inlet 180 34 15 0;

#P comment 199 34 114 196617 enable/disable MIDI in;

#P comment 70 34 100 196617 pitches;

#P comment 77 238 100 196617 MIDI note out;

#P connect 4 0 6 0;

#P fasten 11 0 7 0 252 177 57 177;

#P lcolor 15;

#P connect 6 0 7 0;

#P lcolor 15;

#P connect 7 0 8 0;

#P connect 8 0 5 0;

#P fasten 11 1 7 1 283 181 146 181;

#P lcolor 7;

#P connect 6 1 7 1;

#P lcolor 7;

#P connect 3 0 12 0;

#P connect 12 0 14 0;

#P connect 12 1 13 0;

#P fasten 14 1 10 0 216 100 252 100;

#P connect 13 0 10 0;

#P hidden connect 10 0 9 0;

#P fasten 14 0 11 0 185 144 252 144;

#P connect 9 0 11 0;

#P connect 9 1 11 1;

#P pop;

#P newobj 697 527 104 196617 p notesin;

#P newex 874 556 27 196617 i;

#P hidden message 771 391 14 196617 7;

#P hidden newex 771 333 45 196617 loadbang;

#P window setfont "Arial Black" 12.;

#P comment 770 424 100 -1375731700 select sample;

#P window setfont "Sans Serif" 9.;

#P newex 899 509 63 196617 prepend set;

#P newex 815 487 95 196617 t s b s;

#P newex 857 533 129 196617 info~ vibes-a1.aif;

#N vpatcher 774 130 1919 732;

#P window setfont "Sans Serif" 18.;

#P window linecount 1;

#P message 112 255 73 196626 replace;

#P window setfont "Sans Serif" 9.;

#P newex 31 175 185 196617 buffer~ vibes-a1.aif vibes-a1.aif -1 2;

#P newex 31 155 186 196617 buffer~ sho0630.aif sho0630.aif -1 2;

#P newex 31 136 185 196617 buffer~ rainstick.aif rainstick.aif -1 2;

#P newex 31 116 186 196617 buffer~ jongly.aif jongly.aif -1 2;

#P newex 31 96 185 196617 buffer~ drumLoop.aif drumLoop.aif -1 2;

#P newex 31 76 186 196617 buffer~ cherokee.aif cherokee.aif -1 2;

#P newex 31 55 186 196617 buffer~ cello-f2.aif cello-f2.aif -1 2;

#P newex 31 35 186 196617 buffer~ anton.aif anton.aif -1 2;

#P window setfont "Sans Serif" 18.;

#P newex 93 299 116 196626 buffer~ fred;

#P connect 9 0 1 0;

#P connect 9 0 0 0;

#P pop 1;

#P newobj 820 387 83 196617 p sound-buffers;

#P user ubumenu 770 446 100 196617 0 1 1 0;

#X add anton.aif;

#X add cello-f2.aif;

#X add cherokee.aif;

#X add drumLoop.aif;

#X add jongly.aif;

#X add rainstick.aif;

#X add sho0630.aif;

#X add vibes-a1.aif;

#X prefix_set 0 0 <none> 0;

#P newex 815 579 129 196617 pack vibes-a1.aif 0. 0.;

#P comment 946 620 169 196617 <-- double-click to see the magic.;

#P window setfont "Arial Black" 14.;

#P newex 697 613 239 -1375731698 poly~ clickless-voice-02 16;

#B color 3;

#P window setfont "Sans Serif" 9.;

#P comment 748 806 73 196617 • turn on MSP;

#P hidden newex 707 579 89 196617 loadmess steal 1;

#P hidden newex 777 648 67 196617 loadmess 90;

#P hidden message 778 691 35 196617 set \$1;

#P user ezdac~ 697 792 741 825 0;

#P user gain~ 731 646 24 100 158 0 1.071519 7.94321 10.;

#P user gain~ 697 646 24 100 158 0 1.071519 7.94321 10.;

#P user panel 668 313 458 528;

#X brgb 191 255 227;

#X frgb 0 0 0;

#X border 1;

#X rounded 0;

#X shadow 0;

#X done;

#P number 517 94 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 355 59 172 196617 unpack 0 0 0 0;

#P number 463 95 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 409 95 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 355 95 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 847 5 72 196617 route nunchuk;

#P toggle 1145 -363 15 0;

#P message 1145 -338 60 196617 nunchuk \$1;

#P newex 847 28 416 196617 route motion stick buttons;

#P user lcd 847 78 128 128 1 1 0 0 0;

#N vpatcher 551 177 1101 547;

#P origin 0 -6;

#P window setfont "Sans Serif" 9.;

#P window linecount 0;

#P newex 294 190 27 196617 int;

#P newex 198 190 27 196617 int;

#P newex 102 190 27 196617 int;

#P newex 246 161 59 196617 t i i b;

#P newex 150 160 59 196617 t i i b;

#P newex 54 160 58 196617 t i i b;

#P newex 342 134 27 196617 !- 5;

#P newex 342 158 32 196617 * 90;

#P newex 246 134 93 196617 scale 0 255 127 0;

#P newex 150 134 93 196617 scale 0 255 127 0;

#P newex 54 134 93 196617 scale 0 255 127 0;

#P user umenu 381 101 89 196645 3 64 117 0;

#X add Front side is up.;

#X add Right side is up.;

#X add Back side is up.;

#X add Left side is up.;

#P number 54 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 150 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 246 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 342 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P window linecount 6;

#P message 54 241 181 196617 scrollrect 1 0 127 127 -1 0 \, linesegment 125 \$2 126 \$1 255 0 0 \, linesegment 125 \$4 126 \$3 0 255 0 \, linesegment 125 \$6 126 \$5 0 0 255 \, paintrect 0 100 27 127 0 \, paintarc 7 100 27 120 \$7 180 250;

#P window linecount 1;

#P newex 54 214 298 196617 pack 0 0 0 0 0 0 0;

#P comment 69 36 100 196617 motion sensor data;

#P comment 60 84 78 196617 accelaration-X;

#P comment 348 84 100 196617 orientation;

#P outlet 54 327 15 0;

#P comment 252 84 93 196617 accelaration-Z;

#P comment 156 84 77 196617 accelaration-Y;

#P newex 54 63 299 196617 unpack 0. 0. 0. 0;

#P inlet 54 36 15 0;

#P connect 0 0 1 0;

#P connect 1 0 13 0;

#P connect 13 0 15 0;

#P connect 15 0 20 0;

#P connect 20 0 8 0;

#P connect 8 0 9 0;

#P connect 9 0 4 0;

#P connect 20 2 23 0;

#P connect 23 0 8 1;

#P fasten 20 1 23 1 83 183 124 183;

#P connect 1 1 12 0;

#P connect 12 0 16 0;

#P connect 16 0 21 0;

#P connect 21 0 8 2;

#P connect 21 2 24 0;

#P connect 24 0 8 3;

#P fasten 21 1 24 1 179 183 220 183;

#P connect 1 2 11 0;

#P connect 11 0 17 0;

#P connect 17 0 22 0;

#P connect 22 0 8 4;

#P connect 22 2 25 0;

#P connect 25 0 8 5;

#P fasten 22 1 25 1 275 184 316 184;

#P connect 1 3 10 0;

#P connect 10 0 19 0;

#P connect 19 0 18 0;

#P connect 18 0 8 6;

#P hidden fasten 1 3 14 0 347 96 386 96;

#P pop;

#P newobj 847 52 48 196617 p motion;

#P user lcd 982 78 128 128 1 1 0 0 0;

#N vpatcher 166 316 648 706;

#P origin 0 -6;

#P window setfont "Sans Serif" 9.;

#P newex 86 173 27 196617 - 8;

#P newex 118 173 27 196617 + 8;

#P newex 182 173 27 196617 - 8;

#P newex 214 173 27 196617 + 8;

#P newex 54 199 172 196617 pack 0 0 0 0 0 0;

#P number 150 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 54 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P window linecount 2;

#P message 54 227 183 196617 clear \, paintoval \$2 \$5 \$3 \$6 250 \, linesegment 0 \$4 127 \$4 26 \, linesegment \$1 0 \$1 127 26;

#P newex 150 129 59 196617 scale 0 255 127 0;

#P window linecount 1;

#P comment 68 36 100 196617 IR sensor data;

#P window linecount 0;

#P comment 59 84 59 196617 position-X;

#P outlet 54 276 15 0;

#P newex 54 129 59 196617 scale 0 255 0 127;

#P comment 158 84 64 196617 position-Y;

#P newex 53 63 107 196617 unpack 0 0;

#P inlet 53 36 15 0;

#P connect 0 0 1 0;

#P fasten 1 0 9 0 59 80;

#P connect 9 0 3 0;

#P connect 3 0 11 0;

#P connect 11 0 8 0;

#P connect 8 0 4 0;

#P fasten 3 0 15 0 59 165 91 165;

#P connect 15 0 11 1;

#P fasten 3 0 14 0 59 165 123 165;

#P connect 14 0 11 2;

#P connect 1 1 10 0;

#P connect 10 0 7 0;

#P connect 7 0 11 3;

#P fasten 7 0 13 0 155 165 187 165;

#P connect 13 0 11 4;

#P fasten 7 0 12 0 155 165 219 165;

#P connect 12 0 11 5;

#P pop;

#P newobj 982 52 40 196617 p stick;

#P comment 1135 94 38 196617 Z;

#P comment 1135 80 38 196617 C;

#N vpatcher 284 556 513 800;

#P window setfont "Sans Serif" 9.;

#P newex 50 46 27 196617 & 3;

#P window linecount 1;

#P newex 99 123 27 196617 !- 1;

#P window linecount 0;

#P newex 50 122 27 196617 !- 2;

#P outlet 50 199 15 0;

#P newex 50 172 59 196617 pack 0 0;

#P newex 50 70 40 196617 change;

#P toggle 99 146 15 0;

#P newex 99 99 27 196617 & 1;

#P comment 114 148 38 196617 Z;

#P toggle 50 146 15 0;

#P newex 50 99 27 196617 & 2;

#P comment 65 148 38 196617 C;

#P inlet 50 25 15 0;

#P connect 0 0 12 0;

#P connect 12 0 7 0;

#P fasten 7 0 2 0 55 93 55 93;

#P connect 2 0 10 0;

#P connect 10 0 3 0;

#P connect 3 0 8 0;

#P connect 8 0 9 0;

#P fasten 7 0 5 0 55 93 104 93;

#P connect 5 0 11 0;

#P connect 11 0 6 0;

#P connect 6 0 8 1;

#P pop;

#P newobj 1118 54 66 196617 p buttons;

#P user radiogroup 1117 97 18 30;

#X size 2;

#X offset 14;

#X inactive 0;

#X itemtype 1;

#X flagmode 0;

#X set 0 0;

#X done;

#P newex 847 -186 416 196617 route motion ir buttons;

#P newex 847 -210 69 196617 route remote;

#N vpatcher 450 157 1029 488;

#P window setfont "Sans Serif" 9.;

#P window linecount 0;

#P comment 240 145 318 196617 or connects any remote if the device address is not specified.;

#P comment 30 35 419 196617 Thus you can specific Wii Remote using the device address if you have multiple remotes.;

#P comment 30 21 353 196617 Every Wii Remote has a unique device address. ex. 00-19-1d-3e-1b-0b;

#P newex 125 198 52 196617 metro 50;

#P toggle 125 176 15 0;

#P message 30 282 145 196617;

#P window linecount 1;

#P newex 30 257 62 196617 prepend set;

#P window linecount 0;

#P message 191 282 145 196617;

#P window linecount 1;

#P newex 191 257 62 196617 prepend set;

#P comment 201 232 287 196617 the device address can be specified with the object argument.;

#P comment 131 114 278 196617 gets the device address of the connected remote.;

#P message 100 150 57 196617 disconnect;

#B color 2;

#P comment 171 60 213 196617 specifies the device address to be connected.;

#P comment 103 96 248 196617 clears the device address;

#P comment 188 78 248 196617 (case insensitive);

#P message 86 132 44 196617 connect;

#B color 5;

#P message 72 114 59 196617 getaddress;

#P message 58 96 45 196617 address;

#P message 44 78 144 196617 address 00-19-1D-3E-1B-0B;

#P message 30 60 141 196617 address 00-19-1d-3e-1b-0b;

#P newex 30 231 171 196617 aka.wiiremote 00-19-1d-3e-88-a1;

#P comment 130 132 428 196617 connects the remote which address is specified with address message or object's argument.;

#P fasten 18 0 1 0 130 223 35 223;

#P fasten 10 0 1 0 105 198 35 198;

#P fasten 6 0 1 0 91 189 35 189;

#P fasten 5 0 1 0 77 180 35 180;

#P fasten 4 0 1 0 63 171 35 171;

#P fasten 3 0 1 0 49 162 35 162;

#P fasten 2 0 1 0 35 153 35 153;

#P connect 1 0 15 0;

#P connect 15 0 16 0;

#P connect 17 0 18 0;

#P connect 1 1 13 0;

#P connect 13 0 14 0;

#P pop;

#P newobj 1126 -236 88 196617 p device_address;

#B color 5;

#P comment 847 -434 436 196617 0) Setup(Pairing) Wii Remote for use with your computer uinsg "Bluetooth Setup Assistant.";

#P message 1145 -278 68 196617 getexpansion;

#P message 1098 -278 37 196617 getled;

#P message 866 -278 58 196617 getbattery;

#P user lcd 847 -136 128 128 1 1 0 0 0;

#N vpatcher 112 232 662 602;

#P origin 0 -6;

#P window setfont "Sans Serif" 9.;

#P window linecount 0;

#P newex 294 190 27 196617 int;

#P newex 198 190 27 196617 int;

#P newex 102 190 27 196617 int;

#P window linecount 1;

#P newex 246 161 59 196617 t i i b;

#P newex 150 160 59 196617 t i i b;

#P window linecount 0;

#P newex 54 160 58 196617 t i i b;

#P window linecount 1;

#P newex 342 134 27 196617 !- 5;

#P window linecount 0;

#P newex 342 158 32 196617 * 90;

#P window linecount 1;

#P newex 246 134 93 196617 scale 0 255 127 0;

#P newex 150 134 93 196617 scale 0 255 127 0;

#P window linecount 0;

#P newex 54 134 93 196617 scale 0 255 127 0;

#P user umenu 381 101 89 196645 3 64 117 0;

#X add Front side is up.;

#X add Right side is up.;

#X add Back side is up.;

#X add Left side is up.;

#P number 54 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 150 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 246 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P number 342 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P window linecount 6;

#P message 54 241 182 196617 scrollrect 1 0 127 127 -1 0 \, linesegment 125 \$2 126 \$1 255 0 0 \, linesegment 125 \$4 126 \$3 0 255 0 \, linesegment 125 \$6 126 \$5 0 0 255 \, paintrect 0 100 27 127 0 \, paintarc 7 100 27 120 \$7 180 250;

#P window linecount 1;

#P newex 54 214 298 196617 pack 0 0 0 0 0 0 0;

#P comment 69 36 100 196617 motion sensor data;

#P comment 60 84 78 196617 accelaration-X;

#P comment 348 84 100 196617 orientation;

#P outlet 54 327 15 0;

#P comment 252 84 93 196617 accelaration-Z;

#P comment 156 84 77 196617 accelaration-Y;

#P newex 54 63 299 196617 unpack 0. 0. 0. 0;

#P inlet 54 36 15 0;

#P connect 0 0 1 0;

#P connect 1 0 13 0;

#P connect 13 0 15 0;

#P connect 15 0 20 0;

#P connect 20 0 8 0;

#P connect 8 0 9 0;

#P connect 9 0 4 0;

#P connect 20 2 23 0;

#P connect 23 0 8 1;

#P fasten 20 1 23 1 83 183 124 183;

#P connect 1 1 12 0;

#P connect 12 0 16 0;

#P connect 16 0 21 0;

#P connect 21 0 8 2;

#P connect 21 2 24 0;

#P connect 24 0 8 3;

#P fasten 21 1 24 1 179 183 220 183;

#P connect 1 2 11 0;

#P connect 11 0 17 0;

#P connect 17 0 22 0;

#P connect 22 0 8 4;

#P connect 22 2 25 0;

#P connect 25 0 8 5;

#P fasten 22 1 25 1 275 184 316 184;

#P connect 1 3 10 0;

#P connect 10 0 19 0;

#P connect 19 0 18 0;

#P connect 18 0 8 6;

#P hidden fasten 1 3 14 0 347 96 386 96;

#P pop;

#P newobj 847 -162 48 196617 p motion;

#P user lcd 982 -136 128 128 1 1 0 0 0;

#N vpatcher 442 143 924 533;

#P origin 0 -6;

#P window setfont "Sans Serif" 9.;

#P newex 342 280 29 196617 gate;

#P newex 342 201 46 196617 t i clear;

#P window linecount 3;

#P message 54 226 174 196617 paintarc \$2 \$5 \$3 \$6 \$7 180 250 \, linesegment 0 \$4 127 \$4 26 \, linesegment \$1 0 \$1 127 26;

#P window linecount 1;

#P newex 86 175 30 196617 - 10;

#P newex 118 175 31 196617 + 10;

#P newex 182 175 30 196617 - 10;

#P newex 214 175 31 196617 + 10;

#P window linecount 0;

#P newex 54 201 203 196617 pack 0 0 0 0 0 0 0;

#P window linecount 2;

#P newex 246 129 95 196617 scale 0. 3.141593 90 270;

#P newex 150 129 59 196617 scale -1. 1. 127 0;

#P window linecount 1;

#P comment 69 36 100 196617 IR sensor data;

#P window linecount 0;

#P comment 60 84 59 196617 position-X;

#P toggle 342 99 15 0;

#P window linecount 1;

#P comment 348 84 100 196617 tracking;

#P outlet 342 315 15 0;

#P window linecount 0;

#P newex 54 129 59 196617 scale -1. 1. 0 127;

#P flonum 246 99 46 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P comment 252 84 93 196617 angle(radian);

#P flonum 150 99 46 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P comment 156 84 64 196617 position-Y;

#P flonum 54 99 46 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P newex 54 63 299 196617 unpack 0. 0. 0. 0;

#P inlet 54 36 15 0;

#P connect 0 0 1 0;

#P connect 1 0 2 0;

#P connect 2 0 7 0;

#P connect 7 0 15 0;

#P connect 15 0 20 0;

#P fasten 7 0 19 0 59 166 91 166;

#P connect 19 0 15 1;

#P fasten 7 0 18 0 59 166 123 166;

#P connect 18 0 15 2;

#P connect 1 1 4 0;

#P connect 4 0 13 0;

#P fasten 13 0 15 3 155 195 155 195;

#P fasten 13 0 17 0 155 166 187 166;

#P connect 17 0 15 4;

#P fasten 13 0 16 0 155 166 219 166;

#P connect 16 0 15 5;

#P connect 1 2 6 0;

#P connect 6 0 14 0;

#P connect 14 0 15 6;

#P connect 1 3 10 0;

#P connect 10 0 21 0;

#P connect 21 0 22 0;

#P fasten 21 1 8 0 383 304 347 304;

#P connect 22 0 8 0;

#P fasten 20 0 22 1 59 272 366 272;

#P pop;

#P newobj 982 -162 24 196617 p ir;

#P newex 1029 -210 63 196617 print status;

#P user radiogroup 1173 -137 18 72;

#X size 5;

#X offset 14;

#X inactive 0;

#X itemtype 1;

#X flagmode 0;

#X set 0 0 0 0 0;

#X done;

#P comment 1192 -78 38 196617 Plus;

#P comment 1192 -92 38 196617 Up;

#P comment 1192 -106 38 196617 Down;

#P comment 1192 -120 38 196617 Right;

#P comment 1192 -134 38 196617 Left;

#P comment 1135 -64 38 196617 Home;

#P comment 1135 -78 38 196617 Minus;

#P comment 1135 -92 38 196617 A;

#P comment 1135 -106 38 196617 B;

#P comment 1135 -120 38 196617 1;

#P comment 1135 -134 38 196617 2;

#N vpatcher 10 59 651 300;

#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 1117 -162 66 196617 p buttons;

#P user radiogroup 1117 -135 18 86;

#X size 6;

#X offset 14;

#X inactive 0;

#X itemtype 1;

#X flagmode 0;

#X set 0 0 0 0 0 0;

#X done;

#P window linecount 3;

#P comment 1092 -490 136 196617 Argument: symbol \; Inlet: bang \, connect... \; Outlet: message \, message \;;

#B color 13;

#P window setfont "Sans Serif" 18.;

#P window linecount 1;

#P comment 831 -491 237 196626 aka.wiiremote;

#B color 13;

#P window setfont "Sans Serif" 9.;

#P comment 833 -466 237 196617 Nintendo Wii Remote Handler;

#B color 13;

#P user panel 823 -498 400 50;

#X brgb 255 200 200;

#X frgb 0 0 0;

#X border 0;

#X rounded 0;

#X shadow 0;

#X done;

#P comment 847 -392 439 196617 3) Start "metro" to get date from WiiRemote. Bang causes to output the data from WiiRemote.;

#P comment 847 -406 438 196617 2) Send "connect" message to "aka.wiiremote". LEDs will stop blinking when it's connected.;

#P hidden newex 990 -390 77 196617 loadmess set 1;

#P comment 1005 -363 67 196617 (default on);

#P toggle 1077 -303 15 0;

#P toggle 1060 -303 15 0;

#P toggle 1043 -303 15 0;

#P toggle 1026 -303 15 0;

#P newex 1009 -278 78 196617 pak led 0 0 0 0;

#P toggle 934 -303 15 0;

#P message 934 -278 66 196617 vibration \$1;

#P toggle 1083 -363 15 0;

#P message 1083 -338 33 196617 ir \$1;

#P toggle 990 -363 15 0;

#P message 990 -338 55 196617 motion \$1;

#P message 857 -338 57 196617 disconnect;

#B color 2;

#P message 847 -363 44 196617 connect;

#B color 5;

#P newex 924 -338 52 196617 metro 50;

#P toggle 924 -363 15 0;

#P newex 847 -236 192 196617 aka.wiiremote;

#B color 14;

#P comment 847 -420 294 196617 1) Push "Sync" button of WiiRemote. LEDs will start blinking.;

#P window linecount 3;

#P comment 182 213 100 196617 rotates between the three wiimote values on a metro;

#P number 89 93 89 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P window linecount 4;

#P comment 1 -69 100 196617 up/down on counter: I should be set to 2 to ensure proper cres/decres;

#P user panel 752 407 145 71;

#X brgb 255 200 200;

#X frgb 0 0 0;

#X border 0;

#X rounded 0;

#X shadow 0;

#X done;

#P comment 434 -127 100 196617 press 2 button on remote to reset counter for instant cresendo;

#P window linecount 2;

#P comment 135 189 100 196617 counter max ==number of switches;

#P user panel 349 38 310 337;

#X brgb 191 255 227;

#X frgb 0 0 0;

#X border 1;

#X rounded 0;

#X shadow 0;

#X done;

#P user panel 53 43 271 125;

#X brgb 191 255 227;

#X frgb 0 0 0;

#X border 1;

#X rounded 0;

#X shadow 0;

#X done;

#P user panel 51 176 293 264;

#X brgb 191 255 227;

#X frgb 0 0 0;

#X border 1;

#X rounded 0;

#X shadow 0;

#X done;

#P window linecount 4;

#P comment 413 419 189 196617 I added a master scaler because different voices sound best at different ranges. defaults work in the < 16 range custom sounds usually should stay < 60;

#P user panel 397 403 228 97;

#X brgb 255 200 200;

#X frgb 0 0 0;

#X border 0;

#X rounded 0;

#X shadow 0;

#X done;

#P user panel 135 -73 261 45;

#X brgb 255 200 200;

#X frgb 0 0 0;

#X border 0;

#X rounded 0;

#X shadow 0;

#X done;

#P connect 116 0 115 0;

#P connect 115 0 113 0;

#P connect 113 0 112 0;

#P connect 112 0 109 0;

#P connect 109 0 111 0;

#P connect 111 0 110 0;

#P connect 109 0 114 0;

#P connect 115 0 132 0;

#P connect 132 0 10 0;

#P connect 10 0 115 1;

#P connect 146 0 144 0;

#P connect 144 0 132 1;

#P connect 129 0 132 2;

#P connect 145 0 143 0;

#P connect 143 0 112 4;

#P connect 109 0 125 0;

#P connect 114 0 108 0;

#P connect 125 0 124 0;

#P connect 131 0 132 4;

#P connect 110 0 105 0;

#P connect 105 0 130 0;

#P connect 130 0 106 0;

#P connect 147 0 105 1;

#P connect 10 0 130 1;

#P connect 108 0 107 0;

#P connect 107 0 105 2;

#P connect 128 0 107 1;

#P connect 124 0 123 0;

#P connect 123 0 107 2;

#P connect 126 0 123 1;

#P connect 127 0 123 2;

#P connect 106 0 149 0;

#P connect 118 0 126 0;

#P connect 62 0 78 0;

#P connect 78 0 75 0;

#P connect 75 0 117 0;

#P connect 117 0 118 0;

#P connect 76 0 117 1;

#P connect 149 0 148 0;

#P connect 76 0 119 0;

#P connect 119 0 120 0;

#P connect 120 0 127 0;

#P connect 150 0 149 4;

#P connect 78 1 76 0;

#P connect 77 0 119 1;

#P connect 62 2 104 0;

#P connect 104 0 129 0;

#P connect 122 0 128 0;

#P connect 77 0 121 0;

#P connect 121 0 122 0;

#P connect 78 2 77 0;

#P connect 75 0 121 1;

#P connect 78 3 79 0;

#P connect 133 0 147 0;

#P connect 122 0 136 0;

#P connect 136 0 137 0;

#P connect 137 0 138 0;

#P connect 138 0 133 0;

#P connect 120 0 135 0;

#P connect 118 0 134 0;

#P connect 135 0 137 1;

#P connect 134 0 138 1;

#P connect 148 0 103 0;

#P connect 103 0 100 0;

#P connect 100 0 88 0;

#P hidden fasten 86 0 88 0 712 604 702 604;

#P connect 88 0 81 0;

#P hidden connect 84 0 81 0;

#P hidden connect 85 0 81 0;

#P connect 81 0 83 0;

#P fasten 88 1 82 0 931 642 736 642;

#P hidden connect 81 1 82 0;

#P connect 82 0 83 1;

#P hidden connect 98 0 91 0;

#P hidden connect 97 0 101 0;

#P hidden connect 101 0 98 0;

#P hidden connect 82 1 84 0;

#P connect 91 1 94 0;

#P connect 94 0 90 0;

#P fasten 57 0 13 0 1103 -254 852 -254;

#P fasten 56 0 13 0 871 -254 852 -254;

#P fasten 24 0 13 0 1014 -254 852 -254;

#P fasten 22 0 13 0 939 -254 852 -254;

#P fasten 20 0 13 0 1088 -311 852 -311;

#P fasten 18 0 13 0 995 -311 852 -311;

#P fasten 17 0 13 0 862 -311 852 -311;

#P fasten 16 0 13 0 852 -311 852 -311;

#P fasten 15 0 13 0 929 -311 852 -311;

#P fasten 58 0 13 0 1150 -254 852 -254;

#P fasten 72 0 13 0 1150 -311 852 -311;

#P connect 13 0 61 0;

#P connect 61 0 62 0;

#P connect 62 0 54 0;

#P connect 54 0 55 0;

#P fasten 13 0 74 0 852 -214 835 -214 835 0 852 0;

#P connect 74 0 71 0;

#P connect 71 0 69 0;

#P connect 69 0 70 0;

#P connect 95 0 93 0;

#P connect 94 1 93 0;

#P connect 93 1 99 0;

#P connect 99 0 90 1;

#P connect 94 2 95 0;

#P connect 14 0 15 0;

#P connect 90 0 88 2;

#P hidden fasten 102 0 88 2 959 606 930 606;

#P fasten 93 2 90 2 896 553 938 553;

#P connect 23 0 22 0;

#P hidden connect 101 1 102 0;

#P connect 62 1 52 0;

#P connect 52 0 53 0;

#P connect 71 1 67 0;

#P connect 67 0 68 0;

#P hidden connect 30 0 19 0;

#P connect 19 0 18 0;

#P connect 25 0 24 1;

#P connect 13 1 51 0;

#P connect 26 0 24 2;

#P connect 27 0 24 3;

#P connect 28 0 24 4;

#P connect 21 0 20 0;

#P connect 62 2 38 0;

#P connect 38 0 37 0;

#P connect 64 0 63 0;

#P connect 71 2 64 0;

#P connect 73 0 72 0;

#P connect 38 1 50 0;

#P pop;