Here's what I do (probably not the only way but it works): if you want the most recent 10 seconds of input available in a contiguous stretch in an array, make an array big enough to hold 20 seconds, and using two tabwrite~ objects, alternatively bang one or the other every 10 seconds. At any moment the stretch of the array between the two tabwrite~ pointers (which you can find using "timer") is 10 seconds long and contains the most recent input samples.
cheers Miller
On Wed, Sep 13, 2017 at 05:31:55PM -0400, Ali Momeni wrote:
hello all, is there a way to use tabwrite~ for a circular buffer?
in other words, is there a way to make tabwrite~ go around and start recording in the beginning of the table, once it has reached the end?
i have done some searching and found this thread: https://forum.pdpatchrepo.info/topic/8260/creating-a-live-input-circular-buf...
but there seem to be no resolution; i realize that you can do this with a different method of writing into tables that's driven by events, but i'd like to do it with tabwrite~ and all signals.
thanks!
-ali
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list