[PD] peak amplitude in pd vanilla (was: [env~ ] vs [vsnapshot~ ]: which one is more cpu consuming?)

ypatios ypatios at gmail.com
Tue Feb 9 11:21:37 CET 2010


Hallo Frank :-), thanks for your reply

(i updated the subject since the discussion moved on..)

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.
>

As I understand it (and hopefully i am not completely wrong..) you don't
have to 'store' a list and 'then' read again it to find the max magnitude.
It's as simple as the following:

(some signal)
*I*
*I* [pd metro at samplerate]
*I*/
[vsnapshot~ ]
|
[abs ]
|
[moses ]X[t f ]
            |
         [f ]

So in the last [f ] you have the max magnitude stored and you can bang it to
the [vu ] inlet say at a fix rate (which is the simplest way, it just
requires a [metro ] banging [f ] and resetting [moses ])

I don't understand how using an array to store samples and then analyse it
is more efficient than that. It seems to me you have to read 2 times: one to
write the array in the fist place and one more to analyse it.

a simple comparison:

read-analyse
vs.
read-write-read-analyse


Please correct me if i am missing something and post an example with the use
of an array if you can.


alabala

-- 
ypatios
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100209/1450a880/attachment.htm>


More information about the Pd-list mailing list