Forums > MaxMSP

Poly~ Trouble With My Elementary Beatslicer

November 29, 2008 | 3:48 pm

Hello, I am having strange problems with this beatslicer I am tryiing to build. I believe it’s due to my lack of familiarity with the poly~ object. Attached in the zip is 3 files:

polyslice.pat is the poly~ file
beatSlicer.pat is the main patch for beat slicing.
polysliceDebug.pat is me trying to debug polyslice.pat

However, here’s what gets me: i don’t do anything different in the polysliceDebug.pat from the polyslice.pat file. All I did was add number boxes to check that I was getting the right values. This is what leads me to believe it must that I’m doing something wrong with poly~, however I’ve kept my handling of poly incredibly simple so I don’t really know where I’m going wrong.

Thanks for the help!


November 29, 2008 | 3:51 pm

I forgot to include that the debug patch WORKS, and does exactly what I want the poly patch to do (even though I didn’t change anything from the poly patch).

As a side note:

They really should allow us to edit our messages more than 60 seconds after we post. Even if it was just like 5 minutes, instead of 1, it would be much better. I do not understand why this is not allowed. What’s so bad about correcting yourself?


November 29, 2008 | 10:22 pm

hello,
i think the problem here is the math you are doing inside the poly~. let me look at the patch.

Thanks


November 29, 2008 | 10:31 pm

OK,

I think i have a solution for you. hope you have max 5.

thanks

Luis Marques


November 30, 2008 | 3:43 pm

thanks for the patch, icedragon. however, my intention was to play a single slice from the sample, while your patch plays from the beginning each time for a length determined by the multislider. my idea was that the mutlsider would determine the slice #, so if the sample is divded into 12 part, a multislider value of 8 would play from 7/12ths of the sample to 8/12ths of the sample.

After looking at your patch I got mine to work by having a separate counter for target. Thanks for that bit of wisdom. I guess target is where I was going wrong. I also added a "gate" time, so you can play smaller fractions of the sample if you so choose.

the poly~ patch:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 386 211 48 196617 loadbang;
#P newex 392 26 60 196617 r chopTime;
#P newex 469 212 43 196617 delay 1;
#P newex 268 136 27 196617 f;
#P newex 392 49 27 196617 f;
#P message 531 238 54 196617 1 , mute 0;
#P message 469 238 54 196617 0 , mute 1;
#P newex 469 263 52 196617 thispoly~;
#P newex 330 102 29 196617 * 1.;
#P newex 285 103 29 196617 * 1.;
#P newex 285 187 101 196617 pack 0. 0. 0.;
#P newex 285 68 27 196617 – 1;
#N in 2;
#X comment Slice #;
#P newobj 285 38 25 196617 in 2;
#N in 1;
#X comment trigger sample , 0 for normal playback , 1 for reversed;
#P newobj 160 38 25 196617 in 1;
#P newex 160 59 44 196617 t i b b;
#P newex 160 178 41 196617 sel 0 1;
#P message 285 302 56 196617 $2 , $1 $3;
#P message 160 303 56 196617 $1 , $2 $3;
#P newex 393 69 29 196617 t b f;
#N out~ 1;
#P newobj 161 384 39 196617 out~ 1;
#P newex 160 330 32 196617 line~;
#P newex 160 356 73 196617 play~ chopper;
#P window linecount 3;
#P comment 362 102 100 196617 Determine the length of playback from the buffer;
#P fasten 8 2 17 0 199 166 536 166;
#P connect 16 0 15 0;
#P fasten 17 0 15 0 536 259 474 259;
#P connect 20 0 16 0;
#P fasten 22 0 16 0 391 233 474 233;
#P fasten 2 1 20 0 187 352 440 352 440 195 474 195;
#P connect 18 0 4 0;
#P connect 21 0 18 0;
#P fasten 4 1 13 1 417 94 309 94;
#P fasten 4 1 14 1 417 94 354 94;
#P fasten 4 1 12 2 417 161 380 161;
#P connect 14 0 12 1;
#P fasten 4 0 13 0 398 94 290 94;
#P fasten 4 0 14 0 398 94 335 94;
#P connect 10 0 11 0;
#P fasten 10 0 14 0 290 58 335 58;
#P fasten 7 1 6 0 180 278 290 278;
#P fasten 12 0 5 0 290 278 165 278;
#P connect 12 0 6 0;
#P fasten 19 0 12 0 273 173 290 173;
#P connect 13 0 19 1;
#P connect 11 0 13 0;
#P fasten 8 1 19 0 182 119 273 119;
#P connect 1 0 3 0;
#P connect 2 0 1 0;
#P connect 5 0 2 0;
#P fasten 6 0 2 0 290 324 165 324;
#P connect 7 0 5 0;
#P connect 8 0 7 0;
#P connect 9 0 8 0;
#P window clipboard copycount 23;

the main patch:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 22 25 30 196617 t b b;
#N counter 1 8;
#X flags 0 0;
#P newobj 250 339 66 196617 counter 1 8;
#P message 250 365 53 196617 target $1;
#P message 597 343 43 196617 size $1;
#P user dial 597 361 40 40 746 1 0 0 159 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#P newex 523 422 27 196617 – 0.;
#P newex 523 444 60 196617 s chopTime;
#P newex 523 221 62 196617 prepend set;
#P newex 424 206 27 196617 t b i;
#P toggle 343 342 15 0;
#P newex 326 363 27 196617 i 0;
#P button 22 8 15 0;
#P newex 22 77 71 196617 prepend fetch;
#N counter 1 16;
#X flags 0 0;
#P newobj 22 53 68 196617 counter 1 16;
#P newex 216 50 54 196617 prepend 1;
#P newex 216 70 97 196617 prepend setminmax;
#P number 137 23 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 137 67 66 196617 prepend size;
#P user multiSlider 22 104 410 77 1. 32. 8 2921 15 0 2 2 0 0 0;
#M frgb 14 85 62;
#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 user ezdac~ 326 442 370 475 0;
#P newex 523 286 29 196617 t b f;
#P newex 523 317 29 196617 !/ 1.;
#P number 309 234 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 326 390 87 196617 poly~ polyslice 8;
#P message 612 246 43 196617 replace;
#P user textedit 523 245 607 262 32772 3 9 Busta-Hands-1stVerse.wav;
#P objectname textedit;
#N vpatcher 1179 1000 1779 1400;
#N comlet total length of file;
#P outlet 128 169 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 52 71 51 196617 tosymbol;
#P newex 52 50 56 196617 route text;
#P newex 52 93 81 196617 prepend replace;
#P newex 50 144 105 196617 info~ chopper;
#P newex 52 118 82 196617 buffer~ chopper;
#P inlet 144 28 15 0;
#P inlet 52 30 15 0;
#N comlet Name of file;
#P outlet 141 189 15 0;
#P fasten 3 1 4 0 129 139 55 139;
#P connect 1 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 5 0;
#P fasten 2 0 3 0 149 114 57 114;
#P connect 5 0 3 0;
#P connect 4 6 8 0;
#P connect 4 7 0 0;
#P pop 1;
#P newobj 523 265 87 196617 p chopper_buffer;
#P window linecount 3;
#P comment 55 2 75 196617 BANG TO READ THROUGH MULTISLIDER;
#P window linecount 5;
#P comment 437 104 77 196617 VALUE OF SLIDER CORRESPONDS TO A DIVISION OF THE SAMPLE;
#P window linecount 2;
#P comment 287 207 112 196617 # OF SLICES TO CHOP THE SAMPLE INTO;
#P window linecount 1;
#P comment 640 363 53 196617 GATE SIZE;
#P comment 320 322 100 196617 NORMAL/REVERSE;
#P fasten 23 1 8 1 446 374 408 374;
#P connect 8 0 12 0;
#P connect 8 0 12 1;
#P fasten 29 0 8 0 255 386 331 386;
#P connect 21 0 8 0;
#P fasten 27 0 26 0 602 407 528 407;
#P connect 7 0 5 1;
#P connect 28 0 27 0;
#P connect 10 0 26 0;
#P fasten 10 0 28 0 528 339 602 339;
#P connect 11 1 10 1;
#P connect 26 0 25 0;
#P connect 11 0 10 0;
#P fasten 9 0 17 0 314 257 522 257 522 43 221 43;
#P fasten 9 0 10 0 314 278 512 278 512 310 528 310;
#P connect 5 0 11 0;
#P connect 6 0 5 0;
#P connect 24 0 6 0;
#P fasten 5 1 24 0 605 296 669 296 669 206 528 206;
#P connect 13 1 23 0;
#P connect 22 0 21 1;
#P fasten 23 0 21 0 429 309 331 309;
#P connect 30 0 29 0;
#P fasten 31 1 30 0 47 48 12 48 12 298 255 298;
#P connect 17 0 16 0;
#P connect 15 0 14 0;
#P fasten 15 0 18 4 142 45 83 45;
#P connect 19 0 13 0;
#P connect 16 0 13 0;
#P connect 14 0 13 0;
#P connect 18 0 19 0;
#P connect 31 0 18 0;
#P connect 20 0 31 0;
#P window clipboard copycount 32;


November 30, 2008 | 9:36 pm

hello,
I’m glad i help, the target message tells poly~ which voice must be created and active, while the line~ don’t kill it.
I found a problem on your new version, which is the Dial object Must Float Output in the properties menu, or else max crashes, at least here, on max 5.0.5. If you really want to play only slices from your sample, why don’t you check slice~ object it will play only the slice you choose.

http://www.naotokui.com/2002/02/maxmsp-objects-2002/

Thanks

Luis Marques


December 1, 2008 | 3:01 am

yes, i understand what target does. i’m currently using max 4 so i wasn’t aware of that bug, but am happy you found a solution. i think i "really" am playing slices from my sample, no need for an external object.


December 1, 2008 | 10:57 am


December 1, 2008 | 11:01 am


December 1, 2008 | 12:07 pm

i made a patch where the crash can be reproduced. how can i send it to support? thanks


December 2, 2008 | 6:35 am


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