Forums > MaxMSP

Precise Rhythm

January 13, 2008 | 2:39 am

I have been fooling around with a bunch of different configurations in my patches, trying to make one that will trigger at precise intervals. It is a sort of a drum machine in that it needs to play repeated patterns in precise time. On my machine, at least, the rate at which bangs are triggered is inconsistent. Could anyone look at my patch and see where I could improve it to make the bangs trigger more precisely, i.e. for each cycle of the phasor~ object I would like there to be 1 playing of one buffer~ and any number of playings, divided equally temporally.

max v2;
#N vpatcher 469 190 1069 590;
#P button 283 221 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 330 139 39 196617 < ~ 0.5;
#P message 329 180 14 196617 0;
#P newex 329 159 36 196617 edge~;
#P newex 48 187 39 196617 < ~ 0.5;
#P button 74 264 15 0;
#P message 47 228 14 196617 0;
#P newex 47 207 36 196617 edge~;
#P message 434 280 56 196617 read 0 -1.;
#P message 324 281 56 196617 read 0 -1.;
#P flonum 440 202 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 342 201 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 440 221 29 196617 sig~;
#P newex 342 220 29 196617 sig~;
#P newex 440 255 74 196617 groove~ one 2;
#P newex 342 255 74 196617 groove~ one 2;
#P newex 432 305 106 196617 buffer~ two 30000 2;
#P newex 324 305 104 196617 buffer~ one 30000 2;
#P newex 330 119 37 196617 %~ 1.;
#P flonum 322 35 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 300 89 35 196617 *~ 2.;
#P message 252 325 29 196617 stop;
#P message 181 325 67 196617 startwindow;
#P newex 181 351 31 196617 dac~;
#P newex 46 166 46 196617 phasor~;
#P flonum 46 105 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 0 0 1 0;
#P connect 21 0 18 0;
#P connect 18 1 19 0;
#P connect 1 0 21 0;
#P connect 18 1 20 0;
#P connect 11 0 2 0;
#P fasten 4 0 2 0 257 344 186 344;
#P connect 3 0 2 0;
#P connect 10 0 2 1;
#P connect 23 0 25 0;
#P connect 1 0 5 0;
#P connect 16 0 8 0;
#P connect 6 0 5 1;
#P connect 24 0 22 0;
#P connect 22 1 23 0;
#P connect 5 0 7 0;
#P connect 7 0 24 0;
#P connect 14 0 12 0;
#P connect 19 0 10 0;
#P connect 12 0 10 0;
#P fasten 17 0 9 0 437 304;
#P connect 15 0 13 0;
#P connect 23 0 11 0;
#P connect 13 0 11 0;
#P pop;


January 13, 2008 | 1:24 pm

I couldn’t resist to clean your patch up a bit (see below).

As an answer to your question: did you try with overdrive enabled?

And a real answer: to have precise playback you’d need to drive the sample position with a signal instead of an event, for example utilizing wave~ instead of groove~.

Mattijs

#P button 123 164 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 115 119 39 196617 < ~ 0.5;
#P message 140 164 14 196617 0;
#P newex 114 139 36 196617 edge~;
#P newex 54 119 39 196617 < ~ 0.5;
#P button 61 164 15 0;
#P message 80 164 14 196617 0;
#P newex 54 139 36 196617 edge~;
#P message 344 221 56 196617 read 0 -1.;
#P message 236 221 56 196617 read 0 -1.;
#P flonum 102 191 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 20 190 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 102 210 29 196617 sig~;
#P newex 20 209 29 196617 sig~;
#P newex 102 244 74 196617 groove~ one 2;
#P newex 20 244 74 196617 groove~ one 2;
#P newex 344 245 106 196617 buffer~ two 30000 2;
#P newex 236 245 104 196617 buffer~ one 30000 2;
#P newex 115 99 37 196617 %~ 1.;
#P flonum 140 27 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 115 79 35 196617 *~ 2.;
#P message 258 292 29 196617 stop;
#P message 187 292 67 196617 startwindow;
#P newex 187 332 31 196617 dac~;
#P newex 54 46 46 196617 phasor~;
#P flonum 54 27 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 22 1 25 0;
#P connect 22 1 23 0;
#P connect 18 1 20 0;
#P connect 18 1 19 0;
#P connect 1 0 21 0;
#P connect 1 0 5 0;
#P fasten 10 0 2 0 25 328 192 328;
#P fasten 11 0 2 1 107 324 213 324;
#P connect 23 0 11 0;
#P connect 13 0 11 0;
#P connect 15 0 13 0;
#P fasten 17 0 9 0 349 244;
#P connect 12 0 10 0;
#P connect 19 0 10 0;
#P connect 14 0 12 0;
#P connect 7 0 24 0;
#P connect 5 0 7 0;
#P connect 24 0 22 0;
#P connect 6 0 5 1;
#P connect 16 0 8 0;
#P connect 3 0 2 0;
#P fasten 4 0 2 0 263 311 192 311;
#P connect 21 0 18 0;
#P connect 0 0 1 0;
#P window clipboard copycount 26;


January 13, 2008 | 1:56 pm

Have a look at Eric Lyon’s el.samm, el.player etc. at
http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/
Cheers
Roger

On 13/1/08 13:24, "Mattijs Kneppers" wrote:
>
> And a real answer: to have precise playback you’d need to drive the sample
> position with a signal instead of an event, for example utilizing wave~
> instead of groove~.
>


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