mirror of
https://github.com/thestk/stk
synced 2026-01-13 13:01:52 +00:00
102 lines
6.6 KiB
HTML
102 lines
6.6 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
|
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF">
|
|
<CENTER>
|
|
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
|
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="faq.html">FAQ</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.4.4 -->
|
|
<h1>Asymp Class Reference</h1><!-- doxytag: class="Asymp" --><!-- doxytag: inherits="Envelope" --><code>#include <<a class="el" href="Asymp_8h-source.html">Asymp.h</a>></code>
|
|
<p>
|
|
<p>Inheritance diagram for Asymp:
|
|
<p><center><img src="classAsymp.png" usemap="#Asymp_map" border="0" alt=""></center>
|
|
<map name="Asymp_map">
|
|
<area href="classEnvelope.html" alt="Envelope" shape="rect" coords="0,112,69,136">
|
|
<area href="classGenerator.html" alt="Generator" shape="rect" coords="0,56,69,80">
|
|
<area href="classStk.html" alt="Stk" shape="rect" coords="0,0,69,24">
|
|
</map>
|
|
<a href="classAsymp-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
STK asymptotic curve envelope class.
|
|
<p>
|
|
This class implements a simple envelope generator which asymptotically approaches a target value. The algorithm used is of the form:<p>
|
|
x[n] = a x[n-1] + (1-a) target,<p>
|
|
where a = exp(-T/tau), T is the sample period, and tau is a time constant. The user can set the time constant (default value = 0.3) and target value. Theoretically, this recursion never reaches its target, though the calculations in this class are stopped when the current value gets within a small threshold value of the target (at which time the current value is set to the target). It responds to <em>keyOn</em> and <em>keyOff</em> messages by ramping to 1.0 on keyOn and to 0.0 on keyOff.<p>
|
|
by Perry R. Cook and Gary P. Scavone, 1995 - 2007.
|
|
<p>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0"></a><!-- doxytag: member="Asymp::Asymp" ref="a0" args="(void)" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classAsymp.html#a0">Asymp</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="Asymp::~Asymp" ref="a1" args="(void)" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classAsymp.html#a1">~Asymp</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class destructor. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="Asymp::keyOn" ref="a2" args="(void)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAsymp.html#a2">keyOn</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set target = 1. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3"></a><!-- doxytag: member="Asymp::keyOff" ref="a3" args="(void)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAsymp.html#a3">keyOff</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set target = 0. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAsymp.html#a4">setTau</a> (StkFloat tau)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the asymptotic rate via the time factor <em>tau</em> (must be > 0). <a href="#a4"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5"></a><!-- doxytag: member="Asymp::setTime" ref="a5" args="(StkFloat time)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAsymp.html#a5">setTime</a> (StkFloat time)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the asymptotic rate based on a time duration (must be > 0). <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6"></a><!-- doxytag: member="Asymp::setTarget" ref="a6" args="(StkFloat target)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAsymp.html#a6">setTarget</a> (StkFloat target)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the target value. <br></td></tr>
|
|
</table>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="a4"></a><!-- doxytag: member="Asymp::setTau" ref="a4" args="(StkFloat tau)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void Asymp::setTau </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">StkFloat </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>tau</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Set the asymptotic rate via the time factor <em>tau</em> (must be > 0).
|
|
<p>
|
|
The rate is computed as described above. The value of <em>tau</em> must be greater than zero. Values of <em>tau</em> close to zero produce fast approach rates, while values greater than 1.0 produce rather slow rates. </td>
|
|
</tr>
|
|
</table>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="Asymp_8h-source.html">Asymp.h</a></ul>
|
|
<HR>
|
|
|
|
<table>
|
|
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
|
<tr><td>©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|