On Sun, Jul 15, 2012 at 10:25 PM, Jim Kremens <span dir="ltr">&lt;<a href="mailto:kremens@gmail.com" target="_blank">kremens@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><p style="text-align:left;padding:0px;outline:0px;vertical-align:baseline;clear:both;line-height:16px;color:rgb(85,85,85);overflow:hidden;font-size:12px;font-family:Arial,Tahoma,Verdana,sans-serif;margin:0px 0px 15px;word-wrap:break-word;border:0px;word-spacing:0.125em">


And, because metro runs on an interval, I don’t have sample accuracy. Snapshot will not reliably give me the zero position – it’ll just give me something close to zero, as it’s dependent on the metro interval, which has no relation to when the sample actually loops. (Hope that makes sense!)</p>

</blockquote><div>You don&#39;t need information from [tabread4~ ], but from [phasor~] to do that. The value of phasor~ increases except for one moment, the moment your new loop starts. So check while comparing each current sample [n] to the one before [n-1] for the moment [n] &lt; [n-1]. You can do that with [expr~ if($v1&lt;$v2, 1, 0)] and do for example the following:<br>
<br>[expr~ if($v1&lt;$v2, 1, 0)]<br>|<br>[env~]<br>|<br>[== 0]<br>|<br>[change]<br>|<br>[sel 0]<br>|<br>[bng]<br><br>Connect [phasor~] to the left inlet of [expr~].<br>Connect [phasor~] also to [biquad~ 0 0 0 1 0] or if you have zexy to [z~] and connect its outlet to the right inlet of [expr~].<br>
<br>There might be other possibilities but this should work.<br></div></div>