Mathematic theory behind "kink~"


    May 12 2016 | 2:14 pm
    Is it possible to know the implementation of the objects in max/msp? For example, I want to know the mathematic theory behind the object "kink~", but I only can find the description of the relation between the output and input instead of the code of its implementation.

    • May 12 2016 | 5:22 pm
      I'm not sure what you mean by "theory" here - the prose text in the kink~ object's help file (which is taken directly from the refpage, by the way) describes quite precisely how the calculation is done.
    • May 12 2016 | 10:05 pm
      the ref page says that it applies a "slope".
      i would more generally say that the math behind it is in the field of "scaling a range". like tanh, cos, or *.
      but both these desciptions wont explain what exact formula is used in case someone wants to replicate the functionality.
      i am big fan of helpfiles such as the mtof one, which has always been revealing exactly what it does.
    • May 13 2016 | 8:10 am
      Apparently, you haven't looked at mtof.maxhelp in a while.
      For kink~, I think the help file says:
      if ( * slope) < 0.5 then output = * slope else, a complimentary slope will be applied that connects 0.5 to 1.0 over the remaining input values.
      I think that the complementary slope would be something like 0.5/(1-(0.5/slope)), with an offset applied (1 - complementarySlope?) to make it fit.
      I'm just having my coffee, so excuse me if the math is not exactly correct.
    • May 13 2016 | 8:16 am
      Seems that the coffee had done its job:
    • May 13 2016 | 12:41 pm
      haha, but what IS slope? the rest is clear.
      mtof ... duh. not even in the ref. and i bet it has changed and i will find out when the first incompatibilty occurs.
    • May 13 2016 | 2:50 pm
      Re mtof, ftom, dbtoa, and atodb formulae:Pitch and loudness formulae
    • May 13 2016 | 8:17 pm
      seems i just dont know the word. mb the OP had the same problem.
      christopher: how do you know when it is no longer in the helpfile?