[PD] absolute values of a list of numbers?

cyrille henry ch at chnry.net
Fri Feb 16 14:52:22 CET 2018


Hello,
You can use iem_tab.
copy the list to 2 array
tab_min 1st arry with 0
tab_mul_scalar it with -1
tab_max 0 the 2nd array
tab_add both array


cheer
c




Le 16/02/2018 à 14:43, Peter P. a écrit :
> Hi list,
> 
> I am using William Brent's [cepstrum~] to calculate cepstral
> coefficients from a section of an audio signal. My object outputs 512
> the real-valued coefficients as pd message list, which I would like to
> convert to their absolute value. I can't seem to find an easy way to do
> this except for possibly sending the list to an array and using tabread
> to serialize, calculate the absolute value for every element and send it
> back to another array, then requesting it as a list again. Has anyone
> got a better idea?
> 
> thank you!
> P
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
> 



More information about the Pd-list mailing list