Skip to content

10.1 Engine Math

Davide Magni edited this page May 30, 2017 · 1 revision

BigBob did an outstanding job with his math library, which has been used extensively by any developer so far. Thanks to the new real math routines that come with Kontakt 5.6, it is possible to enhance the precision of those calculations, as well as reduce drastically the amount of lines of code required to convert an Engine Parameter into a linear value and vice-versa.

All these functions are inline functions, therefore can be used in if statements and loops.

E2V.SVFreq and V2E.SVFreq

Convert the SV and Ladder filters frequency into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 26.0 to 19900.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.SVFreq(<in>)

E2V.SVMFreq and V2E.SVMFreq

Convert the SV multi filter frequency (for SV Par LP/HP, SV Par BP/BP, and SV Ser LP/HP) into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 2.6 to 84400.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.SVMFreq(<in>)

E2V.V3x2Freq and V2E.V3x2Freq

Convert the Multi Versatile 3x2 filter frequency into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 26.0 to 15800.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.V3x2Freq(<in>)

E2V.ARFreq and V2E.ARFreq

Convert the AR filter frequency into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 8.2 to 35500.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.ARFreq(<in>)

E2V.EqFreq and V2E.EqFreq

Convert the 1, 2, 3 bands EQ frequency into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 20.0 to 20000.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.EqFreq(<in>)

E2V.LPFreq and V2E.LPFreq

Convert the LP Legacy filter frequency into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 43.6 to 21800.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.LPFreq(<in>)

E2V.HBFreq and V2E.HBFreq

Convert the Legacy HP/BP filter frequency (including HP1, HP4, BP2, BP4, and BR4) into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 36.1 to 18100.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.HBFreq(<in>)

E2V.HP2Freq and V2E.HP2Freq

Convert the Legacy HP2 filter frequency into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 37.3 to 18700.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.HP2Freq(<in>)

E2V.DAFTFreq and V2E.DAFTFreq

Convert the DAFT filter frequency into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 26.0 to 35500.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.DAFTFreq(<in>)

E2V.ProFreq and V2E.ProFreq

Convert the LP Pro53 and Legacy Ladder filter frequency into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 26.0 to 8400.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.ProFreq(<in>)

E2V.SGEqFreq_ and V2E.SGEqFreq_

Convert the Solid GEQ frequencies into an Engine Parameter value and vice-versa.

The output of the E2V. functions goes from:

  • _LF: 40.0 to 600.0 Hz
  • _LMF: 200.0 to 2500.0 Hz
  • _HMF: 600.0 to 7000.0 Hz
  • _HF: 1500.0 to 22000.0 Hz

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.SGEqFreq_LF(<in>) E2V.SGEqFreq_LMF(<in>) E2V.SGEqFreq_HMF(<in>) E2V.SGEqFreq_HF(<in>)

E2V.LFOFreq and V2E.LFOFreq

Convert the LFO frequency into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 0.01 to 213.0 Hz.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.LFOFreq(<in>)

E2V.tune and V2E.tune

Convert the Tune value into an Engine Parameter value and vice-versa. The output of the E2V. function goes from -3600.0 to 3600.0 millicents.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.tune(<in>)

E2V.volume and V2E.volume

Convert the Volume value into an Engine Parameter value and vice-versa. The output of the E2V. function goes from -inf to 12000.0 millidB.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.volume(<in>)

E2V.AtkTime and V2E.AtkTime

Convert the Envelope's Attack time into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 0.0 to 1500000.0 microseconds.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.AtkTime(<in>)

E2V.DRTime and V2E.DRTime

Convert the Envelope's Decay and Release time into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 0.0 to 2500000.0 microseconds.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.DRTime(<in>)

E2V.DlyTime and V2E.DlyTime

Convert the Send FX Delay time into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 502.0 to 290147.2 microseconds.

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.DlyTime(<in>)

E2V.EqBW and V2E.EqBW

Convert the 1, 2, 3 Band EQ Bandwidth into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 33.0 to 300.0 octaves (scaled by 100).

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.EqBW(<in>)

E2V.SGEqBW and V2E.SGEqBW

Convert the Solid G-EQ Bandwidth into an Engine Parameter value and vice-versa. The output of the E2V. function goes from 70.0 to 250.0 octaves (scaled by 100).

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.SGEqBW(<in>)

E2V.EqGain and V2E.EqGain

Convert the 1, 2, 3 Band EQ Gain into an Engine Parameter value and vice-versa. The output of the E2V. function goes from -180.0 to +180.0 dB (scaled by 10).

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.EqGain(<in>)

E2V.SGEqGain and V2E.SGEqGain

Convert the Solid G-EQ Gain into an Engine Parameter value and vice-versa. The output of the E2V. function goes from -200.0 to +200.0 dB (scaled by 10).

The input of E2V. must be an integer value (e.g. the value of a knob). The input of V2E. must be a real value. The E2V. function outputs a real value, while the V2E. function outputs an integer value.

E2V.SGEqGain(<in>)

Clone this wiki locally