clicks and bits, or: AAARGH, i want a real analog sequencer…

Dec 8, 2009 at 12:31pm

clicks and bits, or: AAARGH, i want a real analog sequencer…

hi,

i can control my analog synth with max/msp by sending dc out from my motu. i can trigger my modifed mattel synsonics from max/msp. hurray, real analog sounds with flexible control! but now i want to use 16th note pulses coming from another analog drummachine as a master clock. and i just can’t get it to work.

i’ve built many stepsequencers in max, never had any timing problems. but so far it was always max that served as master clock. now, going from the signal to data domain and then back to signal domain gives me completely unusuable timing (yes i’ve tried making vector sizes smaller and yes, overdrive and audio interupt mode are both on), i figured i need to stay in the signal domain.

first of all, i need to change those pulses into clean clicks. which seems to be a lot harder then i thought. with thresh~ i can’t get it small enough. the only way i can think of is edge~ -> click~ but that means leaving the signal domain.

secondly, once i have those clicks i need a way to count them. +=~ does that beautifully, but can only be reset with a bang (i’m still in max/msp 4.6). i also tried el.mask~ -> el.clickhold~. also very nice, but i can’t tell it to start from 0 again once it’s started running.

i experimented with sync~, rate~ and sah~ as well, but when i feed sync~ with clicks~ i get anything but a smooth ramp. lots of high frequent mess, with little bits of ramp in between. apart from that, sync~ just keeps running even if doesn’t receive click~. and the stop message doesn’t actually stop it, it pauses the ramp. the other problem is that my 16th note pulses are to fast for sync~, it wants quarter notes.

any ideas? (other then finally actually building that real analog sequencer i’ve been planning to make for years…) ?

#47109
Dec 8, 2009 at 12:50pm

bonk~ is your friend. You can find it in the maxobjects.com database.

#169347
Dec 8, 2009 at 2:22pm

yes, bonk~ and me already know eachother for quite a while but the problem is it outputs data. i want to make a click without leaving the signal domain.

#169348
Dec 8, 2009 at 4:42pm

Here are some ideas (sorry about this old looking code, but this is Max4.6 code).

It does work with the [p ideal rectangle] because the -1 -> 1 transition is perfect. It doesn’t with [rect~] because the transition has some oscillations. With a real analog signal, you may need to lowpass it to get a clean transition.


#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 153 122 92 196617 count limit;
#P newex 209 144 40 196617 t b i i;
#P newex 156 202 31 196617 * -1;
#P number 209 121 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 167 40 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 56 443 31 196617 +~ 1;
#P newex 56 414 40 196617 ==~ 1.;
#P newex 56 386 46 196617 change~;
#P newex 56 357 31 196617 +~ 1;
#P window setfont "Sans Serif" 18.;
#P user number~ 123 331 174 358 18 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 31 273 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 56 272 62 196617 selector~ 2;
#P newex 108 225 43 196617 sig~ -8;
#P newex 56 471 53 196617 send~ rtz;
#P newex 56 329 37 196617 ==~ 8;
#P newex 16 226 67 196617 receive~ rtz;
#P newex 56 300 29 196617 +=~;
#P newex 82 193 40 196617 ==~ 1.;
#P flonum 82 41 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 494 125 681 332;
#P window setfont "Sans Serif" 9.;
#P newex 41 128 41 196617 -~ 0.5;
#P newex 41 101 56 196617 >~ 0.5;
#P newex 41 70 44 196617 phasor~;
#B color 5;
#P outlet 41 156 15 0;
#P inlet 109 42 15 0;
#P inlet 87 23 15 0;
#P connect 1 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 2 0;
#P connect 0 0 4 1;
#P pop;
#P newobj 82 62 95 196617 p ideal rectangle;
#P user ezdac~ 175 439 219 472 0;
#P newex 82 148 56 196617 clip~ 0. 1.;
#P newex 82 102 46 196617 change~;
#P comment 150 42 15 196617 ƒ;
#P connect 22 1 21 0;
#P connect 22 0 13 0;
#P connect 22 2 9 1;
#P connect 20 0 22 0;
#P connect 21 0 11 0;
#P connect 19 0 4 1;
#P connect 7 0 9 0;
#P connect 7 0 14 0;
#P connect 18 0 10 0;
#P connect 4 0 1 0;
#P connect 2 0 6 0;
#P connect 1 0 2 0;
#P connect 17 0 18 0;
#P connect 5 0 4 0;
#P connect 8 0 12 0;
#P connect 13 0 7 0;
#P connect 12 0 7 0;
#P connect 9 0 15 0;
#P connect 6 0 12 1;
#P connect 11 0 12 2;
#P connect 15 0 16 0;
#P connect 16 0 17 0;
#P window clipboard copycount 24;

#169349
Dec 9, 2009 at 12:42am

here is a patch to convert to 1-sample clicks/impulses in max5 format sorry. if you are routing DC INTO your motu it will get DC filtered, however, i guess you should still be able to get the transients to drive a counter.

The idea is thresh~ -> change~ -> ==~1 –>+=~

– Pasted Max Patch, click to expand. –

http://www.olilarkin.co.uk / http://olilarkin.blogspot.com

#169350
Dec 9, 2009 at 7:50am

@ patrick: nice solution to reset +=~ like that, thanks!

@ oli: no dc going into the motu, just coming out.
i’m afraid i can’t open max 5 code. could you post it for 4.6?

in the mean time i found another solution. i borrowed a boss drumpad that has trigger inputs. pulse goes in, midinote comes out, my whole setup in sync and i can use the max sequencers i already have built. nevertheless, this was a very educational experience…

#169351
Dec 9, 2009 at 8:14am

oh, and i forgot to mention the unexpected additional benefit of having a swinging 32nd note resolution now, as the note-offs are nicely in between the original 16th-s. the velocity values the drumpad spits out are very useable too, instant random steps, saves another 0,000000000001 percent of cpu ;-)

#169352
Dec 9, 2009 at 8:54am

@oli: Andrew Benson’s ab objects are great, but so badly advertised, there are even not in the maxobjects.com database. They helped me a lot already, especially wait~ (I forgot about steps~).

#169353

You must be logged in to reply to this topic.