ModsquadReduxRedux

Oct 22, 2007 at 12:32am

ModsquadReduxRedux

After checking out as much commentary as I could on the Modsquad patch I decided to put up an alternative strategy that doesn’t give that glitchiness between steps and esp between 1 and 0 because of the way wave~ interpolates the reordered phasor in ModsquadRedux.

Any commentary or suggestion is appreciated.

Thanks,
Joe

max v2;
#N vpatcher 12 44 1156 800;
#P origin 79 28;
#P setbglock 1;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden message 864 196 14 196617 1;
#P hidden newex 863 170 61 196617 delay 1000;
#B color 5;
#P hidden newex 863 145 48 196617 loadbang;
#P comment 517 416 37 196617 Vel.;
#N vpreset 4;
#X append 1 1 48 396 563 multiSlider list 1. 1. 1. 1. 1. 1. 1. 1. ; 4 217 562 multiSlider list 0 1 2 3 4 5 6 7 ; 18 109 166 flonum float 68.996086 ;;
#X append 2 1 48 396 563 multiSlider list 0.980769 0.557692 1. 0.653846 0.307692 0.269231 1. 0.769231 ; 4 217 562 multiSlider list 0 1 2 1 1 2 6 7 ; 18 109 166 flonum float 117. ;;
#X append 3 1 48 396 563 multiSlider list 1. 0. 1. 0. 1. 1. 1. 1. ; 4 217 562 multiSlider list 0 0 0 0 3 2 4 1 ; 18 109 166 flonum float 100.89 ;;
#X append 4 1 48 396 563 multiSlider list 0.980769 0.557692 1. 0.653846 0.307692 0.269231 1. 0.769231 ; 4 217 562 multiSlider list 0 1 2 1 1 2 1 1 ; 18 109 166 flonum float 117. ;;
#P preset 858 235 48 26;
#P newex 324 321 85 196617 index~ ampsteps;
#P message 815 475 33 196617 clear;
#P newex 815 501 104 196617 buffer~ ampsteps 12;
#P newex 726 628 49 196617 pack 0 0.;
#P newex 726 565 49 196617 t b f;
#P message 786 569 14 196617 0;
#P button 786 551 15 0;
#N counter;
#X flags 0 0;
#P newobj 726 597 133 196617 counter;
#P newex 726 543 45 196617 iter;
#P newex 726 656 81 196617 peek~ ampsteps;
#P user multiSlider 563 396 262 54 0. 1. 8 2937 47 0 0 2 0 0 1;
#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 user number~ 514 201 553 216 9 3 3 2 0. 0. 0 0. 20 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 594 47 61 196617 delay 1000;
#B color 5;
#P hidden message 269 65 14 196617 4;
#P hidden newex 269 42 48 196617 loadbang;
#P newex 594 22 48 196617 loadbang;
#P user multiSlider 562 199 264 16 0. 7. 1 2920 47 0 0 2 0 0 1;
#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 hidden newex 562 140 48 196617 loadbang;
#P comment 347 138 58 196617 looplength;
#P flonum 284 136 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 68 341 48 196617 loadbang;
#P newex 251 355 64 196617 *~ 0.125;
#P newex 336 400 54 196617 +~ 0.125;
#B color 5;
#P message 83 387 42 196617 mode 1;
#P newex 166 471 180 196617 wave~ buf;
#P newex 166 432 180 196617 pong~;
#P message 68 425 46 196617 interp 1;
#P newex 166 539 168 196617 *~ 1.;
#P user gain~ 166 577 48 56 158 0 1.071519 7.94321 10.;
#P message 722 477 33 196617 clear;
#P newex 251 321 67 196617 index~ steps;
#P newex 562 625 49 196617 pack 0 0.;
#P newex 562 562 49 196617 t b f;
#P message 622 566 14 196617 0;
#P button 622 548 15 0;
#N counter;
#X flags 0 0;
#P newobj 562 594 133 196617 counter;
#P newex 562 540 45 196617 iter;
#P newex 562 653 63 196617 peek~ steps;
#P comment 331 103 35 196617 beats;
#P comment 226 110 27 196617 bpm;
#P flonum 166 109 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 166 159 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 166 133 113 196617 expr ($f1 / 60.) / $f2;
#B color 5;
#P flonum 284 194 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 269 101 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 284 165 128 196617 expr 60000. / ($f1/ $f2);
#B color 5;
#P button 569 77 15 0;
#P newex 569 101 105 196617 info~ buf;
#P objectname receive~[1];
#P newex 166 191 68 196617 phasor~ 0.25;
#P newex 251 287 35 196617 -~ 0.5;
#P newex 457 48 122 196617 buffer~ buf drumLoop.aif;
#B color 5;
#P message 562 165 79 196617 0 1 2 3 4 5 6 7;
#P newex 722 503 84 196617 buffer~ steps 12;
#P message 457 24 41 196617 replace;
#P user multiSlider 562 217 264 159 0. 7. 8 2921 47 0 0 2 0 0 1;
#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 user ezdac~ 166 686 210 719 0;
#P comment 348 198 64 196617 natural bpm;
#P newex 251 257 35 196617 *~ 8.;
#P window linecount 2;
#P comment 513 299 37 196617 Slice Select;
#P hidden connect 38 0 32 0;
#P hidden connect 38 0 35 0;
#P hidden connect 59 0 18 0;
#P connect 15 0 18 0;
#P connect 18 0 16 0;
#P connect 16 0 17 0;
#P connect 17 0 10 0;
#P connect 10 0 33 0;
#P connect 35 0 33 0;
#P connect 33 0 34 0;
#P connect 32 0 34 0;
#P connect 34 0 31 0;
#P connect 31 0 30 0;
#P connect 30 0 3 0;
#P connect 30 0 3 1;
#P connect 10 0 1 0;
#P connect 1 0 9 0;
#P connect 9 0 28 0;
#P connect 28 0 37 0;
#P connect 37 0 33 1;
#P hidden connect 44 0 45 0;
#P hidden connect 45 0 14 0;
#P connect 14 0 16 1;
#P connect 11 6 39 0;
#P connect 39 0 13 0;
#P connect 13 0 15 0;
#P connect 9 0 58 0;
#P connect 58 0 31 1;
#P connect 37 0 36 0;
#P connect 36 0 33 2;
#P connect 14 0 13 1;
#P connect 5 0 8 0;
#P connect 1 0 47 0;
#P hidden connect 41 0 7 0;
#P connect 47 1 42 0;
#P hidden connect 59 0 4 0;
#P connect 7 0 4 0;
#P connect 4 0 22 0;
#P connect 22 0 26 0;
#P connect 26 0 23 0;
#P connect 23 0 27 0;
#P connect 27 0 21 0;
#P hidden connect 59 0 48 0;
#P connect 46 0 12 0;
#P connect 8 1 12 0;
#P connect 12 0 11 0;
#P connect 43 0 46 0;
#P connect 26 1 27 1;
#P connect 4 0 24 0;
#P connect 24 0 25 0;
#P connect 25 0 23 2;
#P connect 29 0 6 0;
#P connect 48 0 50 0;
#P connect 50 0 54 0;
#P connect 54 0 51 0;
#P connect 51 0 55 0;
#P connect 55 0 49 0;
#P connect 54 1 55 1;
#P connect 48 0 52 0;
#P connect 52 0 53 0;
#P connect 53 0 51 2;
#P connect 57 0 56 0;
#P hidden connect 63 0 59 0;
#P hidden connect 61 0 62 0;
#P hidden connect 62 0 63 0;
#P pop;

#34270
Oct 22, 2007 at 6:31am

first listen sounds great!

#115339
Oct 22, 2007 at 9:36am

its really good, but it gives clips on bass frequencies now…
the kick of the drum beat clips

as a firts glance

On Oct 22, 2007, at 2:32 AM, joseph stewart wrote:

>
> After checking out as much commentary as I could on the Modsquad
> patch I decided to put up an alternative strategy that doesn’t give
> that glitchiness between steps and esp between 1 and 0 because of
> the way wave~ interpolates the reordered phasor in ModsquadRedux.
>
> Any commentary or suggestion is appreciated.
>
> Thanks,
> Joe
>
> max v2;
> #N vpatcher 12 44 1156 800;
> #P origin 79 28;
> #P setbglock 1;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P hidden message 864 196 14 196617 1;
> #P hidden newex 863 170 61 196617 delay 1000;
> #B color 5;
> #P hidden newex 863 145 48 196617 loadbang;
> #P comment 517 416 37 196617 Vel.;
> #N vpreset 4;
> #X append 1 1 48 396 563 multiSlider list 1. 1. 1. 1. 1. 1. 1. 1.
> ; 4 217 562 multiSlider list 0 1 2 3 4 5 6 7 ; 18 109 166 flonum
> float 68.996086 ;;
> #X append 2 1 48 396 563 multiSlider list 0.980769 0.557692 1.
> 0.653846 0.307692 0.269231 1. 0.769231 ; 4 217 562 multiSlider
> list 0 1 2 1 1 2 6 7 ; 18 109 166 flonum float 117. ;;
> #X append 3 1 48 396 563 multiSlider list 1. 0. 1. 0. 1. 1. 1. 1.
> ; 4 217 562 multiSlider list 0 0 0 0 3 2 4 1 ; 18 109 166 flonum
> float 100.89 ;;
> #X append 4 1 48 396 563 multiSlider list 0.980769 0.557692 1.
> 0.653846 0.307692 0.269231 1. 0.769231 ; 4 217 562 multiSlider
> list 0 1 2 1 1 2 1 1 ; 18 109 166 flonum float 117. ;;
> #P preset 858 235 48 26;
> #P newex 324 321 85 196617 index~ ampsteps;
> #P message 815 475 33 196617 clear;
> #P newex 815 501 104 196617 buffer~ ampsteps 12;
> #P newex 726 628 49 196617 pack 0 0.;
> #P newex 726 565 49 196617 t b f;
> #P message 786 569 14 196617 0;
> #P button 786 551 15 0;
> #N counter;
> #X flags 0 0;
> #P newobj 726 597 133 196617 counter;
> #P newex 726 543 45 196617 iter;
> #P newex 726 656 81 196617 peek~ ampsteps;
> #P user multiSlider 563 396 262 54 0. 1. 8 2937 47 0 0 2 0 0 1;
> #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 user number~ 514 201 553 216 9 3 3 2 0. 0. 0 0. 20 0. 0 0 0 221
> 221 221 222 222 222 0 0 0;
> #P newex 594 47 61 196617 delay 1000;
> #B color 5;
> #P hidden message 269 65 14 196617 4;
> #P hidden newex 269 42 48 196617 loadbang;
> #P newex 594 22 48 196617 loadbang;
> #P user multiSlider 562 199 264 16 0. 7. 1 2920 47 0 0 2 0 0 1;
> #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 hidden newex 562 140 48 196617 loadbang;
> #P comment 347 138 58 196617 looplength;
> #P flonum 284 136 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 68 341 48 196617 loadbang;
> #P newex 251 355 64 196617 *~ 0.125;
> #P newex 336 400 54 196617 +~ 0.125;
> #B color 5;
> #P message 83 387 42 196617 mode 1;
> #P newex 166 471 180 196617 wave~ buf;
> #P newex 166 432 180 196617 pong~;
> #P message 68 425 46 196617 interp 1;
> #P newex 166 539 168 196617 *~ 1.;
> #P user gain~ 166 577 48 56 158 0 1.071519 7.94321 10.;
> #P message 722 477 33 196617 clear;
> #P newex 251 321 67 196617 index~ steps;
> #P newex 562 625 49 196617 pack 0 0.;
> #P newex 562 562 49 196617 t b f;
> #P message 622 566 14 196617 0;
> #P button 622 548 15 0;
> #N counter;
> #X flags 0 0;
> #P newobj 562 594 133 196617 counter;
> #P newex 562 540 45 196617 iter;
> #P newex 562 653 63 196617 peek~ steps;
> #P comment 331 103 35 196617 beats;
> #P comment 226 110 27 196617 bpm;
> #P flonum 166 109 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 166 159 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 166 133 113 196617 expr ($f1 / 60.) / $f2;
> #B color 5;
> #P flonum 284 194 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 269 101 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 284 165 128 196617 expr 60000. / ($f1/ $f2);
> #B color 5;
> #P button 569 77 15 0;
> #P newex 569 101 105 196617 info~ buf;
> #P objectname receive~[1];
> #P newex 166 191 68 196617 phasor~ 0.25;
> #P newex 251 287 35 196617 -~ 0.5;
> #P newex 457 48 122 196617 buffer~ buf drumLoop.aif;
> #B color 5;
> #P message 562 165 79 196617 0 1 2 3 4 5 6 7;
> #P newex 722 503 84 196617 buffer~ steps 12;
> #P message 457 24 41 196617 replace;
> #P user multiSlider 562 217 264 159 0. 7. 8 2921 47 0 0 2 0 0 1;
> #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 user ezdac~ 166 686 210 719 0;
> #P comment 348 198 64 196617 natural bpm;
> #P newex 251 257 35 196617 *~ 8.;
> #P window linecount 2;
> #P comment 513 299 37 196617 Slice Select;
> #P hidden connect 38 0 32 0;
> #P hidden connect 38 0 35 0;
> #P hidden connect 59 0 18 0;
> #P connect 15 0 18 0;
> #P connect 18 0 16 0;
> #P connect 16 0 17 0;
> #P connect 17 0 10 0;
> #P connect 10 0 33 0;
> #P connect 35 0 33 0;
> #P connect 33 0 34 0;
> #P connect 32 0 34 0;
> #P connect 34 0 31 0;
> #P connect 31 0 30 0;
> #P connect 30 0 3 0;
> #P connect 30 0 3 1;
> #P connect 10 0 1 0;
> #P connect 1 0 9 0;
> #P connect 9 0 28 0;
> #P connect 28 0 37 0;
> #P connect 37 0 33 1;
> #P hidden connect 44 0 45 0;
> #P hidden connect 45 0 14 0;
> #P connect 14 0 16 1;
> #P connect 11 6 39 0;
> #P connect 39 0 13 0;
> #P connect 13 0 15 0;
> #P connect 9 0 58 0;
> #P connect 58 0 31 1;
> #P connect 37 0 36 0;
> #P connect 36 0 33 2;
> #P connect 14 0 13 1;
> #P connect 5 0 8 0;
> #P connect 1 0 47 0;
> #P hidden connect 41 0 7 0;
> #P connect 47 1 42 0;
> #P hidden connect 59 0 4 0;
> #P connect 7 0 4 0;
> #P connect 4 0 22 0;
> #P connect 22 0 26 0;
> #P connect 26 0 23 0;
> #P connect 23 0 27 0;
> #P connect 27 0 21 0;
> #P hidden connect 59 0 48 0;
> #P connect 46 0 12 0;
> #P connect 8 1 12 0;
> #P connect 12 0 11 0;
> #P connect 43 0 46 0;
> #P connect 26 1 27 1;
> #P connect 4 0 24 0;
> #P connect 24 0 25 0;
> #P connect 25 0 23 2;
> #P connect 29 0 6 0;
> #P connect 48 0 50 0;
> #P connect 50 0 54 0;
> #P connect 54 0 51 0;
> #P connect 51 0 55 0;
> #P connect 55 0 49 0;
> #P connect 54 1 55 1;
> #P connect 48 0 52 0;
> #P connect 52 0 53 0;
> #P connect 53 0 51 2;
> #P connect 57 0 56 0;
> #P hidden connect 63 0 59 0;
> #P hidden connect 61 0 62 0;
> #P hidden connect 62 0 63 0;
> #P pop;
>
>

#115340
Oct 24, 2007 at 8:22am

Here’s another strategy I’ve been working on using zigzag~, +~ and clip~ for an audio rate trigger based version.

I show it here with a step sequencer with 32 steps/bar.

Commentary, improvements please…

thanks,
joe

max v2;
#N vpatcher 8 44 1280 800;
#P origin 220 -219;
#P setbglock 1;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 737 66 391 196617 0 0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 7 0 0 0;
#P message 734 480 391 196617 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0.;
#P hidden newex 625 180 40 196617 change;
#P user multiSlider 737 94 519 22 0. 32. 1 2920 47 0 0 2 0 0 1;
#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 5;
#P comment 577 704 145 196617 the triggers buffer is twice as long and uses this sprintf message to interpolate 0.s to give that required negative slope for zigzag~ and change~;
#P window linecount 2;
#P comment 324 472 110 196617 to account for speed change as bpm changes;
#P window linecount 1;
#P comment 671 600 52 196617 amplitude;
#P comment 671 188 52 196617 steps;
#P window linecount 25;
#P comment 515 211 145 196617 A master phasor~ object looks through three buffers for triggers , which step , and what amplitude. zigzag~ triggers on a negative slope , so the triggers buffer is twice as long as the others , running “doubletime” to allow for a negative slope (you need 2 samples to indicate a negative slope , right?). change~ identifies the negative slope and outputs a signal of 1. to trigger the two sah~ objects that hold the other information for the sequence. The tricky part is after zigzag~. We are using zigzag in mode 1 with signal input , so the negative slope is triggering a line from 0-1. we clip this into a ramp that will just play the slice of audio indicated in the sequence (using +~ to provde offset) and nothing more or less.;
#P window setfont “Sans Serif” 14.;
#P window linecount 2;
#P comment 445 10 170 196622 ModsquadReduxRedux TriggerVersion;
#P window setfont “Sans Serif” 9.;
#P window linecount 4;
#P comment 594 77 119 196617 This is a audio-rate trigger-based version of the classic Max relooper Modsquad.;
#P hidden user number~ 596 154 635 169 9 3 3 2 0. 0. 0 0. 20 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 412 419 31 196617 sah~;
#P newex 42 409 43 196617 ==~ -1.;
#P newex 41 384 46 196617 change~;
#P newex 177 387 31 196617 sah~;
#P hidden message 821 10 17 196617 4.;
#P hidden newex 851 17 61 196617 delay 1000;
#P hidden newex 851 -18 48 196617 loadbang;
#P newex 15 117 46 196617 phasor~;
#P message 308 409 37 196617 $1 15;
#P message 273 382 37 196617 $1 15;
#P newex 15 584 34 196617 +~ 0.;
#P newex 177 587 88 196617 +~ 0.125;
#P newex 15 620 172 196617 clip~ 0. 0.125;
#P newex 308 442 32 196617 line~;
#P newex 273 468 45 196617 /~;
#P newex 273 407 32 196617 line~;
#P newex 734 761 135 196617 if $f1 == 0. then 0. else -1.;
#P newex 892 873 49 196617 pack 0 0.;
#P newex 892 809 49 196617 t b f;
#P message 952 809 14 196617 0;
#P button 952 786 15 0;
#N counter;
#X flags 0 0;
#P newobj 892 841 133 196617 counter;
#P newex 892 733 45 196617 iter;
#P newex 892 903 81 196617 peek~ ampsteps;
#P message 893 932 33 196617 clear;
#P newex 893 958 104 196617 buffer~ ampsteps 64;
#P newex 412 344 85 196617 index~ ampsteps;
#P newex 412 317 35 196617 -~ 0.5;
#P newex 412 289 41 196617 *~ 32.;
#P newex 177 413 57 196617 *~ 0.125;
#P window linecount 4;
#P newex 734 676 243 196617 sprintf %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0.;
#B color 5;
#P window linecount 1;
#P newex 15 351 80 196617 index~ triggers;
#P newex 15 324 35 196617 -~ 0.5;
#P newex 15 296 41 196617 *~ 64.;
#P message 734 931 33 196617 clear;
#P newex 734 873 49 196617 pack 0 0.;
#P newex 734 809 49 196617 t b f;
#P message 794 809 14 196617 0;
#P button 794 786 15 0;
#N counter;
#X flags 0 0;
#P newobj 734 841 133 196617 counter;
#P newex 734 733 45 196617 iter;
#P newex 734 903 76 196617 peek~ triggers;
#P newex 734 957 99 196617 buffer~ triggers 64;
#P user multiSlider 734 511 521 157 0. 1. 32 2937 47 0 0 2 4 0 1;
#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 message 41 455 58 196617 0. 0. 1. $1;
#P newex 15 502 268 196617 zigzag~;
#P comment 196 60 58 196617 looplength;
#P flonum 133 58 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex -53 424 48 196617 loadbang;
#P message -38 456 42 196617 mode 1;
#P newex 15 657 99 196617 wave~ buf;
#P message -53 494 46 196617 interp 1;
#P newex 15 705 407 196617 *~ 1.;
#P user gain~ 15 743 48 56 158 0 1.071519 7.94321 10.;
#P message 873 329 33 196617 clear;
#P newex 177 351 67 196617 index~ steps;
#P newex 737 401 49 196617 pack 0 0.;
#P newex 737 338 49 196617 t b f;
#P message 797 342 14 196617 0;
#P button 797 324 15 0;
#N counter;
#X flags 0 0;
#P newobj 737 370 133 196617 counter;
#P newex 737 316 45 196617 iter;
#P newex 737 429 63 196617 peek~ steps;
#P comment 180 25 35 196617 beats;
#P comment 75 32 27 196617 bpm;
#P flonum 15 31 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 15 81 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 15 55 113 196617 expr ($f1 / 60.) / $f2;
#B color 5;
#P flonum 133 113 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 118 23 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 133 87 128 196617 expr 60000. / ($f1/ $f2);
#B color 5;
#P button 369 54 15 0;
#P newex 369 78 105 196617 info~ buf;
#P objectname receive~[1];
#P newex 15 215 47 196617 rate~ 1.;
#P newex 177 324 35 196617 -~ 0.5;
#P newex 257 25 122 196617 buffer~ buf drumLoop.aif;
#B color 5;
#P newex 873 355 86 196617 buffer~ steps 64;
#P message 257 1 41 196617 replace;
#P user multiSlider 736 116 521 157 0. 7. 32 2921 47 0 0 2 4 0 1;
#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 user ezdac~ 15 852 59 885 0;
#P comment 197 117 64 196617 natural bpm;
#P newex 177 296 41 196617 *~ 32.;
#P window linecount 2;
#P comment 600 44 119 196617 joseph stewart joseph.rex@gmail.com;
#P connect 34 0 31 0;
#P connect 34 0 33 0;
#P connect 14 0 17 0;
#P connect 17 0 15 0;
#P connect 15 0 16 0;
#P connect 16 0 75 0;
#P connect 75 0 9 0;
#P connect 9 0 49 0;
#P connect 49 0 50 0;
#P connect 50 0 51 0;
#P connect 51 0 37 0;
#P connect 33 0 37 0;
#P connect 38 0 37 0;
#P connect 37 0 72 0;
#P connect 72 0 70 0;
#P connect 31 0 32 0;
#P connect 70 0 32 0;
#P connect 32 0 30 0;
#P connect 30 0 29 0;
#P connect 29 0 3 0;
#P connect 53 0 72 1;
#P connect 51 0 80 0;
#P connect 35 0 38 0;
#P connect 80 0 81 0;
#P connect 29 0 3 1;
#P connect 53 0 70 1;
#P hidden connect 78 0 13 0;
#P connect 13 0 15 1;
#P connect 10 6 35 0;
#P connect 35 0 12 0;
#P connect 12 0 14 0;
#P connect 9 0 1 0;
#P connect 1 0 8 0;
#P connect 8 0 27 0;
#P connect 27 0 79 0;
#P connect 79 0 53 0;
#P connect 53 0 71 0;
#P connect 71 0 70 2;
#P connect 81 0 79 1;
#P connect 13 0 12 1;
#P connect 5 0 7 0;
#P connect 17 0 73 0;
#P connect 73 0 67 0;
#P connect 67 0 68 0;
#P connect 68 0 37 1;
#P connect 14 0 74 0;
#P connect 74 0 69 0;
#P connect 69 0 68 1;
#P hidden connect 77 0 11 0;
#P connect 7 1 11 0;
#P connect 11 0 10 0;
#P connect 9 0 54 0;
#P connect 54 0 55 0;
#P connect 55 0 56 0;
#P connect 56 0 82 0;
#P connect 82 0 30 1;
#P connect 81 0 82 1;
#P hidden connect 54 0 83 0;
#P hidden connect 83 1 92 0;
#P hidden connect 76 0 93 0;
#P connect 93 0 39 0;
#P connect 39 0 52 0;
#P connect 52 0 42 0;
#P connect 42 0 66 0;
#P connect 66 0 46 0;
#P connect 46 0 43 0;
#P connect 43 0 47 0;
#P connect 47 0 41 0;
#P connect 48 0 40 0;
#P connect 94 0 4 0;
#P hidden connect 76 0 94 0;
#P hidden connect 92 0 91 0;
#P connect 4 0 21 0;
#P connect 21 0 25 0;
#P connect 25 0 22 0;
#P connect 22 0 26 0;
#P connect 26 0 20 0;
#P connect 46 1 47 1;
#P connect 25 1 26 1;
#P connect 39 0 44 0;
#P connect 44 0 45 0;
#P connect 45 0 43 2;
#P connect 4 0 23 0;
#P connect 23 0 24 0;
#P connect 24 0 22 2;
#P hidden connect 76 0 78 0;
#P hidden connect 76 0 77 0;
#P connect 28 0 6 0;
#P connect 39 0 60 0;
#P connect 60 0 64 0;
#P connect 64 0 61 0;
#P connect 61 0 65 0;
#P connect 65 0 59 0;
#P connect 58 0 57 0;
#P connect 64 1 65 1;
#P connect 39 0 62 0;
#P connect 62 0 63 0;
#P connect 63 0 61 2;
#P pop;

#115341
Oct 24, 2007 at 6:45pm

great work Joseph
thanks for sharing .
pitch/backward playback mode/volume enveloppe, on each slice would be a nice thing to implement.
hopefully ill get some time this weekend to come up with some extra features.
best

Quote: joseph.rex@gmail.com wrote on Wed, 24 October 2007 10:22
—————————————————-
> Here’s another strategy I’ve been working on using zigzag~, +~ and clip~ for an audio rate trigger based version.
>
> I show it here with a step sequencer with 32 steps/bar.
>
> Commentary, improvements please…
>
> thanks,
> joe
>
> max v2;
> #N vpatcher 8 44 1280 800;
> #P origin 220 -219;
> #P setbglock 1;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P message 737 66 391 196617 0 0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 7 0 0 0;
> #P message 734 480 391 196617 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0.;
> #P hidden newex 625 180 40 196617 change;
> #P user multiSlider 737 94 519 22 0. 32. 1 2920 47 0 0 2 0 0 1;
> #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 5;
> #P comment 577 704 145 196617 the triggers buffer is twice as long and uses this sprintf message to interpolate 0.s to give that required negative slope for zigzag~ and change~;
> #P window linecount 2;
> #P comment 324 472 110 196617 to account for speed change as bpm changes;
> #P window linecount 1;
> #P comment 671 600 52 196617 amplitude;
> #P comment 671 188 52 196617 steps;
> #P window linecount 25;
> #P comment 515 211 145 196617 A master phasor~ object looks through three buffers for triggers , which step , and what amplitude. zigzag~ triggers on a negative slope , so the triggers buffer is twice as long as the others , running “doubletime” to allow for a negative slope (you need 2 samples to indicate a negative slope , right?). change~ identifies the negative slope and outputs a signal of 1. to trigger the two sah~ objects that hold the other information for the sequence. The tricky part is after zigzag~. We are using zigzag in mode 1 with signal input , so the negative slope is triggering a line from 0-1. we clip this into a ramp that will just play the slice of audio indicated in the sequence (using +~ to provde offset) and nothing more or less.;
> #P window setfont “Sans Serif” 14.;
> #P window linecount 2;
> #P comment 445 10 170 196622 ModsquadReduxRedux TriggerVersion;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 4;
> #P comment 594 77 119 196617 This is a audio-rate trigger-based version of the classic Max relooper Modsquad.;
> #P hidden user number~ 596 154 635 169 9 3 3 2 0. 0. 0 0. 20 0. 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P newex 412 419 31 196617 sah~;
> #P newex 42 409 43 196617 ==~ -1.;
> #P newex 41 384 46 196617 change~;
> #P newex 177 387 31 196617 sah~;
> #P hidden message 821 10 17 196617 4.;
> #P hidden newex 851 17 61 196617 delay 1000;
> #P hidden newex 851 -18 48 196617 loadbang;
> #P newex 15 117 46 196617 phasor~;
> #P message 308 409 37 196617 $1 15;
> #P message 273 382 37 196617 $1 15;
> #P newex 15 584 34 196617 +~ 0.;
> #P newex 177 587 88 196617 +~ 0.125;
> #P newex 15 620 172 196617 clip~ 0. 0.125;
> #P newex 308 442 32 196617 line~;
> #P newex 273 468 45 196617 /~;
> #P newex 273 407 32 196617 line~;
> #P newex 734 761 135 196617 if $f1 == 0. then 0. else -1.;
> #P newex 892 873 49 196617 pack 0 0.;
> #P newex 892 809 49 196617 t b f;
> #P message 952 809 14 196617 0;
> #P button 952 786 15 0;
> #N counter;
> #X flags 0 0;
> #P newobj 892 841 133 196617 counter;
> #P newex 892 733 45 196617 iter;
> #P newex 892 903 81 196617 peek~ ampsteps;
> #P message 893 932 33 196617 clear;
> #P newex 893 958 104 196617 buffer~ ampsteps 64;
> #P newex 412 344 85 196617 index~ ampsteps;
> #P newex 412 317 35 196617 -~ 0.5;
> #P newex 412 289 41 196617 *~ 32.;
> #P newex 177 413 57 196617 *~ 0.125;
> #P window linecount 4;
> #P newex 734 676 243 196617 sprintf %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0. %f 0.;
> #B color 5;
> #P window linecount 1;
> #P newex 15 351 80 196617 index~ triggers;
> #P newex 15 324 35 196617 -~ 0.5;
> #P newex 15 296 41 196617 *~ 64.;
> #P message 734 931 33 196617 clear;
> #P newex 734 873 49 196617 pack 0 0.;
> #P newex 734 809 49 196617 t b f;
> #P message 794 809 14 196617 0;
> #P button 794 786 15 0;
> #N counter;
> #X flags 0 0;
> #P newobj 734 841 133 196617 counter;
> #P newex 734 733 45 196617 iter;
> #P newex 734 903 76 196617 peek~ triggers;
> #P newex 734 957 99 196617 buffer~ triggers 64;
> #P user multiSlider 734 511 521 157 0. 1. 32 2937 47 0 0 2 4 0 1;
> #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 message 41 455 58 196617 0. 0. 1. $1;
> #P newex 15 502 268 196617 zigzag~;
> #P comment 196 60 58 196617 looplength;
> #P flonum 133 58 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex -53 424 48 196617 loadbang;
> #P message -38 456 42 196617 mode 1;
> #P newex 15 657 99 196617 wave~ buf;
> #P message -53 494 46 196617 interp 1;
> #P newex 15 705 407 196617 *~ 1.;
> #P user gain~ 15 743 48 56 158 0 1.071519 7.94321 10.;
> #P message 873 329 33 196617 clear;
> #P newex 177 351 67 196617 index~ steps;
> #P newex 737 401 49 196617 pack 0 0.;
> #P newex 737 338 49 196617 t b f;
> #P message 797 342 14 196617 0;
> #P button 797 324 15 0;
> #N counter;
> #X flags 0 0;
> #P newobj 737 370 133 196617 counter;
> #P newex 737 316 45 196617 iter;
> #P newex 737 429 63 196617 peek~ steps;
> #P comment 180 25 35 196617 beats;
> #P comment 75 32 27 196617 bpm;
> #P flonum 15 31 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 15 81 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 15 55 113 196617 expr ($f1 / 60.) / $f2;
> #B color 5;
> #P flonum 133 113 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 118 23 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 133 87 128 196617 expr 60000. / ($f1/ $f2);
> #B color 5;
> #P button 369 54 15 0;
> #P newex 369 78 105 196617 info~ buf;
> #P objectname receive~[1];
> #P newex 15 215 47 196617 rate~ 1.;
> #P newex 177 324 35 196617 -~ 0.5;
> #P newex 257 25 122 196617 buffer~ buf drumLoop.aif;
> #B color 5;
> #P newex 873 355 86 196617 buffer~ steps 64;
> #P message 257 1 41 196617 replace;
> #P user multiSlider 736 116 521 157 0. 7. 32 2921 47 0 0 2 4 0 1;
> #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 user ezdac~ 15 852 59 885 0;
> #P comment 197 117 64 196617 natural bpm;
> #P newex 177 296 41 196617 *~ 32.;
> #P window linecount 2;
> #P comment 600 44 119 196617 joseph stewart joseph.rex@gmail.com;
> #P connect 34 0 31 0;
> #P connect 34 0 33 0;
> #P connect 14 0 17 0;
> #P connect 17 0 15 0;
> #P connect 15 0 16 0;
> #P connect 16 0 75 0;
> #P connect 75 0 9 0;
> #P connect 9 0 49 0;
> #P connect 49 0 50 0;
> #P connect 50 0 51 0;
> #P connect 51 0 37 0;
> #P connect 33 0 37 0;
> #P connect 38 0 37 0;
> #P connect 37 0 72 0;
> #P connect 72 0 70 0;
> #P connect 31 0 32 0;
> #P connect 70 0 32 0;
> #P connect 32 0 30 0;
> #P connect 30 0 29 0;
> #P connect 29 0 3 0;
> #P connect 53 0 72 1;
> #P connect 51 0 80 0;
> #P connect 35 0 38 0;
> #P connect 80 0 81 0;
> #P connect 29 0 3 1;
> #P connect 53 0 70 1;
> #P hidden connect 78 0 13 0;
> #P connect 13 0 15 1;
> #P connect 10 6 35 0;
> #P connect 35 0 12 0;
> #P connect 12 0 14 0;
> #P connect 9 0 1 0;
> #P connect 1 0 8 0;
> #P connect 8 0 27 0;
> #P connect 27 0 79 0;
> #P connect 79 0 53 0;
> #P connect 53 0 71 0;
> #P connect 71 0 70 2;
> #P connect 81 0 79 1;
> #P connect 13 0 12 1;
> #P connect 5 0 7 0;
> #P connect 17 0 73 0;
> #P connect 73 0 67 0;
> #P connect 67 0 68 0;
> #P connect 68 0 37 1;
> #P connect 14 0 74 0;
> #P connect 74 0 69 0;
> #P connect 69 0 68 1;
> #P hidden connect 77 0 11 0;
> #P connect 7 1 11 0;
> #P connect 11 0 10 0;
> #P connect 9 0 54 0;
> #P connect 54 0 55 0;
> #P connect 55 0 56 0;
> #P connect 56 0 82 0;
> #P connect 82 0 30 1;
> #P connect 81 0 82 1;
> #P hidden connect 54 0 83 0;
> #P hidden connect 83 1 92 0;
> #P hidden connect 76 0 93 0;
> #P connect 93 0 39 0;
> #P connect 39 0 52 0;
> #P connect 52 0 42 0;
> #P connect 42 0 66 0;
> #P connect 66 0 46 0;
> #P connect 46 0 43 0;
> #P connect 43 0 47 0;
> #P connect 47 0 41 0;
> #P connect 48 0 40 0;
> #P connect 94 0 4 0;
> #P hidden connect 76 0 94 0;
> #P hidden connect 92 0 91 0;
> #P connect 4 0 21 0;
> #P connect 21 0 25 0;
> #P connect 25 0 22 0;
> #P connect 22 0 26 0;
> #P connect 26 0 20 0;
> #P connect 46 1 47 1;
> #P connect 25 1 26 1;
> #P connect 39 0 44 0;
> #P connect 44 0 45 0;
> #P connect 45 0 43 2;
> #P connect 4 0 23 0;
> #P connect 23 0 24 0;
> #P connect 24 0 22 2;
> #P hidden connect 76 0 78 0;
> #P hidden connect 76 0 77 0;
> #P connect 28 0 6 0;
> #P connect 39 0 60 0;
> #P connect 60 0 64 0;
> #P connect 64 0 61 0;
> #P connect 61 0 65 0;
> #P connect 65 0 59 0;
> #P connect 58 0 57 0;
> #P connect 64 1 65 1;
> #P connect 39 0 62 0;
> #P connect 62 0 63 0;
> #P connect 63 0 61 2;
> #P pop;
>
—————————————————-

#115342

You must be logged in to reply to this topic.