<div dir="ltr"><div><div><div>Here's an abstraction I made a while ago.<br></div>It's was aimed mainly at finding the closest note in a musical scale, <br>but it's probably easy to make it more general.<br></div><div>it uses some objects from list-abs<br></div>gr,<br></div>Tim<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-06 17:21 GMT+01:00 Miller Puckette <span dir="ltr"><<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Alternatively, if it's more convenient to put the values in a "text"<br>
object, you can "text search" for the nearest value.<br>
<br>
cheers<br>
Miller<br>
<span class=""><br>
On Fri, Mar 06, 2015 at 11:44:57AM -0300, Alexandre Torres Porres wrote:<br>
> I'm wondering if there's an object that can find in an array which is the<br>
> closest value in the array ro an input value.<br>
><br>
</span>> Say I have an array/list of *1.1* , *2.2* , *3.3*, then I give as the input<br>
> the number "3" and the object outputs *3.3*<br>
<span class="">><br>
> I've done this as a patch already, but I wonder if theres any solution<br>
> that's "ready made".<br>
><br>
> thanks<br>
<br>
</span>> _______________________________________________<br>
> <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.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>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.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>
</blockquote></div><br></div>