HELP INDEX


NAME


cec_slider - Creation of input control slider.

SYNOPSIS

cec_slider name type unit orientation resolution min max init

STANDARD OPTIONS

name:            character string 
type:			 i (i-rate) or k (k-rate)
unit:            character string
orientation:     v (vertical) or h (horizontal)
resolution:      real number
min & max:       real-numbers
init		 a real number between min and max

DESCRIPTION


The cec_slider command creates a slider in the real-time window. There are two types of sliders: the i-rate slider and the k-rate slider.

The i-rate slider is evaluated at init-time only. Its value at compile time is substituted into the orchestra and/or score with the construct:


	[name_of_variable]


The k-rate slider is usable at performance time and values are passed to the orchestra via a global "gkname" variable. The k-rate cec_slider is implemented with a special Csound routine that handles values though console-driven events. The Csound window option is not available when a k-rate slider is present in a module. The initial value of the variable is set at the current value of the slider.

Substitution for k-rate sliders is done in the orchestra via a global variable their name prefixed with "gk".

For k-rate sliders, an option menu is also produced with the options: k-rate, record, playback, load and save. The user can record slider events with record and replay them with playback. A given stream can be saved under any name with save and recalled with load. k-rate allows to simply play the slider without recording.

When the orchestra and score are compiled, the cec_slider object creates its own instruments to direct slider information to Csound. This is not normally seen by the user.

To obtain better screen resolution, it is advisable to size the real-time window to a convenient height and/or width.

Note:It is compulsory, when using the k-rate slider object, to also declare a "total_time/duree_totale" i-rate slider, unless there is a cec_filein object present (in which case the sliders will be in function for the duration of the longest sound selected.

EXAMPLE


The definition:
 
cec_slider pitch k Hz .01 50 4500 2000
sets up a k-rate slider in the realtime window. Values are passed with a global variable named "gkpitch". The data will be scaled to a value between 50 and 4500 with a resolution of 0.01.

The definition:

 
cec_slider amp i db .01 50 90 40
sets up a i-rate slider in the realtime window. The value of theslider at init time will subtitute any [amp] in the orchestra and/or score .




Copyright 1996