synchronize counter by using phasor
Dear expert
I try to synchronize counter by using phasor counters.
But i could not find way to synchronize , when i changed count speed.
One phasor for master counter. I set 2n dur for it.
Other one is flexible counter. This count dur depend on how much divide master dur.
So count to divide num .
I put reset button , and this button make synchronize counter.
And when i changed divide num , counter head position shift.
So next step , i want to re synchronize after chnaged divide num.
And i want keep master counter , donot want use reset button.
One solution , connect master bang to flexible counter's "reset counter number immediately".
But this make problem for synth.
when synth get bang , one bang through and give delay bang . This makes on,off sound.
I donot want change synth , i want to improve synchronize counter system.
How do you synchronize ?
hi, i am no expert, but i can try... there are some confusing things in your patch first, though:
-you have two objects of [phasor~ 2n @lock 1] and neither one is controlled differently to change at all, so you might be able to sync the [rate~ @sync cycle] object to the master counter, since it will still allow for flexible change at the point of [rate~]
-i never knew counter could take 'bang' messages into the 'reset' inlets, but i see it works! i have learned something new here 😄 ...but still, it might be better to send a specific number. so one solution is to anticipate how it arrives late and tell it to skip to the 2nd beat at that point in order to resync properly(it might miss the 1 count, but at least as it cycles through it will be synced)
-it's hard to hear the sync if both sounds are the same, so it might help to use 2 cycle~ objects at different frequencies
i've made these changes, but also left a solution using the old 'reset' button. because maybe sometimes you want them to be out of sync in counting, and then resync later... other times, you might like(as you mentioned above), not to have to use the 'reset' button, and have them resync automatically whenever the 'divide num' is changed... so for that i added the solution labelled 'divide num & reset':
in particular, notice the use of the [trigger] object, shorthand is [t], it can help quite a bit when you want to send messages to many different places at once, but assure a certain order(it triggers its outlets from right to left... in the 'divide num & reset' case i added, i use it with arguments [t 0 2 i] which sends the incoming 'divide num' integer out the 'i' outlet, then a 2 out its middle outlet(to the 'reset counter to number on next clock' inlet of counter), and finally sends the 0 out the left outlet to restart the main transport from 0.
i'm not entirely clear if that's exactly what you're looking for, but hope it helps get you toward the right solution for you 🤝
Thank you comment.
I donot want reset transport after sync master counter.
I wanna try resync "flexible counter" to master.
Because i wanna try use many "flexible counter" .
So master counter should keep counting.
And , your patch dose not sync .
oh sorry, i didn't understand...
is this patch what you wanted then? with the added [onebang] object, hit 'reset' button and it will resync the 'flexible' to 'master' by only letting one bang through when triggered to go into flexible counter's "reset counter number immediately" inlet:
if not, i bump this thread to the real experts to come and help here 🙌 🙏
Still this patch is not what i thought.
I tried , but head position dose not sync.
I guess just sync quantize.
I wanna use this flexible counter for kick , bass , snare etc.
And i want change each synths division rhysm.
So i donot want reset master clock when i change flexible counter ,
i hope keep master counter .
Thanks your advice.
That "flexible" counters are nothing else but number of divisions of the
"master" phasor.
So you need one stream and several divisions.
I would not use signal rate objects, but plain max objects,
because you want to use transport.
take a look at this patch
add as many blue division sections as you want
for me it is easier not to use timing signature arguments with the master phasor, but milliseconds all across the patch and do the little math myself.
your patch reminds my on my "offline metro" patches for NRT sequencing, where this type of sequencer/counter is required.
i wonder why you need this?
i ask, because in most other cases it should be better to use only signal or only data, and not jump between domains several times.
however, here is how to make a phasor with reset function.
you can do the same with the ramp of an individual "sub phaser".
you can also adopt the mechanism to work with range -5 to 777, a reversed direction phasor signal - or with count~ output.
because it is sample-exact, you can now sync things at multiple positions in your patch with either bang or a signal spike.

Thank you for help.
SOURCE AUDIO patch , cool ! division sync OK!
I wanna to use live dj with friend (he use hardware modular ) , we sync with external midi clock.
So I feel "sub phaser" makes non-sync with friend.
Why i use phasor , i thought it is flexible division system , metro is limited (16n 8n ....).
And why i use counter and grid sequencer , i thought it is easy to shift pattern.
For example,
kick = 16n , 1~8 count , play 1 step.
snare = 16n , 1~7 count , play 1 step.
kick is master rhysm and snare will shift 1 step each 8 count.
So , i tred do such thing what i know.
I start MAX this MAY , so I really appreciate advice for me.
I f you can , please tell me this .
" because in most other cases it should be better to use only signal or only data,"
I wanna learn more what i can do with max.
Thank you.
If you sync to external midi clock, you must use midi sync,
best forget transport and signal rate objects and deal directly with midi clock
and Song Position Pointer if needed.
That will give you best results.
When you have division numbers progessing, you can shift them as you want
to offset beats.
metro is not limited at all to that n shit, it can be set to any value in ms.
What you describe as divisions is not divisions but grouping
of note numbers.
Like snare cycling 7 beats of 16th notes and triggering on 1 of 7.
So you need modulo and not division and also absolute time progress
in ticks which you then divide into beats and run through modulo ( % ).
If that is what you need, I can post example patch that receives midi clock
and divides midi tick stream into different note values etc.
Only if you need smaller division values than 1 tick in midi beat clock world,
then you need to sync to midi and trigger something else which outputs smaller divisions then midi clock
in order to divide for example 1 bar of 3/4 by 39 and use 7/39
to create a beat, and 6 of that beats to create a pattern....
But I have a feeling that this is not the case.
midi sync I thought like this.
So i use phasor ~ .
And song position for reset(resync counter to head position).
I can only repeat my opinion, don't mix midi clock, and signal rate objects
only to convert back to count numbers.
But if you want to do that, have a lot of fun.
>> metro is not limited at all to that n shit, it can be set to any value in ms. >>
what he said. :)
learn how to calculate what 7/39 of 4/4 in 1137 milliseconds is, and build a patch using objects like [+ ] and [* ].
this is also a great excercise for learning max, and then you will have full control over [metro] and it does everything you want.
it is not illegal or "wrong" to use phasor~, but it is also not ideal.
i have built many sequencers but i have never used phasor~ or midi ticks. start, stop and milliseconds should be all you need.