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>
<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"><--</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> </CENTER>
<CENTER>
<H2>
The 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> <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> <FONT SIZE=-2><A HREF="#">top</A></FONT></H4>
<PRE><B>cslider</B> name ?options?</PRE>
<H4>
<A NAME="OPTIONS"></A><U>OPTIONS</U> <FONT SIZE=-2><A HREF="#">top</A></FONT></H4>
<TT><B>-label</B> <I>character string</I></TT>
<BR><I>
</I>will replace the name label besides or underneath the slider.<I> ;<B>default
none</B></I>
<P><TT><B>-min</B> <I>int | float</I></TT>
<BR>
determines the minimum value of te slider <I> ;<B>default
0</B></I>
<P><TT><B>-max</B> <I>int | float</I></TT>
<BR>
determines the maximum value of te slider <I> ;<B>default
100</B></I>
<P><TT><B>-rate</B> <I>k | i</I></TT>
<BR>
determines whether the slider is k-rate or i-rate <I> ;<B>default
k</B></I>
<BR>
<P><TT><B>-res</B> <I>int | float</I></TT>
<BR>
determines the resolution of the slider <I> ;<B>default
.01</B></I>
<P><TT><B>-orient </B><I>h / v</I></TT>
<BR>
determines the vertical or horizontal orientation of the slider <I>
;<B>default horizontal</B></I>
<BR>
<BR><TT><B>-unit</B> <I>character string</I></TT>
<BR>
dtermines the unit of measurement for the slider <I> ;<B>default
x</B></I>
<P><TT><B>-rel</B> <I>log / lin</I></TT>
<BR>
determines whether the slider will issues its values according to a linear
or logarithmic function <I> ;<B>default
lin</B></I>
<P><TT><B>-color</B> <I>color</I></TT>
<BR>
determines the color of the through of the slider <I>
;<B>default gray</B></I>
<P><TT><B>-width</B> <I>int</I></TT>
<BR>
determines the width of the display for the slider value <I>
;<B>default automatic</B></I>
<P><TT><B>-init</B> <I>int | float</I></TT>
<BR><I>
</I>determines the initial value of the slider.<I> ;<B>default
0 | -min</B></I>
<BR>
<H4>
<A NAME="DESCRIPTION"></A><U>DESCRIPTION</U> <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. 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- 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>
<H4>
<A NAME="SUBSTITUTION"></A><U>SUBSTITUTION</U> <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>
<H4>
<A NAME="EXAMPLE"></A><U>EXAMPLES</U> <FONT SIZE=-2><A HREF="#">top</A></FONT></H4>
<PRE>The definition:
<B>cslider</B> pit -label pitch -ra k -unit Hz -res .01 -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>
<PRE>The definition:
<B>cslider</B> amp -ra i -unit db -rel log -res .01 -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 .
The slider will issue values through a logarithmic function. The label
for the slider will be the same as the name.
<BR>
<PRE>The definition:
<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 .
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>
<BR>
<HR>
<BR>Copyright 1996 - 97
</BODY>
</HTML>
|