groove~ sync output help

Apr 23, 2006 at 3:10pm

groove~ sync output help

hi. the patch below is my first attempt at granular synthesis of any kind- its kind of a tacky time stretcher that works with groove. a line gives groove~ new loop start points, and allows you to change the length of the recording. i’ve been trying to apply an envelope to each ‘grain’, but i’ve been running into problems with the sync output not ramping from 0-1. i suspect it’s because of a timing issue causing problems with the new loop times being triggered before the old ones have completed, but i thought i’d made allowances for that. i’ve included a cut down version of the patch.

if anyone feels like having a little peek, i’d be extremely grateful

thanks

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 80 55 870 658;
#P origin 49 28;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 259 468 45 196617 +~ 0.75;
#P newex 259 433 40 196617 *~ 0.5;
#P newex 230 509 39 196617 cycle~;
#P newex 122 361 125 196617 trapezoid~ 0.1 0.9;
#B color 5;
#P newex 105 410 27 196617 *~;
#P message 322 159 20 196617 50;
#P flonum 322 206 53 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 381 206 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 303 72 15 0;
#P message 93 158 14 196617 1;
#P flonum 350 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 28 455 55 196617 delay~ 15;
#N vpatcher 539 355 835 795;
#P window setfont “Sans Serif” 9.;
#P flonum 82 67 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P inlet 190 35 15 0;
#P inlet 26 35 15 0;
#P message 26 204 56 196617 $1 , $2 $3;
#P button 26 111 15 0;
#P message 26 141 14 196617 0;
#P newex 26 172 66 196617 pack 0. 0. 0.;
#P newex 26 236 56 196617 line 0.;
#P newex 82 139 27 196617 * 2;
#P inlet 82 35 15 0;
#P inlet 136 35 15 0;
#P outlet 120 277 15 0;
#P outlet 72 277 15 0;
#P outlet 26 277 15 0;
#P connect 13 0 9 0;
#P connect 11 0 9 0;
#P connect 9 0 8 0;
#P connect 8 0 7 0;
#P connect 7 0 10 0;
#P connect 10 0 6 0;
#P connect 6 0 0 0;
#P connect 13 0 7 1;
#P connect 12 0 6 2;
#P connect 6 1 1 0;
#P connect 4 0 13 0;
#P connect 13 0 5 0;
#P connect 5 0 7 2;
#P connect 3 0 5 1;
#P fasten 13 0 2 0 87 98 125 98;
#P pop;
#P newobj 303 107 131 196617 p line_gen;
#P message 265 158 14 196617 0;
#P button 363 140 15 0;
#P newex 265 266 34 196617 + 50.;
#P flonum 265 206 53 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 83 42 48 196617 loadbang;
#P toggle 83 206 15 0;
#P message 26 239 68 196617 loopinterp $1;
#P flonum 130 206 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 219 206 40 196617 loop 0;
#P newex 173 158 56 196617 select 0;
#P message 173 206 40 196617 loop 1;
#P message 105 206 17 196617 0.;
#P newex 130 268 29 196617 sig~;
#P newex 105 312 170 196617 groove~ sample1;
#P toggle 173 107 15 0;
#P window linecount 2;
#P comment 417 71 85 196617 multiplication factor of original;
#P window linecount 1;
#P comment 1 206 79 196617 groove controls;
#P comment 322 191 53 196617 grain size;
#P window linecount 6;
#P comment 420 250 131 196617 ‘grain size’ is fed into line_gen’s line as the time grain value , to ensure line only outputs a new value to groove~ when the old loop has played through. somehow , it clicks occasionally.;
#P comment 584 22 146 196617 monophonic_stretcher plays the recorded sample through a groove~ in grains controlled by a line to allow a give rough ‘timestretching’ effect with independent pitch control;
#P inlet 303 42 15 0;
#P inlet 413 42 15 0;
#P inlet 173 42 15 0;
#P inlet 350 42 15 0;
#P inlet 322 42 15 0;
#P inlet 214 42 15 0;
#P outlet 105 491 15 0;
#P outlet 28 491 15 0;
#P outlet 363 491 15 0;
#P window linecount 0;
#P comment 250 534 100 196617 i’ve tried with this envelope also – no difference;
#P connect 24 0 23 0;
#P connect 38 0 31 0;
#P connect 31 0 2 0;
#P connect 25 0 24 0;
#P connect 25 0 33 0;
#P connect 20 0 18 0;
#P fasten 23 0 16 0 31 269 110 269;
#P fasten 19 0 16 0 178 239 110 239;
#P connect 18 0 16 0;
#P connect 17 0 16 0;
#P fasten 21 0 16 0 224 239 110 239;
#P connect 16 0 38 0;
#P connect 38 0 3 0;
#P connect 16 1 39 0;
#P connect 39 0 38 1;
#P connect 20 0 22 0;
#P connect 33 0 22 0;
#P connect 4 0 22 0;
#P connect 22 0 17 0;
#P connect 7 0 15 0;
#P fasten 15 0 20 0 178 139 178 139;
#P connect 20 0 19 0;
#P connect 26 0 16 1;
#P connect 20 1 21 0;
#P connect 41 0 42 0;
#P connect 42 0 40 1;
#P fasten 15 0 29 0 178 139 270 139;
#P fasten 30 0 26 0 308 189 270 189;
#P connect 29 0 26 0;
#P connect 26 0 27 0;
#P connect 27 0 16 2;
#P fasten 36 0 27 1 327 237 294 237;
#P connect 9 0 34 0;
#P connect 34 0 30 0;
#P connect 25 0 37 0;
#P connect 37 0 36 0;
#P connect 5 0 36 0;
#P connect 8 0 30 1;
#P connect 6 0 32 0;
#P connect 30 1 28 0;
#P connect 28 0 1 0;
#P fasten 30 2 35 0 428 188 386 188;
#P connect 32 0 30 2;
#P connect 36 0 30 3;
#P pop;
#P newobj 76 252 315 196617 p monophonic_stretcher~;
#P user ezdac~ 76 344 120 377 0;
#P number 320 222 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 259 222 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 76 23 15 0;
#P comment 185 208 52 196617 play line;
#P button 198 222 15 0;
#P comment 320 208 145 196617 length (* factor of original);
#P comment 251 208 52 196617 grain size;
#P flonum 137 222 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 76 125 185 196617 t i i;
#N vpatcher 274 179 703 467;
#P button 280 116 15 0;
#N comlet bang when recorded;
#P outlet 280 222 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 162 86 128 196617 togedge;
#P button 162 116 15 0;
#P message 162 151 33 196617 clear;
#P message 65 86 33 196617 start;
#P newex 65 116 40 196617 adc~ 1;
#P newex 65 151 86 196617 record~ sample1;
#P newex 162 183 117 196617 buffer~ sample1 60000;
#N comlet 1 clears buffer , turns on audio , starts record~. 0 turns off record;
#P inlet 25 38 15 0;
#P window linecount 0;
#P comment 298 33 100 196617 1 clears buffer , turns on audio , starts record~. 0 turns off record. bang out when record~ stops;
#P connect 1 0 5 0;
#P lcolor 1;
#P connect 5 0 4 0;
#P connect 4 0 3 0;
#P connect 1 0 3 0;
#P lcolor 1;
#P connect 1 0 8 0;
#P lcolor 1;
#P connect 8 0 7 0;
#P connect 7 0 6 0;
#P connect 6 0 2 0;
#P connect 8 1 10 0;
#P connect 10 0 9 0;
#P lcolor 1;
#P pop;
#P newobj 101 64 112 196617 p record_sample1_adc;
#P button 380 285 15 0;
#P newex 251 157 44 196617 togedge;
#P newex 251 180 44 196617 timer;
#P comment 127 208 60 196617 grain pitch;
#P connect 11 0 5 0;
#P connect 11 0 4 0;
#P connect 9 0 15 2;
#P connect 1 0 15 5;
#P connect 5 0 15 0;
#P connect 13 0 15 4;
#P connect 12 0 15 3;
#P connect 6 0 15 1;
#P connect 15 1 14 1;
#P connect 15 0 14 0;
#P connect 15 2 3 0;
#P connect 5 1 2 0;
#P connect 2 0 1 0;
#P connect 2 1 1 1;
#P window clipboard copycount 16;

#25610
Apr 24, 2006 at 5:41pm

For doing granular stuff, I recommend using one of the lower-level
playback objects like play~,wave~, or 2d.wave~ driven by phasor~ or
line~. This will give you a more dependable ramp to work with.

AB

#75569
Apr 25, 2006 at 6:44pm

thanks andrew, definately some useful ideas there. i think i’ll take the play~ route instead. i’ve realised some stupid mistakes i’ve been making here, and play~ seems a lot more straight forward for what i want to do. thanks again – i really dont know what i’d do without this list!!

#75570

You must be logged in to reply to this topic.