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">&lt;<a href="mailto:brbrofsvl@gmail.com">brbrofsvl@gmail.com</a>&gt;</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&#39;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 &lt;<a href="mailto:jack@rybn.org">jack@rybn.org</a>&gt; wrote:<br>
&gt; True, so now it should be OK (patch attached).<br>
&gt; I didn&#39;t think of this eventuality.<br>
&gt; ++<br>
&gt;<br>
&gt; Jack<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Le mardi 27 avril 2010 à 20:50 -0400, Matt Barber a écrit :<br>
&gt;&gt; One thing to watch out for;  if you get two items in the list that are<br>
&gt;&gt; equally as far as the test value, mine outputs one list with the value<br>
&gt;&gt; replacement at each appropriate index, while Jack&#39;s outputs several<br>
&gt;&gt; lists with the value replacement at only one index, but each<br>
&gt;&gt; replacement sequentially, if that makes any sense.<br>
&gt;&gt;<br>
&gt;&gt; So if the test value is 2.02, and the input list is &lt;1 0 3 2 4 3 3 2 0<br>
&gt;&gt; 4&gt;, mine will output:<br>
&gt;&gt;<br>
&gt;&gt; &lt;1 0 3 2.02 4 3 3 2.02 0 4&gt; as one list, while Jack&#39;s gives two lists:<br>
&gt;&gt;<br>
&gt;&gt; &lt;1 0 3 2.02 4 3 3 2 0 4&gt;<br>
&gt;&gt; &lt;1 0 3 2 4 3 3 2.02 0 4&gt;<br>
&gt;&gt;<br>
&gt;&gt; Matt<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Apr 27, 2010 at 8:16 PM, Jack &lt;<a href="mailto:jack@rybn.org">jack@rybn.org</a>&gt; wrote:<br>
&gt;&gt; &gt; An alternative. Also full pure-pd.<br>
&gt;&gt; &gt; ++<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Jack<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Le mardi 27 avril 2010 à 18:49 -0400, Matt Barber a écrit :<br>
&gt;&gt; &gt;&gt; Try the attached (threw together using list-abs) -- right inlet is the<br>
&gt;&gt; &gt;&gt; value (12 in your example) and left inlet is the list of floats; I<br>
&gt;&gt; &gt;&gt; think this follows established list-abs syntax.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; It&#39;s possible that I overlooked a list-abs that already does this, and<br>
&gt;&gt; &gt;&gt; there is probably a step or two you could skip.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; You might get poor results if the list is a bang or contains symbols.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Matt<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt; Hello everyone,<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; I would like to compare all the values in a list with a value of input and<br>
&gt;&gt; &gt;&gt; &gt; then decide which is the closest value and replace that value closer to the<br>
&gt;&gt; &gt;&gt; &gt; amount of input.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; For example, I have a list &lt;2, 10, 35&gt; and have an input value of &lt;12&gt; I<br>
&gt;&gt; &gt;&gt; &gt; would like the list as output &lt;2, 12, 35&gt;. I&#39;m almost getting, but the patch<br>
&gt;&gt; &gt;&gt; &gt; is so ugly that I will not show here, i&#39;m sure there is a more elegant<br>
&gt;&gt; &gt;&gt; &gt; solution. Does anyone have an idea?<br>
&gt;&gt; &gt;&gt; &gt; tnx ;)<br>
&gt;&gt; &gt;&gt; &gt; -------------- next part --------------<br>
&gt;&gt; &gt;&gt; &gt; An HTML attachment was scrubbed...<br>
&gt;&gt; &gt;&gt; &gt; URL: &lt;<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>&gt;<br>

&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
&gt;&gt; &gt;&gt; UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>