OSSIA
Open Scenario System for Interactive Application
|
Parameter creation, and attributes. More...
Parameter creation, and attributes.
Enumerations | |
enum | ossia_type { FLOAT_T , INT_T , VEC2F_T , VEC3F_T , VEC4F_T , IMPULSE_T , BOOL_T , STRING_T , LIST_T , CHAR_T } |
enum | ossia_access_mode { BI , GET , SET } |
enum | ossia_bounding_mode { FREE , CLIP , WRAP , FOLD , LOW , HIGH } |
Functions | |
OSSIA_EXPORT ossia_node_t | ossia_parameter_get_node (ossia_parameter_t param) |
Return the node a parameter is part of. More... | |
OSSIA_EXPORT void | ossia_parameter_set_access_mode (ossia_parameter_t param, ossia_access_mode am) |
OSSIA_EXPORT ossia_access_mode | ossia_parameter_get_access_mode (ossia_parameter_t param) |
OSSIA_EXPORT void | ossia_parameter_set_bounding_mode (ossia_parameter_t param, ossia_bounding_mode bm) |
OSSIA_EXPORT ossia_bounding_mode | ossia_parameter_get_bounding_mode (ossia_parameter_t param) |
OSSIA_EXPORT void | ossia_parameter_set_domain (ossia_parameter_t param, ossia_domain_t domain) |
OSSIA_EXPORT ossia_domain_t | ossia_parameter_get_domain (ossia_parameter_t param) |
OSSIA_EXPORT void | ossia_parameter_set_unit (ossia_parameter_t param, const char *unit) |
OSSIA_EXPORT const char * | ossia_parameter_get_unit (ossia_parameter_t param) |
OSSIA_EXPORT void | ossia_parameter_set_muted (ossia_parameter_t param, int muted) |
OSSIA_EXPORT int | ossia_parameter_get_muted (ossia_parameter_t param) |
OSSIA_EXPORT void | ossia_parameter_set_disabled (ossia_parameter_t param, int disabled) |
OSSIA_EXPORT int | ossia_parameter_get_disabled (ossia_parameter_t param) |
OSSIA_EXPORT void | ossia_parameter_set_critical (ossia_parameter_t param, int critical) |
OSSIA_EXPORT int | ossia_parameter_get_critical (ossia_parameter_t param) |
OSSIA_EXPORT void | ossia_parameter_set_repetition_filter (ossia_parameter_t param, int repetition_filter) |
OSSIA_EXPORT int | ossia_parameter_get_repetition_filter (ossia_parameter_t param) |
OSSIA_EXPORT void | ossia_parameter_set_value (ossia_parameter_t param, ossia_value_t value) |
OSSIA_EXPORT ossia_value_t | ossia_parameter_get_value (ossia_parameter_t param) |
OSSIA_EXPORT int | ossia_parameter_to_int (ossia_parameter_t val) |
Get the value if it is an int. More... | |
OSSIA_EXPORT float | ossia_parameter_to_float (ossia_parameter_t val) |
Get the value if it is an float. More... | |
OSSIA_EXPORT struct ossia_vec2f | ossia_parameter_to_2f (ossia_parameter_t val) |
Get the value if it is a vec2f. More... | |
OSSIA_EXPORT struct ossia_vec3f | ossia_parameter_to_3f (ossia_parameter_t val) |
Get the value if it is a vec3f. More... | |
OSSIA_EXPORT struct ossia_vec4f | ossia_parameter_to_4f (ossia_parameter_t val) |
Get the value if it is a vec4f. More... | |
OSSIA_EXPORT int | ossia_parameter_to_bool (ossia_parameter_t val) |
Get the value if it is a bool. More... | |
OSSIA_EXPORT void | ossia_parameter_to_byte_array (ossia_parameter_t val, char **str, size_t *sz) |
Get the value if it is a byte array. More... | |
OSSIA_EXPORT const char * | ossia_parameter_to_string (ossia_parameter_t val) |
Get the value if it is a null-terminated string. More... | |
OSSIA_EXPORT void | ossia_parameter_to_list (ossia_parameter_t val_in, ossia_value_t **out, size_t *size) |
Get the value if it is a list. More... | |
OSSIA_EXPORT void | ossia_parameter_to_fn (ossia_parameter_t val_in, float **out, size_t *size) |
Get the value if it is a list of floats. More... | |
OSSIA_EXPORT void | ossia_parameter_to_in (ossia_parameter_t val_in, int **out, size_t *size) |
Get the value if it is a list of ints. More... | |
OSSIA_EXPORT void | ossia_parameter_push_value (ossia_parameter_t param, ossia_value_t value) |
OSSIA_EXPORT void | ossia_parameter_push_impulse (ossia_parameter_t param) |
OSSIA_EXPORT void | ossia_parameter_push_i (ossia_parameter_t param, int value) |
OSSIA_EXPORT void | ossia_parameter_push_b (ossia_parameter_t param, int b) |
OSSIA_EXPORT void | ossia_parameter_push_f (ossia_parameter_t param, float value) |
OSSIA_EXPORT void | ossia_parameter_push_2f (ossia_parameter_t param, float v1, float v2) |
OSSIA_EXPORT void | ossia_parameter_push_3f (ossia_parameter_t param, float v1, float v2, float v3) |
OSSIA_EXPORT void | ossia_parameter_push_4f (ossia_parameter_t param, float v1, float v2, float v3, float v4) |
OSSIA_EXPORT void | ossia_parameter_push_c (ossia_parameter_t param, char value) |
OSSIA_EXPORT void | ossia_parameter_push_s (ossia_parameter_t param, const char *value) |
OSSIA_EXPORT void | ossia_parameter_push_in (ossia_parameter_t param, const int *value, size_t sz) |
Push an array of integers. More... | |
OSSIA_EXPORT void | ossia_parameter_push_fn (ossia_parameter_t param, const float *value, size_t sz) |
Push an array of floats. More... | |
OSSIA_EXPORT void | ossia_parameter_push_cn (ossia_parameter_t param, const char *value, size_t sz) |
Push a string with known length. More... | |
OSSIA_EXPORT void | ossia_parameter_push_list (ossia_parameter_t param, const ossia_value_t *value, size_t sz) |
Push an array of values. More... | |
OSSIA_EXPORT ossia_value_t | ossia_parameter_fetch_value (ossia_parameter_t param) |
Fetch the value of a parameter. More... | |
OSSIA_EXPORT void | ossia_parameter_set_listening (ossia_parameter_t param, int listening) |
Enable or disable remote updates for a given address. More... | |
OSSIA_EXPORT ossia_value_callback_idx_t | ossia_parameter_add_callback (ossia_parameter_t param, ossia_value_callback_t callback, void *ctx) |
Add a callback called when the value of a parameter changes. More... | |
OSSIA_EXPORT void | ossia_parameter_push_callback (ossia_parameter_t param, ossia_value_callback_t callback, void *ctx) |
Add a callback called when the value of a parameter changes. More... | |
OSSIA_EXPORT void | ossia_parameter_remove_callback (ossia_parameter_t param, ossia_value_callback_idx_t index) |
Remove a callback added with ossia_parameter_add_callback. More... | |
OSSIA_EXPORT void | ossia_parameter_free_callback_idx (ossia_value_callback_idx_t) |
Free a callback index. More... | |
enum ossia_type |
enum ossia_access_mode |
enum ossia_bounding_mode |
OSSIA_EXPORT ossia_node_t ossia_parameter_get_node | ( | ossia_parameter_t | param | ) |
Return the node a parameter is part of.
OSSIA_EXPORT void ossia_parameter_set_access_mode | ( | ossia_parameter_t | param, |
ossia_access_mode | am | ||
) |
OSSIA_EXPORT ossia_access_mode ossia_parameter_get_access_mode | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT void ossia_parameter_set_bounding_mode | ( | ossia_parameter_t | param, |
ossia_bounding_mode | bm | ||
) |
OSSIA_EXPORT ossia_bounding_mode ossia_parameter_get_bounding_mode | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT void ossia_parameter_set_domain | ( | ossia_parameter_t | param, |
ossia_domain_t | domain | ||
) |
OSSIA_EXPORT ossia_domain_t ossia_parameter_get_domain | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT void ossia_parameter_set_unit | ( | ossia_parameter_t | param, |
const char * | unit | ||
) |
OSSIA_EXPORT const char* ossia_parameter_get_unit | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT void ossia_parameter_set_muted | ( | ossia_parameter_t | param, |
int | muted | ||
) |
OSSIA_EXPORT int ossia_parameter_get_muted | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT void ossia_parameter_set_disabled | ( | ossia_parameter_t | param, |
int | disabled | ||
) |
OSSIA_EXPORT int ossia_parameter_get_disabled | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT void ossia_parameter_set_critical | ( | ossia_parameter_t | param, |
int | critical | ||
) |
OSSIA_EXPORT int ossia_parameter_get_critical | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT void ossia_parameter_set_repetition_filter | ( | ossia_parameter_t | param, |
int | repetition_filter | ||
) |
repetition_filter is a boolean value.
OSSIA_EXPORT int ossia_parameter_get_repetition_filter | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT void ossia_parameter_set_value | ( | ossia_parameter_t | param, |
ossia_value_t | value | ||
) |
OSSIA_EXPORT ossia_value_t ossia_parameter_get_value | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT int ossia_parameter_to_int | ( | ossia_parameter_t | val | ) |
Get the value if it is an int.
OSSIA_EXPORT float ossia_parameter_to_float | ( | ossia_parameter_t | val | ) |
Get the value if it is an float.
OSSIA_EXPORT struct ossia_vec2f ossia_parameter_to_2f | ( | ossia_parameter_t | val | ) |
Get the value if it is a vec2f.
OSSIA_EXPORT struct ossia_vec3f ossia_parameter_to_3f | ( | ossia_parameter_t | val | ) |
Get the value if it is a vec3f.
OSSIA_EXPORT struct ossia_vec4f ossia_parameter_to_4f | ( | ossia_parameter_t | val | ) |
Get the value if it is a vec4f.
OSSIA_EXPORT int ossia_parameter_to_bool | ( | ossia_parameter_t | val | ) |
Get the value if it is a bool.
OSSIA_EXPORT void ossia_parameter_to_byte_array | ( | ossia_parameter_t | val, |
char ** | str, | ||
size_t * | sz | ||
) |
Get the value if it is a byte array.
Usage:
OSSIA_EXPORT const char* ossia_parameter_to_string | ( | ossia_parameter_t | val | ) |
Get the value if it is a null-terminated string.
OSSIA_EXPORT void ossia_parameter_to_list | ( | ossia_parameter_t | val_in, |
ossia_value_t ** | out, | ||
size_t * | size | ||
) |
Get the value if it is a list.
OSSIA_EXPORT void ossia_parameter_to_fn | ( | ossia_parameter_t | val_in, |
float ** | out, | ||
size_t * | size | ||
) |
Get the value if it is a list of floats.
OSSIA_EXPORT void ossia_parameter_to_in | ( | ossia_parameter_t | val_in, |
int ** | out, | ||
size_t * | size | ||
) |
Get the value if it is a list of ints.
OSSIA_EXPORT void ossia_parameter_push_value | ( | ossia_parameter_t | param, |
ossia_value_t | value | ||
) |
OSSIA_EXPORT void ossia_parameter_push_impulse | ( | ossia_parameter_t | param | ) |
OSSIA_EXPORT void ossia_parameter_push_i | ( | ossia_parameter_t | param, |
int | value | ||
) |
OSSIA_EXPORT void ossia_parameter_push_b | ( | ossia_parameter_t | param, |
int | b | ||
) |
b is a boolean, 0 for false, 1 for true.
OSSIA_EXPORT void ossia_parameter_push_f | ( | ossia_parameter_t | param, |
float | value | ||
) |
OSSIA_EXPORT void ossia_parameter_push_2f | ( | ossia_parameter_t | param, |
float | v1, | ||
float | v2 | ||
) |
OSSIA_EXPORT void ossia_parameter_push_3f | ( | ossia_parameter_t | param, |
float | v1, | ||
float | v2, | ||
float | v3 | ||
) |
OSSIA_EXPORT void ossia_parameter_push_4f | ( | ossia_parameter_t | param, |
float | v1, | ||
float | v2, | ||
float | v3, | ||
float | v4 | ||
) |
OSSIA_EXPORT void ossia_parameter_push_c | ( | ossia_parameter_t | param, |
char | value | ||
) |
OSSIA_EXPORT void ossia_parameter_push_s | ( | ossia_parameter_t | param, |
const char * | value | ||
) |
OSSIA_EXPORT void ossia_parameter_push_in | ( | ossia_parameter_t | param, |
const int * | value, | ||
size_t | sz | ||
) |
Push an array of integers.
OSSIA_EXPORT void ossia_parameter_push_fn | ( | ossia_parameter_t | param, |
const float * | value, | ||
size_t | sz | ||
) |
Push an array of floats.
OSSIA_EXPORT void ossia_parameter_push_cn | ( | ossia_parameter_t | param, |
const char * | value, | ||
size_t | sz | ||
) |
Push a string with known length.
OSSIA_EXPORT void ossia_parameter_push_list | ( | ossia_parameter_t | param, |
const ossia_value_t * | value, | ||
size_t | sz | ||
) |
Push an array of values.
OSSIA_EXPORT ossia_value_t ossia_parameter_fetch_value | ( | ossia_parameter_t | param | ) |
Fetch the value of a parameter.
OSSIA_EXPORT void ossia_parameter_set_listening | ( | ossia_parameter_t | param, |
int | listening | ||
) |
Enable or disable remote updates for a given address.
OSSIA_EXPORT ossia_value_callback_idx_t ossia_parameter_add_callback | ( | ossia_parameter_t | param, |
ossia_value_callback_t | callback, | ||
void * | ctx | ||
) |
Add a callback called when the value of a parameter changes.
address | Address on which the callback must be added. |
callback | Function to be called. |
ctx | Will be passed to the callback. |
OSSIA_EXPORT void ossia_parameter_push_callback | ( | ossia_parameter_t | param, |
ossia_value_callback_t | callback, | ||
void * | ctx | ||
) |
Add a callback called when the value of a parameter changes.
address | Address on which the callback must be added. |
callback | Function to be called. |
ctx | Will be passed to the callback. |
OSSIA_EXPORT void ossia_parameter_remove_callback | ( | ossia_parameter_t | param, |
ossia_value_callback_idx_t | index | ||
) |
Remove a callback added with ossia_parameter_add_callback.
address | Address on which the callback must be removed |
index | Identifier of the callback |
OSSIA_EXPORT void ossia_parameter_free_callback_idx | ( | ossia_value_callback_idx_t | cb | ) |
Free a callback index.