Here's how I like to do it these days:

[phasor~]
 |
[expr~ $v1 < 0.5]
 |
[snapshot~] (with [bang~]
 |
[change]
 |
[sel 1]
 |
BANG!

If you need it to be sample accurate, you can set [block~ 1].

Even better if you can keep it all in the signal domain and skip the [snapshot~], but it depends on your purpose.

Sam



Content-Type: text/plain; charset="iso-8859-1"

Hi there,
I assume this has been discussed many times before but...what could be simplest and most concise way to detect a phase reset of a phasor~ with only plain vanilla objects?
I only need one bang when it goes back to 0.
It seems I should need snapshot~ and fexpr~ which is not that elegant...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20220316/37d4b25a/attachment-0001.htm>