<div dir="ltr">jaja, &quot;you can do the math&quot;. well, obviously we can always do the math, but he was asking for that particular object. anyway, i appreciate the math examples, surely they empower my brain : )<br><br>
<div>to the original question, as mentioned above, the object is in pd extended</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/3 Mario Mey <span dir="ltr">&lt;<a href="mailto:mariomey@gmail.com" target="_blank">mariomey@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El 03/09/13 10:11, Lorenzo Sutton escribió:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 03/09/2013 14:06, Mario Mey wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
IOhannes, you are right only in these cases:<br>
<br>
0 127 0 500<br>
0 300 0 1<br>
...<br>
<br>
But, if I need:<br>
<br>
50 10 0 500|<br>
</blockquote>
(assuming you want to map have 50 mapped to the &#39;minimum&#39;):<br>
|<br>
[- 10]<br>
|<br>
[t b f]<br>
|   /<br>
[-  ]<br>
|<br>
[* 12.5]<br>
|<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3000 -3000 0.5 0.6<br>
</blockquote>
[* -1]<br>
|<br>
[+ 3000]<br>
|<br>
[/ 60000]<br>
|<br>
[+ 0.5]<br>
</blockquote>
<br></div>
Yes, you can make this math every scale you need... or use an abstract that does the same automatically. In my patch, I use 284 lin-eq-conv objects. I didn&#39;t want to think how to make that math... and change everytime (normally, I create a lin-eq-conv and change its values a lot of times).<br>

<br>
Best.<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
...<br>
<br>
I will need a &quot;linear equation conversion&quot;. As I wrote in last mail, I was needing something like this, first in ActionScript... then in Python... but I never could did it. Now, I needed again in Pd... so, I made lin-eq-conv.pd with extrapolation and lin-eq-conv-clip.pd for clipped values. I made it as neat as I could, to see how it works. Using x0-x1 and y0-y1, it uses expr to get &quot;a&quot; and &quot;b&quot; at load. Then, it only computes &quot;aX + b = Y&quot;.<br>

<br>
I attach the lin-eq-conv.pd, lin-eq-conv-clip.pd and lin-eq-conv-help.pd.<br>
<br>
Also, I have some issues using [autoscale]. I start giving values and it outputs only 1. Then, I start to down the input and, then, it shows the real output. Maybe it&#39;s about this version (0.43.4 Pd-Extended 64bits).<br>

<br>
PD: translated to Python:<br>
<br>
|def lin_eq_conv(x, x0, x1, y0, y1):<br>
   a = (y0 - y1) / (x0 - x1)<br>
   b = (a * x0) + y0<br>
   return a * x + b|<br>
<br>
<br>
<br>
<br>
El 03/09/13 03:32, IOhannes zmölnig escribió:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 09/02/2013 06:17 PM, hghoyer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
in Max/MSP there is an object for simple scaling.<br>
<br>
If you create in MAX these object with this arguments:<br>
<br>
[scale 0 127 0 500] incomming messages from 0 to 127 are automatically<br>
scaled from 0 to 500...<br>
</blockquote>
honestly i&#39;m of the firm conviction that you should learn how scaling<br>
works: it really is only a matter of adding, multiplying, dividing,<br>
subtracting - stuff you should heave learned in primary school.<br>
<br>
as frank pointed out, this should do for you:<br>
<br>
|<br>
[/ 127]<br>
|<br>
[* 500]<br>
|<br>
<br>
if you find it too tedious to do the maths over and over again, you<br>
might want to create an abstraction.<br>
<br>
<br>
being able to solve trivial problems like this will surely empower you<br>
to solve more complex problems :-)<br>
<br>
gamsdr<br>
IOhannes<br>
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a>  mailing list<br>
UNSUBSCRIBE and account-management -&gt;<a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</blockquote>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>JM Jones
</div>