List of all members | Public Types
Mapper Class Reference

Predefined mapper types. More...

Public Types

enum  Type {
  Linear,
  Exponential,
  QuinticRoot,
  QuarticRoot,
  CubeRoot,
  SquareRoot,
  Quadratic,
  Cubic,
  Quartic,
  Quintic
}
 

Detailed Description

Predefined mapper types.

Mappers are named after the function mapping from the widget's normalized range to the parameter's natural range.

e.g.: an exponential mapper from [0;1] to [1;10000] would have the following correspondances:

mapping from widget's position to parameter values
positionparameter
0%1.0
25%10.0
50%100.0
75%1000.0
100%10000.0

Example:

local knob = Knob{"ExpKnob", 100, 10, 1000, mapper = Mapper.Exponential}
Examples:
monoBassLine.lua.

Member Enumeration Documentation

Enumerator
Linear 

Linear mapper:

param = min + (max-min)*pos
Exponential 

Exponential mapper, the parameter's range should be strictly positive.

param = min * (max/min)^pos
QuinticRoot 

QuinticRoot mapper:

param = min + (max-min)*pos^(1/5)
QuarticRoot 

QuarticRoot mapper:

param = min + (max-min)*pos^(1/4)
CubeRoot 

CubeRoot mapper:

param = min + (max-min)*pos^(1/3)
SquareRoot 

SquareRoot mapper:

param = min + (max-min)*pos^(1/2)
Quadratic 

Quadratic mapper:

param = min + (max-min)*pos^2
Cubic 

Cubic mapper:

param = min + (max-min)*pos^3
Quartic 

Quartic mapper:

param = min + (max-min)*pos^4
Quintic 

Quintic mapper:

param = min + (max-min)*pos^5