thanks for the answers, i will try all and post the results ;)<br><br><br><div class="gmail_quote">On Tue, Apr 27, 2010 at 11:06 PM, Matt Barber <span dir="ltr"><<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Ha ha, mine had a hilarious and totally unnecessary extra [list-map].<br>
That's what happens when you work hastily... how embarrassing; oh<br>
well.<br>
<font color="#888888"><br>
MB<br>
</font><div><div></div><div class="h5"><br>
On Tue, Apr 27, 2010 at 9:13 PM, Jack <<a href="mailto:jack@rybn.org">jack@rybn.org</a>> wrote:<br>
> True, so now it should be OK (patch attached).<br>
> I didn't think of this eventuality.<br>
> ++<br>
><br>
> Jack<br>
><br>
><br>
><br>
> Le mardi 27 avril 2010 à 20:50 -0400, Matt Barber a écrit :<br>
>> One thing to watch out for; if you get two items in the list that are<br>
>> equally as far as the test value, mine outputs one list with the value<br>
>> replacement at each appropriate index, while Jack's outputs several<br>
>> lists with the value replacement at only one index, but each<br>
>> replacement sequentially, if that makes any sense.<br>
>><br>
>> So if the test value is 2.02, and the input list is <1 0 3 2 4 3 3 2 0<br>
>> 4>, mine will output:<br>
>><br>
>> <1 0 3 2.02 4 3 3 2.02 0 4> as one list, while Jack's gives two lists:<br>
>><br>
>> <1 0 3 2.02 4 3 3 2 0 4><br>
>> <1 0 3 2 4 3 3 2.02 0 4><br>
>><br>
>> Matt<br>
>><br>
>> On Tue, Apr 27, 2010 at 8:16 PM, Jack <<a href="mailto:jack@rybn.org">jack@rybn.org</a>> wrote:<br>
>> > An alternative. Also full pure-pd.<br>
>> > ++<br>
>> ><br>
>> > Jack<br>
>> ><br>
>> ><br>
>> ><br>
>> > Le mardi 27 avril 2010 à 18:49 -0400, Matt Barber a écrit :<br>
>> >> Try the attached (threw together using list-abs) -- right inlet is the<br>
>> >> value (12 in your example) and left inlet is the list of floats; I<br>
>> >> think this follows established list-abs syntax.<br>
>> >><br>
>> >> It's possible that I overlooked a list-abs that already does this, and<br>
>> >> there is probably a step or two you could skip.<br>
>> >><br>
>> >> You might get poor results if the list is a bang or contains symbols.<br>
>> >><br>
>> >> Matt<br>
>> >><br>
>> >><br>
>> >> > Hello everyone,<br>
>> >> ><br>
>> >> > I would like to compare all the values in a list with a value of input and<br>
>> >> > then decide which is the closest value and replace that value closer to the<br>
>> >> > amount of input.<br>
>> >> ><br>
>> >> > For example, I have a list <2, 10, 35> and have an input value of <12> I<br>
>> >> > would like the list as output <2, 12, 35>. I'm almost getting, but the patch<br>
>> >> > is so ugly that I will not show here, i'm sure there is a more elegant<br>
>> >> > solution. Does anyone have an idea?<br>
>> >> > tnx ;)<br>
>> >> > -------------- next part --------------<br>
>> >> > An HTML attachment was scrubbed...<br>
>> >> > URL: <<a href="http://lists.puredata.info/pipermail/pd-list/attachments/20100427/ac720c09/attachment-0001.htm" target="_blank">http://lists.puredata.info/pipermail/pd-list/attachments/20100427/ac720c09/attachment-0001.htm</a>><br>
>> >> _______________________________________________<br>
>> >> <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
>> >> UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br>