Forums > MaxMSP

help with my granular patch

January 20, 2009 | 4:31 pm

hey kiddos

i’m working on a granular patch from scratch, and so far it’s been going quite well.

this one functions in a way, but i’m still dealing with the grains being to far apart (i think) so the texture of the outcome is really bumpy. if i set the grain size pretty big i get this annoying hann fade at the beginning and end of the loop…

any thoughts on how i could eliminate this problem? maybe by delaying one of the signals? (hasn’t worked for me so far)

check it out;

max v2;
#N vpatcher 96 44 734 728;
#P origin 0 -29;
#P window setfont "Sans Serif" 9.;
#P number 371 280 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 290 329 48 196617 loadbang;
#B color 8;
#P newex 59 361 33 196617 r end;
#B color 2;
#P newex 16 361 41 196617 r start;
#B color 2;
#P toggle 344 280 15 0;
#P newex 344 299 37 196617 metro;
#B color 14;
#P newex 102 277 70 196617 r sampl.lengd;
#B color 5;
#P newex 250 277 70 196617 r sampl.lengd;
#B color 5;
#N counter;
#X flags 0 0;
#P newobj 174 298 88 196617 counter;
#P message 174 277 41 196617 min $1;
#P message 26 278 41 196617 min $1;
#N counter;
#X flags 0 0;
#P newobj 26 298 88 196617 counter;
#P number 164 322 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 16 322 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 164 342 33 196617 s end;
#B color 2;
#P newex 16 342 41 196617 s start;
#B color 2;
#N vpatcher 834 475 1434 875;
#P inlet 292 68 15 0;
#P inlet 230 63 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 199 111 72 196617 receive~ sig;
#B color 14;
#P newex 223 131 48 196617 loadbang;
#B color 14;
#P message 223 151 37 196617 loop 1;
#P newex 223 243 68 196617 send~ grain3;
#B color 11;
#P message 345 170 62 196617 set triangle;
#B color 15;
#P message 295 170 47 196617 set hann;
#B color 15;
#P newex 223 220 69 196617 *~;
#B color 14;
#P newex 282 198 63 196617 wave~ hann;
#B color 14;
#P newex 223 170 69 196617 groove~ polo;
#B color 14;
#P connect 7 0 6 0;
#P connect 8 0 0 0;
#P connect 6 0 0 0;
#P connect 0 0 2 0;
#P connect 2 0 5 0;
#P connect 9 0 0 1;
#P connect 10 0 0 2;
#P connect 0 1 1 0;
#P connect 3 0 1 0;
#P connect 4 0 1 0;
#P connect 1 0 2 1;
#P pop;
#P newobj 132 385 53 196617 p grainy3;
#P newex 385 484 49 196617 delay~ 6;
#B color 11;
#P toggle 385 385 15 0;
#P newex 385 406 46 196617 metro 5;
#P button 385 426 15 0;
#P newex 385 464 92 196617 receive~ scatter3;
#B color 11;
#N vpatcher 793 369 1397 814;
#P origin 0 -17;
#P inlet 417 81 15 0;
#P inlet 379 82 15 0;
#P button 379 101 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 355 245 64 196617 random 400;
#P newex 341 227 64 196617 random 800;
#P newex 327 209 64 196617 random 500;
#P newex 313 191 64 196617 random 400;
#P newex 299 173 64 196617 random 400;
#P newex 285 155 64 196617 random 500;
#P newex 271 137 64 196617 random 400;
#P newex 257 119 64 196617 random 100;
#P newex 236 266 129 196617 delay~;
#P newex 222 248 129 196617 delay~;
#P newex 208 230 129 196617 delay~;
#P newex 194 212 129 196617 delay~;
#P newex 180 194 129 196617 delay~;
#P newex 166 176 129 196617 delay~;
#P newex 152 158 129 196617 delay~;
#P newex 19 351 78 196617 send~ scatter3;
#P newex 138 140 129 196617 delay~;
#P newex 331 34 82 196617 receive~ grain3;
#P connect 1 0 2 0;
#P lcolor 6;
#P connect 3 0 2 0;
#P lcolor 6;
#P connect 4 0 2 0;
#P lcolor 6;
#P connect 5 0 2 0;
#P lcolor 6;
#P connect 6 0 2 0;
#P lcolor 6;
#P connect 7 0 2 0;
#P lcolor 6;
#P connect 8 0 2 0;
#P lcolor 6;
#P connect 9 0 2 0;
#P lcolor 6;
#P connect 0 0 1 0;
#P lcolor 6;
#P connect 0 0 3 0;
#P lcolor 6;
#P connect 0 0 4 0;
#P lcolor 6;
#P connect 0 0 5 0;
#P lcolor 6;
#P connect 0 0 6 0;
#P lcolor 6;
#P connect 0 0 7 0;
#P lcolor 6;
#P connect 0 0 8 0;
#P lcolor 6;
#P connect 0 0 9 0;
#P lcolor 6;
#P connect 18 0 10 0;
#P connect 10 0 1 1;
#P connect 18 0 11 0;
#P connect 11 0 3 1;
#P connect 18 0 12 0;
#P connect 12 0 4 1;
#P connect 18 0 13 0;
#P connect 13 0 5 1;
#P connect 20 0 10 1;
#P connect 18 0 14 0;
#P connect 14 0 6 1;
#P connect 20 0 11 1;
#P connect 18 0 15 0;
#P connect 15 0 7 1;
#P connect 20 0 12 1;
#P connect 18 0 16 0;
#P connect 16 0 8 1;
#P connect 20 0 13 1;
#P connect 18 0 17 0;
#P connect 17 0 9 1;
#P connect 20 0 14 1;
#P connect 19 0 18 0;
#P connect 20 0 15 1;
#P connect 20 0 16 1;
#P connect 20 0 17 1;
#P pop;
#P newobj 385 444 51 196617 p scatter;
#B color 11;
#N vpatcher 834 44 1434 444;
#P inlet 292 68 15 0;
#P inlet 230 63 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 199 111 72 196617 receive~ sig;
#B color 14;
#P newex 223 131 48 196617 loadbang;
#B color 14;
#P message 223 151 37 196617 loop 1;
#P newex 223 243 68 196617 send~ grain2;
#B color 11;
#P message 345 170 62 196617 set triangle;
#B color 15;
#P message 295 170 47 196617 set hann;
#B color 15;
#P newex 223 220 69 196617 *~;
#B color 14;
#P newex 282 198 63 196617 wave~ hann;
#B color 14;
#P newex 223 170 69 196617 groove~ polo;
#B color 14;
#P connect 7 0 6 0;
#P connect 6 0 0 0;
#P connect 8 0 0 0;
#P connect 0 0 2 0;
#P connect 2 0 5 0;
#P connect 9 0 0 1;
#P connect 10 0 0 2;
#P connect 4 0 1 0;
#P connect 3 0 1 0;
#P connect 0 1 1 0;
#P connect 1 0 2 1;
#P pop;
#P newobj 77 385 53 196617 p grainy2;
#P newex 5 436 52 196617 send~ sig;
#B color 14;
#P newex 290 484 49 196617 delay~ 9;
#B color 11;
#P toggle 290 385 15 0;
#P newex 290 406 46 196617 metro 5;
#P button 290 426 15 0;
#P newex 290 464 92 196617 receive~ scatter2;
#B color 11;
#N vpatcher 793 369 1397 814;
#P origin 0 -17;
#P inlet 417 81 15 0;
#P inlet 379 82 15 0;
#P button 379 101 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 355 245 64 196617 random 400;
#P newex 341 227 64 196617 random 400;
#P newex 327 209 64 196617 random 400;
#P newex 313 191 64 196617 random 400;
#P newex 299 173 64 196617 random 400;
#P newex 285 155 64 196617 random 400;
#P newex 271 137 64 196617 random 400;
#P newex 257 119 64 196617 random 400;
#P newex 236 266 129 196617 delay~;
#P newex 222 248 129 196617 delay~;
#P newex 208 230 129 196617 delay~;
#P newex 194 212 129 196617 delay~;
#P newex 180 194 129 196617 delay~;
#P newex 166 176 129 196617 delay~;
#P newex 152 158 129 196617 delay~;
#P newex 19 351 78 196617 send~ scatter2;
#P newex 138 140 129 196617 delay~;
#P newex 331 34 82 196617 receive~ grain2;
#P connect 1 0 2 0;
#P lcolor 6;
#P connect 3 0 2 0;
#P lcolor 6;
#P connect 4 0 2 0;
#P lcolor 6;
#P connect 5 0 2 0;
#P lcolor 6;
#P connect 6 0 2 0;
#P lcolor 6;
#P connect 7 0 2 0;
#P lcolor 6;
#P connect 8 0 2 0;
#P lcolor 6;
#P connect 9 0 2 0;
#P lcolor 6;
#P connect 0 0 1 0;
#P lcolor 6;
#P connect 0 0 3 0;
#P lcolor 6;
#P connect 0 0 4 0;
#P lcolor 6;
#P connect 0 0 5 0;
#P lcolor 6;
#P connect 0 0 6 0;
#P lcolor 6;
#P connect 0 0 7 0;
#P lcolor 6;
#P connect 0 0 8 0;
#P lcolor 6;
#P connect 0 0 9 0;
#P lcolor 6;
#P connect 18 0 10 0;
#P connect 10 0 1 1;
#P connect 18 0 11 0;
#P connect 11 0 3 1;
#P connect 18 0 12 0;
#P connect 12 0 4 1;
#P connect 18 0 13 0;
#P connect 13 0 5 1;
#P connect 20 0 10 1;
#P connect 18 0 14 0;
#P connect 14 0 6 1;
#P connect 20 0 11 1;
#P connect 18 0 15 0;
#P connect 15 0 7 1;
#P connect 20 0 12 1;
#P connect 18 0 16 0;
#P connect 16 0 8 1;
#P connect 20 0 13 1;
#P connect 18 0 17 0;
#P connect 17 0 9 1;
#P connect 20 0 14 1;
#P connect 19 0 18 0;
#P connect 20 0 15 1;
#P connect 20 0 16 1;
#P connect 20 0 17 1;
#P pop;
#P newobj 290 444 51 196617 p scatter;
#B color 11;
#P toggle 201 385 15 0;
#P newex 201 406 46 196617 metro 5;
#P button 201 426 15 0;
#P newex 5 481 62 196617 send~ grain;
#B color 11;
#P newex 201 464 86 196617 receive~ scatter;
#B color 11;
#N vpatcher 753 347 1357 792;
#P origin 0 -17;
#P inlet 379 82 15 0;
#P button 379 101 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 355 245 64 196617 random 200;
#P newex 341 227 64 196617 random 200;
#P newex 327 209 64 196617 random 200;
#P newex 313 191 64 196617 random 200;
#P newex 299 173 64 196617 random 200;
#P newex 285 155 64 196617 random 200;
#P newex 271 137 64 196617 random 200;
#P newex 257 119 64 196617 random 200;
#P window linecount 1;
#P newex 236 266 129 196617 delay~;
#P newex 222 248 129 196617 delay~;
#P newex 208 230 129 196617 delay~;
#P newex 194 212 129 196617 delay~;
#P newex 180 194 129 196617 delay~;
#P newex 166 176 129 196617 delay~;
#P newex 152 158 129 196617 delay~;
#P newex 19 351 72 196617 send~ scatter;
#P newex 138 140 129 196617 delay~;
#P window linecount 0;
#P newex 331 34 76 196617 receive~ grain;
#P connect 1 0 2 0;
#P lcolor 6;
#P connect 3 0 2 0;
#P lcolor 6;
#P connect 4 0 2 0;
#P lcolor 6;
#P connect 5 0 2 0;
#P lcolor 6;
#P connect 6 0 2 0;
#P lcolor 6;
#P connect 7 0 2 0;
#P lcolor 6;
#P connect 8 0 2 0;
#P lcolor 6;
#P connect 9 0 2 0;
#P lcolor 6;
#P connect 0 0 1 0;
#P lcolor 6;
#P connect 0 0 3 0;
#P lcolor 6;
#P connect 0 0 4 0;
#P lcolor 6;
#P connect 0 0 5 0;
#P lcolor 6;
#P connect 0 0 6 0;
#P lcolor 6;
#P connect 0 0 7 0;
#P lcolor 6;
#P connect 0 0 8 0;
#P lcolor 6;
#P connect 0 0 9 0;
#P lcolor 6;
#P connect 18 0 10 0;
#P connect 10 0 1 1;
#P connect 18 0 11 0;
#P connect 11 0 3 1;
#P connect 18 0 12 0;
#P connect 12 0 4 1;
#P connect 18 0 13 0;
#P connect 13 0 5 1;
#P connect 18 0 14 0;
#P connect 14 0 6 1;
#P connect 18 0 15 0;
#P connect 15 0 7 1;
#P connect 18 0 16 0;
#P connect 16 0 8 1;
#P connect 18 0 17 0;
#P connect 17 0 9 1;
#P connect 19 0 18 0;
#P pop;
#P newobj 201 444 51 196617 p scatter;
#B color 11;
#P newex 158 184 78 196617 prepend symbol;
#B color 5;
#P message 158 205 35 196617 set $1;
#P newex 158 164 49 196617 tosymbol;
#B color 5;
#P message 16 242 114 196617 drone.wav;
#P newex 90 21 48 196617 loadbang;
#B color 6;
#P newex 90 81 106 196617 buffer~ triangle 11.5;
#B color 6;
#N vpatcher 928 370 1265 739;
#P setbglock 1;
#P window setfont "Sans Serif" 9.;
#P newex 230 91 50 196617 line 0. 1.;
#P message 230 71 56 196617 1. , 0. 256;
#P newex 173 91 50 196617 line 0. 1.;
#P message 173 71 56 196617 0. , 1. 256;
#P newex 106 159 54 196617 pack 0. 0.;
#P newex 108 90 50 196617 line 0. 1.;
#P message 108 70 68 196617 0. , 512. 512;
#P button 108 50 15 0;
#P outlet 103 182 15 0;
#P inlet 84 33 15 0;
#P connect 5 0 1 0;
#P connect 4 0 5 0;
#P connect 0 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 7 0 5 1;
#P connect 9 0 5 1;
#P connect 2 0 6 0;
#P connect 6 0 7 0;
#P connect 7 1 8 0;
#P connect 8 0 9 0;
#P pop;
#P newobj 90 41 81 196617 p make-triangle;
#B color 6;
#P newex 90 61 74 196617 peek~ triangle;
#B color 6;
#P message 132 406 62 196617 set triangle;
#B color 15;
#P message 77 406 47 196617 set hann;
#B color 15;
#P message 382 622 29 196617 stop;
#B color 11;
#P newex 59 322 48 196617 loadbang;
#P message 59 342 37 196617 loop 1;
#P message 313 622 67 196617 startwindow;
#B color 11;
#P message 211 506 20 196617 64;
#B color 11;
#P newex 211 485 48 196617 loadbang;
#B color 11;
#P user hslider 211 524 13 50 128 1 0 11;
#N vpatcher 20 74 620 474;
#N comlet;
#P outlet 258 210 15 0;
#N comlet;
#P outlet 223 211 15 0;
#N comlet;
#P inlet 215 92 15 0;
#N comlet;
#P inlet 262 97 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 258 166 27 196617 + 1.;
#P newex 258 146 34 196617 * -1.;
#P newex 258 125 40 196617 / 127.;
#P flonum 258 186 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 215 125 40 196617 / 127.;
#P flonum 215 146 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 6 0 1 0;
#P connect 1 0 0 0;
#P connect 0 0 8 0;
#P connect 7 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 2 0;
#P connect 2 0 9 0;
#P pop;
#P newobj 211 601 99 196617 patcher pan;
#B color 11;
#P newex 290 622 20 196617 *~;
#B color 9;
#P newex 201 622 20 196617 *~;
#B color 9;
#P newex 201 646 99 196617 dac~;
#B color 9;
#P newex 5 458 69 196617 *~;
#B color 14;
#P newex 64 436 63 196617 wave~ hann;
#B color 14;
#P newex 83 184 70 196617 r sampl.lengd;
#B color 14;
#P message 83 205 43 196617 size $1;
#B color 14;
#P flonum 5 203 35 9 -2. 2. 3 3 0 0 0 255 191 193 222 222 222 0 0 0;
#P newex 5 222 29 196617 sig~;
#B color 14;
#P user rslider 16 260 592 11 24559 1 0 14 0;
#P newex 5 184 70 196617 s sampl.lengd;
#B color 5;
#P newex 5 406 69 196617 groove~ polo;
#B color 14;
#P flonum 5 166 75 9 0 0 32 3 0 0 0 255 243 141 222 222 222 0 0 0;
#P newex 5 21 48 196617 loadbang;
#B color 6;
#P newex 5 143 105 196617 info~ polo;
#B color 5;
#P message 5 101 43 196617 replace;
#B color 5;
#P newex 5 120 65 196617 buffer~ polo;
#B color 5;
#P newex 5 81 82 196617 buffer~ hann 12;
#B color 6;
#N vpatcher 489 485 893 893;
#P setbglock 1;
#P window setfont "Sans Serif" 9.;
#P newex 147 147 34 196617 – 512;
#P newex 126 178 38 196617 / 511.;
#P newex 126 201 27 196617 * 2.;
#P message 186 201 23 196617 1.;
#P newex 186 178 23 196617 t b;
#P newex 126 124 70 196617 split 384 512;
#P newex 78 103 58 196617 split 0 128;
#P button 73 40 15 0;
#P newex 78 201 27 196617 * 2.;
#P comment 229 247 127 196617 Sqrt for two Overlap;
#P newex 78 225 278 196617 expr 0.5 * (1 + cos((3.14159 + 3.14159*2* $f1)));
#P newex 151 245 75 196617 expr sqrt($f1);
#P comment 246 207 50 196617 hanning;
#P outlet 39 303 15 0;
#P inlet 46 33 15 0;
#P newex 78 178 38 196617 / 511.;
#P newex 46 62 43 196617 Uzi 512;
#P newex 78 83 27 196617 – 1;
#P newex 39 276 49 196617 pack 0 0.;
#P connect 1 0 0 0;
#P connect 0 0 5 0;
#P connect 4 0 2 0;
#P connect 11 0 2 0;
#P connect 2 2 1 0;
#P connect 1 0 12 0;
#P connect 12 0 3 0;
#P connect 3 0 10 0;
#P connect 10 0 8 0;
#P connect 16 0 8 0;
#P connect 7 0 0 1;
#P connect 8 0 0 1;
#P connect 15 0 0 1;
#P connect 12 1 13 0;
#P connect 13 0 17 0;
#P connect 17 0 16 0;
#P connect 13 0 18 0;
#P connect 13 1 14 0;
#P connect 14 0 15 0;
#P pop;
#P newobj 5 41 75 196617 p make-hanning;
#B color 6;
#P newex 5 61 59 196617 peek~ hann;
#B color 6;
#P connect 6 0 1 0;
#P connect 1 0 0 0;
#P connect 4 0 3 0;
#P fasten 3 1 5 0 65 140 10 140;
#P fasten 5 6 7 0 88 163 10 163;
#P connect 7 0 9 0;
#P connect 12 0 11 0;
#P fasten 25 0 8 0 64 396 10 396;
#P connect 11 0 8 0;
#P lcolor 15;
#P connect 11 0 50 0;
#P connect 8 0 16 0;
#P connect 16 0 40 0;
#P fasten 36 0 34 0 163 240 21 240;
#P hidden fasten 13 0 10 0 88 240 21 240;
#P connect 10 0 61 0;
#P connect 63 0 61 0;
#P connect 61 0 59 0;
#P connect 10 0 64 0;
#P fasten 69 0 63 0 349 368 157 368 157 296 31 296;
#P connect 64 0 63 0;
#P fasten 71 0 8 1 21 392 39 392;
#P connect 26 0 25 0;
#P fasten 72 0 8 2 64 392 68 392;
#P connect 29 0 15 0;
#P connect 28 0 15 0;
#P connect 8 1 15 0;
#P connect 15 0 16 1;
#P fasten 71 0 51 0 21 381 82 381;
#P connect 14 0 13 0;
#P connect 33 0 31 0;
#P connect 31 0 30 0;
#P connect 68 0 63 4;
#P fasten 72 0 51 1 64 381 125 381;
#P fasten 71 0 58 0 21 381 137 381;
#P fasten 5 7 35 0 101 162 163 162;
#P connect 35 0 37 0;
#P connect 37 0 36 0;
#P fasten 10 1 62 0 603 319 169 319;
#P connect 66 0 62 0;
#P connect 62 0 60 0;
#P fasten 10 1 65 0 603 273 179 273;
#P connect 65 0 66 0;
#P fasten 69 0 66 0 349 368 157 368 157 296 179 296;
#P fasten 72 0 58 1 64 381 180 381;
#P connect 73 0 43 0;
#P connect 43 0 42 0;
#P connect 42 0 41 0;
#P connect 41 0 38 0;
#P connect 57 0 18 0;
#P lcolor 6;
#P connect 39 0 18 0;
#P lcolor 6;
#P connect 18 0 17 0;
#P connect 22 0 23 0;
#P connect 23 0 21 0;
#P connect 21 0 20 0;
#P connect 20 0 18 1;
#P connect 67 0 66 4;
#P connect 73 0 48 0;
#P connect 48 0 47 0;
#P connect 47 0 46 0;
#P connect 46 0 44 0;
#P connect 45 0 49 0;
#P connect 49 0 19 0;
#P lcolor 6;
#P connect 57 0 19 0;
#P lcolor 6;
#P fasten 27 0 17 1 387 642 295 642;
#P fasten 24 0 17 1 318 642 295 642;
#P connect 19 0 17 1;
#P fasten 21 0 20 1 216 547 305 547;
#P fasten 20 1 19 1 305 614 305 614;
#P fasten 73 0 70 0 295 350 341 350 341 277 349 277;
#P connect 70 0 69 0;
#P connect 74 0 69 1;
#P connect 73 0 56 0;
#P connect 56 0 55 0;
#P connect 55 0 54 0;
#P connect 54 0 52 0;
#P connect 53 0 57 0;
#P pop;


Viewing 1 post (of 1 total)