Tscope5
cedrusbox.c File Reference

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_key (int device, int key)
int ts5_cedrusbox_set_parameter (int device, int parameter, int value)
int ts5_cedrusbox_get_parameter (int device, int parameter)

Detailed Description

Definition in file cedrusbox.c.


Function Documentation

int ts5_define_cedrusbox_key ( int  device,
int  key 
)

Define a cedrusbox key as a response key.

Parameters:
deviceNumber of the cedrusbox (devices are numbered from 1).
keyNumber of the key (keys are counted from 1).
Returns:
The reponse number associated with the key.

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

Definition at line 32 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 112 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 248 of file cedrusbox.c.