Debian Codegraph @

opcodes/setctrl.xml

raw symbols SCIP
1
2 <refentry id="setctrl">
3 <indexterm id="IndexSetctrl"><primary>setctrl</primary></indexterm>
4 <refentryinfo><title>Instrument Control:Sensing and Control</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>setctrl</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>setctrl</refname>
13 <refpurpose>
14 Configurable slider controls for realtime user input.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>Plugin opcode in control.</para>
21 <para>
22 Configurable slider controls for realtime user input. Requires Winsound or TCL/TK. <emphasis>setctrl</emphasis> sets a slider to a specific value, or sets a minimum or maximum range.
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis><command>setctrl</command> inum, ival, itype</synopsis>
29 </refsect1>
30
31 <refsect1>
32 <title>Initialization</title>
33 <para>
34 Note that this opcode is not available on Windows due to the implimentation of pipes on that system
35 </para>
36 <para>
37 <emphasis>inum</emphasis> -- number of the slider to set
38 </para>
39
40 <para>
41 <emphasis>ival</emphasis> -- value to be sent to the slider
42 </para>
43
44 <para>
45 <emphasis>itype</emphasis> -- type of value sent to the slider as follows:
46 <itemizedlist>
47 <listitem><para>1 -- set the current value. Initial value is 0.</para></listitem>
48 <listitem><para>2 -- set the minimum value. Default is 0.</para></listitem>
49 <listitem><para>3 -- set the maximum value. Default is 127.</para></listitem>
50 <listitem><para>4 -- set the label. (New in Csound version 4.09)</para></listitem>
51 </itemizedlist>
52 </para>
53 </refsect1>
54
55 <refsect1>
56 <title>Performance</title>
57 <para>
58 Calling <emphasis>setctrl</emphasis> 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 <emphasis>port</emphasis>.
59 </para>
60 </refsect1>
61
62 <refsect1>
63 <title>Examples</title>
64 <para>
65 Here is an example of the setctrl opcode. It uses the file <ulink url="examples/setctrl.csd"><citetitle>setctrl.csd</citetitle></ulink>.
66
67 <example>
68 <title>Example of the setctrl opcode.</title>
69
70
71
72 <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>
73 <xi:include href="examples-xml/setctrl.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
74 </example>
75
76 Its output should include lines like this:
77 <screen>
78 i1 38.00000
79 i1 40.00000
80 i1 43.00000
81 </screen>
82 </para>
83 </refsect1>
84
85 <refsect1>
86 <title>See also</title>
87 <para><link linkend="ControlSensing"><citetitle>Sensing and Control: TCL/TK widgets</citetitle></link></para>
88 </refsect1>
89
90 <refsect1>
91 <title>Credits</title>
92 <para>
93 <simplelist>
94 <member>Author: &namejohn;</member>
95 <member>University of Bath, Codemist. Ltd.</member>
96 <member>Bath, UK</member>
97 <member>May 2000</member>
98 </simplelist>
99 </para>
100 <para>Example written by &namekevin;.</para>
101
102 <para>New in Csound version 4.06</para>
103 </refsect1>
104 </refentry>