Tscope5
cedrusbox.c File Reference

Definitions of cedrusbox functions. More...

Go to the source code of this file.

Functions

Response registration

Cedrus response boxes can only be used as response devices.

See timer.c for more information about response registration.

int ts5_define_cedrusbox_button (int device, int button)
 Define a cedrusbox button as a response button.
int ts5_get_num_cedrusboxes ()
 Get then number of cedrusboxes that are connected to the system.
int ts5_get_num_cedrusbox_buttons (int device)
 Get then number of buttons available on a cedrusbox.
int ts5_cedrusbox_set_parameter (int device, int parameter, int value)
 Set a parameter on a cedrusbox.
int ts5_cedrusbox_get_parameter (int device, int parameter)
 Get a parameter on a cedrusbox.

Detailed Description

Definitions of cedrusbox functions.

Definition in file cedrusbox.c.


Function Documentation

int ts5_define_cedrusbox_button ( int  device,
int  button 
)

Define a cedrusbox button as a response button.

Parameters:
deviceNumber of the cedrusbox (devices are numbered from 1).
buttonNumber of the button (buttons are counted from 1).
Returns:
The reponse number associated with the button.

Give a positive number if you want to monitor button press events, a negative number if you want to monitor button release events.

Examples:
cedrusbox01.c.

Definition at line 41 of file cedrusbox.c.

int ts5_get_num_cedrusboxes ( )

Get then number of cedrusboxes that are connected to the system.

Returns:
The number of cedrusboxes that are connected to the system.
Examples:
cedrusbox01.c.

Definition at line 111 of file cedrusbox.c.

int ts5_get_num_cedrusbox_buttons ( int  device)

Get then number of buttons available on a cedrusbox.

Parameters:
deviceNumber of the cedrusbox (devices are numbered from 1).
Returns:
The number of buttons on the cedrusbox.
Examples:
cedrusbox01.c.

Definition at line 127 of file cedrusbox.c.

int ts5_cedrusbox_set_parameter ( int  device,
int  parameter,
int  value 
)

Set a parameter on a cedrusbox.

Parameters:
deviceNumber of the cedrusbox.
parameterCode for the parameter that will be set.
valueThe value that will be set.
Returns:
The previous value for the parameter.

The available commands for SV1 voice keys are:

  • TS5_CEDRUSBOX_LOCKINGLEVEL: can be S5_CEDRUSBOX_LOCK or TS5_CEDRUSBOX_UNLOCK. This locks/unlocks the treshold and delay dials on the device.
  • TS5_CEDRUSBOX_TRESHOLD: voice key treshold. Should be an integer between the values set with TS5_CEDRUSBOX_MIN_TRESHOLD and TS5_CEDRUSBOX_MAX_TRESHOLD.
  • TS5_CEDRUSBOX_MIN_TRESHOLD: minimum voice key treshold that can be set. Should be an integer value between 0 and the value set with TS5_CEDRUSBOX_MAX_TRESHOLD.
  • TS5_CEDRUSBOX_MAX_TRESHOLD: maximum voice key treshold that can be set. Should be an integer value between the value set with TS5_CEDRUSBOX_MIN_TRESHOLD and 255.
  • TS5_CEDRUSBOX_RISE_DELAY: voice key rise delay in milliseconds. Should be an integer between the values set with TS5_CEDRUSBOX_MIN_RISE_DELAY and TS5_CEDRUSBOX_MAX_RISE_DELAY.
  • TS5_CEDRUSBOX_MIN_RISE_DELAY: minimum voice key rise delay that can be set. Should be an integer value between 0 and the value set with TS5_CEDRUSBOX_MAX_RISE_DELAY.
  • TS5_CEDRUSBOX_MAX_RISE_DELAY: maximum voice key rise delay that can be set. Should be an integer value between the value set with TS5_CEDRUSBOX_MIN_TRESHOLD and 100.
  • TS5_CEDRUSBOX_DROP_DELAY: voice key drop delay in milliseconds. Should be an integer value between 0 and 255.

Definition at line 170 of file cedrusbox.c.

int ts5_cedrusbox_get_parameter ( int  device,
int  parameter 
)

Get a parameter on a cedrusbox.

Parameters:
deviceNumber of the cedrusbox.
parameterCode for the parameter that will be queried.
Returns:
The value for the parameter.

See ts5_cedrusbox_set_parameter() for the list of parameter values.

Definition at line 329 of file cedrusbox.c.