forked from pschatzmann/arduino-stk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingWave_8h_source.html
181 lines (181 loc) · 32.1 KB
/
SingWave_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Arduino STK: SingWave.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Arduino STK
 <span id="projectnumber">4.6.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">SingWave.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef STK_SINGWAVE_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define STK_SINGWAVE_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  </div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include "FileLoop.h"</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include "Modulate.h"</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "Envelope.h"</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>  </div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="keyword">namespace </span><a class="code" href="namespacestk.html">stk</a> {</div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>  </div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">/***************************************************/</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">/***************************************************/</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html"> 25</a></span> <span class="keyword">class </span><a class="code" href="classstk_1_1SingWave.html">SingWave</a> : <span class="keyword">public</span> <a class="code" href="classstk_1_1Generator.html">Generator</a></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> {</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#a7a38283d4e42d5f9b96d3ce8c401183a"> 36</a></span>  <a class="code" href="classstk_1_1SingWave.html#a7a38283d4e42d5f9b96d3ce8c401183a">SingWave</a>( std::string fileName, <span class="keywordtype">bool</span> raw = <span class="keyword">false</span> );</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#a0cd0c9dc6878705b638098c425ced782"> 39</a></span>  <a class="code" href="classstk_1_1SingWave.html#a0cd0c9dc6878705b638098c425ced782">~SingWave</a>( <span class="keywordtype">void</span> );</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#a906a50d64292988d48aa742c80e4f572"> 42</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#a906a50d64292988d48aa742c80e4f572">reset</a>( <span class="keywordtype">void</span> ) { wave_.<a class="code" href="classstk_1_1FileLoop.html#a76344714f6edc231a20dc6a303e26786">reset</a>(); lastFrame_[0] = 0.0; };</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  </div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#aed07d9ebe8289abe232eb1337d0708db"> 45</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#aed07d9ebe8289abe232eb1337d0708db">normalize</a>( <span class="keywordtype">void</span> ) { wave_.<a class="code" href="classstk_1_1FileLoop.html#a7c4a3d5c427154bf653f86a53e900b8b">normalize</a>(); };</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  </div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#aeece74c720cfe97c3d7f67c01a102b3d"> 48</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#aeece74c720cfe97c3d7f67c01a102b3d">normalize</a>( StkFloat peak ) { wave_.<a class="code" href="classstk_1_1FileLoop.html#a7c4a3d5c427154bf653f86a53e900b8b">normalize</a>( peak ); };</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#ae1ac4a84551f89570ff0842d032a3cba"> 51</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#ae1ac4a84551f89570ff0842d032a3cba">setFrequency</a>( StkFloat frequency );</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#a9143162e223ad86682c099d2a6c79ea0"> 54</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#a9143162e223ad86682c099d2a6c79ea0">setVibratoRate</a>( StkFloat rate ) { modulator_.<a class="code" href="classstk_1_1Modulate.html#a298b25f4b7cc56f2dffae5474a05999d">setVibratoRate</a>( rate ); };</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#a5276e1e244551d1ca1dcc70ed42e9228"> 57</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#a5276e1e244551d1ca1dcc70ed42e9228">setVibratoGain</a>( StkFloat gain ) { modulator_.<a class="code" href="classstk_1_1Modulate.html#a08f2d489a3fba3a10d1f301aed869ed4">setVibratoGain</a>( gain ); };</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  </div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#a287cf0feecb7eda88328fb2bc0edff92"> 60</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#a287cf0feecb7eda88328fb2bc0edff92">setRandomGain</a>( StkFloat gain ) { modulator_.<a class="code" href="classstk_1_1Modulate.html#ac6e7a02378facf59916f2460ed5c2fa5">setRandomGain</a>( gain ); };</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  </div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#ab80c50b3c8fc05f056221452504aa150"> 63</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#ab80c50b3c8fc05f056221452504aa150">setSweepRate</a>( StkFloat rate ) { sweepRate_ = rate; };</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#a7e2a4183704bea50f9d793bd998d6554"> 66</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#a7e2a4183704bea50f9d793bd998d6554">setGainRate</a>( StkFloat rate ) { envelope_.<a class="code" href="classstk_1_1Envelope.html#ade99b5c7cb974f71f1d2919868d774a0">setRate</a>( rate ); };</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#ac248b298dd095bd7c9ed2c84a229a55f"> 69</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#ac248b298dd095bd7c9ed2c84a229a55f">setGainTarget</a>( StkFloat target ) { envelope_.<a class="code" href="classstk_1_1Envelope.html#a5269bc5dc1d56161ab82b677b5462a3e">setTarget</a>( target ); };</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  </div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#a9bd638590605e5b5eb679467506e42ff"> 72</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#a9bd638590605e5b5eb679467506e42ff">noteOn</a>( <span class="keywordtype">void</span> ) { envelope_.<a class="code" href="classstk_1_1Envelope.html#a18cf8f21ef70227bd5cd17f53752bd0f">keyOn</a>(); };</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  </div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#ac81240ee79f64b90a9c37d45c0aa3a7f"> 75</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1SingWave.html#ac81240ee79f64b90a9c37d45c0aa3a7f">noteOff</a>( <span class="keywordtype">void</span> ) { envelope_.<a class="code" href="classstk_1_1Envelope.html#a9dbefb15f8d64aac3969f77d38791774">keyOff</a>(); };</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  </div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#aba8aab424f415d81dc0af921324f428e"> 78</a></span>  StkFloat <a class="code" href="classstk_1_1SingWave.html#aba8aab424f415d81dc0af921324f428e">lastOut</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> lastFrame_[0]; };</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  StkFloat <a class="code" href="classstk_1_1SingWave.html#a45136f9bf5b6f58433d4d65864d9db78">tick</a>( <span class="keywordtype">void</span> );</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  </div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  </div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="classstk_1_1StkFrames.html">StkFrames</a>& <a class="code" href="classstk_1_1SingWave.html#a45136f9bf5b6f58433d4d65864d9db78">tick</a>( <a class="code" href="classstk_1_1StkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 0 );</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  </div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  </div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classstk_1_1FileLoop.html">FileLoop</a> wave_;</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <a class="code" href="classstk_1_1Modulate.html">Modulate</a> modulator_;</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <a class="code" href="classstk_1_1Envelope.html">Envelope</a> envelope_;</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="code" href="classstk_1_1Envelope.html">Envelope</a> pitchEnvelope_;</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  StkFloat rate_;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  StkFloat sweepRate_;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  </div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> };</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  </div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#a45136f9bf5b6f58433d4d65864d9db78"> 104</a></span> <span class="keyword">inline</span> StkFloat <a class="code" href="classstk_1_1SingWave.html#a45136f9bf5b6f58433d4d65864d9db78">SingWave :: tick</a>( <span class="keywordtype">void</span> )</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> {</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="comment">// Set the wave rate.</span></div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  StkFloat newRate = pitchEnvelope_.<a class="code" href="classstk_1_1Envelope.html#a8de91b9caf10a03f52bd2247648c4601">tick</a>();</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  newRate += newRate * modulator_.<a class="code" href="classstk_1_1Modulate.html#a237b96dd553d65253abbf00a186e293d">tick</a>();</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  wave_.<a class="code" href="classstk_1_1FileLoop.html#a13e1f693bc8a29d9051a400087347a3c">setRate</a>( newRate );</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  </div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  lastFrame_[0] = wave_.<a class="code" href="classstk_1_1FileLoop.html#a037b31918134ed1839a8b48de774ab95">tick</a>();</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  lastFrame_[0] *= envelope_.<a class="code" href="classstk_1_1Envelope.html#a8de91b9caf10a03f52bd2247648c4601">tick</a>();</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  </div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">return</span> lastFrame_[0];</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> }</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classstk_1_1SingWave.html#ab74d7a305510eec92a9aa1a26bcb5e94"> 117</a></span> <span class="keyword">inline</span> <a class="code" href="classstk_1_1StkFrames.html">StkFrames</a>& <a class="code" href="classstk_1_1SingWave.html#a45136f9bf5b6f58433d4d65864d9db78">SingWave :: tick</a>( <a class="code" href="classstk_1_1StkFrames.html">StkFrames</a>& frames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel )</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> {</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor">#if defined(_STK_DEBUG_)</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">if</span> ( channel >= frames.<a class="code" href="classstk_1_1StkFrames.html#a0340d9e76707282658e49509a568f60e">channels</a>() ) {</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  oStream_ << <span class="stringliteral">"SingWave::tick(): channel and StkFrames arguments are incompatible!"</span>;</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff">handleError</a>( StkError::FUNCTION_ARGUMENT );</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  }</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  </div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  StkFloat *samples = &frames[channel];</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> hop = frames.<a class="code" href="classstk_1_1StkFrames.html#a0340d9e76707282658e49509a568f60e">channels</a>();</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0; i<frames.<a class="code" href="classstk_1_1StkFrames.html#a0fc22e21feecdee966f0203722b9c168">frames</a>(); i++, samples += hop )</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  *samples = <a class="code" href="classstk_1_1SingWave.html#a45136f9bf5b6f58433d4d65864d9db78">SingWave::tick</a>();</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  </div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">return</span> frames;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> }</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  </div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> } <span class="comment">// stk namespace</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  </div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassstk_1_1Envelope_html"><div class="ttname"><a href="classstk_1_1Envelope.html">stk::Envelope</a></div><div class="ttdoc">STK linear line envelope class.</div><div class="ttdef"><b>Definition:</b> Envelope.h:22</div></div>
<div class="ttc" id="aclassstk_1_1Envelope_html_a18cf8f21ef70227bd5cd17f53752bd0f"><div class="ttname"><a href="classstk_1_1Envelope.html#a18cf8f21ef70227bd5cd17f53752bd0f">stk::Envelope::keyOn</a></div><div class="ttdeci">void keyOn(void)</div><div class="ttdoc">Set target = 1.</div><div class="ttdef"><b>Definition:</b> Envelope.h:35</div></div>
<div class="ttc" id="aclassstk_1_1Envelope_html_a5269bc5dc1d56161ab82b677b5462a3e"><div class="ttname"><a href="classstk_1_1Envelope.html#a5269bc5dc1d56161ab82b677b5462a3e">stk::Envelope::setTarget</a></div><div class="ttdeci">void setTarget(StkFloat target)</div><div class="ttdoc">Set the target value.</div></div>
<div class="ttc" id="aclassstk_1_1Envelope_html_a8de91b9caf10a03f52bd2247648c4601"><div class="ttname"><a href="classstk_1_1Envelope.html#a8de91b9caf10a03f52bd2247648c4601">stk::Envelope::tick</a></div><div class="ttdeci">StkFloat tick(void)</div><div class="ttdoc">Compute and return one output sample.</div><div class="ttdef"><b>Definition:</b> Envelope.h:88</div></div>
<div class="ttc" id="aclassstk_1_1Envelope_html_a9dbefb15f8d64aac3969f77d38791774"><div class="ttname"><a href="classstk_1_1Envelope.html#a9dbefb15f8d64aac3969f77d38791774">stk::Envelope::keyOff</a></div><div class="ttdeci">void keyOff(void)</div><div class="ttdoc">Set target = 0.</div><div class="ttdef"><b>Definition:</b> Envelope.h:38</div></div>
<div class="ttc" id="aclassstk_1_1Envelope_html_ade99b5c7cb974f71f1d2919868d774a0"><div class="ttname"><a href="classstk_1_1Envelope.html#ade99b5c7cb974f71f1d2919868d774a0">stk::Envelope::setRate</a></div><div class="ttdeci">void setRate(StkFloat rate)</div><div class="ttdoc">Set the rate.</div></div>
<div class="ttc" id="aclassstk_1_1FileLoop_html"><div class="ttname"><a href="classstk_1_1FileLoop.html">stk::FileLoop</a></div><div class="ttdoc">STK file looping / oscillator class.</div><div class="ttdef"><b>Definition:</b> FileLoop.h:27</div></div>
<div class="ttc" id="aclassstk_1_1FileLoop_html_a037b31918134ed1839a8b48de774ab95"><div class="ttname"><a href="classstk_1_1FileLoop.html#a037b31918134ed1839a8b48de774ab95">stk::FileLoop::tick</a></div><div class="ttdeci">StkFloat tick(unsigned int channel=0)</div><div class="ttdoc">Compute a sample frame and return the specified channel value.</div></div>
<div class="ttc" id="aclassstk_1_1FileLoop_html_a13e1f693bc8a29d9051a400087347a3c"><div class="ttname"><a href="classstk_1_1FileLoop.html#a13e1f693bc8a29d9051a400087347a3c">stk::FileLoop::setRate</a></div><div class="ttdeci">void setRate(StkFloat rate)</div><div class="ttdoc">Set the data read rate in samples. The rate can be negative.</div></div>
<div class="ttc" id="aclassstk_1_1FileLoop_html_a76344714f6edc231a20dc6a303e26786"><div class="ttname"><a href="classstk_1_1FileLoop.html#a76344714f6edc231a20dc6a303e26786">stk::FileLoop::reset</a></div><div class="ttdeci">virtual void reset(void)</div><div class="ttdoc">Clear outputs and reset time (file) pointer to zero.</div><div class="ttdef"><b>Definition:</b> FileLoop.h:57</div></div>
<div class="ttc" id="aclassstk_1_1FileLoop_html_a7c4a3d5c427154bf653f86a53e900b8b"><div class="ttname"><a href="classstk_1_1FileLoop.html#a7c4a3d5c427154bf653f86a53e900b8b">stk::FileLoop::normalize</a></div><div class="ttdeci">void normalize(void)</div><div class="ttdoc">Normalize data to a maximum of +-1.0.</div><div class="ttdef"><b>Definition:</b> FileLoop.h:67</div></div>
<div class="ttc" id="aclassstk_1_1Generator_html"><div class="ttname"><a href="classstk_1_1Generator.html">stk::Generator</a></div><div class="ttdoc">STK abstract unit generator parent class.</div><div class="ttdef"><b>Definition:</b> Generator.h:21</div></div>
<div class="ttc" id="aclassstk_1_1Modulate_html"><div class="ttname"><a href="classstk_1_1Modulate.html">stk::Modulate</a></div><div class="ttdoc">STK periodic/random modulator.</div><div class="ttdef"><b>Definition:</b> Modulate.h:24</div></div>
<div class="ttc" id="aclassstk_1_1Modulate_html_a08f2d489a3fba3a10d1f301aed869ed4"><div class="ttname"><a href="classstk_1_1Modulate.html#a08f2d489a3fba3a10d1f301aed869ed4">stk::Modulate::setVibratoGain</a></div><div class="ttdeci">void setVibratoGain(StkFloat gain)</div><div class="ttdoc">Set the periodic (vibrato) gain.</div><div class="ttdef"><b>Definition:</b> Modulate.h:42</div></div>
<div class="ttc" id="aclassstk_1_1Modulate_html_a237b96dd553d65253abbf00a186e293d"><div class="ttname"><a href="classstk_1_1Modulate.html#a237b96dd553d65253abbf00a186e293d">stk::Modulate::tick</a></div><div class="ttdeci">StkFloat tick(void)</div><div class="ttdoc">Compute and return one output sample.</div><div class="ttdef"><b>Definition:</b> Modulate.h:80</div></div>
<div class="ttc" id="aclassstk_1_1Modulate_html_a298b25f4b7cc56f2dffae5474a05999d"><div class="ttname"><a href="classstk_1_1Modulate.html#a298b25f4b7cc56f2dffae5474a05999d">stk::Modulate::setVibratoRate</a></div><div class="ttdeci">void setVibratoRate(StkFloat rate)</div><div class="ttdoc">Set the periodic (vibrato) rate or frequency in Hz.</div><div class="ttdef"><b>Definition:</b> Modulate.h:39</div></div>
<div class="ttc" id="aclassstk_1_1Modulate_html_ac6e7a02378facf59916f2460ed5c2fa5"><div class="ttname"><a href="classstk_1_1Modulate.html#ac6e7a02378facf59916f2460ed5c2fa5">stk::Modulate::setRandomGain</a></div><div class="ttdeci">void setRandomGain(StkFloat gain)</div><div class="ttdoc">Set the random modulation gain.</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html"><div class="ttname"><a href="classstk_1_1SingWave.html">stk::SingWave</a></div><div class="ttdoc">STK "singing" looped soundfile class.</div><div class="ttdef"><b>Definition:</b> SingWave.h:26</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_a0cd0c9dc6878705b638098c425ced782"><div class="ttname"><a href="classstk_1_1SingWave.html#a0cd0c9dc6878705b638098c425ced782">stk::SingWave::~SingWave</a></div><div class="ttdeci">~SingWave(void)</div><div class="ttdoc">Class destructor.</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_a287cf0feecb7eda88328fb2bc0edff92"><div class="ttname"><a href="classstk_1_1SingWave.html#a287cf0feecb7eda88328fb2bc0edff92">stk::SingWave::setRandomGain</a></div><div class="ttdeci">void setRandomGain(StkFloat gain)</div><div class="ttdoc">Set the random-ness amount.</div><div class="ttdef"><b>Definition:</b> SingWave.h:60</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_a45136f9bf5b6f58433d4d65864d9db78"><div class="ttname"><a href="classstk_1_1SingWave.html#a45136f9bf5b6f58433d4d65864d9db78">stk::SingWave::tick</a></div><div class="ttdeci">StkFloat tick(void)</div><div class="ttdoc">Compute and return one output sample.</div><div class="ttdef"><b>Definition:</b> SingWave.h:104</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_a5276e1e244551d1ca1dcc70ed42e9228"><div class="ttname"><a href="classstk_1_1SingWave.html#a5276e1e244551d1ca1dcc70ed42e9228">stk::SingWave::setVibratoGain</a></div><div class="ttdeci">void setVibratoGain(StkFloat gain)</div><div class="ttdoc">Set the vibrato gain.</div><div class="ttdef"><b>Definition:</b> SingWave.h:57</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_a7a38283d4e42d5f9b96d3ce8c401183a"><div class="ttname"><a href="classstk_1_1SingWave.html#a7a38283d4e42d5f9b96d3ce8c401183a">stk::SingWave::SingWave</a></div><div class="ttdeci">SingWave(std::string fileName, bool raw=false)</div><div class="ttdoc">Class constructor taking filename argument.</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_a7e2a4183704bea50f9d793bd998d6554"><div class="ttname"><a href="classstk_1_1SingWave.html#a7e2a4183704bea50f9d793bd998d6554">stk::SingWave::setGainRate</a></div><div class="ttdeci">void setGainRate(StkFloat rate)</div><div class="ttdoc">Set the gain rate.</div><div class="ttdef"><b>Definition:</b> SingWave.h:66</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_a906a50d64292988d48aa742c80e4f572"><div class="ttname"><a href="classstk_1_1SingWave.html#a906a50d64292988d48aa742c80e4f572">stk::SingWave::reset</a></div><div class="ttdeci">void reset(void)</div><div class="ttdoc">Reset file to beginning.</div><div class="ttdef"><b>Definition:</b> SingWave.h:42</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_a9143162e223ad86682c099d2a6c79ea0"><div class="ttname"><a href="classstk_1_1SingWave.html#a9143162e223ad86682c099d2a6c79ea0">stk::SingWave::setVibratoRate</a></div><div class="ttdeci">void setVibratoRate(StkFloat rate)</div><div class="ttdoc">Set the vibrato frequency in Hz.</div><div class="ttdef"><b>Definition:</b> SingWave.h:54</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_a9bd638590605e5b5eb679467506e42ff"><div class="ttname"><a href="classstk_1_1SingWave.html#a9bd638590605e5b5eb679467506e42ff">stk::SingWave::noteOn</a></div><div class="ttdeci">void noteOn(void)</div><div class="ttdoc">Start a note.</div><div class="ttdef"><b>Definition:</b> SingWave.h:72</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_ab80c50b3c8fc05f056221452504aa150"><div class="ttname"><a href="classstk_1_1SingWave.html#ab80c50b3c8fc05f056221452504aa150">stk::SingWave::setSweepRate</a></div><div class="ttdeci">void setSweepRate(StkFloat rate)</div><div class="ttdoc">Set the sweep rate.</div><div class="ttdef"><b>Definition:</b> SingWave.h:63</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_aba8aab424f415d81dc0af921324f428e"><div class="ttname"><a href="classstk_1_1SingWave.html#aba8aab424f415d81dc0af921324f428e">stk::SingWave::lastOut</a></div><div class="ttdeci">StkFloat lastOut(void) const</div><div class="ttdoc">Return the last computed output value.</div><div class="ttdef"><b>Definition:</b> SingWave.h:78</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_ac248b298dd095bd7c9ed2c84a229a55f"><div class="ttname"><a href="classstk_1_1SingWave.html#ac248b298dd095bd7c9ed2c84a229a55f">stk::SingWave::setGainTarget</a></div><div class="ttdeci">void setGainTarget(StkFloat target)</div><div class="ttdoc">Set the gain target value.</div><div class="ttdef"><b>Definition:</b> SingWave.h:69</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_ac81240ee79f64b90a9c37d45c0aa3a7f"><div class="ttname"><a href="classstk_1_1SingWave.html#ac81240ee79f64b90a9c37d45c0aa3a7f">stk::SingWave::noteOff</a></div><div class="ttdeci">void noteOff(void)</div><div class="ttdoc">Stop a note.</div><div class="ttdef"><b>Definition:</b> SingWave.h:75</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_ae1ac4a84551f89570ff0842d032a3cba"><div class="ttname"><a href="classstk_1_1SingWave.html#ae1ac4a84551f89570ff0842d032a3cba">stk::SingWave::setFrequency</a></div><div class="ttdeci">void setFrequency(StkFloat frequency)</div><div class="ttdoc">Set looping parameters for a particular frequency.</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_aed07d9ebe8289abe232eb1337d0708db"><div class="ttname"><a href="classstk_1_1SingWave.html#aed07d9ebe8289abe232eb1337d0708db">stk::SingWave::normalize</a></div><div class="ttdeci">void normalize(void)</div><div class="ttdoc">Normalize the file to a maximum of +-1.0.</div><div class="ttdef"><b>Definition:</b> SingWave.h:45</div></div>
<div class="ttc" id="aclassstk_1_1SingWave_html_aeece74c720cfe97c3d7f67c01a102b3d"><div class="ttname"><a href="classstk_1_1SingWave.html#aeece74c720cfe97c3d7f67c01a102b3d">stk::SingWave::normalize</a></div><div class="ttdeci">void normalize(StkFloat peak)</div><div class="ttdoc">Normalize the file to a maximum of +- peak.</div><div class="ttdef"><b>Definition:</b> SingWave.h:48</div></div>
<div class="ttc" id="aclassstk_1_1StkFrames_html"><div class="ttname"><a href="classstk_1_1StkFrames.html">stk::StkFrames</a></div><div class="ttdoc">An STK class to handle vectorized audio data.</div><div class="ttdef"><b>Definition:</b> Stk.h:287</div></div>
<div class="ttc" id="aclassstk_1_1StkFrames_html_a0340d9e76707282658e49509a568f60e"><div class="ttname"><a href="classstk_1_1StkFrames.html#a0340d9e76707282658e49509a568f60e">stk::StkFrames::channels</a></div><div class="ttdeci">unsigned int channels(void) const</div><div class="ttdoc">Return the number of channels represented by the data.</div><div class="ttdef"><b>Definition:</b> Stk.h:415</div></div>
<div class="ttc" id="aclassstk_1_1StkFrames_html_a0fc22e21feecdee966f0203722b9c168"><div class="ttname"><a href="classstk_1_1StkFrames.html#a0fc22e21feecdee966f0203722b9c168">stk::StkFrames::frames</a></div><div class="ttdeci">unsigned int frames(void) const</div><div class="ttdoc">Return the number of sample frames represented by the data.</div><div class="ttdef"><b>Definition:</b> Stk.h:418</div></div>
<div class="ttc" id="aclassstk_1_1Stk_html_a48ac73a0d8ca28445ba1a054e1f061ff"><div class="ttname"><a href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff">stk::Stk::handleError</a></div><div class="ttdeci">static void handleError(const char *message, StkError::Type type)</div><div class="ttdoc">Static function for error reporting and handling using c-strings.</div></div>
<div class="ttc" id="anamespacestk_html"><div class="ttname"><a href="namespacestk.html">stk</a></div><div class="ttdoc">The STK namespace.</div><div class="ttdef"><b>Definition:</b> ADSR.h:8</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>