Forums > MaxMSP

Sync to MIDI Clock

September 23, 2006 | 2:21 am

Hi,
How do I adapt this sampler to sync it’s playback speed to external MIDI clock?
Thanks!
max v2;
#N vpatcher 157 119 1010 504;
#P origin 0 7;
#P window setfont Georgia 9.;
#P hidden newex 616 37 49 9961481 loadbang;
#P hidden message 580 60 14 9961481 1;
#P message 536 79 40 9961481 import;
#P user gain~ 475 292 13 10 158 0 1.071519 7.94321 10.;
#P user ezdac~ 430 292 474 325 0;
#P hidden button 77 327 15 0;
#P user pictslider 17 90 19 76 0 0 0 0 wfknob.pct 1 wfmodes.pct 1 2146 0 0 196608 1. 1.;
#P window setfont Georgia 10.;
#P comment 475 32 52 9961482 select all;
#P message 473 49 44 9961482 0 -1 0 -1;
#N vpatcher 40 55 278 404;
#P window setfont "Sans Serif" 9.;
#P newex 96 202 27 9109513 int;
#N coll ;
#T flags 1 0;
#T 0 mode select;
#T 1 mode loop;
#T 2 mode move;
#T 3 mode draw;
#P newobj 131 255 53 9109513 coll;
#P button 75 117 15 0;
#N comlet waveform~ mode messages;
#P inlet 74 164 15 0;
#P newex 113 88 27 9109513 < < 1;
#P newex 96 140 40 9109513 change;
#P newex 96 164 45 9109513 select 0;
#P newex 96 117 27 9109513 |;
#P outlet 131 284 15 0;
#P newex 45 62 78 9109513 modifiers 100;
#P connect 5 0 7 0;
#P connect 0 3 2 0;
#P connect 7 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 9 0;
#P connect 6 0 9 0;
#P connect 0 4 5 0;
#P connect 5 0 2 1;
#P connect 9 0 8 0;
#P connect 3 1 8 0;
#P connect 8 0 1 0;
#P pop;
#P hidden newobj 144 16 50 9961482 p wfkeys;
#P hidden message 322 174 35 9961482 set $1;
#P hidden message 221 176 35 9961482 set $1;
#P hidden message 129 171 35 9961482 set $1;
#P hidden message 33 171 35 9961482 set $1;
#P comment 89 269 263 9961482 clips sample values to window display in draw mode;
#P toggle 70 269 15 0;
#P message 4 267 65 9961482 clipdraw $1;
#P hidden message 613 327 35 9961482 loop 1;
#P button 70 286 15 0;
#P hidden newex 6 286 31 9961482 float;
#P comment 89 284 185 9961482 normalize buffer~ (destructive edit);
#P flonum 34 286 35 10 0 0 0 152 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 4 320 72 9961482 normalize $1;
#P hidden message 9 210 14 9961482 1;
#P comment 91 249 253 9961482 set vertical offset (amplitude at middle of display);
#P flonum 55 249 35 10 0 0 0 152 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 0 248 54 9961482 voffset $1;
#P comment 91 234 293 9961482 set vertical zoom (amplitude from middle to top of display);
#P comment 91 216 100 9961482 undo last selection;
#P comment 89 301 252 9961482 crop buffer~ to current selection (destructive edit);
#P message 57 215 33 9961482 undo;
#P flonum 55 233 35 10 0. 0 1 152 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 2 231 52 9961482 vzoom $1;
#P message 58 302 29 9961482 crop;
#P newex 497 262 31 9961482 adc~;
#P comment 582 304 231 9961482 • record into buffer~ to see dynamic updating;
#P toggle 498 285 15 0;
#P newex 498 303 83 9961482 record~ sample;
#P comment 389 40 73 9961482 select end ms;
#P comment 267 40 79 9961482 select start ms;
#P comment 145 40 97 9961482 display length ms;
#P flonum 398 54 49 10 0 0 0 152 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 278 54 49 10 0 0 0 152 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 158 54 49 10 0 0 0 152 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 38 54 49 10 0 0 0 152 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 23 196 67 9961482 set sample 1;
#P user waveform~ 38 76 490 93 152 10;
#W mode loop;
#W mouseoutput continuous;
#W unit ms;
#W grid 500.;
#W ticks 8;
#W labels 1;
#W vlabels 1;
#W vticks 1;
#W voffset 0.07;
#W bpm 120. 4.;
#W frgb 58 255 89;
#W brgb 0 0 0;
#W rgb2 0 232 96;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 214 219 233;
#W rgb6 108 108 108;
#W rgb7 78 74 220;
#P comment 25 40 88 9961482 display start ms;
#P comment 91 199 186 9961482 link waveform~ to [ buffer , channel];
#P flonum 395 199 35 10 0 0 0 152 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 548 158 15 0;
#P hidden message 548 178 72 9961482 loopinterp $1;
#P message 390 259 23 9961482 0.5;
#P message 384 237 17 9961482 -1;
#P toggle 548 175 15 0;
#P hidden message 635 173 41 9961482 loop $1;
#P toggle 375 218 15 0;
#P hidden newex 372 279 29 9961482 sig~;
#P newex 450 174 84 9961482 groove~ sample;
#B color 5;
#P message 536 98 30 9961482 read;
#P newex 536 118 83 9961482 buffer~ sample;
#B color 15;
#P comment 569 99 102 9961482 • open a sample file;
#P comment 565 174 66 9961482 • loop on/off;
#P comment 393 219 170 9961482 • play normal speed forward/stop;
#P comment 405 238 62 9961482 • backward;
#P comment 416 260 36 9961482 • slow;
#P comment 565 157 206 9961482 • turn interpolation at loop points on/off;
#P comment 432 200 66 9961482 • vari-speed;
#P hidden connect 42 0 41 0;
#P hidden connect 36 0 35 0;
#P hidden connect 52 0 51 0;
#P hidden connect 48 0 45 0;
#P hidden connect 49 0 48 0;
#P hidden connect 7 1 22 0;
#P hidden connect 46 0 48 1;
#P hidden connect 21 0 54 0;
#P hidden connect 66 0 46 0;
#P hidden connect 44 0 46 0;
#P hidden connect 54 0 23 0;
#P hidden fasten 34 0 21 0 63 326 43 326;
#P hidden connect 58 0 21 0;
#P hidden connect 41 0 21 0;
#P hidden connect 35 0 21 0;
#P hidden connect 22 0 21 0;
#P connect 23 0 21 0;
#P hidden connect 37 0 21 0;
#P hidden fasten 45 0 21 0 9 345 43 345;
#P hidden fasten 51 0 21 0 9 295 43 295;
#P hidden connect 44 0 36 0;
#P hidden connect 34 0 62 0;
#P hidden connect 21 1 55 0;
#P hidden connect 61 1 58 0;
#P hidden connect 55 0 24 0;
#P connect 24 0 21 1;
#P hidden connect 21 2 56 0;
#P hidden connect 56 0 25 0;
#P connect 25 0 21 2;
#P hidden connect 21 3 57 0;
#P hidden connect 11 0 10 0;
#P hidden connect 14 0 10 0;
#P hidden connect 15 0 10 0;
#P hidden connect 18 0 10 0;
#P hidden connect 66 0 18 0;
#P hidden connect 57 0 26 0;
#P connect 26 0 21 3;
#P hidden connect 64 0 63 0;
#P hidden connect 12 0 9 0;
#P hidden connect 10 0 9 0;
#P hidden connect 16 0 9 0;
#P hidden connect 64 0 63 1;
#P hidden connect 62 0 59 0;
#P hidden connect 9 0 64 0;
#P hidden connect 21 2 9 1;
#P connect 31 0 30 0;
#P hidden fasten 33 0 30 0 502 275 503 275;
#P hidden fasten 50 0 30 0 618 351 503 351;
#P fasten 59 0 21 4 478 71 523 71;
#P hidden connect 21 3 9 2;
#P hidden connect 65 0 7 0;
#P connect 8 0 7 0;
#P hidden connect 66 0 17 0;
#P hidden connect 66 0 13 0;
#P hidden connect 17 0 16 0;
#P hidden connect 67 0 66 0;
#P hidden connect 13 0 12 0;
#P pop;


September 23, 2006 | 7:17 pm

how do you want it to sync ??

rearrange it, loopsynched, trigger ?

—the groove~ object is not very good for synching, except for trigger synching… look into the Index~, Play~ or wave~ objects. You can use a rtin -> sync~ to drive them…


September 23, 2006 | 11:13 pm

Quote: spleef wrote on Sat, 23 September 2006 13:17
—————————————————-
> how do you want it to sync ??
>
> rearrange it, loopsynched, trigger ?
>
> —the groove~ object is not very good for synching, except for trigger synching… look into the Index~, Play~ or wave~ objects. You can use a rtin -> sync~ to drive them…
—————————————————-

Thanks! I’ll look at these. Rearrange, loopsync, trigger — all of those would be ideal to have at some point.


Viewing 3 posts - 1 through 3 (of 3 total)