SoundFontInfoLib  2.21.6
Library for parsing and rendering SF2 files
SF2::DSP::Interpolation Namespace Reference

Functions

Float linear (Float partial, Float x0, Float x1)
 Interpolate a value from two values. More...
 
static Float cubic4thOrder (Float partial, Float x0, Float x1, Float x2, Float x3)
 Interpolate a value from four values. More...
 

Function Documentation

◆ cubic4thOrder()

static Float SF2::DSP::Interpolation::cubic4thOrder ( Float  partial,
Float  x0,
Float  x1,
Float  x2,
Float  x3 
)
inlinestatic

Interpolate a value from four values.

Parameters
partiallocation between the second value and the third. By definition it should always be < 1.0
x0first value to use
x1second value to use
x2third value to use
x3fourth value to use

References SF2::DSP::Tables::Cubic4thOrder::interpolate().

◆ linear()

Float SF2::DSP::Interpolation::linear ( Float  partial,
Float  x0,
Float  x1 
)
inline

Interpolate a value from two values.

Parameters
partialindication of affinity for one of the two values. Low values give greater weight to x0 while higher values give greater weight to x1.
x0first value to use
x1second value to use