Ardour  9.0-pre0-582-g084a23a80d
control_math.h File Reference
#include <assert.h>
#include <math.h>
#include <stdint.h>
Include dependency graph for control_math.h:

Go to the source code of this file.

Macros

#define TINY_NUMBER   (0.0000001) /* (-140dB) */
 

Functions

static double gain_to_position (double g)
 
static double position_to_gain (double pos)
 
static double position_to_logscale (double pos, double lower, double upper)
 
static double logscale_to_position (double val, double lower, double upper)
 
static double logscale_to_position_with_steps (double val, double lower, double upper, uint32_t steps)
 
static double position_to_logscale_with_steps (double pos, double lower, double upper, uint32_t steps)
 
static double interpolate_linear (double from, double to, double fraction)
 
static double interpolate_logarithmic (double from, double to, double fraction, double, double)
 
static double interpolate_gain (double f, double t, double fraction, double upper)
 

Macro Definition Documentation

◆ TINY_NUMBER

#define TINY_NUMBER   (0.0000001) /* (-140dB) */

Definition at line 26 of file control_math.h.

Function Documentation

◆ gain_to_position()

static double gain_to_position ( double  g)
inlinestatic

Definition at line 30 of file control_math.h.

◆ interpolate_gain()

static double interpolate_gain ( double  f,
double  t,
double  fraction,
double  upper 
)
inlinestatic

Definition at line 105 of file control_math.h.

◆ interpolate_linear()

static double interpolate_linear ( double  from,
double  to,
double  fraction 
)
inlinestatic

Definition at line 84 of file control_math.h.

◆ interpolate_logarithmic()

static double interpolate_logarithmic ( double  from,
double  to,
double  fraction,
double  ,
double   
)
inlinestatic

Definition at line 90 of file control_math.h.

◆ logscale_to_position()

static double logscale_to_position ( double  val,
double  lower,
double  upper 
)
inlinestatic

Definition at line 59 of file control_math.h.

◆ logscale_to_position_with_steps()

static double logscale_to_position_with_steps ( double  val,
double  lower,
double  upper,
uint32_t  steps 
)
inlinestatic

Definition at line 67 of file control_math.h.

◆ position_to_gain()

static double position_to_gain ( double  pos)
inlinestatic

Definition at line 40 of file control_math.h.

◆ position_to_logscale()

static double position_to_logscale ( double  pos,
double  lower,
double  upper 
)
inlinestatic

Definition at line 50 of file control_math.h.

◆ position_to_logscale_with_steps()

static double position_to_logscale_with_steps ( double  pos,
double  lower,
double  upper,
uint32_t  steps 
)
inlinestatic

Definition at line 75 of file control_math.h.