Debian Codegraph @

opcodes/logcurve.xml

raw symbols SCIP
1
2 <refentry id="logcurve">
3 <indexterm id="IndexLogcurve"><primary>logcurve</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Linear and Exponential Generators</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>logcurve</refentrytitle>
7 </refmeta>
8
9
10 <refnamediv>
11 <refname>logcurve</refname>
12 <refpurpose>
13 This opcode implements a formula for generating a normalised logarithmic curve in range 0 - 1. It is based on the Max / MSP work of Eric Singer (c) 1994.
14 </refpurpose>
15 </refnamediv>
16
17 <refsect1>
18 <title>Description</title>
19 <para>
20 Generates a logarithmic curve in range 0 to 1 of arbitrary steepness.
21 Steepness index less than 1.0 would result in Not-a-Number
22 errors and cause unstable behavior, so it is treated as if it
23 were 1.
24 </para>
25
26 <para>
27 The formula used to calculate the curve is:
28 <programlisting>log(x * (y-1)+1) / (log(y)</programlisting>
29 where x is equal to <emphasis>kindex</emphasis> and y is equal to <emphasis>ksteepness</emphasis>.
30 </para>
31
32 </refsect1>
33
34 <refsect1>
35 <title>Syntax</title>
36 <synopsis>kout <command>logcurve</command> kindex, ksteepness</synopsis>
37 </refsect1>
38
39 <refsect1>
40 <title>Performance</title>
41 <para>
42 <emphasis>kindex</emphasis> -- Index value. Expected range 0 to 1.
43 </para>
44 <para>
45 <emphasis>ksteepness</emphasis> -- Steepness of the generated curve. Values
46 closer to 1.0 result in a straighter line while larger values steepen the
47 curve.
48 </para>
49 <para>
50 <emphasis>kout</emphasis> -- Scaled output.
51 </para>
52 </refsect1>
53
54 <refsect1>
55 <title>Examples</title>
56 <para>
57 Here is an example of the logcurve opcode. It uses the file <ulink url="examples/logcurve.csd"><citetitle>logcurve.csd</citetitle></ulink>.
58
59 <example>
60 <title>Example of the logcurve opcode.</title>
61
62
63
64 <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>
65 <xi:include href="examples-xml/logcurve.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
66 </example>
67 </para>
68 </refsect1>
69
70 <refsect1>
71 <title>See also</title>
72 <para><link linkend="SiggenLineexp"><citetitle>Linear and Exponential Generators</citetitle></link></para>
73 </refsect1>
74
75 <refsect1>
76 <title>Credits</title>
77 <para>
78 <simplelist>
79 <member>Author: David Akbari</member>
80 <member>October</member>
81 <member>2006</member>
82 <member>Range check introduced in 6.16 by &namejohn;</member>
83 </simplelist>
84 </para>
85 </refsect1>
86 </refentry>