[PD] basic stats on a table?

B. Bogart ben at ekran.org
Wed Nov 5 18:49:10 CET 2008


Thanks Jamie,

Indeed those objects were very helpful at this stage.

Now I need to do something a little more complex which may need to
perform better than unpacking to a list for calcs...

I need to calculate the sum of the differences between two tables (768
elements each).

I suppose the fastest way would be to do it in the signal domain?

Really what I got used to is the amazing and fast vector operations in R.

Seems to me the best thing would be a numpy py external that accesses
the tables directly.

I hunger for a unified datatype in PD not tied to data-structures. I
mean things like tables of symbols, tables of lists and tables of
tables. And, of course, higher math functions on those tables.

Thanks all,
B.

Jamie Bullock wrote:
> On Sat, 2008-10-25 at 00:21 +0200, Frank Barknecht wrote:
>> Hallo,
>> B. Bogart hat gesagt: // B. Bogart wrote:
>>
>>> What is the best (least cpu usage) way to get some basic stats on the
>>> content of a table?
>> Are externals allowed? Then either vasp or the iem_tab externals may be
>> worth a look, i.e.:
>>
>>   iem_tab is written by Thomas Musil from IEM Graz Austria and it is
>>   compatible to miller puckette's pd-0.37-3 to pd-0.39-2.  see also
>>   LICENCE.txt, GnuGPL.txt.
>>   
>>   The objects of iem_tab manipulate tables or arrays; you can set
>>   constant, copy, fft, ifft, reverse, find minimum or maximum, compare,
>>   add, subtract, mul tiplicate, divide arrays.
> 
> There is of course the mighty zexy also. In there you have:
> 
> tabminmax: get the minimum and maximum of a table (I think this is what
> Ben wants to do)
> tabdump: dump the contents of the table to a list
> unpack~/pack~ : convert between list and signal
> 
> If you want to do complex things, you could unpack~ the table contents
> into a signal, then get your stats from the signal vector. For example
> you could use something like xtract~ (from libXtract) to get a whole
> bunch of different stats from the audio vector if you wanted. 
> 
> Jamie
> 





More information about the Pd-list mailing list