setctrl
Configurable slider controls for realtime user input.
Plugin opcode in control.
Requires Winsound or TCL/TK. setctrl sets a slider to a specific value, or sets a minimum or maximum range.
Syntax
Initialization
Note that this opcode is not available on Windows due to the implimentation of pipes on that system.
inum -- number of the slider to set
ival -- value to be sent to the slider
itype -- type of value sent to the slider as follows:
- 1 -- set the current value. Initial value is 0.
- 2 -- set the minimum value. Default is 0.
- 3 -- set the maximum value. Default is 127.
- 4 -- set the label. (New in Csound version 4.09)
Performance
Calling setctrl will create a new slider on the screen. There is no theoretical limit to the number of sliders. Windows and TCL/TK use only integers for slider values, so the values may need rescaling. GUIs usually pass values at a fairly slow rate, so it may be advisable to pass the output of control through port.
Examples
Here is an example of the setctrl opcode. It uses the file setctrl.csd.
Its output should include lines like this:
See also
Sensing and Control: TCL/TK widgets
Credits
Author: John ffitch
University of Bath, Codemist. Ltd.
Bath, UK
May 2000
Example written by Kevin Conder.
New in Csound version 4.06