[PD] is there a way to send a bang precisely when a sample is looped using tabread4~?
czhenry at gmail.com
Mon Jul 16 17:18:26 CEST 2012
On Mon, Jul 16, 2012 at 2:26 AM, Roman Haefeli <reduzent at gmail.com> wrote:
> 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]
I agree with you Roman--the solution is to use metro+vline or
delay+vline. In either case, you get the bangs exactly when the new
Where it's different: when changing the delay value, your loop will
no longer reach the end of the table when it starts over. This could
introduce clicks. That's where phasor~ has the advantage.
I think you could compensate for that with a line object that counts
down the interval. When you provide it another message telling it to
change the rate, you'd know exactly how much time is left in the
current loop and provide another message to vline~ to make sure it
speeds up to compensate.
More information about the Pd-list