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 *