4.63 – what is groove's 2nd outlet good for?

Dec 6, 2008 at 5:32pm

4.63 – what is groove's 2nd outlet good for?

hello again, this question probably seems stupid to you experienced max users again, please forgive my newbieness.

what do people use groove’s second outlet for?

i could imagine to use it to sync other groove objects to one master object, but this seems hindered by the absence (correct me i am wrong, please!) of an object able to read the loop positional signal from the second outlet to data, without a 20ms limit on the frequency of reading values.

is there an object for finer or even sample accurate resolution, nevertheless?
and what do you groovers use the second outlet for as well?

thank you very much for any more insight.

jrp

#41214
Dec 6, 2008 at 7:10pm

Here’s a patch that lets you sync up one groove~ to another and gives a sample accurate trigger for any other bits of your patch that might need it:

#P user scope~ 321 276 451 406 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 321 244 29 9109513 < ~ 0.;
#P newex 321 225 33 9109513 delta~;
#P toggle 74 204 15 0;
#P message 32 171 16 9109513 0.;
#P message 74 223 38 9109513 loop $1;
#P flonum 89 262 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 81 244 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 209 291 16 9109513 0.;
#P newex 209 269 34 9109513 edge~;
#P newex 209 246 39 9109513 ==~ -1.;
#P newex 209 225 48 9109513 change~;
#P user gain~ 62 442 24 100 158 0 1.071519 7.94321 10.;
#P user ezdac~ 52 571 96 604 0;
#P newex 209 319 59 9109513 groove~ two;
#P newex 10 276 36 9109513 sig~ 1.;
#P newex 61 319 60 9109513 groove~ one;
#P message 170 75 38 9109513 replace;
#P newex 170 96 56 9109513 buffer~ two;
#P message 50 75 38 9109513 replace;
#P newex 50 96 57 9109513 buffer~ one;
#P comment 117 244 30 9109513 start;
#P comment 127 263 31 9109513 end;
#P comment 351 407 67 9109513 or signal rate;
#P comment 73 339 38 9109513 master;
#P comment 222 339 32 9109513 slave;
#P connect 6 0 5 0;
#P connect 13 0 12 0;
#P fasten 10 0 9 0 15 311 66 311;
#P connect 21 0 9 0;
#P hidden connect 20 0 9 0;
#P connect 11 0 13 0;
#P connect 9 0 13 0;
#P connect 22 0 20 0;
#P hidden connect 18 0 9 1;
#P connect 13 0 12 1;
#P hidden connect 19 0 9 2;
#P connect 8 0 7 0;
#P fasten 9 1 14 0 116 356 185 356 185 197 214 197;
#P lcolor 7;
#P connect 14 0 15 0;
#P connect 15 0 16 0;
#P connect 16 0 17 0;
#P fasten 10 0 11 0 15 311 214 311;
#P connect 17 0 11 0;
#P fasten 9 1 23 0 116 356 292 356 292 195 326 195;
#P lcolor 7;
#P connect 23 0 24 0;
#P connect 24 0 25 0;
#P window clipboard copycount 26;

Regards
jan.

#146546
Dec 6, 2008 at 7:37pm

I’ve used it to create triggers for the end of playback. And I also recall using it to drive an amplitude windowing function. (Although with groove~’s interpolation function, I’m not quite sure why I would have needed to do that.)

#146547
Dec 6, 2008 at 9:33pm

Hello Jan, thank you very much.

Your patch works very nicely.
Now my problem is: I don’t understand why.
i tried changing the values in both the change as well as the delta variant, i can’t figure out, what exactly it does. do they detect the 0 as the start of teh sample, or the 1 as the full signal value when the groove has run throughout it;s whole length?

if you have time to explain this, i’d appreciate this very much, thank you,

jrp

#146548
Dec 6, 2008 at 10:20pm

They’re both detecting the start of the ramp but this may not be exactly 0. change~ isnt looking for a specific value but is detecting when the signal changes direction – it outputs a -1 when the signal decreases. This is what triggers the slaved groove~. The delta~ is doing much the same, but it outputs tha actual difference in consecutive samples.

Hope i make sense.
jan.

#146549
Dec 6, 2008 at 10:22pm

It’s a sync outlet so things like establishing master and slave connections to sync start of playback and amp-envelopes can use this to sync at sample-rate. Just figured I’d also chime in and tell you to check out the example in the examples folder which is pretty essential learning for sample usage whether you use groove~ or anything else:

Max5(or 4.6)/examples/sequencing-looping/audio-rate-sequencing-looping/grooveduck.maxhelp

and
grooveduck2.maxhelp in the same folder as well as the patches they depend on located within the “lib” subfolder.

Groove~’s interpolation doesn’t smooth everything perfectly so you often need to sync an amp-window/envelope. The grooveduck examples are one of many innovative ways to do this and the other ways often run on similar principles(0-1 ramp for a clock signal).

#146550
Dec 7, 2008 at 9:06pm

thank you, jan.

i’d assume one could as well instead measure the time, when the signal slips back to 0 instead, not? this would give one a small timeframe in advance of the loop start to already send a trigger, instead of always beeing behind the actual master groove start, if just a tiny little bit.

how could this be done?

jan(ek) – jrp

#146551
Dec 7, 2008 at 9:07pm

thank you rabidraja, i’ll make sure to check the grooveduck examples again!

)stupid me: grooveduck is what i am actually using…)

jrp

#146552
Dec 8, 2008 at 5:40pm

I’m not quite sure i Know what you mean. The second output of groove~ is already measuring the passage of time between the start and end loop points. So, I guess if you want to trigger another event slightly early you could use something like >~ 0.99 instead of checking for the start of the ramp.

But i don’t think this is a good idea. The problem is that you have to trigger the slaved groove~ with a message rather than drive it with a signal – so it’s unlikely to be sample accurate. Her is a link to another thread talking about sample accurate timing:

http://tinyurl.com/64ycyv

HTH
jan.

Quote: jayrope wrote on Sun, 07 December 2008 14:06
—————————————————-

> i’d assume one could as well instead measure the time, when the signal slips back to 0 instead, not? this would give one a small timeframe in advance of the loop start to already send a trigger, instead of always beeing behind the actual master groove start, if just a tiny little bit.
>
> how could this be done?
—————————————————-

#146553
Dec 9, 2008 at 2:54am

jan, thanx very much for your expertise.

i am actually triggering the slaved groove~ with a message of course. i was just wondering if grabbing the highest value before loop start would supply any timing advantadge.
actually, though, i don’t need to be sooo timing exact, since i like the musical output of vague timing in general.
meanwhile i am wondering if i can derive timed fragments from the example you demonstrated. looking at the curve of the output on a signal scope i wold assume, that grabbing >~ 0.25, >~ 0.5 & >~0.75 could give me quarter values as well. is that any useful idea, especially when trying to be exact in the first place (let alone the love for dealing with the vague). or would you go a different way to establish that, more exact, again?

appreciate your experience here very much already.

jrp

#146554
Dec 9, 2008 at 10:15pm

Well you could use a rate~ on the sync output and get 1/4 note (or anything else) that way.

Most of the time if i use groove, i’m triggering it from a metro and the timings usually good enough. If a more accurate timing is needed you could drive everything from a master phasor and use objects like play~ or wave instead. You might also find the el.player~ from the potpourri library helpful for real tight timing.

jan.

#146555
Dec 9, 2008 at 10:33pm

thanx for the hints, jan.

i was looking for a way to derive microtiming from the groove length itself, as i am using this in conjunction with live looping.
so i want to be able to derive a midi clock or a timed off-sync for other loops playing eventually, or as a trigegr for a panning, etc.

here’s a working example on the base of what you posted before. it’s a bit crude, and especially touchy, when you change the geographical order of the parts on the right side, but it works. especially it allows for unsual divisions, like 5 or 7 or 9 or 11 or basically any number one dials in, as a base for rhythms. somethign i always wished to have in midi, but never got, as 4 is the dictator there.

not anymore, ha.

erm, i guess this can be improved. happy about any contribution to this.

jrp

free division groove sync patch.

____________________________________________
< dist (clamped ibook)> 08/12/09 11:32:41 PM
max v2;
#N vpatcher 8 53 1000 652;
#P origin -414 -309;
#P window setfont “Sans Serif” 9.;
#P newex 584 77 27 196617 b;
#P message 670 366 14 196617 1;
#P message 688 366 14 196617 0;
#P newex 688 339 43 196617 delay 5;
#P toggle 670 402 15 0;
#P user gswitch 670 435 41 32 0 0;
#P message 670 271 14 196617 b;
#P newex 670 241 34 196617 edge~;
#P newex 670 216 69 196617 thresh~ 1. 1.;
#P number 601 103 35 9 1 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 692 169 60 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 1. 8.;
#X flags 0 0;
#P newobj 692 147 68 196617 counter 1. 8.;
#P newex 584 142 27 196617 / 4.;
#P message 521 270 14 196617 b;
#P newex 671 189 35 196617 *~ 1.;
#P button 520 292 24 0;
#P newex 521 196 34 196617 edge~;
#P newex 521 169 105 196617 thresh~ 0.125 0.125;
#P user scope~ 101 360 201 411 64 3 64 0. 1. 0 0. 0 0. 255 251 9 0 0 0 0;
#P newex 289 215 34 196617 edge~;
#P newex 289 193 40 196617 ==~ 1.;
#P button 324 370 24 0;
#P message 324 332 14 196617 b;
#P button 429 369 24 0;
#P message 429 332 14 196617 b;
#P newex 430 216 34 196617 edge~;
#P newex 430 195 50 196617 >~ -0.99;
#P button 403 369 24 0;
#P button 297 370 24 0;
#P message 403 332 14 196617 b;
#P message 297 332 14 196617 b;
#P newex 380 215 34 196617 edge~;
#P newex 380 195 30 196617 < ~ 0;
#P newex 380 172 33 196617 delta~;
#P toggle 64 151 15 0;
#P message 22 118 16 196617 0.;
#P message 64 170 38 196617 loop $1;
#P flonum 80 211 39 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 70 191 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 199 238 16 196617 0.;
#P newex 199 216 34 196617 edge~;
#P newex 199 193 45 196617 ==~ -1.;
#P newex 199 172 48 196617 change~;
#P user gain~ 51 389 24 100 158 0 1.071519 7.94321 10.;
#P user ezdac~ 41 518 85 551 0;
#P newex 199 266 73 196617 groove~ two;
#P newex 0 223 41 196617 sig~ 1.;
#P newex 51 266 60 196617 groove~ one;
#P message 160 22 38 196617 replace;
#P newex 160 43 70 196617 buffer~ two;
#P message 40 22 38 196617 replace;
#P newex 40 43 57 196617 buffer~ one;
#P comment 107 191 30 196617 start;
#P comment 121 211 31 196617 end;
#P comment 378 244 67 196617 or signal rate;
#P comment 63 286 38 196617 master;
#P comment 212 286 32 196617 slave;
#P button 670 291 24 0;
#P comment 643 103 100 196617 < - change this....;
#P connect 8 0 7 0;
#P connect 15 0 14 0;
#P fasten 12 0 11 0 5 258 56 258;
#P connect 23 0 11 0;
#P hidden connect 22 0 11 0;
#P connect 13 0 15 0;
#P connect 11 0 15 0;
#P connect 24 0 22 0;
#P connect 15 0 14 1;
#P hidden connect 20 0 11 1;
#P hidden connect 21 0 11 2;
#P connect 11 1 40 0;
#P connect 10 0 9 0;
#P fasten 11 1 16 0 106 303 175 303 175 144 204 144;
#P lcolor 7;
#P connect 16 0 17 0;
#P connect 17 0 18 0;
#P connect 27 0 19 0;
#P fasten 12 0 13 0 5 258 204 258;
#P connect 19 0 13 0;
#P connect 16 0 38 0;
#P connect 38 0 39 0;
#P connect 18 0 28 0;
#P connect 28 0 30 0;
#P connect 39 0 36 0;
#P connect 36 0 37 0;
#P fasten 11 1 25 0 106 303 365 303 365 142 385 142;
#P lcolor 7;
#P connect 25 0 26 0;
#P connect 26 0 27 0;
#P connect 27 0 29 0;
#P connect 29 0 31 0;
#P connect 33 0 34 0;
#P connect 34 0 35 0;
#P connect 25 0 32 0;
#P connect 32 0 33 0;
#P fasten 45 0 43 0 525 286;
#P connect 44 0 41 0;
#P connect 41 0 42 0;
#P connect 42 0 45 0;
#P connect 46 0 41 1;
#P connect 48 0 58 0;
#P connect 48 0 46 0;
#P connect 58 0 46 0;
#P connect 58 0 49 0;
#P connect 49 0 46 1;
#P connect 46 0 41 2;
#P connect 44 0 50 0;
#P connect 50 0 51 0;
#P connect 51 0 52 0;
#P connect 52 0 1 0;
#P connect 1 0 57 0;
#P connect 56 0 54 0;
#P connect 57 0 54 0;
#P connect 54 0 53 0;
#P fasten 11 1 44 0 106 304 502 304 502 129 676 129;
#P connect 43 0 53 1;
#P connect 1 0 55 0;
#P connect 55 0 56 0;
#P fasten 53 0 47 0 812 467 812 134 697 134;
#P connect 47 0 48 0;
#P connect 1 0 53 2;
#P connect 49 0 47 4;
#P pop;

#146556
Dec 10, 2008 at 9:31am

#146557

You must be logged in to reply to this topic.