max v2;
#N vpatcher 235 99 807 506;
#P window setfont "Sans Serif" 9.;
#P comment 18 242 21 196617 4.;
#N vpatcher 395 64 1195 499;
#P toggle 607 194 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 607 215 29 196617 gate;
#P toggle 380 141 15 0;
#P newex 380 162 29 196617 gate;
#P newex 626 188 54 196617 pack 60 0;
#P message 626 119 68 196617 60 \, 70 1000;
#P newex 626 143 40 196617 line;
#P button 284 63 15 0;
#P newex 284 173 60 196617 pack 60 80;
#P message 284 104 68 196617 60 \, 70 1000;
#P newex 284 128 40 196617 line;
#P newex 284 234 52 196617 noteout 1;
#P window setfont "American Typewriter" 18.;
#P comment 25 316 264 199491602 Right-to-Left/False Negative;
#P window setfont "Sans Serif" 9.;
#P window linecount 3;
#P comment 498 183 100 196617 this gate turns note off messages on and off >>>>>;
#P window linecount 2;
#P comment 429 143 100 196617 <<<< this gate turns looping on and off;
#P comment 180 58 100 196617 this bang starts the cycle >>>>>;
#P window linecount 6;
#P comment 31 148 194 196617 This patch tries to construct a line which outputs midi values (a scale) and then turn the note off. Unfortunately it's not working \, and there are no error messages (false negative). Work out what the problem is and fix it...;
#P fasten 13 0 9 0 385 186 421 186 421 54 289 54;
#P connect 9 0 7 0;
#P connect 7 0 6 0;
#P connect 6 0 8 0;
#P connect 8 0 5 0;
#P fasten 15 0 5 0 612 224 289 224;
#P connect 14 0 13 0;
#P fasten 6 1 13 1 319 161 404 161;
#P connect 16 0 15 0;
#P fasten 9 0 11 0 289 91 631 91;
#P connect 11 0 10 0;
#P connect 10 0 12 0;
#P connect 12 0 15 1;
#P pop;
#P newobj 41 241 75 196617 p right-to-left;
#N vpatcher 392 109 1220 586;
#P window setfont "Sans Serif" 9.;
#P newex 601 172 29 196617 * 4.;
#P message 554 124 14 196617 6;
#P newex 503 143 27 196617 / 3.;
#P flonum 554 195 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P comment 486 69 100 196617 6/(3*4) = 0.5;
#P button 567 398 15 0;
#P number 588 429 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P newex 588 398 27 196617 + 0;
#P number 559 325 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 605 325 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 605 352 27 196617 / 3;
#P window linecount 0;
#P newex 559 352 27 196617 * 2;
#P window setfont "Fixedwidth Serif" 10.;
#P window linecount 1;
#P newex 133 131 51 1441802 print B;
#P message 159 88 20 1441802 60;
#P message 106 88 20 1441802 40;
#P message 133 88 20 1441802 50;
#P button 104 35 15 0;
#P newex 104 55 69 1441802 bangbang 3;
#P window linecount 2;
#P newex 204 246 37 1441802 print left;
#P newex 242 246 42 1441802 print middle;
#P newex 285 246 41 1441802 print right;
#P window linecount 1;
#P newex 205 96 85 1441802 trigger i i i;
#P message 205 70 20 1441802 90;
#P newex 37 111 51 1441802 print A;
#P message 15 73 20 1441802 40;
#P message 37 73 20 1441802 50;
#P message 59 73 20 1441802 60;
#P button 37 35 15 0;
#P message 89 180 20 1441802 90;
#P window setfont Times 10.;
#P comment 55 36 15 1310730 A;
#P comment 122 36 14 1310730 B;
#P comment 71 181 15 1310730 C;
#P comment 234 71 15 1310730 D;
#P window setfont "Fixedwidth Serif" 10.;
#P newex 342 234 51 1441802 print E;
#P window setfont Times 10.;
#P comment 348 168 14 1310730 E;
#P window setfont "Fixedwidth Serif" 10.;
#P newex 319 193 56 1441802 t b f i;
#P message 319 167 20 1441802 90;
#P window setfont "American Typewriter" 18.;
#P window linecount 0;
#P comment 40 381 195 199491602 Right to Left Priority;
#P window setfont "Sans Serif" 9.;
#P comment 485 53 100 196617 (6/3)*4 = 8;
#P connect 11 0 14 0;
#P connect 11 0 13 0;
#P connect 13 0 15 0;
#P connect 12 0 15 0;
#P connect 14 0 15 0;
#P connect 11 0 12 0;
#P connect 22 0 21 0;
#P connect 21 2 24 0;
#P connect 21 1 23 0;
#P connect 25 0 26 0;
#P connect 23 0 26 0;
#P connect 24 0 26 0;
#P connect 21 0 25 0;
#P connect 10 0 20 0;
#P connect 17 2 20 0;
#P connect 16 0 17 0;
#P connect 17 1 19 0;
#P connect 10 0 19 0;
#P connect 17 0 18 0;
#P connect 10 0 18 0;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P connect 3 1 5 0;
#P connect 3 2 5 0;
#P connect 38 0 36 0;
#P connect 36 0 35 0;
#P connect 30 0 27 0;
#P fasten 28 0 33 0 610 385 572 385;
#P fasten 27 0 31 0 564 382 593 382;
#P fasten 33 0 31 0 572 417 584 417 584 391 593 391;
#P connect 31 0 32 0;
#P connect 37 0 38 0;
#P connect 29 0 28 0;
#P connect 28 0 31 1;
#P pop;
#P newobj 167 243 81 196617 p right-to-left2;
#P comment 18 217 21 196617 3.;
#P comment 18 193 21 196617 2.;
#N vpatcher 531 52 1578 784;
#P window setfont "Sans Serif" 9.;
#P window linecount 3;
#P comment 696 257 291 196617 3. The urn object generates 256 numbers between 0 and 255 without repeating any one. The clear message clears the object of any previously repeated numbers and resets it.;
#P window linecount 0;
#P message 356 230 33 196617 clear;
#P window linecount 3;
#P comment 696 365 111 196617 5. Correct the patch so that it works correctly.;
#P comment 696 323 192 196617 4. Currently \, when I click the bang \, the buffer is filled with samples \, but all of the same value.;
#P window linecount 1;
#P newex 420 256 46 196617 urn 254;
#P newex 420 231 44 196617 uzi 256;
#P newex 420 282 27 196617 + 1;
#P message 420 327 65 196617 select \$1 \$2;
#P newex 420 305 50 196617 pack 0 0.;
#P flonum 488 286 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 488 263 39 196617 / 100.;
#P message 546 238 50 196617 seed 777;
#P newex 488 238 63 196617 random 100;
#P button 420 162 15 0;
#P newex 420 459 60 196617 prepend set;
#P user multiSlider 420 386 173 69 0. 1. 254 2937 15 0 0 2 0 0 0;
#M frgb 86 45 84;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 345 535 39 196617 *~ 0.5;
#P button 345 468 20 0;
#P newex 345 504 35 196617 click~;
#B color 5;
#P user ezdac~ 271 661 315 694 0;
#P newex 135 531 39 196617 *~ 0.5;
#P button 135 464 20 0;
#P newex 135 500 37 196617 click~;
#B color 5;
#P window linecount 0;
#P comment 696 184 192 196617 1. the uzi object sends out the number of bangs in its argument - in this case 254;
#P comment 696 214 192 196617 2. I want to fill the click~'s buffer (256 samples) with 256 random values between 0 and 1.;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P fasten 4 0 5 0 140 622 276 622;
#P fasten 8 0 5 0 350 631 276 631;
#P fasten 4 0 5 1 140 611 310 611;
#P fasten 8 0 5 1 350 642 310 642;
#P connect 10 0 6 0;
#P connect 7 0 6 0;
#P connect 6 0 8 0;
#P fasten 11 0 23 0 425 194 361 194;
#P connect 11 0 19 0;
#P fasten 23 0 20 0 361 251 425 251;
#P connect 19 0 20 0;
#P connect 20 0 18 0;
#P connect 18 0 16 0;
#P connect 16 0 17 0;
#P connect 17 0 9 0;
#P connect 9 0 10 0;
#P fasten 15 0 16 1 493 303 465 303;
#P fasten 13 0 12 0 551 261 485 261 485 234 493 234;
#P fasten 11 0 12 0 425 218 493 218;
#P connect 12 0 14 0;
#P connect 14 0 15 0;
#P pop;
#P newobj 42 216 61 196617 p uzi-error;
#N vpatcher 548 163 1247 664;
#P button 432 109 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 419 135 14 196617 1;
#P message 443 135 107 196617 open anothererror.aif;
#P toggle 197 72 15 0;
#P message 347 315 67 196617 record 4000;
#P message 311 295 107 196617 open anothererror.aif;
#P toggle 290 296 15 0;
#P newex 290 345 55 196617 sfrecord~;
#P button 85 233 15 0;
#P message 85 256 14 196617 1;
#P newex 85 209 92 196617 if $i1==4 then out;
#P message 444 256 100 196617 open "my sound.aif";
#P button 444 233 15 0;
#P button 330 235 15 0;
#P newex 444 210 92 196617 if $i1==7 then out;
#P newex 330 211 92 196617 if $i1==2 then out;
#P button 197 234 15 0;
#P message 174 319 14 196617 0;
#P message 156 319 14 196617 1;
#P newex 197 344 31 196617 dac~;
#P message 197 257 14 196617 1;
#N sfplay~  1 120960 0 ;
#P newobj 197 289 44 196617 sfplay~;
#P message 330 256 120 196617 open "160LP1 BD .WAV";
#P newex 197 96 58 196617 metro 100;
#P number 153 156 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 197 210 98 196617 if $i1==10 then out;
#N counter 0 0 9;
#X flags 0 0;
#P newobj 197 126 71 196617 counter 0 0 9;
#P window linecount 6;
#P comment 330 30 298 196617 Here is a (totally useless) patch that should open and then play two different samples in sequence \, according to a counter. On count 2 it should open one file \, on count 4 output one sound \, on count 7 open another file and on count 10 play that file. However it doesn't work! Try to understand the patch and then try to fix it.;
#B frgb 149 133 0;
#P window linecount 2;
#P comment 9 29 100 196617 First \, turn the dac~ on...;
#P comment 459 105 100 196617 this is what it should sound like;
#P comment 155 43 131 196617 turn the toggle on/off to start/stop the counter;
#P fasten 4 0 20 0 202 194 90 194;
#P connect 20 0 22 0;
#P connect 22 0 21 0;
#P fasten 4 0 6 0 202 151 158 151;
#P connect 27 0 7 0;
#P connect 7 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 14 0;
#P connect 14 0 10 0;
#P hidden fasten 29 0 9 0 424 181 202 181;
#P hidden fasten 28 0 9 0 448 183 202 183;
#P fasten 19 0 9 0 449 283 202 283;
#P fasten 8 0 9 0 335 278 202 278;
#P connect 10 0 9 0;
#P fasten 21 0 9 0 90 277 202 277;
#P connect 9 0 11 0;
#P connect 13 0 11 0;
#P connect 12 0 11 0;
#P fasten 9 0 11 1 202 321 223 321;
#P fasten 9 0 23 0 202 331 295 331;
#P fasten 26 0 23 0 352 341 295 341;
#P connect 25 0 23 0;
#P connect 24 0 23 0;
#P fasten 4 0 15 0 202 197 335 197;
#P connect 15 0 17 0;
#P connect 17 0 8 0;
#P fasten 30 0 29 0 437 130 424 130;
#P fasten 30 0 28 0 437 130 448 130;
#P fasten 4 0 16 0 202 197 449 197;
#P connect 16 0 18 0;
#P connect 18 0 19 0;
#P pop;
#P newobj 42 192 82 196617 p another-error;
#N vpatcher 487 106 1177 699;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 133 233 70 196617 output >>>>>>;
#P comment 133 183 70 196617 object >>>>>>;
#P number 408 143 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 408 231 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 408 182 29 196617 * 2.;
#P number 314 231 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 314 143 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 314 182 29 196617 * 2.;
#P flonum 214 231 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 214 143 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P newex 214 182 27 196617 * 2;
#P comment 36 51 219 196617 I'm trying to develop a small patch that takes a floating point input \, multiplies it by two and outputs the result as a floating point number. I've tried three of these but none of them work. Design one that works!;
#P comment 133 144 70 196617 input >>>>>>;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P connect 6 0 5 0;
#P connect 5 0 7 0;
#P connect 10 0 8 0;
#P connect 8 0 9 0;
#P pop;
#P newobj 42 168 86 196617 p number-errors;
#P newex 121 113 52 196617 mysfplay;
#P window linecount 5;
#P comment 17 33 333 196617 Open the patch 'mysfplay' (double-click on the object below). This will probably generate an error in the Max window and the sfplay~ object within it will be improper. This is because you have an sfplay~ object within the directory. Rename this to 'mysfplay~' and restart Max and everything will be just dandy...;
#P window linecount 2;
#P comment 18 110 100 196617 Double click on the object >>>>;
#P window linecount 1;
#P comment 18 170 21 196617 1.;
#P window setfont "American Typewriter" 18.;
#P comment 18 309 264 199491602 Max Making Mistakes Task;
#P window setfont "Sans Serif" 9.;
#P comment 18 338 100 196617 v 0.01;
#P pop;
