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

Roman Haefeli reduzent at gmail.com
Mon Jul 16 09:26:48 CEST 2012

Hi Jim

On Sun, 2012-07-15 at 16:25 -0400, Jim Kremens wrote:
> Here’s my setup: I’m using a phasor~ to read data out of an array
> using tabread4~. And I’m using snapshot and metro to let me know
> current position in that file. Basically, metro pings the snapshot
> object on an interval and gives me a reading of where we are. I’m
> trying to fire a bang exactly when the sample is looped.

Don't measure something when that something can be known beforehand.
Instead of a [phasor~] I'd use a [vline~] to control the play head. Then
you only need to tell [vline~] in what time it should play your table.
You can use the exact same value to control a [metro]. Example:

[metro 2000] <- 2s interval
[0, 88200 2000(  <- play the 88200 samples of your table in 2s
[tabread4~ yourtable]

(You really want [vline~] here and not [line~] as only the former is
able to start ramps in the middle of blocks)

> I’d love it if an event would fire when we’ve reached the end of the
> array. But as far as I can tell, there’s no such event. 


> And, because metro runs on an interval, I don’t have sample accuracy.

[metro] is indeed sample accurate, it's even sub-sample accurate. So is
[delay]. However, only some tilde-classes make effective use of it,
namely [vline~] and [vsnapshot~]. 

There are lots of threads about this topic in the archive. If you're
interested, please check:


More information about the Pd-list mailing list