Hallo, Damian Stewart hat gesagt: // Damian Stewart wrote:
here's [d-median], a 'running median' abstraction i put together today. it's pure-Pd, for your PDa/Palmpilot/iPhoning pleasure. it outlets a running median of the last n values sent to its inlet.
internally, it maintains two arrays - one a sorted list of values, the other a table of the timetags associated with each value. when you pass it a new value it increments the current timetag, finds the 'oldest' value in the list (the value with the current timetag) and removes it, and inserts the new value in-order, attaching the current timetag. this is implemented as a single pass through the array, doing the smallest number of copies possible, so it's fairly efficient.
That's really useful!
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. ;)
Frank Barknecht Do You RjDj.me? _ ______footils.org__