libmapper  1.2
Typedefs | Functions
Signals

Typedefs

typedef void mapper_signal_update_handler(mapper_signal sig, mapper_id instance, const void *value, int count, mapper_timetag_t *tt)
 
typedef void mapper_instance_event_handler(mapper_signal sig, mapper_id instance, mapper_instance_event event, mapper_timetag_t *tt)
 

Functions

void mapper_signal_update (mapper_signal sig, const void *value, int count, mapper_timetag_t tt)
 
void mapper_signal_update_int (mapper_signal sig, int value)
 
void mapper_signal_update_float (mapper_signal sig, float value)
 
void mapper_signal_update_double (mapper_signal sig, double value)
 
const void * mapper_signal_value (mapper_signal sig, mapper_timetag_t *tt)
 
int mapper_signal_query_remotes (mapper_signal sig, mapper_timetag_t tt)
 
mapper_map * mapper_signal_maps (mapper_signal sig, mapper_direction dir)
 
void mapper_signal_set_user_data (mapper_signal sig, const void *user_data)
 
mapper_signal_group mapper_signal_signal_group (mapper_signal sig)
 
void mapper_signal_set_group (mapper_signal sig, mapper_signal_group group)
 
void * mapper_signal_user_data (mapper_signal sig)
 
void mapper_signal_set_callback (mapper_signal sig, mapper_signal_update_handler *handler)
 
int mapper_signal_reserve_instances (mapper_signal sig, int num, mapper_id *ids, void **user_data)
 
void mapper_signal_instance_update (mapper_signal sig, mapper_id instance, const void *value, int count, mapper_timetag_t tt)
 
void mapper_signal_instance_release (mapper_signal sig, mapper_id instance, mapper_timetag_t tt)
 
void mapper_signal_remove_instance (mapper_signal sig, mapper_id instance)
 
int mapper_signal_instance_is_active (mapper_signal sig, mapper_id instance)
 
int mapper_signal_instance_activate (mapper_signal sig, mapper_id instance)
 
mapper_id mapper_signal_oldest_active_instance (mapper_signal sig)
 
mapper_id mapper_signal_newest_active_instance (mapper_signal sig)
 
const void * mapper_signal_instance_value (mapper_signal sig, mapper_id instance, mapper_timetag_t *tt)
 
int mapper_signal_num_active_instances (mapper_signal sig)
 
int mapper_signal_num_reserved_instances (mapper_signal sig)
 
mapper_id mapper_signal_instance_id (mapper_signal sig, int index)
 
mapper_id mapper_signal_active_instance_id (mapper_signal sig, int index)
 
mapper_id mapper_signal_reserved_instance_id (mapper_signal sig, int index)
 
void mapper_signal_set_instance_stealing_mode (mapper_signal sig, mapper_instance_stealing_type mode)
 
mapper_instance_stealing_type mapper_signal_instance_stealing_mode (mapper_signal sig)
 
void mapper_signal_set_instance_event_callback (mapper_signal sig, mapper_instance_event_handler h, int flags)
 
void mapper_signal_instance_set_user_data (mapper_signal sig, mapper_id instance, const void *user_data)
 
void * mapper_signal_instance_user_data (mapper_signal sig, mapper_id instance)
 
const char * mapper_signal_description (mapper_signal sig)
 
mapper_device mapper_signal_device (mapper_signal sig)
 
mapper_direction mapper_signal_direction (mapper_signal sig)
 
mapper_id mapper_signal_id (mapper_signal sig)
 
int mapper_signal_is_local (mapper_signal sig)
 
int mapper_signal_length (mapper_signal sig)
 
void * mapper_signal_maximum (mapper_signal sig)
 
void * mapper_signal_minimum (mapper_signal sig)
 
const char * mapper_signal_name (mapper_signal sig)
 
int mapper_signal_num_instances (mapper_signal sig)
 
int mapper_signal_num_maps (mapper_signal sig, mapper_direction dir)
 
float mapper_signal_rate (mapper_signal sig)
 
char mapper_signal_type (mapper_signal sig)
 
const char * mapper_signal_unit (mapper_signal sig)
 
int mapper_signal_num_properties (mapper_signal sig)
 
int mapper_signal_property (mapper_signal sig, const char *name, int *length, char *type, const void **value)
 
int mapper_signal_property_index (mapper_signal sig, unsigned int index, const char **name, int *length, char *type, const void **value)
 
void mapper_signal_set_description (mapper_signal sig, const char *description)
 
void mapper_signal_set_maximum (mapper_signal sig, const void *maximum)
 
void mapper_signal_set_minimum (mapper_signal sig, const void *minimum)
 
void mapper_signal_set_rate (mapper_signal sig, float rate)
 
void mapper_signal_set_unit (mapper_signal sig, const char *unit)
 
int mapper_signal_set_property (mapper_signal sig, const char *name, int length, char type, const void *value, int publish)
 
void mapper_signal_clear_staged_properties (mapper_signal sig)
 
void mapper_signal_push (mapper_signal sig)
 
int mapper_signal_remove_property (mapper_signal sig, const char *name)
 
mapper_signal * mapper_signal_query_union (mapper_signal *query1, mapper_signal *query2)
 
mapper_signal * mapper_signal_query_intersection (mapper_signal *query1, mapper_signal *query2)
 
mapper_signal * mapper_signal_query_difference (mapper_signal *query1, mapper_signal *query2)
 
mapper_signal mapper_signal_query_index (mapper_signal *query, int index)
 
mapper_signal * mapper_signal_query_next (mapper_signal *query)
 
mapper_signal * mapper_signal_query_copy (mapper_signal *query)
 
void mapper_signal_query_done (mapper_signal *query)
 
void mapper_signal_print (mapper_signal sig, int device_name)
 

Detailed Description

Signals define inputs or outputs for devices. A signal consists of a scalar or vector value of some integer or floating-point type. A mapper_signal is created by adding an input or output to a device. It can optionally be provided with some metadata such as a signal's range, unit, or other properties. Signals can be mapped by creating maps through a GUI.

Typedef Documentation

◆ mapper_instance_event_handler

typedef void mapper_instance_event_handler(mapper_signal sig, mapper_id instance, mapper_instance_event event, mapper_timetag_t *tt)

A handler function to be called whenever a signal instance management event occurs.

◆ mapper_signal_update_handler

typedef void mapper_signal_update_handler(mapper_signal sig, mapper_id instance, const void *value, int count, mapper_timetag_t *tt)

A signal handler function can be called whenever a signal value changes.

Function Documentation

◆ mapper_signal_active_instance_id()

mapper_id mapper_signal_active_instance_id ( mapper_signal  sig,
int  index 
)

Get an active signal instance's ID by its index. Intended to be used for iterating over the active instances.

Parameters
sigThe signal to operate on.
indexThe numerical index of the ID to retrieve. Should be between zero and the number of instances.
Returns
The instance ID associated with the given index, or zero if unsuccessful.

◆ mapper_signal_clear_staged_properties()

void mapper_signal_clear_staged_properties ( mapper_signal  sig)

Clear any staged property changes.

Parameters
sigThe signal to operate on.

◆ mapper_signal_description()

const char* mapper_signal_description ( mapper_signal  sig)

Get the description for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal description if it is defined, or NULL.

◆ mapper_signal_device()

mapper_device mapper_signal_device ( mapper_signal  sig)

Get the parent mapper_device for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal's parent device.

◆ mapper_signal_direction()

mapper_direction mapper_signal_direction ( mapper_signal  sig)

Get the direction for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal direction.

◆ mapper_signal_id()

mapper_id mapper_signal_id ( mapper_signal  sig)

Get the unique id for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal id.

◆ mapper_signal_instance_activate()

int mapper_signal_instance_activate ( mapper_signal  sig,
mapper_id  instance 
)

Activate a specific signal instance.

Parameters
sigThe signal to operate on.
instanceThe identifier of the instance to activate.
Returns
Non-zero if the instance is active, zero otherwise.

◆ mapper_signal_instance_id()

mapper_id mapper_signal_instance_id ( mapper_signal  sig,
int  index 
)

Get a signal instance's identifier by its index. Intended to be used for iterating over the active instances.

Parameters
sigThe signal to operate on.
indexThe numerical index of the ID to retrieve. Should be between zero and the number of instances.
Returns
The instance ID associated with the given index, or zero if unsuccessful.

◆ mapper_signal_instance_is_active()

int mapper_signal_instance_is_active ( mapper_signal  sig,
mapper_id  instance 
)

Return whether a given signal instance is currently active.

Parameters
sigThe signal to operate on.
instanceThe identifier of the instance to check.
Returns
Non-zero if the instance is active, zero otherwise.

◆ mapper_signal_instance_release()

void mapper_signal_instance_release ( mapper_signal  sig,
mapper_id  instance,
mapper_timetag_t  tt 
)

Release a specific instance of a signal by removing it from the list of active instances and adding it to the reserve list.

Parameters
sigThe signal to operate on.
instanceThe identifier of the instance to suspend.
ttThe time at which the instance was released; if NULL, will be tagged with the current time. See mapper_device_start_queue() for more information on bundling multiple signal updates with the same timetag.

◆ mapper_signal_instance_set_user_data()

void mapper_signal_instance_set_user_data ( mapper_signal  sig,
mapper_id  instance,
const void *  user_data 
)

Associate a signal instance with an arbitrary pointer.

Parameters
sigThe signal to operate on.
instanceThe identifier of the instance to operate on.
user_dataA pointer to user data to be associated with this instance.

◆ mapper_signal_instance_stealing_mode()

mapper_instance_stealing_type mapper_signal_instance_stealing_mode ( mapper_signal  sig)

Get the stealing method to be used when a previously-unseen instance ID is received.

Parameters
sigThe signal to operate on.
Returns
The stealing mode of the provided signal.

◆ mapper_signal_instance_update()

void mapper_signal_instance_update ( mapper_signal  sig,
mapper_id  instance,
const void *  value,
int  count,
mapper_timetag_t  tt 
)

Update the value of a specific signal instance. The signal will be routed according to external requests.

Parameters
sigThe signal to operate on.
instanceThe identifier of the instance to update.
valueA pointer to a new value for this signal. If the signal type is 'i', this should be int*; if the signal type is 'f', this should be float* (etc). It should be an array at least as long as the signal's length property.
countThe number of values being updated, or 0 for non-periodic signals.
ttThe time at which the value update was aquired. If NULL, libmapper will tag the value update with the current time. See mapper_device_start_queue() for more information on bundling multiple signal updates with the same timetag.

◆ mapper_signal_instance_user_data()

void* mapper_signal_instance_user_data ( mapper_signal  sig,
mapper_id  instance 
)

Retrieve the arbitrary pointer associated with a signal instance.

Parameters
sigThe signal to operate on.
instanceThe identifier of the instance to operate on.
Returns
A pointer associated with this instance.

◆ mapper_signal_instance_value()

const void* mapper_signal_instance_value ( mapper_signal  sig,
mapper_id  instance,
mapper_timetag_t *  tt 
)

Get a signal_instance's value.

Parameters
sigThe signal to operate on.
instanceThe identifier of the instance to operate on.
ttA location to receive the value's time tag. May be 0.
Returns
A pointer to an array containing the value of the signal instance, or 0 if the signal instance has no value.

◆ mapper_signal_is_local()

int mapper_signal_is_local ( mapper_signal  sig)

Indicate whether this signal is local.

Parameters
sigThe signal to check.
Returns
1 if the signal is local, 0 otherwise.

◆ mapper_signal_length()

int mapper_signal_length ( mapper_signal  sig)

Get the vector length for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal vector length.

◆ mapper_signal_maps()

mapper_map* mapper_signal_maps ( mapper_signal  sig,
mapper_direction  dir 
)

Return the list of maps associated with a given signal.

Parameters
sigSignal record to query for maps.
dirThe direction of the map relative to the given signal.
Returns
A double-pointer to the first item in the list of results or zero if none. Use mapper_map_query_next() to iterate.

◆ mapper_signal_maximum()

void* mapper_signal_maximum ( mapper_signal  sig)

Get the maximum for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal maximum if it is defined, or NULL.

◆ mapper_signal_minimum()

void* mapper_signal_minimum ( mapper_signal  sig)

Get the minimum for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal minimum if it is defined, or NULL.

◆ mapper_signal_name()

const char* mapper_signal_name ( mapper_signal  sig)

Get the name for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal name.

◆ mapper_signal_newest_active_instance()

mapper_id mapper_signal_newest_active_instance ( mapper_signal  sig)

Get the local id of the newest active instance.

Parameters
sigThe signal to operate on.
Returns
The instance identifier, or zero if unsuccessful.

◆ mapper_signal_num_active_instances()

int mapper_signal_num_active_instances ( mapper_signal  sig)

Return the number of active instances owned by a signal.

Parameters
sigThe signal to query.
Returns
The number of active instances.

◆ mapper_signal_num_instances()

int mapper_signal_num_instances ( mapper_signal  sig)

Get the number of instances for a specific signal.

Parameters
sigThe signal to check.
Returns
The number of allocated signal instances.

◆ mapper_signal_num_maps()

int mapper_signal_num_maps ( mapper_signal  sig,
mapper_direction  dir 
)

Get the number of maps associated with a specific signal.

Parameters
sigThe signal to check.
dirThe direction of the maps relative to the given signal.
Returns
The number of associated maps.

◆ mapper_signal_num_properties()

int mapper_signal_num_properties ( mapper_signal  sig)

Get the total number of properties for a specific signal.

Parameters
sigThe signal to check.
Returns
The number of properties.

◆ mapper_signal_num_reserved_instances()

int mapper_signal_num_reserved_instances ( mapper_signal  sig)

Return the number of reserved instances owned by a signal.

Parameters
sigThe signal to query.
Returns
The number of active instances.

◆ mapper_signal_oldest_active_instance()

mapper_id mapper_signal_oldest_active_instance ( mapper_signal  sig)

Get the local id of the oldest active instance.

Parameters
sigThe signal to operate on.
Returns
The instance identifier, or zero if unsuccessful.

◆ mapper_signal_print()

void mapper_signal_print ( mapper_signal  sig,
int  device_name 
)

Helper to print the properties of a specific signal.

Parameters
sigThe signal to print.
device_name1 to include the parent device name, 0 otherwise.

◆ mapper_signal_property()

int mapper_signal_property ( mapper_signal  sig,
const char *  name,
int *  length,
char *  type,
const void **  value 
)

Look up a signal property by name.

Parameters
sigThe signal to check.
nameThe name of the property to retrieve.
lengthA pointer to a location to receive the vector length of the property value. (Required.)
typeA pointer to a location to receive the type of the property value. (Required.)
valueA pointer to a location to receive the address of the property's value. (Required.)
Returns
Zero if found, otherwise non-zero.

◆ mapper_signal_property_index()

int mapper_signal_property_index ( mapper_signal  sig,
unsigned int  index,
const char **  name,
int *  length,
char *  type,
const void **  value 
)

Look up a signal property by index. To iterate all properties, call this function from index=0, increasing until it returns zero.

Parameters
sigThe signal to check.
indexNumerical index of a signal property.
nameAddress of a string pointer to receive the name of indexed property. May be zero.
lengthA pointer to a location to receive the vector length of the property value. (Required.)
typeA pointer to a location to receive the type of the property value. (Required.)
valueA pointer to a location to receive the address of the property's value. (Required.)
Returns
Zero if found, otherwise non-zero.

◆ mapper_signal_push()

void mapper_signal_push ( mapper_signal  sig)

Push any property changes out to the network.

Parameters
sigThe signal to operate on.

◆ mapper_signal_query_copy()

mapper_signal* mapper_signal_query_copy ( mapper_signal *  query)

Copy a previously-constructed signal query.

Parameters
queryThe previous signal record pointer.
Returns
A double-pointer to the copy of the list, or zero if none. Use mapper_signal_query_next() to iterate.

◆ mapper_signal_query_difference()

mapper_signal* mapper_signal_query_difference ( mapper_signal *  query1,
mapper_signal *  query2 
)

Get the difference between two signal queries (signals matching query1 but NOT query2).

Parameters
query1The first signal query.
query2The second signal query.
Returns
A double-pointer to the first item in a list of results. Use mapper_signal_query_next() to iterate.

◆ mapper_signal_query_done()

void mapper_signal_query_done ( mapper_signal *  query)

Given a signal record pointer returned from a previous signal query, indicate that we are done iterating.

Parameters
queryThe previous signal record pointer.

◆ mapper_signal_query_index()

mapper_signal mapper_signal_query_index ( mapper_signal *  query,
int  index 
)

Given a signal record pointer returned from a previous signal query, get an indexed item in the list.

Parameters
queryThe previous signal record pointer.
indexThe index of the list element to retrieve.
Returns
A pointer to the signal record, or zero if it doesn't exist.

◆ mapper_signal_query_intersection()

mapper_signal* mapper_signal_query_intersection ( mapper_signal *  query1,
mapper_signal *  query2 
)

Get the intersection of two signal queries (signals matching query1 AND query2).

Parameters
query1The first signal query.
query2The second signal query.
Returns
A double-pointer to the first item in a list of results. Use mapper_signal_query_next() to iterate.

◆ mapper_signal_query_next()

mapper_signal* mapper_signal_query_next ( mapper_signal *  query)

Given a signal record pointer returned from a previous signal query, get the next item in the list.

Parameters
queryThe previous signal record pointer.
Returns
A double-pointer to the next signal record in the list, or zero if no more signals.

◆ mapper_signal_query_remotes()

int mapper_signal_query_remotes ( mapper_signal  sig,
mapper_timetag_t  tt 
)

Query the values of any signals connected via mapping connections.

Parameters
sigA local output signal. We will be querying the remote ends of this signal's mapping connections.
ttA timetag to be attached to the outgoing query. Query responses should also be tagged with this time.
Returns
The number of queries sent, or -1 for error.

◆ mapper_signal_query_union()

mapper_signal* mapper_signal_query_union ( mapper_signal *  query1,
mapper_signal *  query2 
)

Get the union of two signal queries (signals matching query1 OR query2).

Parameters
query1The first signal query.
query2The second signal query.
Returns
A double-pointer to the first item in a list of results. Use mapper_signal_query_next() to iterate.

◆ mapper_signal_rate()

float mapper_signal_rate ( mapper_signal  sig)

Get the update rate for a specific signal.

Parameters
sigThe signal to check.
Returns
The rate for this signal in samples/second, or zero for non-periodic signals.

◆ mapper_signal_remove_instance()

void mapper_signal_remove_instance ( mapper_signal  sig,
mapper_id  instance 
)

Remove a specific instance of a signal and free its memory.

Parameters
sigThe signal to operate on.
instanceThe identifier of the instance to suspend.

◆ mapper_signal_remove_property()

int mapper_signal_remove_property ( mapper_signal  sig,
const char *  name 
)

Remove a property of a signal.

Parameters
sigThe signal to operate on.
nameThe name of the property to remove.
Returns
1 if property has been removed, 0 otherwise.

◆ mapper_signal_reserve_instances()

int mapper_signal_reserve_instances ( mapper_signal  sig,
int  num,
mapper_id *  ids,
void **  user_data 
)

Add new instances to the reserve list. Note that if instance ids are specified, libmapper will not add multiple instances with the same id.

Parameters
sigThe signal to which the instances will be added.
numThe number of instances to add.
idsArray of integer ids, one for each new instance, or 0 for automatically-generated instance ids.
user_dataArray of user context pointers, one for each new instance, or 0 if not needed.
Returns
Number of instances added.

◆ mapper_signal_reserved_instance_id()

mapper_id mapper_signal_reserved_instance_id ( mapper_signal  sig,
int  index 
)

Get a reserved signal instance's ID by its index. Intended to be used for iterating over the reserved instances.

Parameters
sigThe signal to operate on.
indexThe numerical index of the ID to retrieve. Should be between zero and the number of instances.
Returns
The instance ID associated with the given index, or zero if unsuccessful.

◆ mapper_signal_set_callback()

void mapper_signal_set_callback ( mapper_signal  sig,
mapper_signal_update_handler handler 
)

Set or unset the message handler for a signal.

Parameters
sigThe signal to operate on.
handlerA pointer to a mapper_signal_update_handler function for processing incoming messages.

◆ mapper_signal_set_description()

void mapper_signal_set_description ( mapper_signal  sig,
const char *  description 
)

Set the description property for a specific signal.

Parameters
sigThe signal to modify.
descriptionThe description value to set.

◆ mapper_signal_set_group()

void mapper_signal_set_group ( mapper_signal  sig,
mapper_signal_group  group 
)

Add a signal to a predefined signal group created using mapper_device_add_signal_group. Signals in the same group will have instance ids automatically coordinated. By default all signals are in the same (default) group.

Parameters
sigThe signal to add.
groupA signal group to associate with this signal, or 0 to reset to the default group.

◆ mapper_signal_set_instance_event_callback()

void mapper_signal_set_instance_event_callback ( mapper_signal  sig,
mapper_instance_event_handler  h,
int  flags 
)

Set the handler to be called on signal instance management events.

Parameters
sigThe signal to operate on.
hA handler function for instance management events.
flagsBitflags for indicating the types of events which should trigger the callback. Can be a combination of values from the enum mapper_instance_event.

◆ mapper_signal_set_instance_stealing_mode()

void mapper_signal_set_instance_stealing_mode ( mapper_signal  sig,
mapper_instance_stealing_type  mode 
)

Set the stealing method to be used when a previously-unseen instance ID is received and no instances are available.

Parameters
sigThe signal to operate on.
modeMethod to use for reallocating active instances if no reserved instances are available.

◆ mapper_signal_set_maximum()

void mapper_signal_set_maximum ( mapper_signal  sig,
const void *  maximum 
)

Set or remove the maximum of a signal.

Parameters
sigThe signal to modify.
maximumMust be the same type as the signal, or 0 to remove the maximum.

◆ mapper_signal_set_minimum()

void mapper_signal_set_minimum ( mapper_signal  sig,
const void *  minimum 
)

Set or remove the minimum of a signal.

Parameters
sigThe signal to modify.
minimumMust be the same type as the signal, or 0 to remove the minimum.

◆ mapper_signal_set_property()

int mapper_signal_set_property ( mapper_signal  sig,
const char *  name,
int  length,
char  type,
const void *  value,
int  publish 
)

Set a property of a signal. Can be used to provide arbitrary metadata. Value pointed to will be copied.

Parameters
sigThe signal to operate on.
nameThe name of the property to add.
lengthThe length of value array.
typeThe property datatype.
valueAn array of property values.
publish1 to publish property to network, 0 for local-only.
Returns
1 if property has been changed, 0 otherwise.

◆ mapper_signal_set_rate()

void mapper_signal_set_rate ( mapper_signal  sig,
float  rate 
)

Set the rate of a signal.

Parameters
sigThe signal to modify.
rateA rate for this signal in samples/second, or zero for non-periodic signals.

◆ mapper_signal_set_unit()

void mapper_signal_set_unit ( mapper_signal  sig,
const char *  unit 
)

Set the unit of a signal.

Parameters
sigThe signal to operate on.
unitThe unit value to set.

◆ mapper_signal_set_user_data()

void mapper_signal_set_user_data ( mapper_signal  sig,
const void *  user_data 
)

Associate a signal or signal instance with an arbitrary pointer.

Parameters
sigThe signal to operate on.
user_dataA pointer to user data to be associated.

◆ mapper_signal_signal_group()

mapper_signal_group mapper_signal_signal_group ( mapper_signal  sig)

Retrieve the signal group from a given signal. Signals in the same group will have instance ids automatically coordinated. By default all signals are in the same (default) group.

Parameters
sigThe signal to add.
Returns
The signal group used by this signal.

◆ mapper_signal_type()

char mapper_signal_type ( mapper_signal  sig)

Get the data type for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal date type.

◆ mapper_signal_unit()

const char* mapper_signal_unit ( mapper_signal  sig)

Get the unit for a specific signal.

Parameters
sigThe signal to check.
Returns
The signal unit if it is defined, or NULL.

◆ mapper_signal_update()

void mapper_signal_update ( mapper_signal  sig,
const void *  value,
int  count,
mapper_timetag_t  tt 
)

Update the value of a signal. The signal will be routed according to external requests.

Parameters
sigThe signal to update.
valueA pointer to a new value for this signal. If the signal type is 'i', this should be int*; if the signal type is 'f', this should be float*. It should be an array at least as long as the signal's length property.
countThe number of instances of the value that are being updated. For non-periodic signals, this should be 0 or
  1. For periodic signals, this may indicate that a block of values should be accepted, where the last value is the current value.
ttThe time at which the value update was aquired. If the value is MAPPER_NOW, libmapper will tag the value update with the current time. See mapper_device_start_queue() for more information on bundling multiple signal updates with the same timetag.

◆ mapper_signal_update_double()

void mapper_signal_update_double ( mapper_signal  sig,
double  value 
)

Update the value of a scalar signal of type double. This is a scalar equivalent to mapper_signal_update(), for when passing by value is more convenient than passing a pointer. The signal will be routed according to external requests.

Parameters
sigThe signal to update.
valueA new scalar value for this signal.

◆ mapper_signal_update_float()

void mapper_signal_update_float ( mapper_signal  sig,
float  value 
)

Update the value of a scalar signal of type float. This is a scalar equivalent to mapper_signal_update(), for when passing by value is more convenient than passing a pointer. The signal will be routed according to external requests.

Parameters
sigThe signal to update.
valueA new scalar value for this signal.

◆ mapper_signal_update_int()

void mapper_signal_update_int ( mapper_signal  sig,
int  value 
)

Update the value of a scalar signal of type int. This is a scalar equivalent to mapper_signal_update(), for when passing by value is more convenient than passing a pointer. The signal will be routed according to external requests.

Parameters
sigThe signal to update.
valueA new scalar value for this signal.

◆ mapper_signal_user_data()

void* mapper_signal_user_data ( mapper_signal  sig)

Retrieve the arbitrary pointer associated with a signal instance.

Parameters
sigThe signal to operate on.
Returns
A pointer associated with this signal.

◆ mapper_signal_value()

const void* mapper_signal_value ( mapper_signal  sig,
mapper_timetag_t *  tt 
)

Get a signal's value.

Parameters
sigThe signal to operate on.
ttA location to receive the value's time tag. May be 0.
Returns
A pointer to an array containing the value of the signal, or 0 if the signal has no value.