aubio  0.4.9
Typedefs | Functions
parameter.h File Reference

Parameter with linear interpolation. More...

Go to the source code of this file.

Typedefs

typedef struct _aubio_parameter_t aubio_parameter_t
 parameter object
 

Functions

aubio_parameter_tnew_aubio_parameter (smpl_t min_value, smpl_t max_value, uint_t steps)
 create new parameter object More...
 
uint_t aubio_parameter_set_target_value (aubio_parameter_t *param, smpl_t value)
 set target value of the parameter More...
 
smpl_t aubio_parameter_get_next_value (aubio_parameter_t *param)
 get next parameter More...
 
smpl_t aubio_parameter_get_current_value (const aubio_parameter_t *param)
 get current parameter value, without interpolation More...
 
uint_t aubio_parameter_set_current_value (aubio_parameter_t *param, smpl_t value)
 set current parameter value, skipping interpolation More...
 
uint_t aubio_parameter_set_steps (aubio_parameter_t *param, uint_t steps)
 set number of steps used for interpolation More...
 
uint_t aubio_parameter_get_steps (const aubio_parameter_t *param)
 get number of steps of this parameter More...
 
uint_t aubio_parameter_set_min_value (aubio_parameter_t *param, smpl_t min_value)
 set minimum value of this parameter More...
 
smpl_t aubio_parameter_get_min_value (const aubio_parameter_t *param)
 get minimum value of this parameter More...
 
uint_t aubio_parameter_set_max_value (aubio_parameter_t *param, smpl_t max_value)
 set maximum value of this parameter More...
 
smpl_t aubio_parameter_get_max_value (const aubio_parameter_t *param)
 get maximum value of this parameter More...
 
void del_aubio_parameter (aubio_parameter_t *param)
 destroy aubio_parameter_t object More...
 

Detailed Description

Parameter with linear interpolation.

This object manages a parameter, with minimum and maximum values, and a number of steps to compute linear interpolation between two values.

Definition in file parameter.h.

Function Documentation

◆ aubio_parameter_get_current_value()

smpl_t aubio_parameter_get_current_value ( const aubio_parameter_t param)

get current parameter value, without interpolation

Parameters
paramparameter, created by new_aubio_parameter
Returns
current value
Examples:
utils/test-parameter.c.

◆ aubio_parameter_get_max_value()

smpl_t aubio_parameter_get_max_value ( const aubio_parameter_t param)

get maximum value of this parameter

Parameters
paramparameter, created by new_aubio_parameter
Returns
maximum value

◆ aubio_parameter_get_min_value()

smpl_t aubio_parameter_get_min_value ( const aubio_parameter_t param)

get minimum value of this parameter

Parameters
paramparameter, created by new_aubio_parameter
Returns
minimum value

◆ aubio_parameter_get_next_value()

smpl_t aubio_parameter_get_next_value ( aubio_parameter_t param)

get next parameter

Parameters
paramparameter, created by new_aubio_parameter
Returns
new interpolated parameter value
Examples:
utils/test-parameter.c.

◆ aubio_parameter_get_steps()

uint_t aubio_parameter_get_steps ( const aubio_parameter_t param)

get number of steps of this parameter

Parameters
paramparameter, created by new_aubio_parameter
Returns
number of steps
Examples:
utils/test-parameter.c.

◆ aubio_parameter_set_current_value()

uint_t aubio_parameter_set_current_value ( aubio_parameter_t param,
smpl_t  value 
)

set current parameter value, skipping interpolation

Parameters
paramparameter, created by new_aubio_parameter
valuenew parameter value
Returns
0 if successful, 1 otherwise
Examples:
utils/test-parameter.c.

◆ aubio_parameter_set_max_value()

uint_t aubio_parameter_set_max_value ( aubio_parameter_t param,
smpl_t  max_value 
)

set maximum value of this parameter

Parameters
paramparameter, created by new_aubio_parameter
max_valuenew maximum value
Returns
0 if successful, 1 otherwise
Examples:
utils/test-parameter.c.

◆ aubio_parameter_set_min_value()

uint_t aubio_parameter_set_min_value ( aubio_parameter_t param,
smpl_t  min_value 
)

set minimum value of this parameter

Parameters
paramparameter, created by new_aubio_parameter
min_valuenew minimum value
Returns
0 if successful, 1 otherwise
Examples:
utils/test-parameter.c.

◆ aubio_parameter_set_steps()

uint_t aubio_parameter_set_steps ( aubio_parameter_t param,
uint_t  steps 
)

set number of steps used for interpolation

Parameters
paramparameter, created by new_aubio_parameter
stepsnew number of steps
Returns
0 if successful, 1 otherwise
Examples:
utils/test-parameter.c.

◆ aubio_parameter_set_target_value()

uint_t aubio_parameter_set_target_value ( aubio_parameter_t param,
smpl_t  value 
)

set target value of the parameter

Parameters
paramparameter, created by new_aubio_parameter
valuenew target value
Returns
0 if successful, 1 otherwise
Examples:
utils/test-parameter.c.

◆ del_aubio_parameter()

void del_aubio_parameter ( aubio_parameter_t param)

destroy aubio_parameter_t object

Parameters
paramparameter, created by new_aubio_parameter
Examples:
utils/test-parameter.c.

◆ new_aubio_parameter()

aubio_parameter_t* new_aubio_parameter ( smpl_t  min_value,
smpl_t  max_value,
uint_t  steps 
)

create new parameter object

Parameters
min_valuethe minimum value of the new parameter
max_valuethe maximum value of the new parameter
stepsthe number of steps to interpolate from the old value to the target value
Returns
the newly created aubio_parameter_t
Examples:
utils/test-parameter.c.