<div dir="ltr"><span style="font-size:12.8000001907349px">> To be honest, I don't think the non classic mode is that much</span><div><span style="font-size:12.8000001907349px">> sensible. It'd make much more sense to me to specify a power</span></div><div><span style="font-size:12.8000001907349px">> exponential. </span><br><div class="gmail_extra"><br></div><div class="gmail_extra">I take this back, because that what it does after all, you specify the power exponential :)</div><div class="gmail_extra"><br></div><div class="gmail_extra">I still think we need to clone the classic mode behavior, but I'm surely including this non classic feature from Max7, cause it is as sensible as it gets.</div><div class="gmail_extra"><br></div><div class="gmail_extra">cheers</div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-19 23:36 GMT-03:00 Alexandre Torres Porres <span dir="ltr"><<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span class="">> There's no way mapping 13.3 from 0-127 to -1 to 1 <div>> should result in something so close to -1</div><div><br></div></span><div>well, there wouldn't be a way if it were a linear scaling... but it's a logarithmic scale, so it'll do what it does.</div><span class=""><div><br></div><div>> <span style="font-size:12.8000001907349px">Just try a few different exponents and </span></div><div><span style="font-size:12.8000001907349px">> you'll see that there's a bug in the Max code.</span><span style="font-size:12.8000001907349px"> </span></div><div><span style="font-size:12.8000001907349px"><br></span></div></span><div><span style="font-size:12.8000001907349px">which bug exactly? I tried other values close to the "typical value" they mention (1.06) and it doesn't seem weird to me. Not typical values will given untypical and not so useful results, but they warn you about it.</span></div><span class=""><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">there are lots of bug reports out there about it.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div></span><div><span style="font-size:12.8000001907349px">About the object or the conversion formula? cause if it is about the object, it could be anything. Now, if the object does not convert according to the supposed math, it'd be reasonable that they'd have it fix</span><span style="font-size:12.8000001907349px">ed eventually. Is this really the case? I hope you could be more specific about the issue. I'd like to know that please, now that I'm working with this.</span></div><span class=""><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">> Switch off classic mode in the inspector in Max7, and you</span></div><div><span style="font-size:12.8000001907349px">> get the same result as expr above, the very sensible -0.817072.</span><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div></span><div><span style="font-size:12.8000001907349px">To be honest, I don't think the non classic mode is that much sensible. It'd make much more sense to me to specify a power exponential. <br><br>Anyway, it may be more sensible after all, but this fact alone is not enough to say the other one is "wrong" or "broken" - you can just say it isn't "sensible"... which is true.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">What we know is that the given formula in the reference for the non classic mode is in accordance to what the object outputs. I had tested that by the way, and saw it was accurate.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I'm just asking to make sure if the other given formula given in the reference is actually wrong, or if I made a mistake. It seems clear for us that it is not outputting what the object is, so the reference seems just wrong.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">If the reference is wrong, it doesn't mean the object is "broken" or "wrong". And talking about being sensible, the output of the given formula is even crazier and all... so it's not like the object should output that, it's more like "hey, the reference is wrong, and we don't know the formula to clone it!"</span><br><br><span style="font-size:12.8000001907349px">About the other inquiry on what would I want to clone an object that behaves arguably insensibly, the answer is just that I'd like to clone it for the purpose of cloning it. Whatever it is, I'd like to make an exact copy of it. That's the purpose of cyclone after all.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">cheers</span></div><div><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2015-06-19 22:25 GMT-03:00 Joel Matthys <span dir="ltr"><<a href="mailto:jwmatthys@gmail.com" target="_blank">jwmatthys@gmail.com</a>></span>:<br></span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    You're using the [scale] formula from @classic_mode in Max7, which
    exists for compatibility with IRCAM, but it's clearly wrong.
    (There's no way mapping 13.3 from 0-127 to -1 to 1 should result in
    something so close to -1. Just try a few different exponents and
    you'll see that there's a bug in the Max code. And there are lots of
    bug reports out there about it.)<br>
    <br>
    That's why they introduced an alternate mode for [scale] in Max,
    which can be switch in the Inspector.<br>
    <br>
    For non-classic (modern) mode, the documentation gives you this
    equation:<br>
    <br>
    
    <span style="color:rgb(51,51,51);font-family:Lato,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:18.5714302062988px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;background-color:rgb(255,255,255)">((x-in_low)/(in_high-in_low)
      == 0) ? out_low : (((x-in_low)/(in_high-in_low)) > 0) ?
      (out_low + (out_high-out_low) * ((x-in_low)/(in_high-in_low))^exp)
      : ( out_low + (out_high-out_low) *
      -((((-x+in_low)/(in_high-in_low)))^(exp)))</span><br>
    <br>
    Translated to expr as:<br>
    <br>
    [expr if ((($f1-in_low)/(in_high-in_low)==0), out_low, if
    ((($f1-in_low)/(in_high-in_low)>0),
    out_low+(out_high-out_low)*pow(($f1-in_low)/(in_high-in_low),
    power),
    out_low+(out_high-out_low)*-1*pow((-1*$f1+in_low)/(in_high-in_low),
    power)))]<br>
    <br>
    Switch off classic mode in the inspector in Max7, and you get the
    same result as expr above, the very sensible -0.817072.<span><font color="#888888"><br>
    <br>
    Joel</font></span><div><div><br>
    <br>
    <div>On 06/19/2015 05:39 PM, Alexandre
      Torres Porres wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      <div dir="ltr">
        <p style="margin:0px 0px 6px">Howdy, so I'm cloning the scale
          object from Max, to make an object and include in the cyclone
          library. It converts range input (low_in / high_in) to a range
          output (low_out / high_out). It has a logarithmic curve for
          rescaling according to a fifth argument/inlet. I did copy into
          expr the formula described in the reference of Max6/7 (max's 5
          was just wrong, copied from [linedrive]) - well, it didn't
          work! Would anyone know if I'm doing something wrong or if the
          reference is not telling the truth?</p>
        <p style="margin:6px 0px">The formula, as described in the
          reference is: (out_low + (out_<span style="display:inline">high-out_low) * ( (out_high -
            out_low) * exp(-1 * (in_high-in_low) * log(power)) * exp(x *
            log(power)) ))</span></p>
        <p style="margin:6px 0px"><span style="display:inline"><br>
          </span></p>
        <div style="display:inline">
          <p style="margin:0px 0px 6px;color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:15.4559993743896px">Here's
            my patch with that formula into expr. The output with the
            parameters I have should be -0.997347 - as that's the output
            I get in Max. But instead, it's giving -0.994694...</p>
          <p style="margin:0px 0px 6px;color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:15.4559993743896px"><br>
          </p>
          <p style="margin:0px 0px 6px;color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:15.4559993743896px">thanks</p>
          <p style="margin:0px 0px 6px;color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:15.4559993743896px"><br>
          </p>
          <p style="margin:0px 0px 6px;color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:15.4559993743896px"><br>
          </p>
          <p style="margin:0px 0px 6px;color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:15.4559993743896px"><br>
          </p>
          <p style="margin:0px 0px 6px;color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:15.4559993743896px">=================</p>
          <p style="margin:0px 0px 6px;color:rgb(20,24,35);font-family:helvetica,arial,sans-serif;font-size:14px;line-height:15.4559993743896px"><br>
          </p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#N
                canvas 24 23 488 340 10;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                obj 215 154 v out_low;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                obj 233 132 v out_high;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                obj 288 110 v power;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                obj 152 130 v in_high;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                obj 115 153 v in_low;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                floatatom 58 248 0 0 0 0 - - -;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                obj 58 197 expr (out_low + (out_high-out_low) * (
                (out_high - out_low)</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">*
                exp(-1*(in_high-in_low)*log(power)) *
                exp($f1*log(power)) ));</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                msg 115 102 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                msg 152 102 127;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                msg 215 99 -1;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                msg 249 97 1;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                msg 288 86 1.06;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                obj 90 31 loadbang;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                obj 90 60 t b b;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                msg 58 107 13.3;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 6 0 5 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 7 0 4 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 8 0 3 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 9 0 0 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 10 0 1 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 11 0 2 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 12 0 13 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 13 0 14 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 13 1 11 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 13 1 10 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 13 1 9 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 13 1 8 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 13 1 7 0;</span></font></p>
          <p style="margin:0px 0px 6px"><font color="#141823" face="helvetica, arial, sans-serif"><span style="font-size:14px;line-height:15.456000328064px">#X
                connect 14 0 6 0;</span></font></p>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><span><pre>_______________________________________________
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </span></blockquote>
    <br>
  </div>

</blockquote></div></div></div><br></div></div></div>
</blockquote></div><br></div></div></div>