<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div id="yiv0535434375"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;">No, the code I ported is from vslider_set and vslider_draw_update (might be different in Vanilla).<br><br>In vslider_bang, math is done to output the proper value.&nbsp; Without looking at the code I would have guessed vslider_bang simply outputs a stored value like [float] does.&nbsp; Then just do math to set the slider position or calculate a new stored value from mouse input.<br><br>-Jonathan<br><div style="display: block;" id="yiv0535434375yui_3_13_0_ym1_7_1395037396152_16" class="yiv0535434375yahoo_quoted"> <br> <br> <div class="yiv0535434375yui_3_13_0_ym1_1_1395037396152_5621" style="font-family:HelveticaNeue,
 Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"> <div class="yiv0535434375yui_3_13_0_ym1_1_1395037396152_5622" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Monday, March 17, 2014 1:21 AM, Alexandre Torres Porres &lt;porres@gmail.com&gt; wrote:<br> </font> </div>  <div class="yiv0535434375y_msg_container"><div id="yiv0535434375"><div dir="ltr"><div>Hi Roman. This is turning out trickier than I thought. A friend explained the code to me and got to the following equation, with min/max values
 as 0.01 and 1 respectively.</div><div><br></div><div>[expr 0.01 * exp((log(1 / 0.01) / 0.01) * $f1 * 0.01)]<br>
</div><div><br></div><div>For what I've checked, it seems to behave like your patch. But it doesn't do the trick I'm looking for yet. I sent a patch earlier, and I'm sending it back again.</div><div><br></div>
<div>The goal is to connect a linear slider to an [expr] (with this so called "log" function) and then to another linear slider. The idea then is that this second slider behaves as one that was set as being "log".</div>
<div><br></div><div>In the patch attached I was able to emulate it poorly with [pow 0.25], but that was before reaching the list. See that if I use this expr function from the code or your patch it presents quite a different behavior.</div>
<div><br></div><div>maybe it is some sort of inversion of this equation, not sure. Apparently this code converts the "log" function values to linear and I'm hoping to get the exact opposite. Got it?</div><div>
<br></div><div>Thanks for looking into this</div></div><div class="yiv0535434375gmail_extra"><br><br><div class="yiv0535434375gmail_quote">2014-03-12 4:38 GMT-03:00 Roman Haefeli <span dir="ltr">&lt;<a href="" rel="nofollow">reduzent@gmail.com</a>&gt;</span>:<br>
<blockquote class="yiv0535434375gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv0535434375">On Don, 2014-03-06 at 21:37 -0300, Alexandre Torres Porres wrote:<br>
&gt; hi folks, out of curiosity, what's the exact log function used in the<br>
&gt; slider? I'd like to emulate it.<br>
<br>
</div>I am not sure, if this is what you want. It converts the incoming linear<br>
range between 0 and 1 to a logarithmic range specified by $1 and $2,<br>
respectively by the second and third inlet. They behave like the lower<br>
and upper bound specified in the [vslider]/[hslider] classes.<br>
<br>
<a href="" rel="nofollow">https://raw.github.com/reduzent/netpd2-patches/master/abs/rh_scalelog.pd</a><br>
<span class="yiv0535434375HOEnZb"><font color="#888888"><br>
<br>
Roman<br>
</font></span><div class="yiv0535434375HOEnZb"><div class="yiv0535434375h5"><br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="" rel="nofollow">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="" rel="nofollow">http://lists.puredata.info/listinfo/pd-list</a><br>
</div></div></blockquote></div><br></div></div><br>_______________________________________________<br><a href="" rel="nofollow">Pd-list@iem.at</a> mailing list<br>UNSUBSCRIBE and account-management -&gt; <a href="" rel="nofollow">http://lists.puredata.info/listinfo/pd-list</a><br><br><br></div>  </div> </div>  </div> </div></div></div></div></body></html>