[PD] list operation

Ben Baker-Smith bbakersmith at gmail.com
Wed Apr 28 02:48:49 CEST 2010


This was a fun little problem. I haven't looked at the other
responses, but I whipped this up. Unlike some of the others, this
requires Pd-extended.

-Ben

>Hello everyone,
>
>I would like to compare all the values in a list with a value of input and
>then decide which is the closest value and replace that value closer to the
>amount of input.
>
>For example, I have a list <2, 10, 35> and have an input value of <12> I
>would like the list as output <2, 12, 35>. I'm almost getting, but the patch
>is so ugly that I will not show here, i'm sure there is a more elegant
>solution. Does anyone have an idea?
>tnx ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: closest_in_list.zip
Type: application/zip
Size: 1211 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100427/c2baa826/attachment.zip>


More information about the Pd-list mailing list