Fist subdiv not output when using phasor @lock 1 and transport is started for the first time

Harry May's icon

It seems that a subdiv in a newly loaded patcher wont evaluate a recently assigned prob value as soon as the transport starts...is there a workaround for this?

If you load up this example patcher and then start the transport, the first subdiv of 16 gets output according to subdiv's default @prob 1 while the following subdivs get the more recently assigned prob 0. On subsequent loops, no subdivs are output so its only that first loop where the new prob value isn't evaluated for the very first subdiv.

This is a dumbed down example but its causing me problems in a sequencer device I'm building whereby the first note is often triggered when it shouldnt be or not triggered when it should be after my device has been loaded and the transport is started for the first time. Beyond that first time, the first subdiv is output correctly.

Max Patch
Copy patch and select New From Clipboard in Max.


For anyone who might want to test it more quickly by deleting/re-loading the device in Live i'll include an .amxd

subdiv-prob-issue.amxd
amxd 4.47 KB

René Mosele's icon

Hey Harry

This issue almost broke me the last couple of weeks. (I'm new to Max MSP)

But I think I found a solution to the problem.

It seems, the first cycle of a phaser~ is not yet initialized to work with subdiv~. Thats why it doesnt work the first time upon loading.

What I came up with, is a small workaround with a rate~ object, in between phaser and subdiv, {rate~ 1 @sync =} that recieves a two ramp burst upon loading. this initializes rate~ and makes subdiv~ sync.

yet another subdiv test.amxd
amxd 8.36 KB

Hope that works for you. All my patches are now synced upon loading.