mirror of
https://github.com/thestk/stk
synced 2026-01-13 13:01:52 +00:00
93 lines
4.9 KiB
HTML
93 lines
4.9 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>Shakers.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
|
00053 <span class="comment">/***************************************************/</span>
|
|
00054
|
|
00055 <span class="preprocessor">#ifndef STK_SHAKERS_H</span>
|
|
00056 <span class="preprocessor"></span><span class="preprocessor">#define STK_SHAKERS_H</span>
|
|
00057 <span class="preprocessor"></span>
|
|
00058 <span class="preprocessor">#include "Instrmnt.h"</span>
|
|
00059
|
|
00060 <span class="keyword">const</span> <span class="keywordtype">int</span> MAX_FREQS = 8;
|
|
00061 <span class="keyword">const</span> <span class="keywordtype">int</span> NUM_INSTR = 24;
|
|
00062
|
|
<a name="l00063"></a><a class="code" href="classShakers.html">00063</a> <span class="keyword">class </span><a class="code" href="classShakers.html">Shakers</a> : <span class="keyword">public</span> <a class="code" href="classInstrmnt.html">Instrmnt</a>
|
|
00064 {
|
|
00065 <span class="keyword">public</span>:
|
|
00067 <a class="code" href="classShakers.html#a0">Shakers</a>();
|
|
00068
|
|
00070 <a class="code" href="classShakers.html#a1">~Shakers</a>();
|
|
00071
|
|
00073
|
|
00077 <span class="keywordtype">void</span> <a class="code" href="classShakers.html#a2">noteOn</a>(StkFloat instrument, StkFloat amplitude);
|
|
00078
|
|
00080 <span class="keywordtype">void</span> <a class="code" href="classShakers.html#a3">noteOff</a>(StkFloat amplitude);
|
|
00081
|
|
00083 StkFloat <a class="code" href="classShakers.html#a4">tick</a>();
|
|
00084
|
|
00086 StkFloat *<a class="code" href="classShakers.html#a4">tick</a>(StkFloat *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
|
00087
|
|
00089
|
|
00095 <a class="code" href="classStkFrames.html">StkFrames</a>& <a class="code" href="classShakers.html#a4">tick</a>( <a class="code" href="classStkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 1 );
|
|
00096
|
|
00098 <span class="keywordtype">void</span> <a class="code" href="classShakers.html#a7">controlChange</a>(<span class="keywordtype">int</span> number, StkFloat value);
|
|
00099
|
|
00100 <span class="keyword">protected</span>:
|
|
00101
|
|
00102 <span class="keywordtype">int</span> setupName(<span class="keywordtype">char</span>* instr);
|
|
00103 <span class="keywordtype">int</span> setupNum(<span class="keywordtype">int</span> inst);
|
|
00104 <span class="keywordtype">int</span> setFreqAndReson(<span class="keywordtype">int</span> which, StkFloat freq, StkFloat reson);
|
|
00105 <span class="keywordtype">void</span> setDecays(StkFloat sndDecay, StkFloat sysDecay);
|
|
00106 <span class="keywordtype">void</span> setFinalZs(StkFloat z0, StkFloat z1, StkFloat z2);
|
|
00107 StkFloat wuter_tick();
|
|
00108 StkFloat tbamb_tick();
|
|
00109 StkFloat ratchet_tick();
|
|
00110
|
|
00111 <span class="keywordtype">int</span> instType_;
|
|
00112 <span class="keywordtype">int</span> ratchetPos_, lastRatchetPos_;
|
|
00113 StkFloat shakeEnergy_;
|
|
00114 StkFloat inputs_[MAX_FREQS];
|
|
00115 StkFloat outputs_[MAX_FREQS][2];
|
|
00116 StkFloat coeffs_[MAX_FREQS][2];
|
|
00117 StkFloat sndLevel_;
|
|
00118 StkFloat baseGain_;
|
|
00119 StkFloat gains_[MAX_FREQS];
|
|
00120 <span class="keywordtype">int</span> nFreqs_;
|
|
00121 StkFloat t_center_freqs_[MAX_FREQS];
|
|
00122 StkFloat center_freqs_[MAX_FREQS];
|
|
00123 StkFloat resons_[MAX_FREQS];
|
|
00124 StkFloat freq_rand_[MAX_FREQS];
|
|
00125 <span class="keywordtype">int</span> freqalloc_[MAX_FREQS];
|
|
00126 StkFloat soundDecay_;
|
|
00127 StkFloat systemDecay_;
|
|
00128 StkFloat nObjects_;
|
|
00129 StkFloat totalEnergy_;
|
|
00130 StkFloat ratchet_, ratchetDelta_;
|
|
00131 StkFloat finalZ_[3];
|
|
00132 StkFloat finalZCoeffs_[3];
|
|
00133 StkFloat defObjs_[NUM_INSTR];
|
|
00134 StkFloat defDecays_[NUM_INSTR];
|
|
00135 StkFloat decayScale_[NUM_INSTR];
|
|
00136
|
|
00137 };
|
|
00138
|
|
00139 <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>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|