aubio: utils/parameter.h File Reference

aubio 0.4.9

Typedefs | Functions
parameter.h File Reference

Go to the source code of this file.

## Typedefs
typedef struct _aubio_parameter_t | aubio_parameter_t
| parameter object

## Functions
aubio_parameter_t * | new_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

  param | parameter, 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

  param | parameter, 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

  param | parameter, 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

  param | parameter, 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

  param | parameter, 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

  param | parameter, created by new_aubio_parameter
  value | new 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

  param | parameter, created by new_aubio_parameter
  max_value | new 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

  param | parameter, created by new_aubio_parameter
  min_value | new 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

  param | parameter, created by new_aubio_parameter
  steps | new 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

  param | parameter, created by new_aubio_parameter
  value | new 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

  param | parameter, 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_value | the minimum value of the new parameter
  max_value | the maximum value of the new parameter
  steps | the 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.