From: Ivica Ico Bukvic ico@vt.edu To: Funs Seelen funsseelen@gmail.com Cc: pd-list@iem.at Sent: Monday, July 16, 2012 1:29 AM Subject: Re: [PD] is there a way to send a bang precisely when a sample is looped using tabread4~?
On 07/15/2012 07:43 PM, Funs Seelen wrote:
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)] | [env~] | [== 0] | [change] | [sel 0] | [bng]
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.
This is still limited to the signal vector size inside pd even at the smallest env~ buffer (which is also incredibly CPU intensive). In other words, pd by default does everything in 64-byte chunks (unless one manually alters this behaviour which with lower buffers results in a rapid increase in CPU overhead).
You mean like [block~ 1]?
-Jonathan