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