16th note or greater resolution from hostsync~ (or other means)

May 30, 2007 at 10:32pm

16th note or greater resolution from hostsync~ (or other means)

I’m wondering what the most effective way of getting a bang at every 16th note from my sequencer into Max/MSP … or perhaps an arbitrary fraction of a beat.

I tried generating a bang at every “((beat-length-in-samples / 16) % current-sample) == 0″ … using hostsync~ as an input … but it seems generate too many messages too quickly and I only get bangs when I pause it at just the right time.

I actually used the equivalent set of individual max objects for that expression, not “expr”, if that makes any difference.

#32192
Jun 4, 2007 at 11:48pm

No help? Is it obvious and I’m clueless or not so easy? :(

#105454
Jun 5, 2007 at 12:57am

I’m sorry no one was hovering at the forums to answer your post within an hour. If you were in that much of a hurry, you could have checked the archives!

Here is an example using hostphasor~ that I have posted before. Oddly enough, the last guy who had this question wanted 16ths, so the code was alreay set up for that.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 89 239 224 196617 I copied and pasted it from the hostphasor~ help;
#P comment 229 129 348 196617 The ratio would be 0.5 if an eighth note gets the beat and so on.;
#P flonum 184 194 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P comment 229 103 348 196617 This should come out to a rate of (1/4) = 0.25 if a quarter note gets the beat (i.e. a 4/4 , 3/4 or 2/4 etc time signature);
#P window linecount 1;
#P newex 168 85 40 196617 change;
#P newex 168 110 52 196617 t 0.25 i;
#P newex 168 167 38 196617 / 1.;
#P newex 120 61 58 196617 unpack 4 4;
#P newex 68 32 131 196617 hostsync~;
#P newex 196 137 31 196617 !/ 4.;
#P button 29 300 15 0;
#P newex 29 273 34 196617 edge~;
#P newex 29 246 40 196617 ==~ -1;
#P newex 29 219 49 196617 change~;
#P newex 29 192 149 196617 rate~;
#P newex 29 165 65 196617 hostphasor~;
#P comment 228 86 264 196617 This part just makes sure that the rate~ is set to 16ths.;
#P comment 89 224 274 196617 This part outputs a bang at the begging on each phase cycle;
#P connect 2 0 3 0;
#P connect 9 4 10 0;
#P connect 6 0 7 0;
#P connect 5 0 6 0;
#P connect 4 0 5 0;
#P connect 3 0 4 0;
#P connect 12 1 8 0;
#P connect 13 0 12 0;
#P connect 10 1 13 0;
#P connect 12 0 11 0;
#P connect 8 0 11 1;
#P fasten 11 0 15 0 173 189 189 189;
#P fasten 11 0 3 1 173 187;
#P window clipboard copycount 18;

#105455
Jun 5, 2007 at 1:02am

Hi Nick, thanks very much! I was trying to put something together that was signicantly less elegant than that (still kind of a n00b here) :D

#105456
Jun 5, 2007 at 1:08am

I like using hostphasor~, rate~, and edge~. The help files should be enough.

Keith

On 6/4/07, cirric wrote:
>
> No help? Is it obvious and I’m clueless or not so easy? :(
>

#105457
Jun 5, 2007 at 8:23am

the point you missed inn that max and/or pluggo can only
recieve sync signals where there exist some. :)

dividing a bar /16 works more or less but generally
when you want to have 128/32 bangs from a VST host
i would recommend you to set your VST hosts signature
to 128/32 and then you can take the “beats” from
[plugsync~] in order to recieve 1/32 notes (without haveing
to wait one whole bar until the division delays work.)

#105458

You must be logged in to reply to this topic.