aubio 0.4.9

Loading...
Searching...
No Matches
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_t * | new_aubio_parameter (smpl_t min_value, smpl_t max_value, uint_t steps)
| create new parameter object
uint_t | aubio_parameter_set_target_value (aubio_parameter_t *param, smpl_t value)
| set target value of the parameter
smpl_t | aubio_parameter_get_next_value (aubio_parameter_t *param)
| get next parameter
smpl_t | aubio_parameter_get_current_value (const aubio_parameter_t *param)
| get current parameter value, without interpolation
uint_t | aubio_parameter_set_current_value (aubio_parameter_t *param, smpl_t value)
| set current parameter value, skipping interpolation
uint_t | aubio_parameter_set_steps (aubio_parameter_t *param, uint_t steps)
| set number of steps used for interpolation
uint_t | aubio_parameter_get_steps (const aubio_parameter_t *param)
| get number of steps of this parameter
uint_t | aubio_parameter_set_min_value (aubio_parameter_t *param, smpl_t min_value)
| set minimum value of this parameter
smpl_t | aubio_parameter_get_min_value (const aubio_parameter_t *param)
| get minimum value of this parameter
uint_t | aubio_parameter_set_max_value (aubio_parameter_t *param, smpl_t max_value)
| set maximum value of this parameter
smpl_t | aubio_parameter_get_max_value (const aubio_parameter_t *param)
| get maximum value of this parameter
void | del_aubio_parameter (aubio_parameter_t *param)
| destroy aubio_parameter_t object

## 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.

## Typedef Documentation

## ◆ aubio_parameter_t

typedef struct _aubio_parameter_t aubio_parameter_t

parameter object

Examples
  utils/test-parameter.c.

Definition at line 40 of 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.