[PD] is there a way to send a bang precisely when a sample is looped using tabread4~?

Funs Seelen funsseelen at gmail.com
Mon Jul 16 01:43:26 CEST 2012

On Sun, Jul 15, 2012 at 10:25 PM, Jim Kremens <kremens at gmail.com> wrote:

> 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!)
You don'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] < [n-1]. You can do that with [expr~
if($v1<$v2, 1, 0)] and do for example the following:

[expr~ if($v1<$v2, 1, 0)]
[== 0]
[sel 0]

Connect [phasor~] to the left inlet of [expr~].
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~].

There might be other possibilities but this should work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120716/74c44789/attachment.htm>

More information about the Pd-list mailing list