File: cec_rsli.html

package info (click to toggle)
cecilia 2.0.5-2.2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 4,452 kB
  • ctags: 833
  • sloc: tcl: 9,786; sh: 1,097; makefile: 69; csh: 13
file content (186 lines) | stat: -rw-r--r-- 8,557 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; IRIX 6.3 IP32) [Netscape]">
   <TITLE>CEC_slider</TITLE>
</HEAD>
<BODY>
&nbsp;
<CENTER><TABLE COLS=3 WIDTH="100%" NOSAVE >
<TR ALIGN=CENTER VALIGN=CENTER NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE><B><A HREF="cec_popu.html">&lt;--</A></B></TD>

<TD ALIGN=CENTER VALIGN=CENTER NOSAVE><A HREF="index.html"><IMG SRC="help.gif" ></A></TD>

<TD ALIGN=RIGHT VALIGN=TOP NOSAVE><B><FONT COLOR="#000000"><A HREF="cec_grap.html">--></A></FONT></B></TD>
</TR>
</TABLE></CENTER>

<CENTER>&nbsp;</CENTER>

<CENTER>
<H2>
The&nbsp; cslider object</H2></CENTER>

<CENTER><A HREF="#NAME">Name</A></CENTER>

<CENTER><A HREF="#SYNOPSIS">Synopsis</A></CENTER>

<CENTER><A HREF="#OPTIONS">Options</A></CENTER>

<CENTER><A HREF="#DESCRIPTION">Description</A></CENTER>

<CENTER><A HREF="#SUBSTITUTION">Substitution</A></CENTER>

<CENTER><A HREF="#EXAMPLE">Examples</A><BR>
<BR>
<BR></CENTER>

<CENTER>
<HR></CENTER>

<H4>
<A NAME="NAME"></A><U>NAME</U>&nbsp; <FONT SIZE=-2><A HREF="#">top</A></FONT></H4>
<B>cslider</B> - Creation of input control slider.
<H4>
<A NAME="SYNOPSIS"></A><U>SYNOPSIS</U>&nbsp; <FONT SIZE=-2><A HREF="#">top</A></FONT></H4>

<PRE><B>cslider</B> name ?options?</PRE>

<H4>
<A NAME="OPTIONS"></A><U>OPTIONS</U>&nbsp; <FONT SIZE=-2><A HREF="#">top</A></FONT></H4>
<TT><B>-label</B>&nbsp;&nbsp; <I>character string</I></TT>
<BR><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</I>will replace the name label besides or underneath the slider.<I> ;<B>default&nbsp;&nbsp;&nbsp;&nbsp;
none</B></I>

<P><TT><B>-min</B>&nbsp;&nbsp;&nbsp;&nbsp; <I>int | float</I></TT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines the minimum value of te slider&nbsp;<I> ;<B>default&nbsp;&nbsp;&nbsp;&nbsp;
0</B></I>

<P><TT><B>-max</B>&nbsp;&nbsp;&nbsp;&nbsp; <I>int | float</I></TT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines the maximum value of te slider&nbsp;<I> ;<B>default&nbsp;&nbsp;&nbsp;&nbsp;
100</B></I>

<P><TT><B>-rate</B>&nbsp;&nbsp;&nbsp; <I>k | i</I></TT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines whether the slider is k-rate or i-rate&nbsp;<I> ;<B>default&nbsp;&nbsp;&nbsp;&nbsp;
k</B></I>
<BR>&nbsp;

<P><TT><B>-res</B>&nbsp;&nbsp;&nbsp;&nbsp; <I>int | float</I></TT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines the resolution of the slider&nbsp;<I>&nbsp; ;<B>default&nbsp;&nbsp;&nbsp;&nbsp;
.01</B></I>

<P><TT><B>-orient&nbsp; </B><I>h / v</I></TT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines the vertical or horizontal orientation of the slider&nbsp;<I>
;<B>default&nbsp;&nbsp;&nbsp;&nbsp; horizontal</B></I>
<BR>&nbsp;
<BR><TT><B>-unit</B>&nbsp;&nbsp;&nbsp; <I>character string</I></TT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
dtermines the unit of measurement for the slider&nbsp;&nbsp;<I> ;<B>default&nbsp;&nbsp;&nbsp;&nbsp;
x</B></I>

<P><TT><B>-rel</B>&nbsp;&nbsp;&nbsp;&nbsp; <I>log / lin</I></TT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines whether the slider will issues its values according to a linear
or logarithmic function&nbsp;&nbsp;<I> ;<B>default&nbsp;&nbsp;&nbsp;&nbsp;
lin</B></I>

<P><TT><B>-color</B>&nbsp;&nbsp; <I>color</I></TT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines the color of the through of the slider&nbsp;&nbsp;<I>&nbsp;
;<B>default&nbsp;&nbsp;&nbsp;&nbsp; gray</B></I>

<P><TT><B>-width</B>&nbsp;&nbsp; <I>int</I></TT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
determines the width of the display for the slider value&nbsp;&nbsp;<I>
;<B>default&nbsp;&nbsp;&nbsp;&nbsp; automatic</B></I>

<P><TT><B>-init</B>&nbsp;&nbsp;&nbsp; <I>int | float</I></TT>
<BR><I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</I>determines the initial value of the slider.<I>&nbsp; ;<B>default&nbsp;&nbsp;&nbsp;&nbsp;
0 | -min</B></I>
<BR>&nbsp;
<H4>
<A NAME="DESCRIPTION"></A><U>DESCRIPTION</U>&nbsp; <FONT SIZE=-2><A HREF="#">top</A></FONT></H4>
The <B>cslider</B> command creates a slider. There are two types of sliders:
the i-rate slider and the k-rate slider.

<P>The i-rate slider is evaluated at init-time only. Its value at compile
time is substituted into the orchestra and/or score with <I>giname </I>The
k-rate slider is usable at performance time and values are passed to the
orchestra via a global <I>gkname</I> variable. The k-rate <B>cslider</B>
is implemented with a special Csound routine that handles values though
console-driven events.&nbsp; The initial value of the variable is set at
the current value of the slider.

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

<P>When the orchestra and score are compiled, the <B>clider </B>object
creates its own instruments to direct slider information to Csound. This
is not normally seen by the user.

<P>To obtain better slider resolution, it is advisable to size the interface
window to a convenient height and/or width.

<P><B><I>CAVEATS:</I></B>

<P>1-&nbsp; It is <B>compulsory</B>, when using the k-rate slider object,
to also declare a "total_time/duree_totale" i-rate slider, <B>unless </B>there
is a <B>cfilein</B> object present (in which case the sliders will be in
function for the duration of the longest sound selected).

<P>2 - The k-rate slider will not transfer values to the orchestras during
performance if the Csound console is open.
<BR>&nbsp;
<H4>
<A NAME="SUBSTITUTION"></A><U>SUBSTITUTION</U>&nbsp; <FONT SIZE=-2><A HREF="#">top</A></FONT></H4>
At compilation, any instance of<I> gkname or giname</I> in the orchestra,
will be replaced by the current value of the slider. The user determines
the propriety of an i-rate or k-rate usage in a given context. The <B>i-rate
</B>cslider object can also be used in the score by using the replacement
string : <B>[name]</B>
<BR>&nbsp;
<H4>
<A NAME="EXAMPLE"></A><U>EXAMPLES</U>&nbsp; <FONT SIZE=-2><A HREF="#">top</A></FONT></H4>

<PRE>The definition:&nbsp;

<B>cslider</B> pit -label pitch -ra k -unit Hz -res .01&nbsp; -min 50 -colo red -max 4500 -init 2000</PRE>
sets up a k-rate slider named <I>pitch </I>in the interface window. Values
are passed with a global variable named <I>"gkpit"</I>. The data will be
scaled to a value between 50 and 4500 with a resolution of 0.01 in a linear
relationship. The trough of the slider will be red.
<BR>&nbsp;
<PRE>The definition:&nbsp;

<B>cslider</B> amp -ra i -unit db -rel log -res .01&nbsp; -min 30 -max 90 -init 40</PRE>
sets up a i-rate slider in the interface window. The value of the slider
at init time will pass through any <I>giamp</I> in the orchestra .&nbsp;
The slider will issue values through a logarithmic function. The label
for the slider will be the same as the name.
<BR>&nbsp;
<PRE>The definition:&nbsp;

<B>cslider</B> freq</PRE>
sets up a k-rate slider in the interface window. The value of the slider
at init time will pass through any <I>gkfreq</I> in the orchestra .&nbsp;
The slider will issue values through a linear function between a minimum
of 0 and a maximum of 100 with a resolution of .01. The label for the slider
will be <I>freq</I>.
<BR>&nbsp;
<BR>
<HR>
<BR>Copyright 1996 - 97
</BODY>
</HTML>