SynthLab SDK
ModulationFunctions

Functions

double SynthLab::doUnipolarModulationFromMin (double unipolarModulatorValue, double minValue, double maxValue)
 Perform unipolar modulation from a min value up to a max value using a unipolar modulator value. More...
 
double SynthLab::doUnipolarModulationFromMax (double unipolarModulatorValue, double minValue, double maxValue)
 Perform unipolar modulation from a max value down to a min value using a unipolar modulator value. More...
 
double SynthLab::doBipolarModulation (double bipolarModulatorValue, double minValue, double maxValue)
 Perform bipolar modulation about a center that his halfway between the min and max values. More...
 
double SynthLab::splitBipolar (double value)
 maps a unipolar value across two unipolar values, from middle More...
 
double SynthLab::bipolar (double value)
 calculates the bipolar [-1.0, +1.0] value FROM a unipolar [0.0, +1.0] value More...
 
void SynthLab::bipolarXForm (double &value)
 identical to bipolar( ) but returns value with pass-by-reference argument More...
 
double SynthLab::unipolar (double value)
 calculates the unipolar [0.0, +1.0] value FROM a bipolar [-1.0, +1.0] value More...
 
void SynthLab::unipolarXForm (double &value)
 identical to unipolar( ) but returns value with pass-by-reference argument More...
 

Detailed Description

Function Documentation

◆ bipolar()

double SynthLab::bipolar ( double  value)
inline

calculates the bipolar [-1.0, +1.0] value FROM a unipolar [0.0, +1.0] value

Parameters
valuevalue to convert
Returns
the bipolar value

◆ bipolarXForm()

void SynthLab::bipolarXForm ( double &  value)
inline

identical to bipolar( ) but returns value with pass-by-reference argument

Parameters
valuevalue to convert, returns with pass-by-reference

◆ doBipolarModulation()

double SynthLab::doBipolarModulation ( double  bipolarModulatorValue,
double  minValue,
double  maxValue 
)
inline

Perform bipolar modulation about a center that his halfway between the min and max values.

Parameters
bipolarModulatorValuemodulation value on range [-1.0, +1.0]
minValuelower modulation limit
maxValueupper modulation limit
Returns
the modulated value

◆ doUnipolarModulationFromMax()

double SynthLab::doUnipolarModulationFromMax ( double  unipolarModulatorValue,
double  minValue,
double  maxValue 
)
inline

Perform unipolar modulation from a max value down to a min value using a unipolar modulator value.

Parameters
unipolarModulatorValuemodulation value on range [0.0, +1.0]
minValuelower modulation limit
maxValueupper modulation limit
Returns
the modulated value

◆ doUnipolarModulationFromMin()

double SynthLab::doUnipolarModulationFromMin ( double  unipolarModulatorValue,
double  minValue,
double  maxValue 
)
inline

Perform unipolar modulation from a min value up to a max value using a unipolar modulator value.

Parameters
unipolarModulatorValuemodulation value on range [0.0, +1.0]
minValuelower modulation limit
maxValueupper modulation limit
Returns
the modulated value

◆ splitBipolar()

double SynthLab::splitBipolar ( double  value)
inline

maps a unipolar value across two unipolar values, from middle

INPUT: 0.0 0.25 0.5 0.75 1.0 |--—|--—|--—|--—| OUTPUT: 1.0 0.5 0.0 0.5 1.0

Parameters
valuevalue to convert
Returns
the bipolar value

◆ unipolar()

double SynthLab::unipolar ( double  value)
inline

calculates the unipolar [0.0, +1.0] value FROM a bipolar [-1.0, +1.0] value

Parameters
valuevalue to convert
Returns
the unipolar value

◆ unipolarXForm()

void SynthLab::unipolarXForm ( double &  value)
inline

identical to unipolar( ) but returns value with pass-by-reference argument

Parameters
valuevalue to convert, returns with pass-by-reference