Debian Codegraph @

opcodes/flknob.xml

raw symbols SCIP
1
2 <refentry id="FLknob">
3 <indexterm id="IndexFLknob"><primary>FLknob</primary></indexterm>
4 <refentryinfo><title>FLTK:Valuators</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>FLknob</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>FLknob</refname>
13 <refpurpose>
14 A FLTK widget opcode that creates a knob.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Plugin opcode in widgets. This opcode is part of the plugin repository and has to be installed separately. These FLTK widgets do not work on the Mac.
22 The plugin repository can be found here: <ulink url="https://github.com/csound/plugins"><citetitle>https://github.com/csound/plugins</citetitle></ulink></para>
23 <para>
24 A FLTK widget opcode that creates a knob.
25 </para>
26 </refsect1>
27
28 <refsect1>
29 <title>Syntax</title>
30 <synopsis>kout, ihandle <command>FLknob</command> &quot;label&quot;, imin, imax, iexp, itype, idisp, iwidth, \
31 ix, iy [, icursorsize]</synopsis>
32 </refsect1>
33
34 <refsect1>
35 <title>Initialization</title>
36 <para>
37 <emphasis>ihandle</emphasis> -- a handle value (an integer number) that unequivocally references a corresponding widget. This is used by other opcodes that modify a widget's properties (see <link linkend="ControlFltkAppearance"><citetitle>Modifying FLTK Widget Appearance</citetitle></link>). It is automatically utput by <emphasis>FLknob</emphasis> and must not be set by the user label. (The user label is a double-quoted string containing some user-provided text placed near the widget.)
38 </para>
39 <para>
40 <emphasis><quote>label</quote></emphasis> -- a double-quoted string containing some user-provided text, placed near the corresponding widget.
41 </para>
42
43 <para>
44 <emphasis>imin</emphasis> -- minimum value of output range.
45 </para>
46
47 <para>
48 <emphasis>imax</emphasis> -- maximum value of output range.
49 </para>
50
51 <para>
52 <emphasis>iexp</emphasis> -- an integer number denoting the behaviour of valuator:
53 <itemizedlist>
54 <listitem><para>0 = valuator output is linear</para></listitem>
55 <listitem><para>-1 = valuator output is exponential</para></listitem>
56 </itemizedlist>
57 </para>
58
59 <para>
60 All other positive numbers for <emphasis>iexp</emphasis> indicate the number of an existing table that is used for indexing. Linear interpolation is provided in table indexing. A negative table number suppresses interpolation.
61 </para>
62
63 <warning>
64 <title>IMPORTANT!</title>
65 <para>
66 Notice that the tables used by valuators must be created with the <link linkend="ftgen"><citetitle>ftgen</citetitle></link> opcode and placed in the orchestra before the corresponding valuator. They can not placed
67 in the score. In fact, tables placed in the score are created later than the initialization of the opcodes placed in the header section of the orchestra.
68 </para>
69 </warning>
70
71 <para>
72 <emphasis>itype</emphasis> -- an integer number denoting the appearance of the valuator.
73 </para>
74
75 <para>
76 The <emphasis>itype</emphasis> argument can be set to the following values:
77
78 <itemizedlist>
79 <listitem><para>1 - a 3-D knob</para></listitem>
80 <listitem><para>2 - a pie-like knob</para></listitem>
81 <listitem><para>3 - a clock-like knob</para></listitem>
82 <listitem><para>4 - a flat knob</para></listitem>
83 </itemizedlist>
84
85 <mediaobject>
86 <imageobject>
87 <imagedata fileref="images/flknob_3d.png" format="PNG"/>
88 </imageobject>
89
90 <textobject>
91 <phrase>A 3-D knob.</phrase>
92 </textobject>
93
94 <caption>
95 <para>A 3-D knob.</para>
96 </caption>
97 </mediaobject>
98
99 <mediaobject>
100 <imageobject>
101 <imagedata fileref="images/flknob_pie.png" format="PNG"/>
102 </imageobject>
103
104 <textobject>
105 <phrase>A pie knob.</phrase>
106 </textobject>
107
108 <caption>
109 <para>A pie knob.</para>
110 </caption>
111 </mediaobject>
112
113 <mediaobject>
114 <imageobject>
115 <imagedata fileref="images/flknob_clock.png" format="PNG"/>
116 </imageobject>
117
118 <textobject>
119 <phrase>A clock knob.</phrase>
120 </textobject>
121
122 <caption>
123 <para>A clock knob.</para>
124 </caption>
125 </mediaobject>
126
127 <mediaobject>
128 <imageobject>
129 <imagedata fileref="images/flknob_flat.png" format="PNG"/>
130 </imageobject>
131
132 <textobject>
133 <phrase>A flat knob.</phrase>
134 </textobject>
135
136 <caption>
137 <para>A flat knob.</para>
138 </caption>
139 </mediaobject>
140 </para>
141
142 <para>
143 <emphasis>idisp</emphasis> -- a handle value that was output
144 from a previous instance of the <link
145 linkend="FLvalue"><citetitle>FLvalue</citetitle></link> opcode
146 to display the current value of the current valuator in the
147 <emphasis>FLvalue</emphasis> widget itself. If the user does not want to use this feature that displays current values, it must be set to a negative number by the user.
148 </para>
149
150 <para>
151 <emphasis>iwidth</emphasis> -- width of widget.
152 </para>
153
154 <para>
155 <emphasis>iheight</emphasis> -- height of widget.
156 </para>
157
158 <para>
159 <emphasis>ix</emphasis> -- horizontal position of upper left corner of the valuator, relative to the upper left corner of corresponding window (expressed in pixels).
160 </para>
161
162 <para>
163 <emphasis>iy</emphasis> -- vertical position of upper left corner of the valuator, relative to the upper left corner of corresponding window (expressed in pixels).
164 </para>
165
166 <para>
167 <emphasis>icursorsize</emphasis> (optional) -- If <emphasis>FLknob</emphasis>'s <emphasis>itype</emphasis> is set to 1 (3D knob), this parameter controls the size of knob cursor.
168 </para>
169 </refsect1>
170
171 <refsect1>
172 <title>Performance</title>
173 <para>
174 <emphasis>kout</emphasis> -- output value
175 </para>
176
177 <para>
178 <emphasis>FLknob</emphasis> puts a knob in the corresponding container.
179 </para>
180 </refsect1>
181
182 <refsect1>
183 <title>Examples</title>
184 <para>
185 Here is an example of the FLknob opcode. It uses the file <ulink url="examples/FLknob.csd"><citetitle>FLknob.csd</citetitle></ulink>.
186
187 <example>
188 <title>Example of the FLknob opcode.</title>
189
190 <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
191 <xi:include href="examples-xml/FLknob.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
192 </example>
193 </para>
194 <para>
195 Here is another example of the FLknob opcode, showing the different styles of knobs and the usage of FLvalue to display a knob's value. It uses the file <ulink url="examples/FLknob-2.csd"><citetitle>FLknob-2.csd</citetitle></ulink>.
196
197 <example>
198 <title>More complex example of the FLknob opcode.</title>
199
200 <xi:include href="examples-xml/FLknob-2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
201 </example>
202 </para>
203 </refsect1>
204
205 <refsect1>
206 <title>See Also</title>
207 <para>
208 <link linkend="FLcount"><citetitle>FLcount</citetitle></link>,
209 <link linkend="FLjoy"><citetitle>FLjoy</citetitle></link>,
210 <link linkend="FLroller"><citetitle>FLroller</citetitle></link>,
211 <link linkend="FLslider"><citetitle>FLslider</citetitle></link>,
212 <link linkend="FLtext"><citetitle>FLtext</citetitle></link>
213 </para>
214 </refsect1>
215
216 <refsect1>
217 <title>Credits</title>
218 <para>Author: &namegabriel;</para>
219 <para>New in version 4.22</para>
220 <para>Example written by Iain McCurdy, edited by &namekevin;.</para>
221 </refsect1>
222 </refentry>