XML Feeds

.

[maxmsp] Accelerating and decelerating clicks with delays

Peter McCulloch peter.mcculloch at gmail.com
Sat Oct 27 11:25:17 MDT 2007


Here you go.  This uses poly~ and vexpr.  Poly~ isn't producing any  
audio, it's just handling the delay times.  (hence the stupid number  
of instances)  3 patches total.

Peter McCulloch


ClickPlayer.pat

max v2;
#N vpatcher 11 44 696 896;
#P origin 0 14;
#P toggle 172 318 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 172 341 47 196617 gate 1 1;
#P flonum 277 385 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 84 609 107 196617 reson~ 10. 600. 300.;
#P newex 83 520 67 196617 slide~ 1 200;
#P flonum 258 517 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 315 517 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 171 384 87 196617 scale 0 100 0. 1.;
#P newex 171 363 71 196617 drunk 100 10;
#P newex 84 392 27 196617 t l b;
#P flonum 375 516 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 12 213 46 196617 select 9;
#P newex 12 170 40 196617 key;
#P user scope~ 491 488 621 618 256 3 128 -1. 1. 0 0. 0 0. 102 255 51  
135 135 135 0;
#P newex 84 441 61 196617 pack i f 0.2;
#P comment 30 7 50 196617 Generate;
#P button 18 280 40 0;
#P newex 84 334 36 196617 zl reg;
#P user ezdac~ 69 787 113 820 0;
#P user gain~ 84 647 24 100 158 0 1.071519 7.94321 10.;
#P newex 84 496 37 196617 click~;
#P newex 85 467 145 196617 poly~ PM.ClickVoice.pat 1000;
#P newex 84 360 61 196617 listfunnel 1;
#P comment 330 13 88 196617 Randomness (ms);
#P comment 270 13 48 196617 List size;
#P button 33 26 40 0;
#P number 332 33 35 9 0 256 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P newex 84 78 258 196617 PM.TimeDistribution @duration 2000 @start 0  
@skew 1. @random 10 @size 80;
#P user multiSlider 84 120 362 176 0. 10000. 32 2680 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#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 window linecount 1;
#P comment 201 13 57 196617 Skewing;
#P flonum 208 33 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 140 13 57 196617 First Click;
#P flonum 146 33 35 9 0. 10000. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 84 33 55 9 0. 10000. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 270 33 35 9 0 256 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 84 13 48 196617 Duration;
#P comment 23 263 30 196617 Play;
#P connect 24 0 25 0;
#P connect 25 0 20 0;
#P connect 17 0 18 0;
#P connect 16 0 32 0;
#P connect 3 0 9 0;
#P connect 11 0 9 0;
#P connect 9 0 8 0;
#P connect 20 0 19 0;
#P connect 19 0 14 0;
#P connect 14 0 27 0;
#P connect 27 0 22 0;
#P connect 15 0 16 0;
#P connect 32 0 33 0;
#P connect 33 0 17 0;
#P connect 22 0 15 0;
#P connect 17 0 18 1;
#P connect 8 0 19 1;
#P connect 34 0 22 2;
#P connect 29 0 22 2;
#P connect 4 0 9 1;
#P connect 35 0 28 0;
#P connect 28 0 29 0;
#P connect 36 0 35 0;
#P connect 6 0 9 2;
#P connect 27 1 35 1;
#P connect 2 0 9 3;
#P connect 10 0 9 4;
#P connect 16 0 23 0;
#P pop;

PM.ClickVoice.pat:

max v2;
#N vpatcher 419 342 1220 794;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 100 61 37 196617 zl rev;
#P newex 100 157 67 196617 pipe 0. 1000;
#P newex 125 117 29 196617 t i 1;
#P newex 56 281 52 196617 thispoly~;
#N out 1;
#P newobj 152 308 33 196617 out 1;
#P newex 133 228 48 196617 t 0 b f;
#P newex 171 281 74 196617 sprintf set %f;
#P newex 100 84 59 196617 unpack f i i;
#N in 1;
#P newobj 100 32 25 196617 in 1;
#P connect 3 0 5 0;
#P connect 6 1 5 0;
#P connect 0 0 8 0;
#P connect 8 0 1 0;
#P connect 1 0 7 0;
#P connect 1 1 6 0;
#P connect 7 0 3 0;
#P connect 3 1 4 0;
#P connect 2 0 4 0;
#P connect 6 0 7 1;
#P connect 3 2 2 0;
#P pop;

PM.TimeDistribution:

max v2;
#N vpatcher 340 200 1087 664;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 544 56 183 196617 route duration start skew size random;
#P newex 412 58 73 196617 unpack f f i f i;
#P newex 412 32 142 196617 patcherargs 1000. 0. 10 0. 0;
#P comment 45 29 102 196617 PM.TimeDistribution;
#P comment 448 405 126 196617 www.petermcculloch.com;
#P comment 448 390 134 196617 peter.mcculloch at gmail.com;
#P newex 50 269 102 196617 vexpr max($f1\\\,0.);
#N comlet Random amount in ms;
#P inlet 375 57 15 0;
#N vpatcher 30 89 630 489;
#P window setfont "Sans Serif" 9.;
#P window linecount 12;
#P message 100 204 406 196617 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38  
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61  
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84  
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105  
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122  
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139  
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156  
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173  
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190  
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207  
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224  
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241  
242 243 244 245 246 247 248 249;
#P window linecount 1;
#P newex 100 134 78 196617 prepend append;
#P newex 100 108 27 196617 - 1;
#P button 67 50 15 0;
#P newex 66 83 45 196617 Uzi 256;
#P newex 50 173 48 196617 loadbang;
#P outlet 100 356 15 0;
#P connect 3 0 2 0;
#P connect 2 2 4 0;
#P connect 4 0 5 0;
#P connect 1 0 6 0;
#P connect 5 0 6 0;
#P connect 6 0 0 0;
#P pop;
#P newobj 245 57 50 196617 p InitList;
#P newex 429 192 114 196617 loadmess scalarmode 1;
#P newex 290 129 30 196617 t i i;
#P newex 245 155 55 196617 zl slice;
#P newex 50 92 338 196617 bondo 6 n;
#P window linecount 2;
#P newex 50 228 335 196617 vexpr $f2+($f1*pow($f4/$f5\\\,pow(2\\\,-1* 
$f3)))+random(-1*$f6\\\, $f6);
#P window linecount 7;
#P comment 314 259 100 196617 $f1 is duration of clicks \, $f2 is  
time of first click \, $f3 is skew factor \, $f4 is list \, $f5 is  
maximum number in $f4 \, $f6 is randomness;
#N comlet Duration in ms;
#P inlet 50 57 15 0;
#N comlet Offset time in ms;
#P inlet 115 57 15 0;
#N comlet Skew factor. -1 = log.-->0 = lin-->1 = exp.;
#P inlet 180 57 15 0;
#P inlet 310 57 15 0;
#P outlet 50 294 15 0;
#P fasten 19 0 7 0 549 79 55 79;
#P lcolor 10;
#P fasten 18 0 7 0 417 79 55 79;
#P lcolor 7;
#P connect 4 0 7 0;
#P fasten 10 0 6 0 434 221 55 221;
#P connect 7 0 6 0;
#P connect 6 0 13 0;
#P connect 13 0 0 0;
#P fasten 19 1 7 1 583 81 120 81;
#P lcolor 10;
#P fasten 18 1 7 1 432 81 120 81;
#P lcolor 7;
#P connect 3 0 7 1;
#P connect 7 1 6 1;
#P fasten 19 2 7 2 617 83 185 83;
#P lcolor 10;
#P fasten 18 2 7 2 447 83 185 83;
#P lcolor 7;
#P connect 2 0 7 2;
#P connect 7 2 6 2;
#P connect 11 0 7 3;
#P connect 7 3 8 0;
#P connect 8 0 6 3;
#P connect 7 4 9 0;
#P connect 9 0 8 1;
#P fasten 19 3 7 4 651 85 315 85;
#P lcolor 10;
#P fasten 18 3 7 4 462 85 315 85;
#P lcolor 7;
#P connect 1 0 7 4;
#P connect 9 1 6 4;
#P fasten 19 4 7 5 685 87 380 87;
#P lcolor 10;
#P fasten 18 4 7 5 477 87 380 87;
#P lcolor 7;
#P connect 12 0 7 5;
#P connect 7 5 6 5;
#P connect 17 0 18 0;
#P connect 17 1 19 0;
#P pop;




More information about the maxmsp mailing list