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
|
<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>VALUE_CONVERTERS</TITLE>
</HEAD>
<BODY>
<CENTER><A NAME="VALUE_CONVERTERS"></A>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="CONVERTERS.html">Top of this section</A></B> - <A HREF="CONVERTERS.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="ipow.html">Next</A>
<HR></CENTER>
<H2>
VALUE CONVERTERS</H2>
<PRE> <B>int</B>(x) (init- or control-rate args only)
<B>frac</B>(x) (init- or control-rate args only)
<B>dbamp</B>(x) (init- or control-rate args only)
<B>i</B>(x) (control-rate args only)
<B>abs</B>(x) (no rate restriction)
<B>exp</B>(x) (no rate restriction)
<B>log</B>(x) (no rate restriction)
<B>sqrt</B>(x) (no rate restriction)
<B>sin</B>(x) (no rate restriction)
<B>cos</B>(x) (no rate restriction)
<B>ampdb</B>(x) (no rate restriction)</PRE>
<HR>
<H4>
<U>DESCRIPTION</U></H4>
where the argument within the parentheses may be an expression.
<P>Value converters perform arithmetic translation from units of one kind
to units of another. The result can then be a term in a further expression. <BR>
<BR>
<BR><TT><B>int</B>(x) returns the integer
part of x.</TT>
<BR><TT><B>frac</B>(x) returns the fractional part
of x.<BR>
<B>dbamp</B>(x) returns the decibel equivalent of the
raw amplitude x.<BR>
<B>i</B>(x) returns an Init-type
equivalent of the argument (k-rate)<BR>
<B>abs</B>(x) returns the absolute value
of x.<BR>
<B>exp</B>(x) returns e raised to the xth
power.</TT>
<BR><TT><B>log</B>(x) returns the natural
log of x (x positive only).<BR>
<B>sqrt</B>(x) returns the square root of x (x
non-negative).<BR>
<B>sin</B>(x) returns the sine of x (x in
radians).</TT>
<BR><TT><B>cos</B>(x) returns the cosine
of x (x in radians).</TT>
<BR><TT><B>ampdb</B>(x) returns the amplitude equivalent
of the decibel value x. Thus</TT>
<BR><TT>
60 db gives 1000,</TT>
<BR><TT>
66 db gives 2000,</TT>
<BR><TT>
72 db gives 4000,</TT>
<BR><TT>
78 db gives 8000,</TT>
<BR><TT>
84 db gives 16000 and</TT>
<BR><TT>
90 db gives 32000.</TT><BR>
<BR>
<P>Note that for <B>log, sqrt</B>, and <B>ftlen</B> the argument value
is restricted. Note also that <B>ftlen</B> will always return a power-of-2
value, i.e. the function table guard point (<A HREF="../NumScore/f-stat.html">see
F statement</A>) is not included. <BR>
<BR>
<CENTER></CENTER>
<CENTER>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="CONVERTERS.html">Top of this section</A></B> - <A HREF="CONVERTERS.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="ipow.html">Next</A>
<HR></CENTER>
<CENTER></CENTER>
<CENTER><B><I><FONT COLOR="#006600">HTML Csound Manual - <FONT SIZE=-1>©
Jean Piché & Peter J. Nix, 1994-97</FONT></FONT></I></B></CENTER>
</BODY>
</HTML>
|