You could check out s_looptable in the rc-patches which wraps [loop~] and [tabread4~] https://github.com/danomatika/rc-patches/tree/master/rc
--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com

On Mar 5, 2016, at 2:40 PM, pd-list-request@lists.iem.at wrote:

From: "Peter P." <peterparker@fastmail.com>
Subject: [PD] using tabread4~~
Date: March 5, 2016 at 2:13:59 PM MST
To: pd-list <pd-list@iem.at>


I am trying to play back a table in varispeed and am getting artefacts.
I looked into vanilla's 'onset* message for tabread4~ but since I want
to play tables backwards as well a solution with an audio signal as
offset message seems simpler to me. Now iem_dp (double precision) has
tabread4~~ which features exactly that. 
The only thing that is missing is me understanding how to build a
wrapper around tabread4~~ so that in can be a drop-in replacement
abstraction for tabread4~. How can I derive the offset signal in the
first hand place? For messages I would devide the index by a certain
numer, for example 100000, truncate the result and use this as the
offset. Then I would use [modulo 100000] to get the left input for
tabread4~~.
Am I correct to go this way? 

How would I truncate an audio signal in Pd?

How would I calculate the modulo of an audio signal in Pd?

Is there a more elegant way to do this?

Thank you for all ideas!
best, Peter