[PD] d-median (a running median) + d-for (a for loop)

Frank Barknecht fbar at footils.org
Sun Oct 19 14:29:56 CEST 2008

Frank Barknecht hat gesagt: // Frank Barknecht wrote:

> But I had a *really* hard time to read your patch. Attached is a
> slightly cleaned up version with some added local sends and many cord
> crossings removed. Still not perfect, but now I can see more of all
> these objects. ;)

I made two other changes that I hade coded in my version before it
broke: I replaced the tables with larger tables of size  500 that only
get resized if 500 wasn't enough. This trades a bit of memory waste
for less resizing. Resizing tables a lot can be bad for performance in Pd. 

Then I changed the calculation of the median in the case of an even
table size to take the arithmetic mean of both center values i.e. it
calculates "(t[n/2] + t[n/2+1]) / 2" if n is even, otherwise it uses

 Frank Barknecht            Do You RjDj.me?          _ ______footils.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d-median.pd
Type: application/puredata
Size: 10416 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20081019/96f08e57/attachment.bin>

More information about the Pd-list mailing list