Files
stk/doc/html/Mesh2D_8h-source.html
2013-09-29 23:41:50 +02:00

90 lines
6.7 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"> &nbsp; <img src="ccrma.gif"> &nbsp; <img src="mcgill.gif"><P>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="information.html">Information</a> &nbsp; <a class="qindex" href="classes.html">Classes</a> &nbsp; <a class="qindex" href="download.html">Download</a> &nbsp; <a class="qindex" href="usage.html">Usage</a> &nbsp; <a class="qindex" href="maillist.html">Mail List</a> &nbsp; <a class="qindex" href="system.html">Requirements</a> &nbsp; <a class="qindex" href="links.html">Links</a> &nbsp; <a class="qindex" href="faq.html">FAQ</a> &nbsp; <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<div class="nav">
<a class="el" href="dir_000000.html">include</a></div>
<h1>Mesh2D.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/***************************************************/</span>
<a name="l00025"></a>00025 <span class="comment">/***************************************************/</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef STK_MESH2D_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define STK_MESH2D_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#include "Instrmnt.h"</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include "OnePole.h"</span>
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="keyword">const</span> <span class="keywordtype">short</span> NXMAX = 12;
<a name="l00034"></a>00034 <span class="keyword">const</span> <span class="keywordtype">short</span> NYMAX = 12;
<a name="l00035"></a>00035
<a name="l00036"></a><a class="code" href="classMesh2D.html">00036</a> <span class="keyword">class </span><a class="code" href="classMesh2D.html">Mesh2D</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
<a name="l00037"></a>00037 {
<a name="l00038"></a>00038 <span class="keyword">public</span>:
<a name="l00040"></a>00040 <a class="code" href="classMesh2D.html#a0">Mesh2D</a>(<span class="keywordtype">short</span> nX, <span class="keywordtype">short</span> nY);
<a name="l00041"></a>00041
<a name="l00043"></a>00043 <a class="code" href="classMesh2D.html#a1">~Mesh2D</a>();
<a name="l00044"></a>00044
<a name="l00046"></a>00046 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a2">clear</a>();
<a name="l00047"></a>00047
<a name="l00049"></a>00049 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a3">setNX</a>(<span class="keywordtype">short</span> lenX);
<a name="l00050"></a>00050
<a name="l00052"></a>00052 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a4">setNY</a>(<span class="keywordtype">short</span> lenY);
<a name="l00053"></a>00053
<a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a5">setInputPosition</a>(StkFloat xFactor, StkFloat yFactor);
<a name="l00056"></a>00056
<a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a6">setDecay</a>(StkFloat decayFactor);
<a name="l00059"></a>00059
<a name="l00061"></a>00061 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a7">noteOn</a>(StkFloat frequency, StkFloat amplitude);
<a name="l00062"></a>00062
<a name="l00064"></a>00064 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a8">noteOff</a>(StkFloat amplitude);
<a name="l00065"></a>00065
<a name="l00067"></a>00067 StkFloat <a class="code" href="classMesh2D.html#a9">energy</a>();
<a name="l00068"></a>00068
<a name="l00070"></a>00070 StkFloat <a class="code" href="classMesh2D.html#a10">inputTick</a>( StkFloat input );
<a name="l00071"></a>00071
<a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a11">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
<a name="l00074"></a>00074
<a name="l00075"></a>00075 <span class="keyword">protected</span>:
<a name="l00076"></a>00076
<a name="l00077"></a>00077 StkFloat computeSample( <span class="keywordtype">void</span> );
<a name="l00078"></a>00078
<a name="l00079"></a>00079 StkFloat tick0();
<a name="l00080"></a>00080 StkFloat tick1();
<a name="l00081"></a>00081 <span class="keywordtype">void</span> clearMesh();
<a name="l00082"></a>00082
<a name="l00083"></a>00083 <span class="keywordtype">short</span> NX_, NY_;
<a name="l00084"></a>00084 <span class="keywordtype">short</span> xInput_, yInput_;
<a name="l00085"></a>00085 <a class="code" href="classOnePole.html">OnePole</a> filterX_[NXMAX];
<a name="l00086"></a>00086 <a class="code" href="classOnePole.html">OnePole</a> filterY_[NYMAX];
<a name="l00087"></a>00087 StkFloat v_[NXMAX-1][NYMAX-1]; <span class="comment">// junction velocities</span>
<a name="l00088"></a>00088 StkFloat vxp_[NXMAX][NYMAX]; <span class="comment">// positive-x velocity wave</span>
<a name="l00089"></a>00089 StkFloat vxm_[NXMAX][NYMAX]; <span class="comment">// negative-x velocity wave</span>
<a name="l00090"></a>00090 StkFloat vyp_[NXMAX][NYMAX]; <span class="comment">// positive-y velocity wave</span>
<a name="l00091"></a>00091 StkFloat vym_[NXMAX][NYMAX]; <span class="comment">// negative-y velocity wave</span>
<a name="l00092"></a>00092
<a name="l00093"></a>00093 <span class="comment">// Alternate buffers</span>
<a name="l00094"></a>00094 StkFloat vxp1_[NXMAX][NYMAX]; <span class="comment">// positive-x velocity wave</span>
<a name="l00095"></a>00095 StkFloat vxm1_[NXMAX][NYMAX]; <span class="comment">// negative-x velocity wave</span>
<a name="l00096"></a>00096 StkFloat vyp1_[NXMAX][NYMAX]; <span class="comment">// positive-y velocity wave</span>
<a name="l00097"></a>00097 StkFloat vym1_[NXMAX][NYMAX]; <span class="comment">// negative-y velocity wave</span>
<a name="l00098"></a>00098
<a name="l00099"></a>00099 <span class="keywordtype">int</span> counter_; <span class="comment">// time in samples</span>
<a name="l00100"></a>00100 };
<a name="l00101"></a>00101
<a name="l00102"></a>00102 <span class="preprocessor">#endif</span>
</pre></div><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>&copy;1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>
</HTML>