using groove~ sync output to generate envelop

May 10, 2006 at 12:15pm

using groove~ sync output to generate envelop

Hello list,

I am new to max so apologies for the newbie question.

I am trying to add an envelope to the output of groove (in loop mode) so that it does not produce clicks during the playback. I know that the sync output ramps to 1 at the end of the selected (playback) portion of the buffer but I cannot figure out how to use it to trigger a line object for fading in and out the signal. Any helps will be very much appreciated.

Thanks in advance
Peiman

#25906
May 10, 2006 at 1:35pm

fill a buffer~ with the wanted window lookup table.

don’t use line, use a wave~ reffering to the buffer~ with the lookup table.

hook the sync output from groove~ to wave~.

multiply the output from groove~ with the output from wave~

that is it…
——————————————
you should also take a look at the grooveduck example patch ;)

#76853
May 10, 2006 at 5:14pm

You might just want to run the groove~ through a trapezoid~ object and then multiply (*~) it to the signal. Here you have an envelope you can easily adjust to get rid of the clicks and still preserve the attack in the loop.

max v2;
#N vpatcher 110 89 665 564;
#P origin -29 -21;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 291 115 29 196617 down;
#P user number~ 292 134 333 149 9 3 3 1 0. 0. 0 0.91 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 235 134 276 149 9 3 3 1 0. 0. 0 0.03 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 236 115 29 196617 up;
#P user scope~ 332 260 462 390 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P newex 188 169 125 196617 trapezoid~ 0.1 0.9;
#B color 5;
#P newex 123 187 32 196617 *~ 1;
#P message 69 226 27 196617 stop;
#P message 0 226 65 196617 startwindow;
#P newex 123 259 29 196617 dac~;
#P newex 101 64 48 196617 loadbang;
#P message 101 85 37 196617 loop 1;
#P toggle 67 69 15 0;
#P newex 67 94 27 196617 sig~;
#P number 224 66 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 156 66 57 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 385 65 43 196617 replace;
#P newex 387 90 72 196617 buffer~ sound;
#P newex 123 120 75 196617 groove~ sound;
#P connect 6 0 5 0;
#P connect 8 0 7 0;
#P connect 7 0 0 0;
#P connect 5 0 0 0;
#P connect 0 0 12 0;
#P connect 12 0 9 0;
#P fasten 10 0 9 0 5 254 128 254;
#P fasten 11 0 9 0 74 254 128 254;
#P connect 12 0 9 1;
#P connect 13 0 12 1;
#P connect 3 0 0 1;
#P connect 4 0 0 2;
#P connect 0 1 13 0;
#P connect 16 0 13 1;
#P connect 17 0 13 2;
#P connect 13 0 14 0;
#P connect 2 0 1 0;
#P pop;

-Morten_E

#76854
May 13, 2006 at 11:46am

Easiest solution I’ve seen so far some days ago (not my idea):
a trapezoid~:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 93 163 68 196617 *~;
#P newex 151 131 98 196617 trapezoid~ 0.1 0.9;
#P newex 93 106 68 196617 groove~ blah;
#P connect 0 1 1 0;
#P connect 1 0 2 1;
#P connect 0 0 2 0;
#P window clipboard copycount 3;

You might want to adjust the parameters with some info about the length
of you buffer~, use info~ for that.

If you want to crossfade a loop I’d look int xgroove~ from Thomas
Grill. (search at Maxobjects.com)

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#76855
May 18, 2006 at 10:03pm

Hello again,

I would just like to thank everyone for their replies it has been most helpful.

Thanks again
Peiman

#76856

You must be logged in to reply to this topic.