mirror of
https://github.com/thestk/stk
synced 2026-01-15 05:51:52 +00:00
89 lines
4.4 KiB
HTML
89 lines
4.4 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"><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="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.2.8.1 -->
|
|
<h1>Shakers.h</h1><div class="fragment"><pre>00001 <font class="comment">/***************************************************/</font>
|
|
00053 <font class="comment">/***************************************************/</font>
|
|
00054
|
|
00055 <font class="preprocessor">#if !defined(__SHAKERS_H)</font>
|
|
00056 <font class="preprocessor"></font><font class="preprocessor">#define __SHAKERS_H</font>
|
|
00057 <font class="preprocessor"></font>
|
|
00058 <font class="preprocessor">#include "Instrmnt.h"</font>
|
|
00059
|
|
00060 <font class="preprocessor">#define MAX_FREQS 8</font>
|
|
00061 <font class="preprocessor"></font><font class="preprocessor">#define NUM_INSTR 24</font>
|
|
00062 <font class="preprocessor"></font>
|
|
00063 <font class="keyword">class </font><a class="code" href="classShakers.html">Shakers</a> : <font class="keyword">public</font> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
|
00064 {
|
|
00065 <font class="keyword">public</font>:
|
|
00067 <a class="code" href="classShakers.html#a0">Shakers</a>();
|
|
00068
|
|
00070 <a class="code" href="classShakers.html#a1">~Shakers</a>();
|
|
00071
|
|
00073
|
|
00077 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classInstrmnt.html#a2">noteOn</a>(MY_FLOAT instrument, MY_FLOAT amplitude);
|
|
00078
|
|
00080 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classInstrmnt.html#a3">noteOff</a>(MY_FLOAT amplitude);
|
|
00081
|
|
00083 MY_FLOAT <a class="code" href="classInstrmnt.html#a6">tick</a>();
|
|
00084
|
|
00086 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classInstrmnt.html#a8">controlChange</a>(<font class="keywordtype">int</font> number, MY_FLOAT value);
|
|
00087
|
|
00088 <font class="keyword">protected</font>:
|
|
00089
|
|
00090 <font class="keywordtype">int</font> setupName(<font class="keywordtype">char</font>* instr);
|
|
00091 <font class="keywordtype">int</font> setupNum(<font class="keywordtype">int</font> inst);
|
|
00092 <font class="keywordtype">int</font> setFreqAndReson(<font class="keywordtype">int</font> which, MY_FLOAT freq, MY_FLOAT reson);
|
|
00093 <font class="keywordtype">void</font> setDecays(MY_FLOAT sndDecay, MY_FLOAT sysDecay);
|
|
00094 <font class="keywordtype">void</font> setFinalZs(MY_FLOAT z0, MY_FLOAT z1, MY_FLOAT z2);
|
|
00095 MY_FLOAT wuter_tick();
|
|
00096 MY_FLOAT tbamb_tick();
|
|
00097 MY_FLOAT ratchet_tick();
|
|
00098
|
|
00099 <font class="keywordtype">int</font> instType;
|
|
00100 <font class="keywordtype">int</font> ratchetPos, lastRatchetPos;
|
|
00101 MY_FLOAT shakeEnergy;
|
|
00102 MY_FLOAT inputs[MAX_FREQS];
|
|
00103 MY_FLOAT outputs[MAX_FREQS][2];
|
|
00104 MY_FLOAT coeffs[MAX_FREQS][2];
|
|
00105 MY_FLOAT sndLevel;
|
|
00106 MY_FLOAT baseGain;
|
|
00107 MY_FLOAT gains[MAX_FREQS];
|
|
00108 <font class="keywordtype">int</font> nFreqs;
|
|
00109 MY_FLOAT t_center_freqs[MAX_FREQS];
|
|
00110 MY_FLOAT center_freqs[MAX_FREQS];
|
|
00111 MY_FLOAT resons[MAX_FREQS];
|
|
00112 MY_FLOAT freq_rand[MAX_FREQS];
|
|
00113 <font class="keywordtype">int</font> freqalloc[MAX_FREQS];
|
|
00114 MY_FLOAT soundDecay;
|
|
00115 MY_FLOAT systemDecay;
|
|
00116 MY_FLOAT nObjects;
|
|
00117 MY_FLOAT collLikely;
|
|
00118 MY_FLOAT totalEnergy;
|
|
00119 MY_FLOAT ratchet,ratchetDelta;
|
|
00120 MY_FLOAT finalZ[3];
|
|
00121 MY_FLOAT finalZCoeffs[3];
|
|
00122 MY_FLOAT defObjs[NUM_INSTR];
|
|
00123 MY_FLOAT defDecays[NUM_INSTR];
|
|
00124 MY_FLOAT decayScale[NUM_INSTR];
|
|
00125
|
|
00126 };
|
|
00127
|
|
00128 <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>©1995-2002 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|