Csound argument mapping

Performing a quaยญdratยญic mapยญping using 3 points: how can we make sure that the funcยญtion will be monotonous?

This is part of docยญuยญment โ€œCheck of Bol Processor โ€˜BP3โ€™ with PHP interยญfaceโ€ on the โ€œBol Processorโ€ webยญsite.

The algoยญrithm is impleยญmentยญed in funcยญtion Findabc() of "CsoundMaths.c".


When three pairs of input/output valยญues are supยญplied, BP2 attempts to define a quaยญdratยญic mapยญping from the input (x) to outยญput (y).

This is an examยญple of a sucยญcessยญful mapping: 

BP2 expects the mapยญping funcยญtion to be monotยญoยญnous, i.e. the three valยญues (x1, x2, x3) supยญplied as the input and the ones supยญplied as the outยญput (y1, y2, y3) must be strictยญly ordered. Even in this case a propยญer quaยญdratยญic mapยญping may not be posยญsiยญble. See for instance: 

Here the quaยญdratยญic funcยญtion is not monotยญoยญnous even though the input valยญues are ordered propยญerยญly. In this case, BP2 replaces the incorยญrect part (the one conยญtainยญing an extremum) with a linยญear funcยญtion, and changes the othยญer part to make the curve tanยญgent to the linยญear part. This yields the graph shown below: 


Leave a Reply

Your email address will not be published. Required fields are marked *