ref: c624f310c5db0a0b03235531a73d6248276c45d3
dir: /docs/leaf/group__tenvelopefollower.html/
<!-- HTML header for doxygen 1.8.18--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=9" /> <meta name="generator" content="Doxygen 1.8.16" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>LEAF: tEnvelopeFollower</title> <link href="tabs.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script> <!-- <script src="/js/template.js"></script> --> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function() { init_search(); }); /* @license-end */ </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="customdoxygen.css" rel="stylesheet" type="text/css"/> <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> --> </head> <body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()"> <div> <!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr> </tr> </tbody> </table> </div> <!-- end header part --> </div> </body> </html><!-- Generated by Doxygen 1.8.16 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> </div><!-- top --> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">tEnvelopeFollower<div class="ingroups"><a class="el" href="group__analysis.html">Analysis</a></div></div> </div> </div><!--header--> <div class="contents"> <p>Detects and returns the basic envelope of incoming audio data. <a href="#details">More...</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ga5a7749052924bc7ed03051043b5e42bb"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tenvelopefollower.html#ga5a7749052924bc7ed03051043b5e42bb">tEnvelopeFollower_init</a> (tEnvelopeFollower *const follower, float attackThreshold, float decayCoefficient, <a class="el" href="struct_l_e_a_f.html">LEAF</a> *const leaf)</td></tr> <tr class="memdesc:ga5a7749052924bc7ed03051043b5e42bb"><td class="mdescLeft"> </td><td class="mdescRight">Initialize a tEnvelopeFollower to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance. <a href="group__tenvelopefollower.html#ga5a7749052924bc7ed03051043b5e42bb">More...</a><br /></td></tr> <tr class="separator:ga5a7749052924bc7ed03051043b5e42bb"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gacd6a2310494413b550ededdaed214d2a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tenvelopefollower.html#gacd6a2310494413b550ededdaed214d2a">tEnvelopeFollower_initToPool</a> (tEnvelopeFollower *const follower, float attackThreshold, float decayCoefficient, tMempool *const mempool)</td></tr> <tr class="memdesc:gacd6a2310494413b550ededdaed214d2a"><td class="mdescLeft"> </td><td class="mdescRight">Initialize a tEnvelopeFollower to a specified mempool. <a href="group__tenvelopefollower.html#gacd6a2310494413b550ededdaed214d2a">More...</a><br /></td></tr> <tr class="separator:gacd6a2310494413b550ededdaed214d2a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga9ff136abec8842d17d25205787370239"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tenvelopefollower.html#ga9ff136abec8842d17d25205787370239">tEnvelopeFollower_free</a> (tEnvelopeFollower *const follower)</td></tr> <tr class="memdesc:ga9ff136abec8842d17d25205787370239"><td class="mdescLeft"> </td><td class="mdescRight">Free a tEnvelopeFollower from its mempool. <a href="group__tenvelopefollower.html#ga9ff136abec8842d17d25205787370239">More...</a><br /></td></tr> <tr class="separator:ga9ff136abec8842d17d25205787370239"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gadd57dad9c08b2ada6e8c720077256d5a"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tenvelopefollower.html#gadd57dad9c08b2ada6e8c720077256d5a">tEnvelopeFollower_tick</a> (tEnvelopeFollower *const follower, float sample)</td></tr> <tr class="memdesc:gadd57dad9c08b2ada6e8c720077256d5a"><td class="mdescLeft"> </td><td class="mdescRight">Tick the tEnvelopeFollower. <a href="group__tenvelopefollower.html#gadd57dad9c08b2ada6e8c720077256d5a">More...</a><br /></td></tr> <tr class="separator:gadd57dad9c08b2ada6e8c720077256d5a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga746d0a9698c22b21091cc6fad79faf85"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tenvelopefollower.html#ga746d0a9698c22b21091cc6fad79faf85">tEnvelopeFollower_setDecayCoefficient</a> (tEnvelopeFollower *const follower, float decayCoefficient)</td></tr> <tr class="memdesc:ga746d0a9698c22b21091cc6fad79faf85"><td class="mdescLeft"> </td><td class="mdescRight">Set the envelope decay coefficient. <a href="group__tenvelopefollower.html#ga746d0a9698c22b21091cc6fad79faf85">More...</a><br /></td></tr> <tr class="separator:ga746d0a9698c22b21091cc6fad79faf85"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga9d8d4762b016fa57939e5d733e164cb9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__tenvelopefollower.html#ga9d8d4762b016fa57939e5d733e164cb9">tEnvelopeFollower_setAttackThreshold</a> (tEnvelopeFollower *const follower, float attackThreshold)</td></tr> <tr class="memdesc:ga9d8d4762b016fa57939e5d733e164cb9"><td class="mdescLeft"> </td><td class="mdescRight">Set the envelope attack threshold. <a href="group__tenvelopefollower.html#ga9d8d4762b016fa57939e5d733e164cb9">More...</a><br /></td></tr> <tr class="separator:ga9d8d4762b016fa57939e5d733e164cb9"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <p>Detects and returns the basic envelope of incoming audio data. </p> <h2 class="groupheader">Function Documentation</h2> <a id="ga5a7749052924bc7ed03051043b5e42bb"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga5a7749052924bc7ed03051043b5e42bb">◆ </a></span>tEnvelopeFollower_init()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void tEnvelopeFollower_init </td> <td>(</td> <td class="paramtype">tEnvelopeFollower *const </td> <td class="paramname"><em>follower</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"><em>attackThreshold</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"><em>decayCoeff</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_l_e_a_f.html">LEAF</a> *const </td> <td class="paramname"><em>leaf</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Initialize a tEnvelopeFollower to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">follower</td><td>A pointer to the tEnvelopeFollower to initialize. </td></tr> <tr><td class="paramname">attackThreshold</td><td>Amplitude threshold for determining an envelope onset. 0.0 to 1.0 </td></tr> <tr><td class="paramname">decayCoefficient</td><td>Multiplier to determine the envelope rate of decay. 0.0 to 1.0, above 0.95 recommended. </td></tr> <tr><td class="paramname">leaf</td><td>A pointer to the leaf instance. </td></tr> </table> </dd> </dl> </div> </div> <a id="gacd6a2310494413b550ededdaed214d2a"></a> <h2 class="memtitle"><span class="permalink"><a href="#gacd6a2310494413b550ededdaed214d2a">◆ </a></span>tEnvelopeFollower_initToPool()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void tEnvelopeFollower_initToPool </td> <td>(</td> <td class="paramtype">tEnvelopeFollower *const </td> <td class="paramname"><em>follower</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"><em>attackThreshold</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"><em>decayCoeff</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">tMempool *const </td> <td class="paramname"><em>mempool</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Initialize a tEnvelopeFollower to a specified mempool. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">follower</td><td>A pointer to the tEnvelopeFollower to initialize. </td></tr> <tr><td class="paramname">attackThreshold</td><td>Amplitude threshold for determining an envelope onset. 0.0 to 1.0 </td></tr> <tr><td class="paramname">decayCoefficient</td><td>Multiplier to determine the envelope rate of decay. 0.0 to 1.0, above 0.95 recommended. </td></tr> <tr><td class="paramname">mempool</td><td>A pointer to the tMempool to use. </td></tr> </table> </dd> </dl> </div> </div> <a id="ga9ff136abec8842d17d25205787370239"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga9ff136abec8842d17d25205787370239">◆ </a></span>tEnvelopeFollower_free()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void tEnvelopeFollower_free </td> <td>(</td> <td class="paramtype">tEnvelopeFollower *const </td> <td class="paramname"><em>follower</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Free a tEnvelopeFollower from its mempool. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">follower</td><td>A pointer to the tEnvelopeFollower to free. </td></tr> </table> </dd> </dl> </div> </div> <a id="gadd57dad9c08b2ada6e8c720077256d5a"></a> <h2 class="memtitle"><span class="permalink"><a href="#gadd57dad9c08b2ada6e8c720077256d5a">◆ </a></span>tEnvelopeFollower_tick()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float tEnvelopeFollower_tick </td> <td>(</td> <td class="paramtype">tEnvelopeFollower *const </td> <td class="paramname"><em>follower</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"><em>input</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Tick the tEnvelopeFollower. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">follower</td><td>A pointer to the relevant tEnvelopeFollower. </td></tr> <tr><td class="paramname">input</td><td>The input sample. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The envelope value. </dd></dl> </div> </div> <a id="ga746d0a9698c22b21091cc6fad79faf85"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga746d0a9698c22b21091cc6fad79faf85">◆ </a></span>tEnvelopeFollower_setDecayCoefficient()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void tEnvelopeFollower_setDecayCoefficient </td> <td>(</td> <td class="paramtype">tEnvelopeFollower *const </td> <td class="paramname"><em>follower</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"><em>decayCoeff</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Set the envelope decay coefficient. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">follower</td><td>A pointer to the relevant tEnvelopeFollower. </td></tr> <tr><td class="paramname">decayCoefficient</td><td>Multiplier to determine the envelope rate of decay. 0.0 to 1.0, above 0.95 recommended. </td></tr> </table> </dd> </dl> </div> </div> <a id="ga9d8d4762b016fa57939e5d733e164cb9"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga9d8d4762b016fa57939e5d733e164cb9">◆ </a></span>tEnvelopeFollower_setAttackThreshold()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void tEnvelopeFollower_setAttackThreshold </td> <td>(</td> <td class="paramtype">tEnvelopeFollower *const </td> <td class="paramname"><em>follower</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"><em>attackThresh</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Set the envelope attack threshold. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">follower</td><td>A pointer to the relevant tEnvelopeFollower. </td></tr> <tr><td class="paramname">attackThreshold</td><td>The new threshold to determine envelope onset as an amplitude from 0.0 to 1.0  </td></tr> </table> </dd> </dl> </div> </div> </div><!-- contents --> <!-- HTML footer for doxygen 1.8.18--> <!-- start footer part --> </body> </html>