mirror of
https://github.com/thestk/stk
synced 2026-01-11 20:11:52 +00:00
90 lines
5.2 KiB
HTML
90 lines
5.2 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="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.3.4 -->
|
|
<h1>Mesh2D.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
|
00025 <span class="comment">/***************************************************/</span>
|
|
00026
|
|
00027 <span class="preprocessor">#if !defined(__MESH2D_H)</span>
|
|
00028 <span class="preprocessor"></span><span class="preprocessor">#define __MESH2D_H</span>
|
|
00029 <span class="preprocessor"></span>
|
|
00030 <span class="preprocessor">#include "Instrmnt.h"</span>
|
|
00031 <span class="preprocessor">#include "OnePole.h"</span>
|
|
00032
|
|
00033 <span class="preprocessor">#define NXMAX ((short)(12))</span>
|
|
00034 <span class="preprocessor"></span><span class="preprocessor">#define NYMAX ((short)(12))</span>
|
|
00035 <span class="preprocessor"></span>
|
|
<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>
|
|
00037 {
|
|
00038 <span class="keyword">public</span>:
|
|
00040 <a class="code" href="classMesh2D.html#a0">Mesh2D</a>(<span class="keywordtype">short</span> nX, <span class="keywordtype">short</span> nY);
|
|
00041
|
|
00043 <a class="code" href="classMesh2D.html#a1">~Mesh2D</a>();
|
|
00044
|
|
00046 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a2">clear</a>();
|
|
00047
|
|
00049 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a3">setNX</a>(<span class="keywordtype">short</span> lenX);
|
|
00050
|
|
00052 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a4">setNY</a>(<span class="keywordtype">short</span> lenY);
|
|
00053
|
|
00055 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a5">setInputPosition</a>(MY_FLOAT xFactor, MY_FLOAT yFactor);
|
|
00056
|
|
00058 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a6">setDecay</a>(MY_FLOAT decayFactor);
|
|
00059
|
|
00061 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a7">noteOn</a>(MY_FLOAT frequency, MY_FLOAT amplitude);
|
|
00062
|
|
00064 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a8">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="classMesh2D.html#a10">tick</a>();
|
|
00071
|
|
00073 MY_FLOAT <a class="code" href="classMesh2D.html#a10">tick</a>(MY_FLOAT input);
|
|
00074
|
|
00076 <span class="keywordtype">void</span> <a class="code" href="classMesh2D.html#a12">controlChange</a>(<span class="keywordtype">int</span> number, MY_FLOAT value);
|
|
00077
|
|
00078 <span class="keyword">protected</span>:
|
|
00079
|
|
00080 MY_FLOAT tick0();
|
|
00081 MY_FLOAT tick1();
|
|
00082 <span class="keywordtype">void</span> clearMesh();
|
|
00083
|
|
00084 <span class="keywordtype">short</span> NX, NY;
|
|
00085 <span class="keywordtype">short</span> 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]; <span class="comment">// junction velocities</span>
|
|
00089 MY_FLOAT vxp[NXMAX][NYMAX]; <span class="comment">// positive-x velocity wave</span>
|
|
00090 MY_FLOAT vxm[NXMAX][NYMAX]; <span class="comment">// negative-x velocity wave</span>
|
|
00091 MY_FLOAT vyp[NXMAX][NYMAX]; <span class="comment">// positive-y velocity wave</span>
|
|
00092 MY_FLOAT vym[NXMAX][NYMAX]; <span class="comment">// negative-y velocity wave</span>
|
|
00093
|
|
00094 <span class="comment">// Alternate buffers</span>
|
|
00095 MY_FLOAT vxp1[NXMAX][NYMAX]; <span class="comment">// positive-x velocity wave</span>
|
|
00096 MY_FLOAT vxm1[NXMAX][NYMAX]; <span class="comment">// negative-x velocity wave</span>
|
|
00097 MY_FLOAT vyp1[NXMAX][NYMAX]; <span class="comment">// positive-y velocity wave</span>
|
|
00098 MY_FLOAT vym1[NXMAX][NYMAX]; <span class="comment">// negative-y velocity wave</span>
|
|
00099
|
|
00100 <span class="keywordtype">int</span> counter; <span class="comment">// time in samples</span>
|
|
00101
|
|
00102
|
|
00103 };
|
|
00104
|
|
00105 <span class="preprocessor">#endif</span>
|
|
</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>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|