Debian Codegraph @

doc-en/source/src/api/Interface/cslider.rst

raw
1 cslider : creates a slider, and its own graph line, for time-varying controls
2 =============================================================================
3
4 Initline
5 ---------
6
7 .. code::
8
9 cslider(name='slider', label='Pitch', min=20.0, max=20000.0, init=1000.0,
10 rel='lin', res='float', gliss=0.025, unit='x', up=False,
11 func=None, midictl=None, half=False, col='red', help='')
12
13 Description
14 ------------
15
16 When created, the slider is stacked in the slider pane of the main Cecilia
17 window in the order it is defined. The value of the slider is passed to
18 the module with a variable named `self.name`. The `up` argument passes
19 the value of the slider on mouse up if set to True or continuously if set
20 to False. The `gliss` argument determines the duration of the portamento
21 (in seconds) applied between values. The portamento is automatically set
22 to 0 if `up` is True. The resolution of the slider can be set to int or
23 float using the `res` argument. Slider color can be set using the `col`
24 argument and a color value. However, sliders with `up` set to True are
25 greyed out and the `col` argument is ignored.
26
27 If `up` is set to True, the cslider will not create an audio rate signal,
28 but will call a method named `widget_name` + '_up'. This method must be
29 defined in the class `Module`. For a cslider with the name 'grains', the
30 method should be declared like this:
31
32
33 .. code::
34
35 def grains_up(self, value):
36
37 Every time a slider is defined with `up` set to False, a corresponding
38 graph line is automatically defined for the grapher in the Cecilia
39 interface. The recording and playback of an automated slider is linked
40 to its graph line.
41
42 Parameters
43 -----------
44
45 **name**: str
46 Name of the slider.
47 **label**: str
48 Label shown in the slider label and the grapher popup.
49 **min**: float
50 Minimum value of the slider.
51 **max**: float
52 Maximum value of the slider.
53 **init**: float
54 Slider's initial value.
55 **rel**: str {'lin', 'log'}
56 Slider scaling. Defaults to 'lin'.
57 **res**: str {'int', 'float'}
58 Slider resolution. Defaults to 'float'
59 **gliss**: float
60 Portamento between values in seconds. Defaults to 0.025.
61 **unit**: str
62 Unit symbol shown in the interface.
63 **up**: boolean
64 Value passed on mouse up if True. Defaults to False.
65 **func**: list of tuples
66 Initial automation in break-points format (serie of time/value
67 points). Times must be in increasing order between 0 and 1.
68 **midictl**: int
69 Automatically map a midi controller to this slider.
70 Defaults to None.
71 **half**: boolean
72 Determines if the slider is full-width or half-width. Set to True
73 to get half-width slider. Defaults to False.
74 **col**: str
75 Color of the widget.
76 **help**: str
77 Help string shown in the cslider tooltip.
78
79