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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<!-- HTML file produced from file: UserManual.tex --
-- using Hyperlatex v 2.3.1 (c) Otfried Cheong--
-- on Emacs 21.1 (patch 4) "Arches" XEmacs Lucid, Sun Apr 30 20:50:03 2000 -->
<HEAD>
<TITLE>Tao User Manual -- The time-varying functions <EM>linear</EM> and <EM>expon</EM></TITLE>
<link rel=stylesheet href="../../taomanual.css" type="text/css">
</HEAD><BODY BACKGROUND="bg.gif">
<table width="500" border="0" align="left" cellspacing="2" cellpadding="2"><tr><td class="nav" valign="top"><!-- top panel --><A HREF="UserManual_79.html"><IMG ALT="Up" ALIGN=BOTTOM BORDER=0 SRC="up.gif"></A>
<BR><A HREF="UserManual_79.html">Expressions</A><BR><IMG width="167" height="1" SRC="trans1x1.gif">
</td><td class="nav" valign="top"><A HREF="UserManual_81.html"><IMG ALT="Back" ALIGN=BOTTOM BORDER=0 SRC="back.gif"></A>
<BR><A HREF="UserManual_81.html">Mathematical Functions</A><BR><IMG width="167" height="1" SRC="trans1x1.gif">
</td><td class="nav" valign="top"><A HREF="UserManual_83.html"><IMG ALT="Forward" ALIGN=BOTTOM BORDER=0 SRC="forward.gif"></A>
<BR><A HREF="UserManual_83.html">Compiling and Executing a <B>Tao</B> Script</A><BR><IMG width="167" height="1" SRC="trans1x1.gif">
</td></tr><!-- end top panel --><tr><td colspan="3" class="main"><!-- main text --><br><br>
<H3>The time-varying functions <EM>linear</EM> and <EM>expon</EM></H3>
Two simple time varying functions are provided for use in a score:
<P><PRE>
linear(<initial>,<final>)
expon(<initial>,<final>)
</PRE>
<P>The time interval over which they change is determined by the scope
in which they appear in the score. In other words they take their
start and end times from the <CODE>start</CODE> and <CODE>end</CODE> variables.
An example of their use is given in the following script:
<P><PRE>
Audio rate: 44100;
Init: ...
Score 1 sec:
Every 0.1 secs:
Print "At time ", Time,
" linear value=", linear(0,1),
" expon value=", expon(0.001,1), newline;
...
...
</PRE>
<P>When invoked this script produces the following output:
<P><PRE>
At time 0 linear value=0 expon value=0.001
At time 0.1 linear value=0.1 expon value=0.00199526
At time 0.2 linear value=0.2 expon value=0.00398107
At time 0.3 linear value=0.3 expon value=0.00794328
At time 0.4 linear value=0.4 expon value=0.0158489
At time 0.5 linear value=0.5 expon value=0.0316228
At time 0.6 linear value=0.6 expon value=0.0630957
At time 0.7 linear value=0.7 expon value=0.125893
At time 0.8 linear value=0.8 expon value=0.251189
At time 0.9 linear value=0.9 expon value=0.501187
At time 1 linear value=1 expon value=1
</PRE>
<P>It should be noted that in the current version of <B>Tao</B> the tools
provided for generating time varying functions are somewhat lacking when
compared to Csound and its plethora of function table generators and its
ability to create multi-segment linear or exponential curves. This
deficiency will be addressed in a future version, probably with the
introduction of a completely new set of table-based objects for use within
a script.
<P>
<BR></td></tr><!-- end main text --><tr><td class="nav" align="left" valign="top"><!-- bottom matter --><A HREF="UserManual_79.html"><IMG ALT="Up" ALIGN=BOTTOM BORDER=0 SRC="up.gif"></A>
<BR><A HREF="UserManual_79.html">Expressions</A><BR><IMG width="167" height="1" SRC="trans1x1.gif">
</td><td class="nav" align="left" valign="top"><A HREF="UserManual_81.html"><IMG ALT="Back" ALIGN=BOTTOM BORDER=0 SRC="back.gif"></A>
<BR><A HREF="UserManual_81.html">Mathematical Functions</A><BR><IMG width="167" height="1" SRC="trans1x1.gif">
</td><td class="nav" align="left" valign="top"><!-- bottom matter --><A HREF="UserManual_83.html"><IMG ALT="Forward" ALIGN=BOTTOM BORDER=0 SRC="forward.gif"></A>
<BR><A HREF="UserManual_83.html">Compiling and Executing a <B>Tao</B> Script</A>
<IMG width="167" height="1" SRC="trans1x1.gif">
</td></tr><!-- end bottom matter -->
<tr><td colspan="3" class="addr"><!-- bottom panel --><ADDRESS><FONT SIZE=-1>©1999,2000 Mark Pearson
<A HREF="mailto:m.pearson@ukonline.co.uk">m.pearson@ukonline.co.uk</A> April 30, 2000</ADDRESS><BR></td></tr><!-- end bottom panel --></table></BODY></HTML>
|