[PD] [env~ ] vs [vsnapshot~ ]: which one is more cpu consuming?

Frank Barknecht fbar at footils.org
Tue Feb 9 09:41:09 CET 2010


Hallo,
ypatios hat gesagt: // ypatios wrote:

> Also, you should know that the result of [env~] is something akin to a
> > low-pass filter; the "speed limiting" from the original patch might be
> > done more efficiently by squaring the signal and sending it through a
> > (probably aggressive) low-pass filter before sending it to vsnapshot
> > -- in that case it's possible that regular old snapshot with a larger
> > [block~] size might work just as well, since you'll be sending a
> > signal that doesn't change as quickly.  You also need to take into
> >
> I want to get the peak of the signal which means that any kind of filtering
> or other manipulation before (or after except rate limiting) vsnapshot~ is
> not a good idea.

vsnapshot~ will almost never give you the peak. It just reports the single
sample that happened when you bang'd it, which very likely is not a peak sample
- peaks usually are rare. In fact, as vsnapshot~ only gives you one single
sample you don't even have other samples to compare it to. 

So in any case you have to collect some more samples to find out if there is a
peak inside, either some local peaks or a global peak over all your samples.
While you could bang vsnapshot~ at samplerate and keep track of samples in a
list or so, this is a waste of resources. Something like tabsend~ or tabwrite~
probably is much better: Just write a number of samples into a table and then
analyse that for peaks. There are some externals for that or do it manually.

Ciao
-- 
Frank




More information about the Pd-list mailing list