argh! still struggling with poly~

Aug 2, 2007 at 10:18pm

argh! still struggling with poly~

So here’s a chunk of my patch.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 98 392 53 196617 target $1;
#N counter 0 1 12;
#X flags 0 0;
#P newobj 67 354 77 196617 counter 0 1 12;
#P button 69 326 15 0;
#P hidden inlet 269 22 15 0;
#P hidden inlet 254 22 15 0;
#P newex 278 438 51 196617 r cymvel;
#P newex 182 459 107 196617 poly~ cympbspeed 12;
#P outlet 243 484 15 0;
#P outlet 225 484 15 0;
#P hidden message 200 184 39 196617 set $1;
#P hidden message 156 184 39 196617 set $1;
#P hidden newex 229 50 48 196617 loadbang;
#P hidden newex 109 205 61 196617 r cymAtrig;
#P hidden newex 86 35 97 196617 record~ cymbalA 2;
#P hidden button 68 184 15 0;
#P hidden newex 68 203 27 196617 f;
#P hidden newex 109 226 29 196617 * 1.;
#P hidden newex 68 247 78 196617 pack 0. 0. 0. 0.;
#P hidden newex 109 184 29 196617 !- 0.;
#P hidden message 186 35 66 196617 set cymbalA;
#P window setfont “Sans Serif” 12.;
#P flonum 180 68 68 12 0. 0 1 3 0 0 0 157 203 255 222 222 222 0 0 0;
#P toggle 25 47 40 0;
#P flonum 109 68 68 12 0. 0 1 3 0 0 0 157 203 255 222 222 222 0 0 0;
#P window setfont “Sans Serif” 9.;
#P user waveform~ 25 91 223 89 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 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P comment 109 55 57 196617 start time;
#P comment 180 55 49 196617 end time;
#P comment 13 34 69 196617 record on/off;
#P window setfont “Sans Serif” 14.;
#P comment 97 33 81 196622 CYMBAL A;
#B frgb 49 27 170;
#P connect 10 0 25 0;
#P connect 10 0 21 0;
#P hidden connect 8 0 4 0;
#P hidden connect 13 0 12 0;
#P hidden connect 12 0 10 0;
#P hidden connect 6 0 14 0;
#P hidden connect 23 0 14 0;
#P hidden connect 17 0 5 0;
#P hidden connect 15 0 11 0;
#P hidden connect 24 0 14 1;
#P hidden connect 9 0 11 1;
#P hidden connect 5 0 4 2;
#P hidden connect 11 0 10 3;
#P hidden connect 11 0 13 0;
#P hidden connect 4 2 17 0;
#P hidden connect 4 2 9 0;
#P hidden connect 4 2 12 1;
#P connect 25 0 26 0;
#P hidden connect 18 0 7 0;
#P hidden connect 7 0 4 3;
#P hidden connect 16 0 8 0;
#P connect 26 0 27 0;
#P hidden connect 4 3 18 0;
#P hidden connect 4 3 9 1;
#P hidden connect 4 3 10 2;
#P connect 27 0 21 0;
#P connect 21 0 19 0;
#P connect 21 1 20 0;
#P connect 22 0 21 3;
#P window clipboard copycount 28;

pack sends a list to the first inlet of the poly~ object. This inlet is connected to line~, which is connected to play~.
I have it set up this way so the user can edit the start and end points of their samples in the patch itself. Also, part of that list controls playback speed in realtime, which is why there’s a * object feeding pack’s last inlet.
Anyway, sending “target $1″ with the number from the counter feeding $1 seems to get this to work, but my understanding was that this isn’t the normal operation. I’ve tried “prepend note” and “note $1″ with no/limited success. Suggestions?
Also, is this the correct use of thispoly~

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 466 405 52 196617 thispoly~;
#N out~ 2;
#X comment ch 2 out;
#P newobj 424 405 39 196617 out~ 2;
#N out~ 1;
#X comment ch 1 out;
#P newobj 382 405 39 196617 out~ 1;
#P newex 558 340 71 196617 * 0.007874;
#N in 4;
#X comment raw velocity inlet;
#P newobj 558 319 25 196617 in 4;
#P newex 412 377 27 196617 *~;
#P newex 382 377 27 196617 *~;
#N in 3;
#X comment cymbalC list inlet;
#P newobj 470 263 25 196617 in 3;
#N in 2;
#X comment cymbalB list inlet;
#P newobj 382 263 25 196617 in 2;
#N in 1;
#X comment cymbalA list inlet;
#P newobj 293 263 25 196617 in 1;
#P newex 470 291 32 196617 line~;
#P newex 382 291 32 196617 line~;
#P newex 293 291 32 196617 line~;
#P newex 470 319 85 196617 play~ cymbalC 2;
#P newex 382 319 85 196617 play~ cymbalB 2;
#P newex 293 319 86 196617 play~ cymbalA 2;
#P connect 11 0 12 0;
#P connect 5 0 2 0;
#P connect 8 0 5 0;
#P connect 9 0 13 0;
#P connect 9 0 15 0;
#P connect 10 0 14 0;
#P connect 10 0 15 0;
#P connect 12 0 9 1;
#P connect 12 0 10 1;
#P connect 2 1 10 0;
#P connect 1 1 10 0;
#P connect 0 1 10 0;
#P connect 2 0 9 0;
#P connect 1 0 9 0;
#P connect 0 0 9 0;
#P connect 4 0 1 0;
#P connect 7 0 4 0;
#P connect 3 0 0 0;
#P connect 6 0 3 0;
#P window clipboard copycount 16;

Thanks!

#33141
Aug 3, 2007 at 1:08am

hi,
[prepend note] and [note $1] have the same function.
For a list you should use the prepend method.
peace

a
______________________________________________________
master patch :
______________________________________________________

max v2;
#N vpatcher 364 63 867 655;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 304 78 38 9109513 replace;
#P newex 154 258 27 9109513 f 1.;
#P button 154 236 15 0;
#P flonum 171 236 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 148 392 206 9109513 159938.96875 0. 162256.921875 2317.959473;
#P newex 148 366 57 9109513 prepend set;
#P newex 304 142 88 9109513 buffer~ cymbalC 2;
#P newex 304 121 87 9109513 buffer~ cymbalB 2;
#P user ezdac~ 431 134 475 167 0;
#P number 168 474 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 74 341 84 9109513 t l l;
#P newex 304 100 87 9109513 buffer~ cymbalA 2;
#P newex 74 367 62 9109513 prepend note;
#P inlet 275 39 15 0;
#P inlet 260 39 15 0;
#P newex 167 418 51 9109513 r cymvel;
#P newex 74 443 105 9109513 poly~ cympbspeed 12;
#P outlet 121 476 15 0;
#P outlet 74 475 15 0;
#P message 206 201 39 9109513 set $1;
#P message 162 201 39 9109513 set $1;
#P newex 235 67 48 9109513 loadbang;
#P newex 190 258 61 9109513 r cymAtrig;
#P newex 98 31 97 9109513 record~ cymbalA 2;
#P button 74 246 15 0;
#P newex 74 265 27 9109513 f;
#P newex 140 290 29 9109513 * 1.;
#P newex 74 316 78 9109513 pack 0. 0. 0. 0.;
#P newex 115 238 29 9109513 !- 0.;
#P message 192 52 66 9109513 set cymbalA;
#P window setfont “Sans Serif” 12.;
#P flonum 186 85 68 12 0. 0 1 139 0 0 0 157 203 255 222 222 222 0 0 0;
#P toggle 31 64 40 0;
#P flonum 115 85 68 12 0. 0 1 139 0 0 0 157 203 255 222 222 222 0 0 0;
#P window setfont “Sans Serif” 9.;
#P user waveform~ 31 108 223 89 139 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 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P comment 115 72 57 9109513 start time;
#P comment 186 72 49 9109513 end time;
#P comment 19 51 69 9109513 record on/off;
#P window setfont “Sans Serif” 14.;
#P comment 103 50 81 9109518 CYMBAL A;
#B frgb 49 27 170;
#P connect 8 0 4 0;
#P connect 11 0 13 0;
#P connect 13 0 12 0;
#P connect 12 0 10 0;
#P connect 10 0 27 0;
#P connect 27 0 25 0;
#P connect 25 0 21 0;
#P connect 21 0 19 0;
#P connect 4 2 12 1;
#P connect 23 0 14 0;
#P connect 6 0 14 0;
#P connect 17 0 5 0;
#P connect 4 2 9 0;
#P connect 4 3 10 2;
#P connect 21 1 20 0;
#P connect 24 0 14 1;
#P connect 4 3 9 1;
#P connect 5 0 4 2;
#P connect 36 0 11 0;
#P connect 15 0 11 0;
#P connect 11 0 10 3;
#P connect 27 1 32 0;
#P connect 32 0 33 0;
#P connect 35 0 36 0;
#P connect 9 0 11 1;
#P connect 4 2 17 0;
#P connect 22 0 21 3;
#P connect 21 2 28 0;
#P connect 34 0 36 1;
#P connect 18 0 7 0;
#P connect 7 0 4 3;
#P connect 16 0 8 0;
#P connect 4 3 18 0;
#P connect 37 0 26 0;
#P pop;

______________________________________________________
cympbspeed.pat
______________________________________________________

max v2;
#N vpatcher 378 45 886 338;
#P window setfont “Sans Serif” 9.;
#P message 135 130 14 9109513 0;
#P newex 27 70 179 9109513 t l 1 b;
#N out 1;
#P newobj 195 207 29 9109513 out 1;
#P newex 195 174 52 9109513 thispoly~;
#N out~ 2;
#X comment ch 2 out;
#P newobj 103 207 39 9109513 out~ 2;
#N out~ 1;
#X comment ch 1 out;
#P newobj 27 206 39 9109513 out~ 1;
#P newex 303 153 71 9109513 * 0.007874;
#N in 4;
#X comment raw velocity inlet;
#P newobj 303 126 25 9109513 in 4;
#P newex 102 174 28 9109513 *~ 1.;
#P newex 27 173 32 9109513 *~ 1.;
#N in 3;
#X comment cymbalC list inlet;
#P newobj 391 44 25 9109513 in 3;
#N in 2;
#X comment cymbalB list inlet;
#P newobj 303 44 25 9109513 in 2;
#N in 1;
#X comment cymbalA list inlet;
#P newobj 27 45 25 9109513 in 1;
#P newex 391 72 32 9109513 line~;
#P newex 303 72 32 9109513 line~;
#P newex 27 99 32 9109513 line~;
#P newex 391 100 85 9109513 play~ cymbalC 2;
#P newex 303 100 85 9109513 play~ cymbalB 2;
#P newex 27 127 86 9109513 play~ cymbalA 2;
#P connect 6 0 17 0;
#P connect 17 0 3 0;
#P connect 3 0 0 0;
#P connect 0 0 9 0;
#P connect 9 0 13 0;
#P connect 0 1 10 0;
#P connect 10 0 14 0;
#P fasten 3 1 18 0 54 122 140 122;
#P connect 17 2 15 0;
#P fasten 17 1 15 0 116 97 200 97;
#P fasten 18 0 15 0 140 155 200 155;
#P connect 15 0 16 0;
#P connect 7 0 4 0;
#P connect 4 0 1 0;
#P connect 11 0 12 0;
#P connect 8 0 5 0;
#P connect 5 0 2 0;
#P pop;

#109968

You must be logged in to reply to this topic.