Forums > MaxMSP

clicking in grain patch

July 23, 2007 | 4:20 am

Hey everyone, I’ve been working on an ambitious (for me) grain patch and
everything is working fine and going smoothly except for some serious
clicking issues I’m getting. The clicking is most noticeable if the aiff
file that is being "grained" is melodic and less percussive and the grains
are longer. I’ve been checking to make sure that the poly~ isn’t
exceeding its allotted number of instances. I use a few of the "gen" series
of externals which is in the percolate library, which you can get here:

http://www.music.columbia.edu/PeRColate/

there are two subpatches and the naming of them is explained below.

Any help or ideas would be appreciated!

thanks
Nic

max v2;
#N vpatcher -2 44 1278 763;
#P origin 0 22;
#P window setfont "Sans Serif" 18.;
#P comment 242 134 35 196626 4.;
#P comment 826 353 35 196626 2.;
#P comment 749 428 35 196626 3.;
#P window setfont "Sans Serif" 9.;
#P message 331 118 118 196617 grain tempo range (ms.);
#P user gain~ 135 604 13 22 158 0 1.071519 7.94321 10.;
#P user gain~ 110 604 13 22 158 0 1.071519 7.94321 10.;
#P number 508 186 35 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user rslider 330 135 187 47 1001 1 0 0 0;
#P flonum 145 304 35 9 0. 1. 35 3 0 0 0 1 213 24 222 222 222 0 0 0;
#P hidden newex 270 351 91 196617 bensenvelopething;
#P button 42 347 13 0;
#P message 87 362 51 196617 vzoom 1.;
#P message 43 362 43 196617 set env;
#P user waveform~ 43 381 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 255 59 161;
#W brgb 167 107 255;
#W rgb2 0 50 198;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 60 241 255;
#W rgb6 100 100 100;
#W rgb7 0 0 0;
#P message 79 120 75 196617 end time (ms.);
#P message 79 103 83 196617 start time (ms.);
#N vpatcher 0 44 1053 747;
#P window setfont "Sans Serif" 9.;
#P message 336 236 69 196617 pitchshift off;
#P message 184 236 110 196617 pitchshiftb y semitone;
#P newex 582 657 56 196617 s end time;
#B color 8;
#P newex 510 657 64 196617 s start time;
#B color 8;
#P newex 900 657 63 196617 s semitones;
#B color 3;
#P comment 205 633 100 196617 end time;
#P message 960 192 59 196617 reciprocal!;
#P newex 837 657 55 196617 s duration;
#B color 2;
#P message 287 311 53 196617 flags 163;
#P message 343 311 14 196617 0;
#P message 364 311 14 196617 1;
#P message 406 311 50 196617 flags 35;
#P message 385 311 14 196617 0;
#P newex 322 254 32 196617 sel 1;
#P newex 322 276 94 196617 b 5;
#P newex 342 368 29 196617 gate;
#P message 184 311 14 196617 0;
#P message 163 311 14 196617 1;
#P message 205 311 14 196617 0;
#P newex 163 254 32 196617 sel 1;
#P newex 163 276 94 196617 b 5;
#P message 51 312 14 196617 0;
#P message 30 312 14 196617 1;
#P newex 650 278 29 196617 gate;
#P message 72 312 14 196617 0;
#P message 93 312 50 196617 flags 163;
#P message 226 311 50 196617 flags 35;
#P user gswitch 590 306 41 32 0 0;
#P flonum 153 632 52 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 153 554 70 196617 random 1000;
#P number 153 577 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 153 596 27 196617 + 1.;
#P comment 188 577 100 196617 start time;
#P newex 837 263 31 196617 float;
#P flonum 858 246 115 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 905 191 52 9 -4. 4. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 905 171 62 196617 expr 1/$f1;
#P newex 837 171 31 196617 float;
#P flonum 837 134 52 9 0. 4. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 837 192 52 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 837 209 78 196617 * 1.;
#P newex 837 115 64 196617 / 8.175799;
#P newex 837 95 31 196617 mtof;
#P newex 837 227 31 196617 t b f;
#P newex 837 152 78 196617 t b f;
#P message 837 285 39 196617 set $1;
#P newex 590 244 31 196617 == 0;
#P newex 620 278 29 196617 gate;
#P newex 30 277 75 196617 b 4;
#P newex 30 256 32 196617 sel 1;
#P newex 537 310 31 196617 float;
#P inlet 590 34 15 0;
#P inlet 837 35 15 0;
#P inlet 361 349 15 0;
#P inlet 639 34 15 0;
#P inlet 669 34 15 0;
#P inlet 858 151 15 0;
#P inlet 153 534 15 0;
#P inlet 30 34 15 0;
#P inlet 163 34 15 0;
#P inlet 322 34 15 0;
#P outlet 72 470 15 0;
#P outlet 385 474 15 0;
#P outlet 651 596 15 0;
#P outlet 590 597 15 0;
#P outlet 205 474 15 0;
#P outlet 184 474 15 0;
#P message 42 236 107 196617 pitchshift by duration;
#P connect 9 0 18 0;
#P connect 18 0 19 0;
#P connect 19 0 45 0;
#P connect 19 1 46 0;
#P connect 19 2 43 0;
#P connect 43 0 6 0;
#P connect 19 3 42 0;
#P connect 10 0 38 0;
#P connect 38 0 37 0;
#P connect 37 0 36 0;
#P connect 36 0 39 0;
#P connect 8 0 48 0;
#P connect 48 0 47 0;
#P connect 47 0 50 0;
#P connect 20 0 36 1;
#P connect 47 1 51 0;
#P connect 51 0 1 0;
#P connect 47 2 49 0;
#P connect 49 0 2 0;
#P connect 47 3 41 0;
#P connect 53 0 59 0;
#P connect 7 0 54 0;
#P connect 54 0 53 0;
#P connect 43 0 52 0;
#P connect 57 0 52 0;
#P connect 53 1 58 0;
#P connect 14 0 52 1;
#P connect 53 2 57 0;
#P connect 53 3 55 0;
#P connect 55 0 5 0;
#P connect 53 4 56 0;
#P connect 37 0 64 0;
#P lcolor 9;
#P connect 47 4 17 0;
#P connect 53 4 17 0;
#P connect 52 0 17 1;
#P connect 39 0 65 0;
#P lcolor 9;
#P connect 16 0 21 0;
#P connect 58 0 21 0;
#P connect 50 0 21 0;
#P connect 21 0 40 0;
#P connect 40 0 3 0;
#P connect 34 0 40 1;
#P connect 46 0 20 0;
#P connect 21 0 20 0;
#P connect 20 0 40 2;
#P connect 13 0 20 1;
#P connect 45 0 44 0;
#P connect 44 0 4 0;
#P connect 12 0 44 1;
#P connect 15 0 25 0;
#P connect 25 0 26 0;
#P connect 26 0 29 0;
#P connect 29 0 23 0;
#P connect 23 0 30 0;
#P connect 30 0 28 0;
#P connect 28 0 27 0;
#P connect 27 0 24 0;
#P connect 24 0 34 0;
#P connect 34 0 22 0;
#P connect 56 0 60 0;
#P lcolor 3;
#P connect 22 0 60 0;
#P lcolor 3;
#P connect 17 0 60 0;
#P lcolor 3;
#P connect 11 0 30 1;
#P connect 24 1 33 0;
#P connect 33 0 34 1;
#P connect 42 0 63 0;
#P lcolor 4;
#P connect 41 0 63 0;
#P lcolor 4;
#P connect 59 0 63 0;
#P lcolor 4;
#P connect 56 0 63 0;
#P lcolor 4;
#P connect 43 0 63 0;
#P lcolor 4;
#P connect 23 1 31 0;
#P connect 31 0 32 0;
#P connect 32 0 27 1;
#P pop;
#P hidden newobj 48 474 131 196617 p duration and pitch guts;
#B color 1;
#P hidden newex 100 26 56 196617 r end time;
#P hidden newex 33 26 64 196617 r start time;
#P hidden newex 262 23 63 196617 r semitones;
#P hidden newex 198 25 55 196617 r duration;
#P toggle 37 224 15 0;
#P message 53 224 69 196617 pitchshift off;
#P toggle 37 206 15 0;
#P message 53 206 110 196617 pitchshift by semitone;
#P toggle 37 188 15 0;
#P hidden newex 188 503 36 196617 float;
#P number 36 161 35 9 -24 24 35 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 520 273 64 196617 metro 1000;
#P user meter~ 9 673 89 686 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217
0 153 186 0 12 3 3 3 3;
#P user meter~ 156 670 236 683 50 0 168 0 103 103 103 255 153 0 255 0 0 217
217 0 153 186 0 12 3 3 3 3;
#P hidden newex 182 348 73 196617 send monotrig;
#P toggle 45 305 27 0;
#P button 892 413 15 0;
#P message 877 365 14 196617 0;
#P message 862 365 14 196617 1;
#P window setfont "Sans Serif" 18.;
#P message 805 228 52 196626 open;
#P window setfont "Sans Serif" 9.;
#N sfplay~ 2 120960 0 ;
#P newobj 805 393 99 196617 sfplay~ 2;
#B color 10;
#P toggle 977 370 15 0;
#P message 977 391 41 196617 loop $1;
#P toggle 785 436 15 0;
#P flonum 36 145 42 9 0. 500. 35 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 79 162 91 196617 pitch in semitones;
#P hidden message 58 507 29 196617 note;
#P hidden newex 1072 26 48 196617 loadbang;
#P newex 214 598 32 196617 print;
#P flonum 36 120 42 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 36 103 42 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 86 546 101 196617 pack symbol 0. 0. 0.;
#P user ubumenu 44 286 100 196617 0 1 1 0;
#X add Sine;
#X add 2pulse;
#X add 4 pulse;
#X add pulser;
#X add exp1;
#X add exp2;
#X add exp3;
#X add exp4;
#X add tri1;
#X add tri2;
#X add tri3;
#X add tri4;
#X add tri8;
#X prefix_set 0 0 0;
#P user ezdac~ 99 663 143 696 0;
#P newex 85 575 140 196617 poly~ monograin 60 args peh;
#B color 6;
#P newex 805 477 98 196617 buffer~ peh 1500 2;
#B color 10;
#P message 79 145 103 196617 grain duration in ms.;
#B color 13;
#P message 520 329 58 196617 busymap 1;
#P newex 805 458 143 196617 record~ peh 2;
#B color 10;
#P newex 536 303 76 196617 choose 20 100;
#P button 520 303 15 0;
#P toggle 277 135 47 0;
#P number 623 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vtable 128 10 59 220 226 0 128 sin;
#P newobj 1107 388 48 196617 table sin;
#P number 1111 424 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 1112 447 105 196617 scale 0 127 50 5000;
#P number 1115 485 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 477 303 40 196617 b 3;
#P message 53 188 107 196617 pitchshift by duration;
#P user panel 34 185 132 59;
#X brgb 169 142 255;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 34 136 160 48;
#X brgb 250 48 214;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P window linecount 2;
#P message 73 305 30 196617 Mono Input;
#P window setfont "Sans Serif" 20.;
#P window linecount 1;
#P message 33 258 222 196628 Grain Amp. envelope;
#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P message 181 304 56 196617 trapezoidal control;
#B color 7;
#P user panel 33 281 219 59;
#X brgb 253 233 128;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P number 330 186 35 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 277 119 39 196617 on/off;
#P user panel 268 105 285 118;
#X brgb 205 107 255;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 18.;
#P comment 760 229 35 196626 1.;
#P connect 70 0 46 0;
#P hidden connect 57 0 28 0;
#P hidden connect 58 0 29 0;
#P hidden connect 55 0 34 0;
#P hidden connect 56 0 48 0;
#P hidden connect 59 3 50 0;
#P hidden connect 59 2 50 0;
#P hidden connect 59 0 52 0;
#P hidden connect 59 3 52 0;
#P hidden connect 31 0 54 0;
#P hidden connect 59 1 54 0;
#P hidden connect 59 0 54 0;
#P connect 26 0 65 0;
#P connect 65 0 63 0;
#P connect 63 0 62 0;
#P connect 64 0 62 0;
#P hidden connect 31 0 26 0;
#P hidden fasten 50 0 59 0 42 338 53 338;
#P connect 11 0 32 0;
#P hidden connect 11 2 59 1;
#P hidden fasten 52 0 59 2 42 347 79 347;
#P connect 27 0 24 0;
#P hidden connect 21 0 24 0;
#P hidden fasten 32 0 27 0 63 531 91 531;
#P connect 31 0 64 0;
#P hidden fasten 54 0 59 3 42 356 92 356;
#P connect 70 0 25 0;
#P hidden fasten 34 0 59 4 41 317 105 317;
#P connect 24 0 70 0;
#P hidden fasten 48 0 59 5 41 325 118 325;
#P hidden fasten 28 0 27 1 41 359 121 359;
#P hidden fasten 34 0 59 6 41 317 131 317;
#P connect 71 0 25 1;
#P connect 24 1 71 0;
#P connect 70 1 71 0;
#P hidden fasten 34 0 59 7 41 317 144 317;
#P hidden fasten 29 0 27 2 41 368 151 368;
#P hidden fasten 48 0 59 8 41 325 157 325;
#P connect 71 0 45 0;
#P hidden fasten 34 0 59 9 41 317 170 317;
#P hidden fasten 49 0 27 3 193 533 181 533;
#P hidden connect 43 0 44 0;
#P connect 11 1 49 0;
#P hidden connect 59 4 49 1;
#P hidden connect 59 5 49 1;
#P connect 24 2 30 0;
#P hidden connect 26 0 66 0;
#P hidden connect 67 0 66 1;
#P connect 68 0 3 0;
#P connect 47 0 11 0;
#P connect 68 1 69 0;
#P connect 17 0 47 0;
#P connect 47 0 18 0;
#P connect 18 0 21 0;
#P connect 47 0 19 0;
#P connect 3 0 19 1;
#P connect 16 0 47 1;
#P connect 69 0 19 2;
#P connect 19 0 16 0;
#P connect 41 0 38 0;
#P connect 40 0 38 0;
#P lcolor 11;
#P connect 39 0 38 0;
#P connect 38 0 20 0;
#P connect 36 0 20 0;
#P connect 35 0 20 0;
#P connect 38 1 20 1;
#P fasten 42 0 40 0 897 432 917 432 917 358 867 358;
#P connect 38 2 42 0;
#P hidden connect 31 0 37 0;
#P connect 37 0 36 0;
#P connect 15 0 14 0;
#P connect 14 0 13 0;
#P connect 13 0 12 0;
#P pop;

subpatches:

name this "bensenvelopething" without the quotes

max v2;
#N vpatcher 25 82 1199 732;
#P origin 0 -106;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 121 33 94 196617 hardwire presets?;
#N comlet trap maker 0.01 – 1;
#P inlet 1007 25 15 0;
#P newex 1007 232 64 196617 * 0.5;
#P newex 1007 132 47 196617 * 4800.;
#P flonum 1007 107 35 9 0.01 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 1007 257 53 196617 pack 0. 0.;
#P flonum 1007 207 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 1007 182 85 196617 expr 4800 – $f1;
#P flonum 1007 157 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 1007 282 99 196617 0. $1 1. $2 1. $1 0.;
#N comlet exp makers 0.01 – 1;
#P inlet 849 28 15 0;
#N comlet menu in;
#P inlet 102 32 15 0;
#P newex 142 79 347 196617 select 0 1 2 3 4 5 6 7 8 9 10 11 12 13;
#P user ubumenu 142 58 100 196617 0 1 1 0;
#X add Sine;
#X add 2pulse;
#X add 4 pulse;
#X add pulser;
#X add exp1;
#X add exp2;
#X add exp3;
#X add exp4;
#X add tri1;
#X add tri2;
#X add tri3;
#X add tri4;
#X add tri8;
#X prefix_set 0 0 0;
#P message 243 225 95 196617 1 0.4 1 2 1 1 3 1 1;
#P message 164 225 33 196617 1 1 1;
#P message 201 225 33 196617 2 1 1;
#P newex 849 264 53 196617 pack 0. 0.;
#P flonum 849 242 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 849 220 85 196617 expr 4800 – $f1;
#P button 849 132 15 0;
#P flonum 849 198 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 849 154 34 196617 4800;
#P flonum 849 110 35 9 0.01 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 849 176 47 196617 * 0.01;
#P message 849 286 93 196617 0.01 $2 1 $1 0.01;
#P message 505 207 90 196617 0.01 3910 1. 500;
#P message 635 364 204 196617 0. 735 1. 735 0. 735 1. 735 0. 735 1. 735;
#P message 635 382 282 196617 0. 551 1. 551 0. 551 1. 552 0. 552 1. 551 0.
551 1. 551 0.;
#P message 635 347 162 196617 0. 1102 1. 1103 0. 1103 1. 1102;
#P message 448 119 120 196617 0.01 2205 1. 2205 0.01;
#P message 465 142 210 196617 0.01 1102 1. 1103 0.01 1103 1. 1102 0.01;
#P message 480 165 90 196617 0.01 500 1. 3910;
#P newex 452 274 67 196617 gen5 4800 0;
#B color 12;
#P message 115 225 42 196617 0.5 1 1;
#P message 635 329 95 196617 0. 2205 1. 2205 0.;
#P window linecount 2;
#P message 636 400 291 196617 0. 275 1. 275 0. 275 1. 275 0. 275 1. 275 0.
276 1. 276 0. 276 1. 276 0. 276 1. 276 0. 276 1. 276 0. 276 1. 276 0. 276;
#P window linecount 1;
#P newex 512 437 67 196617 gen7 4800 0;
#B color 12;
#P newex 130 269 67 196617 gen9 4800 0;
#B color 12;
#P newex 402 502 55 196617 peek~ env;
#B color 6;
#P newex 402 525 84 196617 buffer~ env 100;
#B color 6;
#P connect 28 0 6 0;
#P fasten 6 0 2 0 120 254 135 254;
#P fasten 24 0 2 0 206 255 135 255;
#P fasten 25 0 2 0 169 254 135 254;
#P fasten 26 0 2 0 248 259 135 259;
#P connect 27 0 28 0;
#P fasten 29 0 28 0 107 77 147 77;
#P connect 28 1 25 0;
#P connect 28 2 24 0;
#P connect 28 3 26 0;
#P connect 3 0 1 0;
#P connect 7 0 1 0;
#P fasten 2 0 1 0 135 414 403 414 407 445;
#P connect 28 4 10 0;
#P connect 8 0 7 0;
#P connect 9 0 7 0;
#P connect 10 0 7 0;
#P connect 14 0 7 0;
#P connect 15 0 7 0;
#P connect 28 5 9 0;
#P connect 28 6 8 0;
#P connect 28 7 14 0;
#P connect 31 0 3 0;
#P hidden fasten 4 0 3 0 641 432 517 432;
#P hidden fasten 5 0 3 0 640 436 517 436;
#P hidden fasten 11 0 3 0 640 399 517 399;
#P hidden fasten 12 0 3 0 640 432 517 432;
#P hidden fasten 13 0 3 0 640 435 517 435;
#P connect 28 8 5 0;
#P connect 28 9 11 0;
#P connect 28 10 13 0;
#P connect 28 11 12 0;
#P connect 28 12 4 0;
#P connect 30 0 17 0;
#P connect 17 0 20 0;
#P connect 20 0 18 0;
#P connect 18 0 16 0;
#P connect 16 0 19 0;
#P connect 19 0 21 0;
#P connect 21 0 22 0;
#P connect 22 0 23 0;
#P connect 23 0 15 0;
#P connect 17 0 16 1;
#P connect 19 0 23 1;
#P connect 39 0 36 0;
#P connect 36 0 37 0;
#P connect 37 0 32 0;
#P connect 32 0 33 0;
#P connect 33 0 34 0;
#P connect 34 0 38 0;
#P connect 38 0 35 0;
#P connect 35 0 31 0;
#P connect 32 0 35 1;
#P pop;

name this "monograin" without the quotes

max v2;
#N vpatcher 193 128 1066 741;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 214 406 59 196617 wave~ env;
#P newex 159 437 35 196617 gate~;
#P newex 195 471 27 196617 *~;
#N out~ 2;
#P newobj 195 493 39 196617 out~ 2;
#P message 797 562 51 196617 for index;
#P newex 214 302 30 196617 line~;
#P message 214 229 44 196617 0 , 1 $3;
#P window setfont Arial 9.;
#P newex 268 184 75 131137545 prepend set;
#P window setfont "Sans Serif" 9.;
#P newex 557 169 45 196617 loadbang;
#P newex 145 200 77 196617 pack 0. 0. 0.;
#P newex 145 471 27 196617 *~;
#N in 1;
#P newobj 145 45 25 196617 in 1;
#P message 557 376 62 196617 mute 1 , 0;
#P message 710 392 63 196617 mute 0 , 1;
#P newex 557 424 63 196617 thispoly~;
#P button 710 190 15 0;
#P message 331 99 183 196617 line 1 2 3 , buffer (currently unused;
#P newex 145 88 111 196617 unpack 0. 0. 0. symbol;
#N out~ 1;
#P newobj 145 493 35 196617 out~ 1;
#P newex 710 115 23 196617 t b;
#P newex 145 256 32 196617 line~;
#P message 145 229 56 196617 $1 , $2 $3;
#P newex 145 342 60 196617 play~ $1 2;
#N out 1;
#P newobj 797 539 33 196617 out 1;
#P newex 351 342 58 196617 r monotrig;
#P newex 214 442 101 196617 rampsmooth~ 10 10;
#P connect 14 0 8 0;
#P connect 8 0 16 0;
#P connect 16 0 4 0;
#P connect 4 0 5 0;
#P fasten 18 0 3 0 273 280 150 280;
#P connect 5 0 3 0;
#P connect 3 0 15 0;
#P connect 15 0 7 0;
#P fasten 1 0 24 0 356 432 164 432;
#P connect 0 0 15 1;
#P connect 8 1 16 1;
#P connect 3 0 24 1;
#P connect 24 0 23 0;
#P connect 3 1 23 0;
#P connect 23 0 22 0;
#P connect 8 2 16 2;
#P connect 0 0 23 1;
#P connect 16 0 19 0;
#P connect 19 0 20 0;
#P connect 20 0 25 0;
#P connect 25 0 0 0;
#P fasten 5 1 13 0 172 333 562 333;
#P connect 17 0 13 0;
#P connect 13 0 11 0;
#P fasten 12 0 11 0 715 416 562 416;
#P fasten 14 0 6 0 150 71 715 71;
#P connect 6 0 10 0;
#P fasten 10 0 12 0 715 223 715 223;
#P pop;


July 24, 2007 | 10:41 pm

I’m on a macbook dual core OSX 10.4.9. using max 4.6.3… any takers?

On 7/22/07, Nic Zwart wrote:
>
> Hey everyone, I’ve been working on an ambitious (for me) grain patch and
> everything is working fine and going smoothly except for some serious
> clicking issues I’m getting. The clicking is most noticeable if the aiff
> file that is being "grained" is melodic and less percussive and the grains
> are longer. I’ve been checking to make sure that the poly~ isn’t
> exceeding its allotted number of instances. I use a few of the "gen" series
> of externals which is in the percolate library, which you can get here:
> http://www.music.columbia.edu/PeRColate/
>
> there are two subpatches and the naming of them is explained below.
>
> Any help or ideas would be appreciated!
>
> thanks
> Nic
>
>
>
>
> max v2;
> #N vpatcher -2 44 1278 763;
> #P origin 0 22;
> #P window setfont "Sans Serif" 18.;
> #P comment 242 134 35 196626 4.;
> #P comment 826 353 35 196626 2.;
> #P comment 749 428 35 196626 3.;
> #P window setfont "Sans Serif" 9.;
> #P message 331 118 118 196617 grain tempo range (ms.);
> #P user gain~ 135 604 13 22 158 0 1.071519 7.94321 10.;
> #P user gain~ 110 604 13 22 158 0 1.071519 7.94321 10.;
> #P number 508 186 35 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P user rslider 330 135 187 47 1001 1 0 0 0;
> #P flonum 145 304 35 9 0. 1. 35 3 0 0 0 1 213 24 222 222 222 0 0 0;
> #P hidden newex 270 351 91 196617 bensenvelopething;
> #P button 42 347 13 0;
> #P message 87 362 51 196617 vzoom 1.;
> #P message 43 362 43 196617 set env;
> #P user waveform~ 43 381 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 255 59 161;
> #W brgb 167 107 255;
> #W rgb2 0 50 198;
> #W rgb3 0 0 0;
> #W rgb4 0 0 0;
> #W rgb5 60 241 255;
> #W rgb6 100 100 100;
> #W rgb7 0 0 0;
> #P message 79 120 75 196617 end time (ms.);
> #P message 79 103 83 196617 start time (ms.);
> #N vpatcher 0 44 1053 747;
> #P window setfont "Sans Serif" 9.;
> #P message 336 236 69 196617 pitchshift off;
> #P message 184 236 110 196617 pitchshiftb y semitone;
> #P newex 582 657 56 196617 s end time;
> #B color 8;
> #P newex 510 657 64 196617 s start time;
> #B color 8;
> #P newex 900 657 63 196617 s semitones;
> #B color 3;
> #P comment 205 633 100 196617 end time;
> #P message 960 192 59 196617 reciprocal!;
> #P newex 837 657 55 196617 s duration;
> #B color 2;
> #P message 287 311 53 196617 flags 163;
> #P message 343 311 14 196617 0;
> #P message 364 311 14 196617 1;
> #P message 406 311 50 196617 flags 35;
> #P message 385 311 14 196617 0;
> #P newex 322 254 32 196617 sel 1;
> #P newex 322 276 94 196617 b 5;
> #P newex 342 368 29 196617 gate;
> #P message 184 311 14 196617 0;
> #P message 163 311 14 196617 1;
> #P message 205 311 14 196617 0;
> #P newex 163 254 32 196617 sel 1;
> #P newex 163 276 94 196617 b 5;
> #P message 51 312 14 196617 0;
> #P message 30 312 14 196617 1;
> #P newex 650 278 29 196617 gate;
> #P message 72 312 14 196617 0;
> #P message 93 312 50 196617 flags 163;
> #P message 226 311 50 196617 flags 35;
> #P user gswitch 590 306 41 32 0 0;
> #P flonum 153 632 52 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 153 554 70 196617 random 1000;
> #P number 153 577 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 153 596 27 196617 + 1.;
> #P comment 188 577 100 196617 start time;
> #P newex 837 263 31 196617 float;
> #P flonum 858 246 115 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 905 191 52 9 -4. 4. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 905 171 62 196617 expr 1/$f1;
> #P newex 837 171 31 196617 float;
> #P flonum 837 134 52 9 0. 4. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 837 192 52 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 837 209 78 196617 * 1.;
> #P newex 837 115 64 196617 / 8.175799 ;
> #P newex 837 95 31 196617 mtof;
> #P newex 837 227 31 196617 t b f;
> #P newex 837 152 78 196617 t b f;
> #P message 837 285 39 196617 set $1;
> #P newex 590 244 31 196617 == 0;
> #P newex 620 278 29 196617 gate;
> #P newex 30 277 75 196617 b 4;
> #P newex 30 256 32 196617 sel 1;
> #P newex 537 310 31 196617 float;
> #P inlet 590 34 15 0;
> #P inlet 837 35 15 0;
> #P inlet 361 349 15 0;
> #P inlet 639 34 15 0;
> #P inlet 669 34 15 0;
> #P inlet 858 151 15 0;
> #P inlet 153 534 15 0;
> #P inlet 30 34 15 0;
> #P inlet 163 34 15 0;
> #P inlet 322 34 15 0;
> #P outlet 72 470 15 0;
> #P outlet 385 474 15 0;
> #P outlet 651 596 15 0;
> #P outlet 590 597 15 0;
> #P outlet 205 474 15 0;
> #P outlet 184 474 15 0;
> #P message 42 236 107 196617 pitchshift by duration;
> #P connect 9 0 18 0;
> #P connect 18 0 19 0;
> #P connect 19 0 45 0;
> #P connect 19 1 46 0;
> #P connect 19 2 43 0;
> #P connect 43 0 6 0;
> #P connect 19 3 42 0;
> #P connect 10 0 38 0;
> #P connect 38 0 37 0;
> #P connect 37 0 36 0;
> #P connect 36 0 39 0;
> #P connect 8 0 48 0;
> #P connect 48 0 47 0;
> #P connect 47 0 50 0;
> #P connect 20 0 36 1;
> #P connect 47 1 51 0;
> #P connect 51 0 1 0;
> #P connect 47 2 49 0;
> #P connect 49 0 2 0;
> #P connect 47 3 41 0;
> #P connect 53 0 59 0;
> #P connect 7 0 54 0;
> #P connect 54 0 53 0;
> #P connect 43 0 52 0;
> #P connect 57 0 52 0;
> #P connect 53 1 58 0;
> #P connect 14 0 52 1;
> #P connect 53 2 57 0;
> #P connect 53 3 55 0;
> #P connect 55 0 5 0;
> #P connect 53 4 56 0;
> #P connect 37 0 64 0;
> #P lcolor 9;
> #P connect 47 4 17 0;
> #P connect 53 4 17 0;
> #P connect 52 0 17 1;
> #P connect 39 0 65 0;
> #P lcolor 9;
> #P connect 16 0 21 0;
> #P connect 58 0 21 0;
> #P connect 50 0 21 0;
> #P connect 21 0 40 0;
> #P connect 40 0 3 0;
> #P connect 34 0 40 1;
> #P connect 46 0 20 0;
> #P connect 21 0 20 0;
> #P connect 20 0 40 2;
> #P connect 13 0 20 1;
> #P connect 45 0 44 0;
> #P connect 44 0 4 0;
> #P connect 12 0 44 1;
> #P connect 15 0 25 0;
> #P connect 25 0 26 0;
> #P connect 26 0 29 0;
> #P connect 29 0 23 0;
> #P connect 23 0 30 0;
> #P connect 30 0 28 0;
> #P connect 28 0 27 0;
> #P connect 27 0 24 0;
> #P connect 24 0 34 0;
> #P connect 34 0 22 0;
> #P connect 56 0 60 0;
> #P lcolor 3;
> #P connect 22 0 60 0;
> #P lcolor 3;
> #P connect 17 0 60 0;
> #P lcolor 3;
> #P connect 11 0 30 1;
> #P connect 24 1 33 0;
> #P connect 33 0 34 1;
> #P connect 42 0 63 0;
> #P lcolor 4;
> #P connect 41 0 63 0;
> #P lcolor 4;
> #P connect 59 0 63 0;
> #P lcolor 4;
> #P connect 56 0 63 0;
> #P lcolor 4;
> #P connect 43 0 63 0;
> #P lcolor 4;
> #P connect 23 1 31 0;
> #P connect 31 0 32 0;
> #P connect 32 0 27 1;
> #P pop;
> #P hidden newobj 48 474 131 196617 p duration and pitch guts;
> #B color 1;
> #P hidden newex 100 26 56 196617 r end time;
> #P hidden newex 33 26 64 196617 r start time;
> #P hidden newex 262 23 63 196617 r semitones;
> #P hidden newex 198 25 55 196617 r duration;
> #P toggle 37 224 15 0;
> #P message 53 224 69 196617 pitchshift off;
> #P toggle 37 206 15 0;
> #P message 53 206 110 196617 pitchshift by semitone;
> #P toggle 37 188 15 0;
> #P hidden newex 188 503 36 196617 float;
> #P number 36 161 35 9 -24 24 35 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 520 273 64 196617 metro 1000;
> #P user meter~ 9 673 89 686 50 0 168 0 103 103 103 255 153 0 255 0 0 217
> 217 0 153 186 0 12 3 3 3 3;
> #P user meter~ 156 670 236 683 50 0 168 0 103 103 103 255 153 0 255 0 0
> 217 217 0 153 186 0 12 3 3 3 3;
> #P hidden newex 182 348 73 196617 send monotrig;
> #P toggle 45 305 27 0;
> #P button 892 413 15 0;
> #P message 877 365 14 196617 0;
> #P message 862 365 14 196617 1;
> #P window setfont "Sans Serif" 18.;
> #P message 805 228 52 196626 open;
> #P window setfont "Sans Serif" 9.;
> #N sfplay~ 2 120960 0 ;
> #P newobj 805 393 99 196617 sfplay~ 2;
> #B color 10;
> #P toggle 977 370 15 0;
> #P message 977 391 41 196617 loop $1;
> #P toggle 785 436 15 0;
> #P flonum 36 145 42 9 0. 500. 35 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 79 162 91 196617 pitch in semitones;
> #P hidden message 58 507 29 196617 note;
> #P hidden newex 1072 26 48 196617 loadbang;
> #P newex 214 598 32 196617 print;
> #P flonum 36 120 42 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 36 103 42 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 86 546 101 196617 pack symbol 0. 0. 0.;
> #P user ubumenu 44 286 100 196617 0 1 1 0;
> #X add Sine;
> #X add 2pulse;
> #X add 4 pulse;
> #X add pulser;
> #X add exp1;
> #X add exp2;
> #X add exp3;
> #X add exp4;
> #X add tri1;
> #X add tri2;
> #X add tri3;
> #X add tri4;
> #X add tri8;
> #X prefix_set 0 0 0;
> #P user ezdac~ 99 663 143 696 0;
> #P newex 85 575 140 196617 poly~ monograin 60 args peh;
> #B color 6;
> #P newex 805 477 98 196617 buffer~ peh 1500 2;
> #B color 10;
> #P message 79 145 103 196617 grain duration in ms.;
> #B color 13;
> #P message 520 329 58 196617 busymap 1;
> #P newex 805 458 143 196617 record~ peh 2;
> #B color 10;
> #P newex 536 303 76 196617 choose 20 100;
> #P button 520 303 15 0;
> #P toggle 277 135 47 0;
> #P number 623 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #N vtable 128 10 59 220 226 0 128 sin;
> #P newobj 1107 388 48 196617 table sin;
> #P number 1111 424 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 1112 447 105 196617 scale 0 127 50 5000;
> #P number 1115 485 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 477 303 40 196617 b 3;
> #P message 53 188 107 196617 pitchshift by duration;
> #P user panel 34 185 132 59;
> #X brgb 169 142 255;
> #X frgb 0 0 0;
> #X border 1;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P user panel 34 136 160 48;
> #X brgb 250 48 214;
> #X frgb 0 0 0;
> #X border 1;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P window linecount 2;
> #P message 73 305 30 196617 Mono Input;
> #P window setfont "Sans Serif" 20.;
> #P window linecount 1;
> #P message 33 258 222 196628 Grain Amp. envelope;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 2;
> #P message 181 304 56 196617 trapezoidal control;
> #B color 7;
> #P user panel 33 281 219 59;
> #X brgb 253 233 128;
> #X frgb 0 0 0;
> #X border 1;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P number 330 186 35 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P message 277 119 39 196617 on/off;
> #P user panel 268 105 285 118;
> #X brgb 205 107 255;
> #X frgb 0 0 0;
> #X border 1;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P window setfont "Sans Serif" 18.;
> #P comment 760 229 35 196626 1.;
> #P connect 70 0 46 0;
> #P hidden connect 57 0 28 0;
> #P hidden connect 58 0 29 0;
> #P hidden connect 55 0 34 0;
> #P hidden connect 56 0 48 0;
> #P hidden connect 59 3 50 0;
> #P hidden connect 59 2 50 0;
> #P hidden connect 59 0 52 0;
> #P hidden connect 59 3 52 0;
> #P hidden connect 31 0 54 0;
> #P hidden connect 59 1 54 0;
> #P hidden connect 59 0 54 0;
> #P connect 26 0 65 0;
> #P connect 65 0 63 0;
> #P connect 63 0 62 0;
> #P connect 64 0 62 0;
> #P hidden connect 31 0 26 0;
> #P hidden fasten 50 0 59 0 42 338 53 338;
> #P connect 11 0 32 0;
> #P hidden connect 11 2 59 1;
> #P hidden fasten 52 0 59 2 42 347 79 347;
> #P connect 27 0 24 0;
> #P hidden connect 21 0 24 0;
> #P hidden fasten 32 0 27 0 63 531 91 531;
> #P connect 31 0 64 0;
> #P hidden fasten 54 0 59 3 42 356 92 356;
> #P connect 70 0 25 0;
> #P hidden fasten 34 0 59 4 41 317 105 317;
> #P connect 24 0 70 0;
> #P hidden fasten 48 0 59 5 41 325 118 325;
> #P hidden fasten 28 0 27 1 41 359 121 359;
> #P hidden fasten 34 0 59 6 41 317 131 317;
> #P connect 71 0 25 1;
> #P connect 24 1 71 0;
> #P connect 70 1 71 0;
> #P hidden fasten 34 0 59 7 41 317 144 317;
> #P hidden fasten 29 0 27 2 41 368 151 368;
> #P hidden fasten 48 0 59 8 41 325 157 325;
> #P connect 71 0 45 0;
> #P hidden fasten 34 0 59 9 41 317 170 317;
> #P hidden fasten 49 0 27 3 193 533 181 533;
> #P hidden connect 43 0 44 0;
> #P connect 11 1 49 0;
> #P hidden connect 59 4 49 1;
> #P hidden connect 59 5 49 1;
> #P connect 24 2 30 0;
> #P hidden connect 26 0 66 0;
> #P hidden connect 67 0 66 1;
> #P connect 68 0 3 0;
> #P connect 47 0 11 0;
> #P connect 68 1 69 0;
> #P connect 17 0 47 0;
> #P connect 47 0 18 0;
> #P connect 18 0 21 0;
> #P connect 47 0 19 0;
> #P connect 3 0 19 1;
> #P connect 16 0 47 1;
> #P connect 69 0 19 2;
> #P connect 19 0 16 0;
> #P connect 41 0 38 0;
> #P connect 40 0 38 0;
> #P lcolor 11;
> #P connect 39 0 38 0;
> #P connect 38 0 20 0;
> #P connect 36 0 20 0;
> #P connect 35 0 20 0;
> #P connect 38 1 20 1;
> #P fasten 42 0 40 0 897 432 917 432 917 358 867 358;
> #P connect 38 2 42 0;
> #P hidden connect 31 0 37 0;
> #P connect 37 0 36 0;
> #P connect 15 0 14 0;
> #P connect 14 0 13 0;
> #P connect 13 0 12 0;
> #P pop;
>
>
>
>
>
>
> subpatches:
>
>
>
>
> name this "bensenvelopething" without the quotes
>
>
> max v2;
> #N vpatcher 25 82 1199 732;
> #P origin 0 -106;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 121 33 94 196617 hardwire presets?;
> #N comlet trap maker 0.01 – 1;
> #P inlet 1007 25 15 0;
> #P newex 1007 232 64 196617 * 0.5 ;
> #P newex 1007 132 47 196617 * 4800.;
> #P flonum 1007 107 35 9 0.01 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 1007 257 53 196617 pack 0. 0.;
> #P flonum 1007 207 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 1007 182 85 196617 expr 4800 – $f1;
> #P flonum 1007 157 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 1007 282 99 196617 0. $1 1. $2 1. $1 0.;
> #N comlet exp makers 0.01 – 1;
> #P inlet 849 28 15 0;
> #N comlet menu in;
> #P inlet 102 32 15 0;
> #P newex 142 79 347 196617 select 0 1 2 3 4 5 6 7 8 9 10 11 12 13;
> #P user ubumenu 142 58 100 196617 0 1 1 0;
> #X add Sine;
> #X add 2pulse;
> #X add 4 pulse;
> #X add pulser;
> #X add exp1;
> #X add exp2;
> #X add exp3;
> #X add exp4;
> #X add tri1;
> #X add tri2;
> #X add tri3;
> #X add tri4;
> #X add tri8;
> #X prefix_set 0 0
0;
> #P message 243 225 95 196617 1 0.4 1 2 1 1 3 1 1;
> #P message 164 225 33 196617 1 1 1;
> #P message 201 225 33 196617 2 1 1;
> #P newex 849 264 53 196617 pack 0. 0.;
> #P flonum 849 242 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 849 220 85 196617 expr 4800 – $f1;
> #P button 849 132 15 0;
> #P flonum 849 198 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 849 154 34 196617 4800;
> #P flonum 849 110 35 9 0.01 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 849 176 47 196617 * 0.01;
> #P message 849 286 93 196617 0.01 $2 1 $1 0.01;
> #P message 505 207 90 196617 0.01 3910 1. 500;
> #P message 635 364 204 196617 0. 735 1. 735 0. 735 1. 735 0. 735 1. 735;
> #P message 635 382 282 196617 0. 551 1. 551 0. 551 1. 552 0. 552 1. 551 0.
> 551 1. 551 0.;
> #P message 635 347 162 196617 0. 1102 1. 1103 0. 1103 1. 1102;
> #P message 448 119 120 196617 0.01 2205 1. 2205 0.01;
> #P message 465 142 210 196617 0.01 1102 1. 1103 0.01 1103 1. 1102 0.01;
> #P message 480 165 90 196617 0.01 500 1. 3910;
> #P newex 452 274 67 196617 gen5 4800 0;
> #B color 12;
> #P message 115 225 42 196617 0.5 1 1;
> #P message 635 329 95 196617 0. 2205 1. 2205 0.;
> #P window linecount 2;
> #P message 636 400 291 196617 0. 275 1. 275 0. 275 1. 275 0. 275 1. 275 0.
> 276 1. 276 0. 276 1. 276 0. 276 1. 276 0. 276 1. 276 0. 276 1. 276 0. 276;
> #P window linecount 1;
> #P newex 512 437 67 196617 gen7 4800 0;
> #B color 12;
> #P newex 130 269 67 196617 gen9 4800 0;
> #B color 12;
> #P newex 402 502 55 196617 peek~ env;
> #B color 6;
> #P newex 402 525 84 196617 buffer~ env 100;
> #B color 6;
> #P connect 28 0 6 0;
> #P fasten 6 0 2 0 120 254 135 254;
> #P fasten 24 0 2 0 206 255 135 255;
> #P fasten 25 0 2 0 169 254 135 254;
> #P fasten 26 0 2 0 248 259 135 259;
> #P connect 27 0 28 0;
> #P fasten 29 0 28 0 107 77 147 77;
> #P connect 28 1 25 0;
> #P connect 28 2 24 0;
> #P connect 28 3 26 0;
> #P connect 3 0 1 0;
> #P connect 7 0 1 0;
> #P fasten 2 0 1 0 135 414 403 414 407 445;
> #P connect 28 4 10 0;
> #P connect 8 0 7 0;
> #P connect 9 0 7 0;
> #P connect 10 0 7 0;
> #P connect 14 0 7 0;
> #P connect 15 0 7 0;
> #P connect 28 5 9 0;
> #P connect 28 6 8 0;
> #P connect 28 7 14 0;
> #P connect 31 0 3 0;
> #P hidden fasten 4 0 3 0 641 432 517 432;
> #P hidden fasten 5 0 3 0 640 436 517 436;
> #P hidden fasten 11 0 3 0 640 399 517 399;
> #P hidden fasten 12 0 3 0 640 432 517 432;
> #P hidden fasten 13 0 3 0 640 435 517 435;
> #P connect 28 8 5 0;
> #P connect 28 9 11 0;
> #P connect 28 10 13 0;
> #P connect 28 11 12 0;
> #P connect 28 12 4 0;
> #P connect 30 0 17 0;
> #P connect 17 0 20 0;
> #P connect 20 0 18 0;
> #P connect 18 0 16 0;
> #P connect 16 0 19 0;
> #P connect 19 0 21 0;
> #P connect 21 0 22 0;
> #P connect 22 0 23 0;
> #P connect 23 0 15 0;
> #P connect 17 0 16 1;
> #P connect 19 0 23 1;
> #P connect 39 0 36 0;
> #P connect 36 0 37 0;
> #P connect 37 0 32 0;
> #P connect 32 0 33 0;
> #P connect 33 0 34 0;
> #P connect 34 0 38 0;
> #P connect 38 0 35 0;
> #P connect 35 0 31 0;
> #P connect 32 0 35 1;
> #P pop;
>
>
>
>
>
>
>
>
>
> name this "monograin" without the quotes
>
>
> max v2;
> #N vpatcher 193 128 1066 741;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 214 406 59 196617 wave~ env;
> #P newex 159 437 35 196617 gate~;
> #P newex 195 471 27 196617 *~;
> #N out~ 2;
> #P newobj 195 493 39 196617 out~ 2;
> #P message 797 562 51 196617 for index;
> #P newex 214 302 30 196617 line~;
> #P message 214 229 44 196617 0 , 1 $3;
> #P window setfont Arial 9.;
> #P newex 268 184 75 131137545 prepend set;
> #P window setfont "Sans Serif" 9.;
> #P newex 557 169 45 196617 loadbang;
> #P newex 145 200 77 196617 pack 0. 0. 0.;
> #P newex 145 471 27 196617 *~;
> #N in 1;
> #P newobj 145 45 25 196617 in 1;
> #P message 557 376 62 196617 mute 1 , 0;
> #P message 710 392 63 196617 mute 0 , 1;
> #P newex 557 424 63 196617 thispoly~;
> #P button 710 190 15 0;
> #P message 331 99 183 196617 line 1 2 3 , buffer (currently unused;
> #P newex 145 88 111 196617 unpack 0. 0. 0. symbol;
> #N out~ 1;
> #P newobj 145 493 35 196617 out~ 1;
> #P newex 710 115 23 196617 t b;
> #P newex 145 256 32 196617 line~;
> #P message 145 229 56 196617 $1 , $2 $3;
> #P newex 145 342 60 196617 play~ $1 2;
> #N out 1;
> #P newobj 797 539 33 196617 out 1;
> #P newex 351 342 58 196617 r monotrig;
> #P newex 214 442 101 196617 rampsmooth~ 10 10;
> #P connect 14 0 8 0;
> #P connect 8 0 16 0;
> #P connect 16 0 4 0;
> #P connect 4 0 5 0;
> #P fasten 18 0 3 0 273 280 150 280;
> #P connect 5 0 3 0;
> #P connect 3 0 15 0;
> #P connect 15 0 7 0;
> #P fasten 1 0 24 0 356 432 164 432;
> #P connect 0 0 15 1;
> #P connect 8 1 16 1;
> #P connect 3 0 24 1;
> #P connect 24 0 23 0;
> #P connect 3 1 23 0;
> #P connect 23 0 22 0;
> #P connect 8 2 16 2;
> #P connect 0 0 23 1;
> #P connect 16 0 19 0;
> #P connect 19 0 20 0;
> #P connect 20 0 25 0;
> #P connect 25 0 0 0;
> #P fasten 5 1 13 0 172 333 562 333;
> #P connect 17 0 13 0;
> #P connect 13 0 11 0;
> #P fasten 12 0 11 0 715 416 562 416;
> #P fasten 14 0 6 0 150 71 715 71;
> #P connect 6 0 10 0;
> #P fasten 10 0 12 0 715 223 715 223;
> #P pop;
>
>
>
>


July 25, 2007 | 10:22 am

Nic Zwart schrieb:
> I’ve been checking to make sure that the poly~ isn’t exceeding its
> allotted number of instances. I use a few of the "gen" series of
> externalsnd the naming of them is explained below.
>
> Any help or ideas would be appreciated!

It seems your buffer for the envelope is a bit too small, just by
looking at the envelopes, I’d expect clicks…
The rampsmooth~ after the [wave~ env] doesn’t make sense, the envelope
should make the envelope, it won’t set a non zero output to zero…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


July 25, 2007 | 10:59 am

As Stefan Points out clicking in a granular patch is very often related to the method used to apply envelopes to the grains. I would recommend to you at ‘Granular 2′ by Noboyasu Sakonda for some inspiration in that area.

j.


July 25, 2007 | 8:49 pm

Thanks for the advice and the link to that very interesting patch. I
actually discovered before I read this email that the clicking is almost
definitely coming from the record buffer~ itself and not from the buffer
used for the envelope.

It seems that when clicks happen , it is because a grain is playing over the
point at which the buffer is being recorded into via record~ (record~ is in
loop recording mode). I resized the buffer to be really, really long, and
since the grain patch isn’t programed to trigger past 1000 ms. the grain
never goes over the "recording head" and I never get any clicks. However, I
would like to use this patch as a live input processor, and so it would be
much more convenient to have a smaller buffer~. I guess now it is a design
question rather than a technical one: How can I design the patch in such a
way that it allows live input into a constantly recording buffer without
throwing a grain over the record point?

Nic

On 7/25/07, Leafcutter John

wrote:
>
>
> As Stefan Points out clicking in a granular patch is very often related to
> the method used to apply envelopes to the grains. I would recommend to you
> at ‘Granular 2′ by Noboyasu Sakonda for some inspiration in that area.
>
> j.
> –
> http://www.leafcutterjohn.com
>
> "The Forest And The Sea"
> Out on Staubgold Records
> June 6th (US) 12th (Rest of the world)
> Staubgold 68 CD/LP
>


July 25, 2007 | 9:20 pm

On 25 Jul 2007, at 21:49, Nic Zwart wrote:
> much more convenient to have a smaller buffer~. I guess now it is
> a design question rather than a technical one: How can I design
> the patch in such a way that it allows live input into a constantly
> recording buffer without throwing a grain over the record point?
>
Thinking out loud ..
I though first that recording sequentially into two buffers and
granulating the one that you’re not recording into might do it, but
that means that you can’t play the audio in any particular buffer
until it’s finished recording, and you might not want that.
How about keeping track of the record head position, and preventing
the play head from going there – have it jump over that position.
(Using some scheme with < and > to increment the play head past the
record head). You might have to do something to smooth the jump (a
longer crossfade using a bit of audio in a tap delay line taking its
input from just before the record head?)

David


July 27, 2007 | 12:38 am

Yeah, it’s kind of a conundrum. I’ll try that play head ignoring thing
though, thanks!

On 7/25/07, David Stevens wrote:
>
>
> On 25 Jul 2007, at 21:49, Nic Zwart wrote:
> > much more convenient to have a smaller buffer~. I guess now it is
> > a design question rather than a technical one: How can I design
> > the patch in such a way that it allows live input into a constantly
> > recording buffer without throwing a grain over the record point?
> >
> Thinking out loud ..
> I though first that recording sequentially into two buffers and
> granulating the one that you’re not recording into might do it, but
> that means that you can’t play the audio in any particular buffer
> until it’s finished recording, and you might not want that.
> How about keeping track of the record head position, and preventing
> the play head from going there – have it jump over that position.
> (Using some scheme with < and > to increment the play head past the
> record head). You might have to do something to smooth the jump (a
> longer crossfade using a bit of audio in a tap delay line taking its
> input from just before the record head?)
>
> David
>


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