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

90 lines
5.1 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"><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="tutorial.html">Tutorial</a></CENTER>
<HR>
<!-- Generated by Doxygen 1.2.8.1 -->
<h1>Mesh2D.h</h1><div class="fragment"><pre>00001 <font class="comment">/***************************************************/</font>
00025 <font class="comment">/***************************************************/</font>
00026
00027 <font class="preprocessor">#if !defined(__MESH2D_H)</font>
00028 <font class="preprocessor"></font><font class="preprocessor">#define __MESH2D_H</font>
00029 <font class="preprocessor"></font>
00030 <font class="preprocessor">#include "Instrmnt.h"</font>
00031 <font class="preprocessor">#include "OnePole.h"</font>
00032
00033 <font class="preprocessor">#define NXMAX ((short)(12))</font>
00034 <font class="preprocessor"></font><font class="preprocessor">#define NYMAX ((short)(12))</font>
00035 <font class="preprocessor"></font>
00036 <font class="keyword">class </font><a class="code" href="classMesh2D.html">Mesh2D</a> : <font class="keyword">public</font> <a class="code" href="classInstrmnt.html">Instrmnt</a>
00037 {
00038 <font class="keyword">public</font>:
00040 <a class="code" href="classMesh2D.html#a0">Mesh2D</a>(<font class="keywordtype">short</font> nX, <font class="keywordtype">short</font> nY);
00041
00043 <a class="code" href="classMesh2D.html#a1">~Mesh2D</a>();
00044
00046 <font class="keywordtype">void</font> <a class="code" href="classMesh2D.html#a2">clear</a>();
00047
00049 <font class="keywordtype">void</font> <a class="code" href="classMesh2D.html#a3">setNX</a>(<font class="keywordtype">short</font> lenX);
00050
00052 <font class="keywordtype">void</font> <a class="code" href="classMesh2D.html#a4">setNY</a>(<font class="keywordtype">short</font> lenY);
00053
00055 <font class="keywordtype">void</font> <a class="code" href="classMesh2D.html#a5">setInputPosition</a>(MY_FLOAT xFactor, MY_FLOAT yFactor);
00056
00058 <font class="keywordtype">void</font> <a class="code" href="classMesh2D.html#a6">setDecay</a>(MY_FLOAT decayFactor);
00059
00061 <font class="keywordtype">void</font> <a class="code" href="classInstrmnt.html#a2">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
00062
00064 <font class="keywordtype">void</font> <a class="code" href="classInstrmnt.html#a3">noteOff</a>(MY_FLOAT amplitude);
00065
00067 MY_FLOAT <a class="code" href="classMesh2D.html#a9">energy</a>();
00068
00070 MY_FLOAT <a class="code" href="classInstrmnt.html#a6">tick</a>();
00071
00073 MY_FLOAT <a class="code" href="classInstrmnt.html#a6">tick</a>(MY_FLOAT input);
00074
00076 <font class="keywordtype">void</font> <a class="code" href="classInstrmnt.html#a8">controlChange</a>(<font class="keywordtype">int</font> number, MY_FLOAT value);
00077
00078 <font class="keyword">protected</font>:
00079
00080 MY_FLOAT tick0();
00081 MY_FLOAT tick1();
00082 <font class="keywordtype">void</font> clearMesh();
00083
00084 <font class="keywordtype">short</font> NX, NY;
00085 <font class="keywordtype">short</font> xInput, yInput;
00086 <a class="code" href="classOnePole.html">OnePole</a> *filterX[NXMAX];
00087 <a class="code" href="classOnePole.html">OnePole</a> *filterY[NYMAX];
00088 MY_FLOAT v[NXMAX-1][NYMAX-1]; <font class="comment">// junction velocities</font>
00089 MY_FLOAT vxp[NXMAX][NYMAX]; <font class="comment">// positive-x velocity wave</font>
00090 MY_FLOAT vxm[NXMAX][NYMAX]; <font class="comment">// negative-x velocity wave</font>
00091 MY_FLOAT vyp[NXMAX][NYMAX]; <font class="comment">// positive-y velocity wave</font>
00092 MY_FLOAT vym[NXMAX][NYMAX]; <font class="comment">// negative-y velocity wave</font>
00093
00094 <font class="comment">// Alternate buffers</font>
00095 MY_FLOAT vxp1[NXMAX][NYMAX]; <font class="comment">// positive-x velocity wave</font>
00096 MY_FLOAT vxm1[NXMAX][NYMAX]; <font class="comment">// negative-x velocity wave</font>
00097 MY_FLOAT vyp1[NXMAX][NYMAX]; <font class="comment">// positive-y velocity wave</font>
00098 MY_FLOAT vym1[NXMAX][NYMAX]; <font class="comment">// negative-y velocity wave</font>
00099
00100 <font class="keywordtype">int</font> counter; <font class="comment">// time in samples</font>
00101
00102
00103 };
00104
00105 <font class="preprocessor">#endif</font>
</font></pre></div><HR>
<table>
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
<tr><td>&copy;1995-2002 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>
</HTML>