it sounds like a cd skipping…. errrgghhh…

Jul 13, 2008 at 12:11am

it sounds like a cd skipping…. errrgghhh…

Hello,

I’m creating a shuffler effect based on the ModSquadRedux example patch. Since my slicing does not need to be based on beats (yet), instead it is for ambient-type chords/soundscapes, I skipped out on several of ModSquad’s features. I’ve got it functioning for the most part, but when the playback happens, I get a pretty obnoxious sound resembling a CD skipping.

The sound occurs with every jump in the phasor~. Is there some way to ramp this so as not to have such sudden jumps? Or is there another solution that makes ModSquad’s chopping so seamless where mine is not?

Any suggestions are appreciated.

Jay

#P window setfont “Sans Serif” 14.;
#P window linecount 2;
#P comment 89 431 251 9109518 Looks pretty good… but why the noises that sounds like a cd’s skipping??;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden newex 277 322 19 9109513 t b;
#P hidden message 277 344 29 9109513 reset;
#P hidden newex 284 117 39 9109513 r colors;
#P hidden message 284 137 64 9109513 frgb $1 $2 $3;
#P message 210 153 29 9109513 reset;
#P hidden newex 202 103 19 9109513 t b;
#N vpatcher 15 55 151 265;
#P window setfont “Sans Serif” 9.;
#P message 24 117 14 9109513 0;
#P newex 24 95 28 9109513 sel 1;
#P newex 24 73 29 9109513 >= 1.;
#P newex 24 51 62 9109513 snapshot~ 1.;
#P inlet 24 31 15 0;
#P outlet 24 139 15 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 0 0;
#P pop;
#P hidden newobj 67 102 54 9109513 p snapshot;
#B color 5;
#P hidden message 255 81 14 9109513 0;
#P hidden message 238 112 14 9109513 8;
#P flonum 36 148 50 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 58 318 55 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 210 344 63 9109513 clear , size $1;
#N vpatcher 15 55 376 307;
#P window setfont “Sans Serif” 9.;
#P newex 112 53 19 9109513 t b;
#P newex 251 146 82 9109513 s numbersamples;
#P newex 198 101 54 9109513 s fulllength;
#P comment 150 188 92 9109513 samples per second;
#P flonum 242 209 67 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 242 186 45 9109513 !/ 44100.;
#P flonum 242 168 66 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 190 123 62 9109513 mstosamps~;
#P newex 112 75 105 9109513 info~ shuffle;
#P newex 7 75 103 9109513 buffer~ shuffle 8000 2;
#P comment 136 168 122 9109513 total samples in sample;
#P inlet 7 24 15 0;
#P connect 0 0 2 0;
#P fasten 0 0 11 0 12 46 117 46;
#P connect 11 0 3 0;
#P connect 3 6 4 0;
#P connect 3 6 9 0;
#P connect 4 1 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 4 1 10 0;
#P pop;
#P newobj 210 364 80 9109513 p buffer;
#B color 5;
#N vpatcher 15 55 261 430;
#P window setfont “Sans Serif” 9.;
#P flonum 8 312 65 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 137 312 65 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P newex 181 236 36 9109513 t b f;
#P newex 137 288 80 9109513 / 1.;
#P newex 137 265 27 9109513 f;
#P window linecount 3;
#P newex 137 211 39 9109513 r numbersamples;
#P window linecount 1;
#P newex 8 289 71 9109513 * 1.;
#P newex 8 266 27 9109513 f;
#P newex 80 214 52 9109513 r fulllength;
#P newex 80 236 40 9109513 !/ 1000.;
#P newex 54 184 40 9109513 t b f f;
#P newex 8 184 36 9109513 t b f;
#P number 54 166 13 9 0 0 160 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 8 166 13 9 0 0 160 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 8 123 19 9109513 t 1;
#P newex 66 123 27 9109513 t 1 2;
#P newex 37 123 27 9109513 t 2 1;
#P newex 8 100 99 9109513 select 0 1 2;
#P newex 8 77 40 9109513 change;
#P newex 8 55 29 9109513 i;
#P inlet 8 25 15 0;
#P inlet 24 25 15 0;
#P outlet 8 332 15 0;
#P outlet 22 212 15 0;
#P outlet 137 332 15 0;
#P connect 3 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 10 0;
#P connect 10 0 11 0;
#P connect 9 0 11 0;
#P connect 8 0 11 0;
#P connect 11 0 13 0;
#P fasten 14 0 17 0 59 255 13 255;
#P connect 13 0 17 0;
#P fasten 15 0 17 0 85 260 13 260;
#P connect 17 0 18 0;
#P connect 18 0 24 0;
#P connect 24 0 2 0;
#P connect 13 1 1 0;
#P connect 4 0 5 1;
#P connect 7 1 8 0;
#P connect 9 1 12 0;
#P connect 8 1 12 0;
#P connect 10 0 12 0;
#P connect 12 0 14 0;
#P connect 7 2 9 0;
#P connect 14 1 18 1;
#P fasten 13 1 18 1 39 207 74 207;
#P connect 16 0 15 0;
#P fasten 22 0 20 0 186 260 142 260;
#P connect 19 0 20 0;
#P connect 20 0 21 0;
#P connect 21 0 23 0;
#P connect 23 0 0 0;
#P fasten 14 2 22 0 89 207 186 207;
#P connect 22 1 21 1;
#P pop;
#P newobj 140 53 62 9109513 p timemodes;
#B color 5;
#P newex 111 361 76 9109513 index~ shuffle 2;
#P newex 112 337 53 9109513 *~ 352800.;
#P newex 15 385 107 9109513 sios;
#N vpatcher 15 55 241 223;
#P window setfont “Sans Serif” 9.;
#P newex 122 48 77 9109513 receive~ shuffR;
#P newex 44 48 75 9109513 receive~ shuffL;
#P newex 12 48 27 9109513 + 1;
#P newex 90 98 75 9109513 selector~ 2;
#P newex 12 98 75 9109513 selector~ 2;
#P newex 76 71 88 9109513 adc~;
#P inlet 12 28 15 0;
#P outlet 90 122 15 0;
#P outlet 12 122 15 0;
#P connect 2 0 6 0;
#P connect 6 0 4 0;
#P connect 4 0 0 0;
#P connect 7 0 4 1;
#P connect 3 0 4 2;
#P fasten 6 0 5 0 17 94 95 94;
#P connect 5 0 1 0;
#P connect 8 0 5 1;
#P connect 3 1 5 2;
#P pop;
#P newobj 43 53 49 9109513 p source~;
#B color 5;
#P user umenu 43 33 66 9109543 1 64 49 1;
#X add receive~;
#X add adc~;
#N vpatcher 32 74 357 523;
#P window setfont “Sans Serif” 9.;
#P window linecount 3;
#P comment 14 292 63 9109513 writes values into each of 512 samples;
#P window linecount 0;
#P comment 233 162 69 9109513 converts 0 into next number in the sequence (e.g. 5 0 0 becomes 5 6 7);
#P window linecount 1;
#P hidden newex 78 224 27 9109513 – 1.;
#P hidden newex 75 111 27 9109513 – 1.;
#P newex 227 249 27 9109513 – 1.;
#P newex 185 220 27 9109513 + 1;
#N counter 1 8;
#X flags 0 0;
#P newobj 147 188 66 9109513 counter 1 8;
#P newex 185 164 26 9109513 i;
#P newex 130 136 27 9109513 t b b;
#P newex 175 136 63 9109513 t 1 i i;
#P newex 130 111 55 9109513 sel 0;
#P newex 85 337 27 9109513 / 8.;
#P flonum 85 295 53 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 85 314 152 9109513 + 0.;
#P newex 85 272 27 9109513 / 64.;
#P newex 7 360 88 9109513 0 0.;
#P number 85 252 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 7 275 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 7 250 74 9109513 +;
#N counter 0 63;
#X flags 0 0;
#P newobj 7 224 66 9109513 counter 0 63;
#P newex 7 200 40 9109513 uzi 64;
#P newex 7 176 74 9109513 t b i;
#P newex 7 153 27 9109513 * 64;
#P number 7 134 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 0 7;
#X flags 0 0;
#P newobj 7 111 66 9109513 counter 0 7;
#P newex 7 87 133 9109513 t b i;
#P newex 7 65 21 9109513 iter;
#P newex 7 43 30 9109513 zl reg;
#P newex 7 403 91 9109513 buffer~ steps 11.61;
#P newex 7 382 59 9109513 peek~ steps;
#P inlet 7 25 15 0;
#P user panel 127 108 179 163;
#X brgb 224 244 203;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 5 108 120 250;
#X brgb 162 206 235;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 2 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 12 0;
#P connect 12 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 15 0;
#P connect 15 0 17 0;
#P connect 17 0 3 0;
#P hidden connect 29 0 8 4;
#P hidden connect 30 0 13 4;
#P connect 11 1 14 1;
#P fasten 13 0 16 0 12 246 90 246;
#P connect 16 0 18 0;
#P connect 18 0 20 0;
#P connect 20 0 19 0;
#P connect 19 0 21 0;
#P connect 21 0 17 1;
#P connect 7 1 22 0;
#P connect 22 0 24 0;
#P connect 24 1 26 0;
#P connect 22 1 23 0;
#P connect 23 0 26 2;
#P fasten 24 0 25 0 135 159 190 159;
#P connect 25 0 27 0;
#P connect 23 1 25 1;
#P connect 26 0 27 1;
#P connect 23 2 28 0;
#P connect 27 0 28 0;
#P connect 28 0 19 1;
#P pop;
#P newobj 210 265 44 9109513 p peeker;
#B color 5;
#P toggle 15 218 15 0;
#P newex 15 123 27 9109513 == 0;
#P newex 15 236 31 9109513 gate~;
#P newex 15 263 27 9109513 /~ 1.;
#P button 51 265 15 0;
#P newex 51 236 33 9109513 edge~;
#P newex 51 214 44 9109513 >~ 0.001;
#P number 238 134 35 9 0 24 67 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 238 153 110 9109513 size $1 , setminmax 0 $1;
#P window linecount 2;
#P hidden message 202 121 35 9109513 1 2 3 4 5 6 7 8;
#P user number~ 51 195 90 210 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P hidden newex 208 82 45 9109513 loadbang;
#P message 93 147 14 9109513 0;
#P newex 15 337 53 9109513 *~ 352800.;
#P newex 15 361 76 9109513 index~ shuffle 1;
#P newex 36 168 67 9109513 phasor~ 0.125;
#P user number~ 26 103 65 118 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 210 301 71 9109513 loadmess 8000;
#P toggle 26 34 15 0;
#P newex 26 79 176 9109513 record~ shuffle 2;
#P number 210 326 51 9 0 0 64 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P user multiSlider 210 169 165 93 0. 8. 8 2921 15 0 0 2 0 0 0;
#M frgb 7 253 214;
#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 newex 15 287 106 9109513 wave~ steps 0. 11.61 2;
#P user umenu 140 33 63 9109543 1 64 49 1;
#X add normal;
#X add half-loop;
#X add cut-time;
#P connect 22 0 23 0;
#P connect 23 0 21 0;
#P connect 21 0 20 0;
#P connect 20 0 1 0;
#P connect 10 0 9 0;
#P connect 9 0 27 0;
#P hidden connect 37 0 5 0;
#P hidden connect 42 0 4 0;
#P connect 5 0 4 0;
#P fasten 5 0 22 0 31 63 20 63;
#P fasten 26 0 4 0 48 75 31 75;
#P hidden connect 30 1 20 1;
#P hidden connect 30 0 34 0;
#P connect 34 0 8 0;
#P hidden connect 36 0 25 0;
#P connect 25 0 26 0;
#P connect 8 0 13 0;
#P connect 8 0 21 1;
#P connect 13 0 17 0;
#P connect 17 0 18 0;
#P connect 18 0 19 0;
#P connect 33 0 10 1;
#P hidden connect 4 0 37 0;
#P connect 4 0 7 0;
#P connect 26 1 4 1;
#P connect 11 0 8 1;
#P connect 28 0 29 0;
#P fasten 1 0 28 0 20 309 117 309;
#P connect 1 0 10 0;
#P connect 29 0 27 1;
#P hidden connect 19 0 30 0;
#P hidden connect 30 2 28 1;
#P hidden connect 30 2 33 0;
#P hidden connect 0 0 30 1;
#P hidden connect 39 0 38 0;
#P hidden connect 38 0 14 0;
#P hidden connect 40 0 2 0;
#P hidden connect 14 0 2 0;
#P hidden connect 15 0 2 0;
#P connect 2 0 24 0;
#P hidden connect 6 0 3 0;
#P connect 3 0 32 0;
#P hidden connect 35 0 16 0;
#P connect 16 0 15 0;
#P hidden connect 12 0 36 0;
#P hidden connect 12 0 35 0;
#P hidden connect 12 0 11 0;
#P hidden connect 32 0 43 0;
#P connect 32 0 31 0;
#P hidden connect 43 0 42 0;
#P hidden connect 41 0 40 0;
#P window clipboard copycount 45;

#38858
Jul 13, 2008 at 4:25am

Jay, when I listen to ModSquadRedux in Max 4.6 and in Max5 it also has the CD skipping sound(due to the quick jumps wave~ makes). The reason why it might sound smooth at first is that it opens on preset 1 which is a straight playback of the original file(no jumping around). If you change it to preset 2, and then slow it down, you’ll hear the CD skipping sound. You’ll hear it even more if you replace the jongly.aif file in the playback buffer~ with something that is more steady-state/non-percussive. If you absolutely need to do it the ModSquad way, I’d recommend figuring out a way to have the main volume fade in and out at the beginning and end of each segment kind of like in the groove-ducking example found within this folder:
Max5(or 4.6)/examples/audio-rate-sequencing-looping/

or even like the granular example in this folder:
Max5(or 4.6)/examples/sampling/granular

You will need to figure out how to translate each segment’s ramp to fall between the range of 0-1 and that will make it easier to sync the fade in and fade out properly(much like the grooveducking examps).

The granularized example has a hanning window(found within the rgrano.pat patch (hanning-window is created within and around the

subpatcher), rgrano.pat is found within the “lib” folder).
This gives a logarithmic fade at the beginning and end of a segment(sounds smoother/has less chance of clicks/pops/interpolation-noise but might be too long of a fade-in/fade-out if you don’t alter it to give sharper attacks/releases) whereas grooveduck performs a linear fade(but it is still nicely synced).

If you don’t absolutely need to follow the ModSquad patch, I would use the groove~ object and figure out how to apply the multislider sequencing to the playback of its segments(it should actually be easier than having to write the multislider values as ramps into a buffer~ for wave~ to read and then control index~; in fact, you could probably save different settings into a preset-object or pattr-system and then have the multislider simply trigger the appropriate preset number straight out of its outlet as an integer). ModSquad is indeed, “ultratight” as it claims, but… not sure you need it tight like that even for beats, and when you’ve got something non-percussive you hear the CD-skipping even more.

My personal opinion is that the ModSquad-seq.pat version is the best sounding and tightest of all the versions. This one’s found within the “history” folder of the ModSquad folder in Max4.6(or in Max5 within the modsquad-history subfolder of the legacy-examples subfolder of the examples folder).

If you have Max5, you could also take a look at a new Jitter way of doing things here:
Max5/examples/jitter-examples/audio/jit.sampler-exampler.maxpat

There are also numerous ways to apply an amplitude envelope besides the two i’ve mentioned. Two more ways would be to sync the appropriate ramp using either the line~ object(for linear-fade) or the curve~ object(for logarithmic-fade(you’ll want curve parameter of something like 0.5 for the attack and -0.5 for the release)).

Sorry for such a long post, hopefully it gives you a few ideas to try.

#135920
Jul 13, 2008 at 6:15pm

Thanks, this definitely gives me lots of ideas to try.

I am certainly open to other ways of doing this, as there’s no reason I must stick to ModSquad. But you talk about using multislider to assign the segments of groove~… I don’t understand what you mean by segmenting groove~, and there’s nothing in the help file or reference manual about it. It may just be my inexperience; usually I use play~ for buffer~ playback.

As far as I knew there was simply a loop, rather than segments. Would one set loop start/end points with every segment or multislider?

#135921
Jul 13, 2008 at 7:35pm

Yes, you’ve got it, start and end-point(sorry to not be more clear). Easiest way, take the help-file for groove~, copy the basic interface, then for start and end points of the loop(which I was renaming as ‘segments’ thinking one would be segmenting the overall file into different loops), create presets for the start and end-points(using the “preset” object or a “pattr” system) and then have the multislider trigger the preset numbers…. are you on Max 4.6 or do you have Max 5? Let me know which version you are on and I can probably post a patch to help you along further.

(you can also use play~ or even sfplay~, if you prefer one over the other, let me know that, too, and I’ll target a patch for that specific object.)

#135922
Jul 13, 2008 at 8:16pm

if you want to stay in the audio domain, take a look at using a trapezoid~ object as an envelope for your phasor~

#135923
Jul 14, 2008 at 2:04pm

Thanks a lot for the suggestions. I’m working through it on my own, looks like with some more persistence I should figure it out. If anything else comes up that I just can’t get past, I shall let you know. :)

#135924
Jul 14, 2008 at 11:26pm

Raja,
This is where I am now….

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 15 55 138 229;
#P window setfont “Sans Serif” 9.;
#P newex 37 73 50 9109513 r totaltime;
#P newex 20 96 27 9109513 sel;
#P newex 20 51 51 9109513 clocker 10;
#P inlet 20 31 15 0;
#P outlet 20 120 15 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 0 0;
#P connect 4 0 3 1;
#P pop;
#P newobj 71 577 60 9109513 p timerecord;
#B color 5;
#P newex 403 509 28 9109513 *~;
#P newex 87 483 22 9109513 + 1;
#P newex 155 512 54 9109513 selector~ 2;
#P user umenu 87 420 73 9109543 1 64 436 1;
#X add receive~;
#X add adc~;
#P newex 131 483 79 9109513 adc~;
#P newex 177 440 68 9109513 receive~ shfR;
#P newex 110 440 66 9109513 receive~ shfL;
#P message 239 220 29 9109513 reset;
#P hidden newex 270 218 19 9109513 t b;
#P newex 87 512 54 9109513 selector~ 2;
#P number 357 334 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 357 509 27 9109513 *~;
#P newex 357 535 55 9109513 dac~;
#P newex 427 377 58 9109513 r slicelength;
#P newex 357 401 81 9109513 0 0 0;
#P message 357 424 47 9109513 $1 , $2 $3;
#P newex 357 445 27 9109513 line~;
#P newex 357 468 56 9109513 play~ shf 2;
#P window linecount 3;
#N vpatcher 69 64 320 419;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 364 163 864 417;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 248 25 58 9109513 r listreverse;
#P window linecount 1;
#P newex 248 47 226 9109513 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#P toggle 227 192 15 0;
#P newex 441 135 27 9109513 i;
#P newex 412 135 27 9109513 i;
#P newex 383 135 27 9109513 i;
#P newex 354 135 27 9109513 i;
#P newex 325 135 27 9109513 i;
#P newex 296 135 27 9109513 i;
#P newex 267 135 27 9109513 i;
#P newex 238 135 27 9109513 i;
#P newex 209 135 27 9109513 i;
#P newex 180 135 27 9109513 i;
#P newex 151 135 27 9109513 i;
#P newex 122 135 27 9109513 i;
#P newex 93 135 27 9109513 i;
#P newex 64 135 27 9109513 i;
#P newex 35 135 27 9109513 i;
#P newex 6 47 226 9109513 sel 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16;
#P newex 6 135 27 9109513 i;
#N comlet step number;
#P inlet 6 28 15 0;
#P outlet 227 212 15 0;
#P connect 1 0 3 0;
#P connect 3 0 2 0;
#P connect 20 0 2 1;
#P connect 3 1 4 0;
#P connect 20 1 4 1;
#P connect 3 2 5 0;
#P connect 20 2 5 1;
#P connect 3 3 6 0;
#P connect 20 3 6 1;
#P connect 3 4 7 0;
#P connect 20 4 7 1;
#P connect 3 5 8 0;
#P connect 20 5 8 1;
#P connect 3 6 9 0;
#P connect 20 6 9 1;
#P connect 3 7 10 0;
#P connect 20 7 10 1;
#P connect 18 0 19 0;
#P connect 17 0 19 0;
#P connect 16 0 19 0;
#P connect 15 0 19 0;
#P connect 14 0 19 0;
#P connect 13 0 19 0;
#P connect 12 0 19 0;
#P connect 11 0 19 0;
#P connect 10 0 19 0;
#P connect 9 0 19 0;
#P connect 8 0 19 0;
#P connect 7 0 19 0;
#P connect 6 0 19 0;
#P connect 5 0 19 0;
#P connect 4 0 19 0;
#P connect 2 0 19 0;
#P connect 19 0 0 0;
#P connect 3 8 11 0;
#P connect 21 0 20 0;
#P connect 20 8 11 1;
#P connect 3 9 12 0;
#P connect 20 9 12 1;
#P connect 3 10 13 0;
#P connect 20 10 13 1;
#P connect 3 11 14 0;
#P connect 20 11 14 1;
#P connect 3 12 15 0;
#P connect 20 12 15 1;
#P connect 3 13 16 0;
#P connect 20 13 16 1;
#P connect 3 14 17 0;
#P connect 20 14 17 1;
#P connect 3 15 18 0;
#P connect 20 15 18 1;
#P pop;
#P newobj 142 49 78 9109513 p assign-reverse;
#B color 5;
#P newex 137 206 27 9109513 == 0;
#P toggle 53 174 15 0;
#P newex 165 245 35 9109513 gate;
#P newex 137 245 27 9109513 gate;
#P newex 85 245 45 9109513 gate;
#P newex 53 245 29 9109513 gate;
#P newex 53 267 42 9109513 swap;
#P number 120 174 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 72 174 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 15 55 261 308;
#P outlet 126 209 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 148 73 56 9109513 r totalslices;
#P window linecount 3;
#P comment 54 29 171 9109513 convert 0 into the next number in the series (5 0 0 becomes 5 6 7). numbers past [totalslices] are wrapped around.;
#P window linecount 1;
#P newex 148 176 27 9109513 -;
#P newex 12 153 146 9109513 if $i1 > $i2 then out2 $i1 else $i1;
#P newex 12 131 82 9109513 +;
#P newex 42 73 94 9109513 t b i i;
#N counter 1 8;
#X flags 0 0;
#P newobj 12 109 70 9109513 counter 1 8;
#P newex 12 50 40 9109513 sel 0;
#P inlet 12 29 15 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 5 0;
#P connect 1 1 3 0;
#P connect 3 0 2 2;
#P connect 8 0 2 4;
#P connect 3 1 4 1;
#P connect 6 0 9 0;
#P connect 3 2 9 0;
#P connect 5 0 9 0;
#P connect 8 0 5 1;
#P connect 5 1 6 0;
#P connect 8 0 6 1;
#P pop;
#P newobj 72 49 67 9109513 p zero-capture;
#B color 5;
#P newex 120 151 27 9109513 – 1;
#P newex 120 127 34 9109513 *;
#P newex 144 101 58 9109513 r slicelength;
#P newex 72 127 42 9109513 *;
#P newex 72 104 27 9109513 – 1;
#P number 72 75 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P comment 5 168 49 9109513 1 reverse 0 normal;
#P inlet 72 25 15 0;
#P outlet 53 300 15 0;
#P outlet 85 300 15 0;
#P fasten 20 0 18 0 147 71 58 71;
#P lcolor 13;
#P connect 18 0 14 0;
#P lcolor 13;
#P connect 14 0 13 0;
#P fasten 16 0 1 0 142 290 58 290;
#P connect 13 0 1 0;
#P connect 2 0 10 0;
#P connect 10 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 11 0;
#P connect 11 0 14 1;
#P lcolor 8;
#P connect 18 0 15 0;
#P lcolor 13;
#P connect 15 0 13 1;
#P fasten 17 0 0 0 170 294 90 294;
#P connect 13 1 0 0;
#P fasten 7 0 6 1 149 123 109 123;
#P fasten 4 0 8 0 77 96 125 96;
#P connect 8 0 9 0;
#P connect 9 0 12 0;
#P connect 12 0 15 1;
#P lcolor 8;
#P connect 18 0 19 0;
#P lcolor 13;
#P connect 19 0 16 0;
#P lcolor 13;
#P connect 2 0 20 0;
#P connect 7 0 8 1;
#P connect 11 0 16 1;
#P lcolor 8;
#P connect 19 0 17 0;
#P lcolor 13;
#P connect 12 0 17 1;
#P lcolor 8;
#P pop;
#P newobj 357 351 45 9109513 p calc-loop-points;
#B color 5;
#P window linecount 1;
#P comment 306 363 28 9109513 none;
#P comment 287 363 20 9109513 all;
#P button 310 377 15 0;
#P button 287 377 15 0;
#P hidden message 287 396 14 9109513 1;
#P hidden message 322 396 14 9109513 0;
#P window setfont “Sans Serif” 12.;
#P comment 126 342 105 9109516 reverse segments;
#P window setfont “Sans Serif” 9.;
#P hidden newex 8 415 60 9109513 s listreverse;
#P hidden newex 8 395 276 9109513 pak 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#P comment 8 363 17 9109513 1;
#P comment 127 363 17 9109513 8;
#P comment 110 363 17 9109513 7;
#P comment 93 363 17 9109513 6;
#P comment 76 363 17 9109513 5;
#P comment 59 363 17 9109513 4;
#P comment 42 363 17 9109513 3;
#P comment 25 363 17 9109513 2;
#P comment 144 363 17 9109513 9;
#P comment 263 363 17 9109513 16;
#P comment 246 363 17 9109513 15;
#P comment 229 363 17 9109513 14;
#P comment 212 363 17 9109513 13;
#P comment 195 363 17 9109513 12;
#P comment 178 363 17 9109513 11;
#P toggle 263 377 15 0;
#P toggle 246 377 15 0;
#P toggle 229 377 15 0;
#P toggle 212 377 15 0;
#P toggle 195 377 15 0;
#P toggle 178 377 15 0;
#P toggle 161 377 15 0;
#P toggle 144 377 15 0;
#P toggle 127 377 15 0;
#P toggle 110 377 15 0;
#P toggle 93 377 15 0;
#P toggle 76 377 15 0;
#P toggle 59 377 15 0;
#P toggle 42 377 15 0;
#P toggle 25 377 15 0;
#P toggle 8 377 15 0;
#P comment 161 363 17 9109513 10;
#N vpatcher 15 55 131 244;
#P window setfont “Sans Serif” 9.;
#P newex 57 74 19 9109513 t 0;
#P newex 57 52 28 9109513 sel 1;
#P newex 14 75 40 9109513 !/ 1000.;
#P newex 14 100 53 9109513 phasor~;
#P inlet 14 55 15 0;
#P inlet 57 32 15 0;
#P outlet 14 124 15 0;
#P connect 2 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 3 1;
#P pop;
#P newobj 421 445 53 9109513 p drivezoid;
#B color 5;
#P newex 421 467 92 9109513 trapezoid~ 0.02 0.98;
#B color 5;
#P button 3 65 15 0;
#N vpatcher 15 55 273 207;
#P window setfont “Sans Serif” 9.;
#P newex 30 106 60 9109513 s slicelength;
#P newex 13 30 56 9109513 r totalslices;
#P newex 42 52 50 9109513 r totaltime;
#P newex 13 52 27 9109513 t b i;
#P newex 13 79 27 9109513 / 1.;
#P outlet 13 107 15 0;
#P comment 94 47 138 9109513 total time / number of slices = time to play each slice (metro);
#P connect 5 0 3 0;
#P connect 4 0 2 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P connect 3 1 2 1;
#P connect 2 0 6 0;
#P pop;
#P newobj 81 219 53 9109513 p setmetro;
#B color 5;
#P hidden newex 299 198 56 9109513 loadmess 8;
#P hidden newex 299 179 58 9109513 s totalslices;
#P newex 81 167 52 9109513 s totaltime;
#P number 81 241 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 81 128 27 9109513 * 2;
#P number 81 150 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 81 106 27 9109513 / 2;
#P hidden newex 19 63 33 9109513 del 10;
#P hidden newex 19 42 19 9109513 t b;
#P hidden newex 110 22 71 9109513 loadmess 8000;
#P newex 3 84 105 9109513 info~ shf;
#P number 110 45 53 9 0 0 65 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 110 62 37 9109513 size $1;
#P number 25 303 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 25 321 43 9109513 fetch $1;
#P hidden newex 43 238 28 9109513 sel 0;
#P toggle 25 239 15 0;
#N counter 1 8;
#X flags 0 0;
#P newobj 25 281 66 9109513 counter 1 8;
#P newex 25 259 66 9109513 metro 1000;
#P toggle 131 463 15 0;
#P toggle 71 533 15 0;
#P newex 87 555 216 9109513 record~ shf 2;
#N vpatcher 49 58 171 272;
#P window setfont “Sans Serif” 9.;
#P newex 27 54 19 9109513 t b;
#P newex 27 146 42 9109513 thresh 5;
#P newex 55 100 28 9109513 del 5;
#N counter 1 8;
#X flags 0 0;
#P newobj 27 123 69 9109513 counter 1 8;
#P newex 27 77 40 9109513 uzi;
#P inlet 27 25 15 0;
#P outlet 27 170 15 0;
#P connect 1 0 6 0;
#P connect 6 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 0 0;
#P connect 2 1 4 0;
#P connect 4 0 3 2;
#P fasten 1 0 2 1 32 48 62 48;
#P fasten 1 0 3 4 32 44 88 44;
#P pop;
#P hidden newobj 299 216 37 9109513 p reset;
#B color 5;
#P number 202 221 35 9 1 16 67 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 3;
#P hidden message 298 134 77 9109513 size $1 , setminmax 0 $1 , bang;
#P user multiSlider 202 239 165 93 0. 8. 8 2921 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 newex 110 84 87 9109513 buffer~ shf 8000 2;
#P window linecount 3;
#P comment 110 108 42 9109513 keep the numbers even;
#P window linecount 2;
#P comment 93 278 100 9109513 count through multislider positions;
#P user panel 5 337 332 59;
#X brgb 209 235 177;
#X frgb 0 0 0;
#X border 0;
#X rounded 1;
#X shadow 0;
#X done;
#P comment 196 193 48 9109513 number of segments;
#P hidden connect 17 0 16 0;
#P hidden connect 17 0 34 1;
#P connect 81 0 80 2;
#P connect 33 0 83 1;
#P connect 33 0 94 1;
#P connect 34 0 33 0;
#P connect 27 0 12 1;
#P hidden connect 27 0 34 0;
#P connect 77 1 94 0;
#P connect 94 0 82 1;
#P connect 76 1 80 1;
#P connect 83 0 82 0;
#P connect 77 0 83 0;
#P connect 78 0 77 0;
#P connect 79 0 78 0;
#P connect 80 0 79 0;
#P connect 76 0 80 0;
#P connect 84 0 76 0;
#P connect 5 1 84 0;
#P hidden connect 73 0 70 0;
#P hidden connect 7 0 22 0;
#P hidden connect 7 0 13 4;
#P hidden connect 7 0 6 0;
#P hidden connect 7 0 29 0;
#P hidden connect 7 0 8 0;
#P hidden connect 72 0 71 0;
#P hidden connect 87 0 86 0;
#P hidden connect 51 0 67 15;
#P hidden connect 71 0 36 0;
#P hidden connect 71 0 37 0;
#P hidden connect 71 0 38 0;
#P hidden connect 71 0 39 0;
#P hidden connect 71 0 40 0;
#P hidden connect 71 0 41 0;
#P hidden connect 71 0 42 0;
#P hidden connect 71 0 43 0;
#P hidden connect 71 0 44 0;
#P hidden connect 71 0 45 0;
#P hidden connect 71 0 46 0;
#P hidden connect 71 0 47 0;
#P hidden connect 71 0 48 0;
#P hidden connect 71 0 49 0;
#P hidden connect 71 0 50 0;
#P hidden connect 71 0 51 0;
#P hidden connect 70 0 36 0;
#P hidden connect 70 0 37 0;
#P hidden connect 70 0 38 0;
#P hidden connect 70 0 39 0;
#P hidden connect 70 0 40 0;
#P hidden connect 70 0 41 0;
#P hidden connect 70 0 42 0;
#P hidden connect 70 0 43 0;
#P hidden connect 70 0 44 0;
#P hidden connect 70 0 45 0;
#P hidden connect 70 0 46 0;
#P hidden connect 70 0 47 0;
#P hidden connect 70 0 48 0;
#P hidden connect 70 0 49 0;
#P hidden connect 70 0 50 0;
#P hidden connect 70 0 51 0;
#P hidden connect 50 0 67 14;
#P hidden connect 49 0 67 13;
#P hidden connect 48 0 67 12;
#P hidden connect 16 0 5 0;
#P hidden connect 6 0 5 0;
#P hidden connect 8 0 5 0;
#P hidden connect 86 0 7 0;
#P hidden connect 30 0 7 0;
#P connect 90 1 92 2;
#P hidden connect 47 0 67 11;
#P hidden connect 46 0 67 10;
#P connect 89 0 92 1;
#P hidden connect 45 0 67 9;
#P connect 92 0 9 1;
#P connect 93 0 85 0;
#P fasten 93 0 92 0 92 507 160 507;
#P hidden connect 44 0 67 8;
#P connect 90 0 85 2;
#P connect 11 0 90 0;
#P hidden connect 43 0 67 7;
#P hidden connect 42 0 67 6;
#P hidden connect 18 0 22 0;
#P connect 18 0 4 0;
#P connect 19 0 18 0;
#P hidden connect 21 0 19 0;
#P connect 88 0 85 1;
#P hidden connect 41 0 67 5;
#P connect 85 0 9 0;
#P connect 10 0 95 0;
#P connect 10 0 9 0;
#P connect 91 0 93 0;
#P connect 31 0 27 0;
#P connect 25 0 28 0;
#P connect 26 0 25 0;
#P connect 24 0 26 0;
#P connect 20 6 24 0;
#P hidden connect 40 0 67 4;
#P hidden connect 95 0 10 0;
#P hidden connect 39 0 67 3;
#P hidden connect 15 0 13 2;
#P connect 14 0 12 0;
#P hidden connect 14 0 15 0;
#P hidden connect 38 0 67 2;
#P hidden connect 37 0 67 1;
#P connect 13 0 17 0;
#P connect 12 0 13 0;
#P hidden connect 22 0 23 0;
#P hidden connect 67 0 68 0;
#P hidden connect 36 0 67 0;
#P connect 32 0 20 0;
#P hidden connect 23 0 32 0;
#P window clipboard copycount 96;

Obviously still a work in progress.

#135925
Jul 15, 2008 at 5:27am

It’s coming along really well! I also like the added reverse segments interface makes for more versatility. And the trapezoid~ envelope seems to work well.

I don’t want to interfere too much. But maybe I’ve got some suggestions to consider not so much by necessity but for learning-sake and for future patches/changes/etc. Your way of doing things is working fine and you should stick to what you yourself like best. But just in case it helps…

First suggestion which would probably be really helpful is to use the record~ sync outlet so that you aren’t causing record~ shut-off to depend on a clocker interval(i.e. you can have sample-accurate shut-off).

Here’s an example using the recording-portion of your patch:

#P window setfont “Sans Serif” 9.;
#P window linecount 12;
#P comment 186 591 80 196617 you could have this which is synced to record~’s write operation using a signal(more sample-accurate and doesn’t depend on multiples of the clocker interval)->;
#P window linecount 1;
#P message 285 722 14 196617 0;
#P newex 285 701 36 196617 edge~;
#P newex 285 679 33 196617 < ~ 0.;
#P newex 285 655 46 196617 change~;
#N vpatcher 15 55 192 236;
#P window setfont “Sans Serif” 9.;
#P newex 74 66 50 196617 r totaltime;
#P newex 20 96 27 196617 sel;
#P newex 20 51 53 196617 clocker 10;
#P inlet 20 31 15 0;
#P outlet 20 120 15 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 0 0;
#P connect 4 0 3 1;
#P pop;
#P newobj 100 655 74 196617 p timerecord;
#B color 5;
#P newex 285 546 22 196617 + 1;
#P newex 353 575 59 196617 selector~ 2;
#P user umenu 285 483 73 196647 1 64 499 1;
#X add receive~;
#X add adc~;
#P newex 333 545 78 196617 adc~;
#P newex 377 503 68 196617 receive~ shfR;
#P newex 309 503 67 196617 receive~ shfL;
#P newex 285 575 59 196617 selector~ 2;
#P toggle 333 525 14 0;
#P toggle 269 596 15 0;
#P newex 285 618 216 196617 record~ shf 2;
#P comment 21 655 80 196617 instead of this->;
#P fasten 15 0 2 0 290 741 265 741 265 589 274 589;
#P connect 8 0 10 0;
#P connect 10 0 4 0;
#P fasten 2 0 1 0 274 614 290 614;
#P connect 4 0 1 0;
#P connect 1 0 12 0;
#P connect 12 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 15 0;
#P connect 5 0 4 1;
#P connect 3 0 7 0;
#P connect 7 0 4 2;
#P fasten 10 0 9 0 290 570 358 570;
#P connect 9 0 1 1;
#P connect 6 0 9 1;
#P connect 7 1 9 2;
#P window clipboard copycount 17;

#135926
Jul 15, 2008 at 5:45am

And my other suggestion would be for the “reverse segments” portion, you could use a matrixctrl object(which you can even customize with your own pics instead of depending on the look of toggles) which would then record the state of everything within one coll object. This might save you the hassle of setting up toggles and individual storage objects. What you’ve got works just fine, but someday, maybe you’ll want 32 steps or more and with a simpler setup you can alter it quicker/more easily.

(let me know if I’m pasting text wrong, I found an old copy of Max4.6 and I’m not as familiar anymore with the text formatting)

Here’s the example:

max v2;
#N vpatcher 57 170 662 608;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 215 295 36 196617 —–>;
#P window linecount 3;
#P comment 430 354 117 196617 < -...and the output will be 1s for every segment chosen to be reversed;
#P window linecount 2;
#P comment 340 250 96 196617 < -Connect this up to your multislider...;
#P window linecount 4;
#P comment 49 329 223 196617 (but you might need to +1 or -1 the input from the number box to get it working properly with your

subpatch… not sure… but you can try it out… see what works for you);
#P window linecount 2;
#P comment 69 288 145 196617 You can use this in place of the

subpatcher;
#P window linecount 3;
#P comment 174 102 7 196617 || |;
#P window linecount 7;
#P comment 135 136 100 196617 Using matrixctrl to send values to a coll object might be easier than setting up toggles and individual storage objects;
#P window linecount 1;
#P hidden newex 346 140 48 196617 loadbang;
#P hidden button 346 160 15 0;
#P hidden newex 346 179 30 196617 t b b;
#P window setfont “Sans Serif” 12.;
#P comment 100 44 124 196620 reverse segments;
#P window setfont “Sans Serif” 9.;
#P comment 35 66 17 196617 1;
#P comment 148 66 17 196617 8;
#P comment 132 66 17 196617 7;
#P comment 116 66 17 196617 6;
#P comment 100 66 17 196617 5;
#P comment 85 66 17 196617 4;
#P comment 69 66 17 196617 3;
#P comment 52 66 17 196617 2;
#P comment 164 66 17 196617 9;
#P comment 276 66 17 196617 16;
#P comment 259 66 17 196617 15;
#P comment 243 66 17 196617 14;
#P comment 227 66 17 196617 13;
#P comment 211 66 17 196617 12;
#P comment 195 66 17 196617 11;
#P comment 178 66 17 196617 10;
#P newex 347 285 69 196617 r listreverse;
#P hidden newex 33 99 74 196617 s listreverse;
#P button 333 80 15 0;
#P window linecount 2;
#P hidden message 334 97 237 196617 0 0 1 1 0 1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 1 7 0 1 8 0 1 9 0 1 10 0 1 11 0 1 12 0 1 13 0 1 14 0 1 15 0 1;
#P window linecount 1;
#P comment 300 68 28 196617 none;
#P comment 332 68 20 196617 all;
#P message 299 79 28 196617 clear;
#P number 395 353 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 306 253 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 347 333 58 196617 unpack 0 0;
#P user matrixctrl 33 78 258 18 MatrixDefaultCell.pct MatrixDefaultBkgnd.pct 258 18 16 16 16 1 16 16 1 1 48 2 5120 0;
#N coll ;
#T flags 1 0;
#T 0 0 0;
#T 1 0 0;
#T 2 0 0;
#T 3 0 0;
#T 4 0 0;
#T 5 0 0;
#T 6 0 0;
#T 7 0 0;
#T 8 0 0;
#T 9 0 0;
#T 10 0 0;
#T 11 0 0;
#T 12 0 0;
#T 13 0 0;
#T 14 0 0;
#T 15 0 0;
#P newobj 347 309 53 196617 coll;
#P window linecount 4;
#P hidden comment 378 163 100 196617 < - FIRST CLICK THIS BANG TO INITIALIZE THE COLL OBJECT TO A SERIES OF 0s;
#P user panel 20 43 332 59;
#X brgb 209 235 177;
#X frgb 0 0 0;
#X border 0;
#X rounded 1;
#X shadow 0;
#X done;
#P hidden fasten 10 0 3 0 339 124 27 124 27 73 38 73;
#P hidden fasten 7 0 3 0 304 117 22 117 22 75 38 75;
#P hidden connect 3 0 12 0;
#P hidden fasten 31 0 7 0 351 215 294 215 294 78 304 78;
#P hidden fasten 31 1 11 0 371 211 575 211 575 79 338 79;
#P hidden connect 11 0 10 0;
#P hidden connect 33 0 32 0;
#P hidden connect 32 0 31 0;
#P connect 13 0 2 0;
#P fasten 5 0 2 0 311 308 352 308;
#P connect 2 0 4 0;
#P connect 4 1 6 0;
#P pop;

#135927
Jul 15, 2008 at 6:33am

oh, i just noticed something weird, my first example of using the record~ sync outlet was made in Max 4.6.3 where it triggers properly using [record~]‘s sync outlet attached to [change~] attached to a [< ~ 0.] object. But in Max5, it seems [change~]‘s behavior has… changed. So in Max5 it would be [record~]‘s sync outlet attached to [change~] attached to a [==~ 0.] object (instead of a [<~ 0.] object). If there’s any problems, you can try one or the other… or just stick with what you made already.

(You can also use [delta~] instead of [change~]… click on the help-files, see what works, etc…. you’ll see what I’m trying to explain… sort of all comes from the sequencing-looping Max examples folder:
Max/examples/sequencing-looping/audio-rate-sequencing-looping…)

#135928

You must be logged in to reply to this topic.