-
Notifications
You must be signed in to change notification settings - Fork 0
/
al___preset_handler_8hpp_source.html
370 lines (368 loc) · 54.5 KB
/
al___preset_handler_8hpp_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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<!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>Allolib: al_PresetHandler.hpp 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.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">Allolib
 <span id="projectnumber">1.0</span>
</div>
<div id="projectbrief">C++ Components For Interactive Multimedia</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('al___preset_handler_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">al_PresetHandler.hpp</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 AL_PRESETHANDLER_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define AL_PRESETHANDLER_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="comment">/* Allolib --</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> Multimedia / virtual environment application class library</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"></span> </div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> Copyright (C) 2009. AlloSphere Research Group, Media Arts & Technology,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> UCSB. Copyright (C) 2012-2018. The Regents of the University of California.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> All rights reserved.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"></span> </div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"></span> </div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> Redistributions of source code must retain the above copyright</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> notice, this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"></span> </div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> Redistributions in binary form must reproduce the above</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> copyright notice, this list of conditions and the following disclaimer in the</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> documentation and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"></span> </div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> Neither the name of the University of California nor the names of its</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> contributors may be used to endorse or promote products derived from this</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> software without specific prior written permission.</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"></span> </div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"> OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"> OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"> ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment"></span> </div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"> File description:</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"> Preset classes that encapsulates storing values for groups of parameters</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment"> File author(s):</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment"> Andrés Cabrera [email protected]</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment">*/</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  </div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#include <algorithm></span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor">#include <atomic></span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor">#include <condition_variable></span></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#include <functional></span></div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#include <map></span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="preprocessor">#include <mutex></span></div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor">#include <string></span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor">#include <thread></span></div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor">#include <vector></span></div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  </div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor">#include "al/protocol/al_OSC.hpp"</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor">#include "al/system/al_Time.hpp"</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor">#include "al/ui/al_Parameter.hpp"</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor">#include "al/ui/al_ParameterServer.hpp"</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  </div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">namespace </span><a class="code" href="namespaceal.html">al</a> {</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html"> 66</a></span> <span class="keyword">class </span><a class="code" href="classal_1_1_preset_handler.html">PresetHandler</a> {</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">public</span>:</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keyword">typedef</span> std::map<std::string, std::vector<ParameterField>> ParameterStates;</div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a7bf371f43f8bf4bc0aa8974d0eafc81a"> 77</a></span>  <a class="code" href="classal_1_1_preset_handler.html#a7bf371f43f8bf4bc0aa8974d0eafc81a">PresetHandler</a>(std::string rootDirectory, <span class="keywordtype">bool</span> verbose = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  </div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#ae1422818d3dc64fa782cd32d6e9c7d5e"> 88</a></span>  <a class="code" href="classal_1_1_preset_handler.html#ae1422818d3dc64fa782cd32d6e9c7d5e">PresetHandler</a>(TimeMasterMode timeMasterMode = TimeMasterMode::TIME_MASTER_CPU,</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  std::string rootDirectory = <span class="stringliteral">"presets"</span>, <span class="keywordtype">bool</span> verbose = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  </div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  ~<a class="code" href="classal_1_1_preset_handler.html">PresetHandler</a>();</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  </div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a9a0f4e05ac8720fcb2201ae228a00c8e"> 102</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a9a0f4e05ac8720fcb2201ae228a00c8e">storePreset</a>(std::string name);</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  </div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a53662c04fa7762ccc7a38919b3a84855"> 119</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a53662c04fa7762ccc7a38919b3a84855">storePreset</a>(<span class="keywordtype">int</span> index, std::string name = <span class="stringliteral">""</span>, <span class="keywordtype">bool</span> overwrite = <span class="keyword">true</span>);</div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#af53b0e0d2556b0d0170b14ea72a2386a"> 128</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#af53b0e0d2556b0d0170b14ea72a2386a">recallPreset</a>(std::string name);</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  </div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a57f9abe38727822e898332d498939a17"> 141</a></span>  std::string <a class="code" href="classal_1_1_preset_handler.html#a57f9abe38727822e898332d498939a17">recallPreset</a>(<span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  </div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordtype">void</span> recallPresetSynchronous(std::string name);</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  </div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a6ae795cb7d0d1820f0c324c387157e4c"> 149</a></span>  std::string <a class="code" href="classal_1_1_preset_handler.html#a6ae795cb7d0d1820f0c324c387157e4c">recallPresetSynchronous</a>(<span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  </div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a9523969bf5482371e295abe866bafb3b"> 162</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a9523969bf5482371e295abe866bafb3b">setInterpolatedPreset</a>(<span class="keywordtype">int</span> index1, <span class="keywordtype">int</span> index2, <span class="keywordtype">double</span> factor);</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  </div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a9523969bf5482371e295abe866bafb3b">setInterpolatedPreset</a>(std::string presetName1, std::string presetName2,</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keywordtype">double</span> factor);</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  </div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="comment">// static void setParameterValues(ParameterMeta *param,</span></div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="comment">// std::vector<ParameterField> &values);</span></div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#ac6c3b5d90d00aec95352ebe81985ae85"> 173</a></span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#ac6c3b5d90d00aec95352ebe81985ae85">setInterpolatedValues</a>(ParameterStates &startValues,</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  ParameterStates &endValues, <span class="keywordtype">double</span> factor = 1.0);</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  </div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  std::map<int, std::string> availablePresets();</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  std::string getPresetName(<span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  std::string getCurrentPresetName() { <span class="keywordflow">return</span> mCurrentPresetName; }</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  </div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a18738141a555059057aebf0093cef2b2"> 189</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a18738141a555059057aebf0093cef2b2">skipParameter</a>(std::string parameterAddr, <span class="keywordtype">bool</span> skip = <span class="keyword">true</span>);</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  </div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordtype">int</span> getCurrentPresetIndex();</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  </div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="keywordtype">float</span> getMorphTime();</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordtype">void</span> setMorphTime(<span class="keywordtype">float</span> time);</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordtype">void</span> setMaxMorphTime(<span class="keywordtype">float</span> time);</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keywordtype">void</span> stopMorphing() { mTotalSteps.store(0); }</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordtype">void</span> morphTo(ParameterStates &parameterStates, <span class="keywordtype">float</span> morphTime);</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordtype">void</span> morphTo(std::string presetName, <span class="keywordtype">float</span> morphTime);</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  </div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordtype">void</span> setMorphStepTime(<span class="keywordtype">float</span> stepTime) { mMorphInterval = stepTime; }</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  </div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a748184aef3b2be09d05c8c30832b9f38">stepMorphing</a>(<span class="keywordtype">double</span> stepTime);</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  </div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a748184aef3b2be09d05c8c30832b9f38"> 206</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a748184aef3b2be09d05c8c30832b9f38">stepMorphing</a>();</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  </div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordtype">void</span> setSubDirectory(std::string directory);</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  std::string getSubDirectory() { <span class="keywordflow">return</span> mSubDir; }</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  </div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a6abeeb351d73cdcab020f66501746b2b"> 212</a></span>  std::string <a class="code" href="classal_1_1_preset_handler.html#a6abeeb351d73cdcab020f66501746b2b">getCurrentPath</a>();</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  </div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordtype">void</span> setRootPath(std::string path);</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  </div>
<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a4709bf7a38e14d33dd0c5511b31c036e"> 217</a></span>  std::string <a class="code" href="classal_1_1_preset_handler.html#a4709bf7a38e14d33dd0c5511b31c036e">getRootPath</a>();</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  </div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a9e2502eede5ec415d2c68717ca6d8a47"> 222</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a9e2502eede5ec415d2c68717ca6d8a47">print</a>();</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  </div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a5a6aa88f1adbf9ba7344954e00c9c1c5"> 229</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a5a6aa88f1adbf9ba7344954e00c9c1c5">registerPresetCallback</a>(</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  std::function<<span class="keywordtype">void</span>(<span class="keywordtype">int</span> index, <span class="keywordtype">void</span> *sender, <span class="keywordtype">void</span> *userData)> cb,</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordtype">void</span> *userData = <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  </div>
<div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#aabbfff7533eb7de9737fab3f73fd377d"> 238</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#aabbfff7533eb7de9737fab3f73fd377d">registerStoreCallback</a>(</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  std::function<<span class="keywordtype">void</span>(<span class="keywordtype">int</span> index, std::string name, <span class="keywordtype">void</span> *userData)> cb,</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="keywordtype">void</span> *userData = <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  </div>
<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#af1c461dbd6b0ca71f56ef2a0654bd6fe"> 247</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#af1c461dbd6b0ca71f56ef2a0654bd6fe">registerMorphTimeCallback</a>(Parameter::ParameterChangeCallback cb);</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  </div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="keyword">typedef</span> <span class="keyword">const</span> std::function<void(std::string)> PresetMapCallback;</div>
<div class="line"><a name="l00254"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a282e28b8fd36aed9628cb633f87ce60a"> 254</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a282e28b8fd36aed9628cb633f87ce60a">registerPresetMapCallback</a>(PresetMapCallback cb);</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  </div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <a class="code" href="classal_1_1_preset_handler.html">PresetHandler</a> &registerParameter(<a class="code" href="classal_1_1_parameter_meta.html">ParameterMeta</a> &parameter);</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  </div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <a class="code" href="classal_1_1_preset_handler.html">PresetHandler</a> &operator<<(<a class="code" href="classal_1_1_parameter_meta.html">ParameterMeta</a> &param) {</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keywordflow">return</span> this->registerParameter(param);</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  }</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  </div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <a class="code" href="classal_1_1_preset_handler.html">PresetHandler</a> &registerParameterBundle(<a class="code" href="classal_1_1_parameter_bundle.html">ParameterBundle</a> &bundle);</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  </div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <a class="code" href="classal_1_1_preset_handler.html">PresetHandler</a> &operator<<(<a class="code" href="classal_1_1_parameter_bundle.html">ParameterBundle</a> &bundle) {</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">return</span> this->registerParameterBundle(bundle);</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  }</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  </div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  std::vector<ParameterMeta *> parameters() { <span class="keywordflow">return</span> mParameters; }</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  </div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  std::string buildMapPath(std::string mapName, <span class="keywordtype">bool</span> useSubDirectory = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  </div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  std::vector<std::string> availablePresetMaps();</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  </div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  std::map<int, std::string> readPresetMap(std::string mapName = <span class="stringliteral">"default"</span>);</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  </div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <span class="keywordtype">void</span> setCurrentPresetMap(std::string mapName = <span class="stringliteral">"default"</span>,</div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordtype">bool</span> autoCreate = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  </div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordtype">void</span> setPresetMap(std::map<int, std::string> presetsMap) {</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  mPresetsMap = presetsMap;</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  }</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  </div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="keywordtype">void</span> storeCurrentPresetMap(std::string mapName = <span class="stringliteral">""</span>,</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="keywordtype">bool</span> useSubDirectory = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  </div>
<div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a793c76f905c910036fdf227e1bd96107"> 293</a></span>  <span class="keywordtype">void</span> <a class="code" href="classal_1_1_preset_handler.html#a793c76f905c910036fdf227e1bd96107">useCallbacks</a>(<span class="keywordtype">bool</span> use) { mUseCallbacks = use; }</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  </div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keywordtype">void</span> changeParameterValue(std::string presetName, std::string parameterPath,</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="keywordtype">float</span> newValue);</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  </div>
<div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#ac3724b4c591f7cf0889731a936a9cbcc"> 308</a></span>  <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classal_1_1_preset_handler.html#ac3724b4c591f7cf0889731a936a9cbcc">asciiToPresetIndex</a>(<span class="keywordtype">int</span> ascii, <span class="keywordtype">int</span> offset = 0);</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  </div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  [[deprecated]] <span class="keywordtype">void</span> verbose(<span class="keywordtype">bool</span> isVerbose) { mVerbose = isVerbose; }</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="keywordtype">void</span> setVerbose(<span class="keywordtype">bool</span> isVerbose = <span class="keyword">true</span>) { mVerbose = isVerbose; }</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="keywordtype">bool</span> verbose() { <span class="keywordflow">return</span> mVerbose; }</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  </div>
<div class="line"><a name="l00320"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a45b9dd476d3da2a948b5657c2fe624b4"> 320</a></span>  ParameterStates <a class="code" href="classal_1_1_preset_handler.html#a45b9dd476d3da2a948b5657c2fe624b4">loadPresetValues</a>(std::string name);</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  </div>
<div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="classal_1_1_preset_handler.html#a83323d48fb8629cda182c5fff3f57981"> 329</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classal_1_1_preset_handler.html#a83323d48fb8629cda182c5fff3f57981">savePresetValues</a>(<span class="keyword">const</span> ParameterStates &values, std::string presetName,</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  <span class="keywordtype">bool</span> overwrite = <span class="keyword">true</span>);</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  </div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <span class="keywordtype">void</span> setTimeMaster(TimeMasterMode masterMode);</div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  </div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="keywordtype">void</span> startCpuThread();</div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <span class="keywordtype">void</span> stopCpuThread();</div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  </div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span> <span class="keyword">private</span>:</div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="comment">// std::vector<float> getParameterValue(ParameterMeta *p);</span></div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="comment">// void setParametersInBundle(ParameterBundle *bundle, std::string</span></div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  <span class="comment">// bundlePrefix,</span></div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="comment">// PresetHandler *handler, double factor = 1.0);</span></div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> morphingFunction(<a class="code" href="classal_1_1_preset_handler.html">PresetHandler</a> *handler);</div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  </div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  ParameterStates getBundleStates(<a class="code" href="classal_1_1_parameter_bundle.html">ParameterBundle</a> *bundle, std::string <span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  </div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <span class="keywordtype">bool</span> mVerbose{<span class="keyword">false</span>};</div>
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <span class="keywordtype">bool</span> mUseCallbacks{<span class="keyword">true</span>};</div>
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  std::string mRootDir;</div>
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  std::string mSubDir; <span class="comment">// Optional sub directory, e.g. for preset map archives</span></div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  </div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  std::string mCurrentMapName;</div>
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  std::string mCurrentPresetName;</div>
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  std::vector<ParameterMeta *> mParameters;</div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  </div>
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  std::vector<std::string> mSkipParameters;</div>
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  std::mutex mSkipParametersLock;</div>
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  </div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  std::map<std::string, std::vector<ParameterBundle *>> mBundles;</div>
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  </div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <span class="comment">// Protects file writing from this class. Only one file may be written at</span></div>
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="comment">// a time.</span></div>
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  std::mutex mFileLock;</div>
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  </div>
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  std::mutex mTargetLock;</div>
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  ParameterStates mTargetValues;</div>
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  ParameterStates mStartValues;</div>
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  </div>
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  TimeMasterMode mTimeMasterMode{TimeMasterMode::TIME_MASTER_CPU};</div>
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  </div>
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  Parameter mMorphTime{<span class="stringliteral">"morphTime"</span>, <span class="stringliteral">""</span>, 0.0, 0.0, 20.0};</div>
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  </div>
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  std::atomic<uint64_t> mMorphStepCount{0};</div>
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  std::atomic<uint64_t> mTotalSteps{0};</div>
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="comment">// std::atomic<float> mCurrentMorphIndex;</span></div>
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="keywordtype">bool</span> mCpuThreadRunning{<span class="keyword">false</span>}; <span class="comment">// To keep the morphing thread alive</span></div>
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  std::unique_ptr<std::thread> mMorphingThread;</div>
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="comment">// std::condition_variable mMorphConditionVar;</span></div>
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  <span class="keywordtype">double</span> mMorphInterval{0.02};</div>
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="comment">// std::atomic<bool> mMorphing;</span></div>
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  </div>
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  std::vector<std::function<void(<span class="keywordtype">int</span> index, <span class="keywordtype">void</span> *sender, <span class="keywordtype">void</span> *userData)>></div>
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  mCallbacks;</div>
<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  std::vector<void *> mCallbackUdata;</div>
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  std::vector<std::function<void(<span class="keywordtype">int</span> index, std::string name, <span class="keywordtype">void</span> *userData)>></div>
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  mStoreCallbacks;</div>
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  std::vector<void *> mStoreCallbackUdata;</div>
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  std::vector<std::function<void(std::string)>> mPresetsMapCbs;</div>
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  </div>
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  std::map<int, std::string> mPresetsMap;</div>
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span> };</div>
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  </div>
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span> } <span class="comment">// namespace al</span></div>
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  </div>
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span> <span class="preprocessor">#endif </span><span class="comment">// AL_PRESETHANDLER_H</span></div>
<div class="ttc" id="aclassal_1_1_parameter_bundle_html"><div class="ttname"><a href="classal_1_1_parameter_bundle.html">al::ParameterBundle</a></div><div class="ttdef"><b>Definition:</b> <a href="al___parameter_bundle_8hpp_source.html#l00056">al_ParameterBundle.hpp:56</a></div></div>
<div class="ttc" id="aclassal_1_1_parameter_meta_html"><div class="ttname"><a href="classal_1_1_parameter_meta.html">al::ParameterMeta</a></div><div class="ttdoc">The ParameterMeta class defines the base interface for Parameter metadata.</div><div class="ttdef"><b>Definition:</b> <a href="al___parameter_8hpp_source.html#l00246">al_Parameter.hpp:246</a></div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html"><div class="ttname"><a href="classal_1_1_preset_handler.html">al::PresetHandler</a></div><div class="ttdoc">The PresetHandler class handles sorting and recalling of presets.</div><div class="ttdef"><b>Definition:</b> <a href="al___preset_handler_8hpp_source.html#l00066">al_PresetHandler.hpp:66</a></div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a18738141a555059057aebf0093cef2b2"><div class="ttname"><a href="classal_1_1_preset_handler.html#a18738141a555059057aebf0093cef2b2">al::PresetHandler::skipParameter</a></div><div class="ttdeci">void skipParameter(std::string parameterAddr, bool skip=true)</div><div class="ttdoc">Add or remove a parameter address from group that will be skipped when recalling presets.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a282e28b8fd36aed9628cb633f87ce60a"><div class="ttname"><a href="classal_1_1_preset_handler.html#a282e28b8fd36aed9628cb633f87ce60a">al::PresetHandler::registerPresetMapCallback</a></div><div class="ttdeci">void registerPresetMapCallback(PresetMapCallback cb)</div><div class="ttdoc">Register a callback to be notified when preset map cahges.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a45b9dd476d3da2a948b5657c2fe624b4"><div class="ttname"><a href="classal_1_1_preset_handler.html#a45b9dd476d3da2a948b5657c2fe624b4">al::PresetHandler::loadPresetValues</a></div><div class="ttdeci">ParameterStates loadPresetValues(std::string name)</div><div class="ttdoc">load preset into parameter states data structure without setting values</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a4709bf7a38e14d33dd0c5511b31c036e"><div class="ttname"><a href="classal_1_1_preset_handler.html#a4709bf7a38e14d33dd0c5511b31c036e">al::PresetHandler::getRootPath</a></div><div class="ttdeci">std::string getRootPath()</div><div class="ttdoc">Base path without appending sub directory.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a53662c04fa7762ccc7a38919b3a84855"><div class="ttname"><a href="classal_1_1_preset_handler.html#a53662c04fa7762ccc7a38919b3a84855">al::PresetHandler::storePreset</a></div><div class="ttdeci">void storePreset(int index, std::string name="", bool overwrite=true)</div><div class="ttdoc">Store preset at index. The name argument specifies the preset name.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a57f9abe38727822e898332d498939a17"><div class="ttname"><a href="classal_1_1_preset_handler.html#a57f9abe38727822e898332d498939a17">al::PresetHandler::recallPreset</a></div><div class="ttdeci">std::string recallPreset(int index)</div><div class="ttdoc">Recall a preset by index number.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a5a6aa88f1adbf9ba7344954e00c9c1c5"><div class="ttname"><a href="classal_1_1_preset_handler.html#a5a6aa88f1adbf9ba7344954e00c9c1c5">al::PresetHandler::registerPresetCallback</a></div><div class="ttdeci">void registerPresetCallback(std::function< void(int index, void *sender, void *userData)> cb, void *userData=nullptr)</div><div class="ttdoc">Register a callback to be notified when a preset is loaded.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a6abeeb351d73cdcab020f66501746b2b"><div class="ttname"><a href="classal_1_1_preset_handler.html#a6abeeb351d73cdcab020f66501746b2b">al::PresetHandler::getCurrentPath</a></div><div class="ttdeci">std::string getCurrentPath()</div><div class="ttdoc">Path including subdirectory if any.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a6ae795cb7d0d1820f0c324c387157e4c"><div class="ttname"><a href="classal_1_1_preset_handler.html#a6ae795cb7d0d1820f0c324c387157e4c">al::PresetHandler::recallPresetSynchronous</a></div><div class="ttdeci">std::string recallPresetSynchronous(int index)</div><div class="ttdoc">recall immediately (not using the morph thread)</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a748184aef3b2be09d05c8c30832b9f38"><div class="ttname"><a href="classal_1_1_preset_handler.html#a748184aef3b2be09d05c8c30832b9f38">al::PresetHandler::stepMorphing</a></div><div class="ttdeci">void stepMorphing()</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a793c76f905c910036fdf227e1bd96107"><div class="ttname"><a href="classal_1_1_preset_handler.html#a793c76f905c910036fdf227e1bd96107">al::PresetHandler::useCallbacks</a></div><div class="ttdeci">void useCallbacks(bool use)</div><div class="ttdoc">useCallbacks determines whether to call the internal callbacks</div><div class="ttdef"><b>Definition:</b> <a href="al___preset_handler_8hpp_source.html#l00293">al_PresetHandler.hpp:293</a></div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a7bf371f43f8bf4bc0aa8974d0eafc81a"><div class="ttname"><a href="classal_1_1_preset_handler.html#a7bf371f43f8bf4bc0aa8974d0eafc81a">al::PresetHandler::PresetHandler</a></div><div class="ttdeci">PresetHandler(std::string rootDirectory, bool verbose=false)</div><div class="ttdoc">PresetHandler contructor.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a83323d48fb8629cda182c5fff3f57981"><div class="ttname"><a href="classal_1_1_preset_handler.html#a83323d48fb8629cda182c5fff3f57981">al::PresetHandler::savePresetValues</a></div><div class="ttdeci">bool savePresetValues(const ParameterStates &values, std::string presetName, bool overwrite=true)</div><div class="ttdoc">save list of parameter states into text preset file</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a9523969bf5482371e295abe866bafb3b"><div class="ttname"><a href="classal_1_1_preset_handler.html#a9523969bf5482371e295abe866bafb3b">al::PresetHandler::setInterpolatedPreset</a></div><div class="ttdeci">void setInterpolatedPreset(int index1, int index2, double factor)</div><div class="ttdoc">Set parameters to values interpolated between two presets.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a9a0f4e05ac8720fcb2201ae228a00c8e"><div class="ttname"><a href="classal_1_1_preset_handler.html#a9a0f4e05ac8720fcb2201ae228a00c8e">al::PresetHandler::storePreset</a></div><div class="ttdeci">void storePreset(std::string name)</div><div class="ttdoc">Stores preset.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_a9e2502eede5ec415d2c68717ca6d8a47"><div class="ttname"><a href="classal_1_1_preset_handler.html#a9e2502eede5ec415d2c68717ca6d8a47">al::PresetHandler::print</a></div><div class="ttdeci">void print()</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_aabbfff7533eb7de9737fab3f73fd377d"><div class="ttname"><a href="classal_1_1_preset_handler.html#aabbfff7533eb7de9737fab3f73fd377d">al::PresetHandler::registerStoreCallback</a></div><div class="ttdeci">void registerStoreCallback(std::function< void(int index, std::string name, void *userData)> cb, void *userData=nullptr)</div><div class="ttdoc">Register a callback to be notified when a preset is stored.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_ac3724b4c591f7cf0889731a936a9cbcc"><div class="ttname"><a href="classal_1_1_preset_handler.html#ac3724b4c591f7cf0889731a936a9cbcc">al::PresetHandler::asciiToPresetIndex</a></div><div class="ttdeci">static int asciiToPresetIndex(int ascii, int offset=0)</div><div class="ttdoc">Map QWERTY ascii keys to presets 0-49.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_ac6c3b5d90d00aec95352ebe81985ae85"><div class="ttname"><a href="classal_1_1_preset_handler.html#ac6c3b5d90d00aec95352ebe81985ae85">al::PresetHandler::setInterpolatedValues</a></div><div class="ttdeci">void setInterpolatedValues(ParameterStates &startValues, ParameterStates &endValues, double factor=1.0)</div><div class="ttdoc">Interpolate between start and end values according to factor.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_ae1422818d3dc64fa782cd32d6e9c7d5e"><div class="ttname"><a href="classal_1_1_preset_handler.html#ae1422818d3dc64fa782cd32d6e9c7d5e">al::PresetHandler::PresetHandler</a></div><div class="ttdeci">PresetHandler(TimeMasterMode timeMasterMode=TimeMasterMode::TIME_MASTER_CPU, std::string rootDirectory="presets", bool verbose=false)</div><div class="ttdoc">Constructor with option to set time master mode.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_af1c461dbd6b0ca71f56ef2a0654bd6fe"><div class="ttname"><a href="classal_1_1_preset_handler.html#af1c461dbd6b0ca71f56ef2a0654bd6fe">al::PresetHandler::registerMorphTimeCallback</a></div><div class="ttdeci">void registerMorphTimeCallback(Parameter::ParameterChangeCallback cb)</div><div class="ttdoc">Register a callback to be notified when morph time parameter is changed.</div></div>
<div class="ttc" id="aclassal_1_1_preset_handler_html_af53b0e0d2556b0d0170b14ea72a2386a"><div class="ttname"><a href="classal_1_1_preset_handler.html#af53b0e0d2556b0d0170b14ea72a2386a">al::PresetHandler::recallPreset</a></div><div class="ttdeci">void recallPreset(std::string name)</div><div class="ttdoc">Recall a preset by name.</div></div>
<div class="ttc" id="anamespaceal_html"><div class="ttname"><a href="namespaceal.html">al</a></div><div class="ttdef"><b>Definition:</b> <a href="al___app_8hpp_source.html#l00023">al_App.hpp:23</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_e6bb53534ac0e427887cf7a94c0c004e.html">C:</a></li><li class="navelem"><a class="el" href="dir_8ceffd4ee35c3518d4e8bdc7e638efe8.html">Users</a></li><li class="navelem"><a class="el" href="dir_d934af30b392b1c85e577a193a4f44d7.html">Andres</a></li><li class="navelem"><a class="el" href="dir_e68da7aceac684d2d8b9f1b11e1c2d97.html">source</a></li><li class="navelem"><a class="el" href="dir_fcc7705357f5b24b756c781e261be61a.html">repos</a></li><li class="navelem"><a class="el" href="dir_c3c6d9593ff25ad9938aa507653e60f1.html">casm_viewer</a></li><li class="navelem"><a class="el" href="dir_62b775495639e85334a47dd0b350fd78.html">external</a></li><li class="navelem"><a class="el" href="dir_b57b95b4f0b0651157add3c4117135ea.html">tinc</a></li><li class="navelem"><a class="el" href="dir_a51c8fbca25ad649a2e41de73b4ed7a8.html">external</a></li><li class="navelem"><a class="el" href="dir_f6b0d4003da5aa0ecdbed61a62e8b0a3.html">allolib</a></li><li class="navelem"><a class="el" href="dir_1a17cbf7a13c3de19497337dcee9a11d.html">include</a></li><li class="navelem"><a class="el" href="dir_c24702039c85b0e1007cbbfcdd096437.html">al</a></li><li class="navelem"><a class="el" href="dir_a24a66b9edd993d299c2ae0e22575268.html">ui</a></li><li class="navelem"><b>al_PresetHandler.hpp</b></li>
<li class="footer">Generated on Thu Apr 8 2021 13:24:23 for Allolib 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 </li>
</ul>
</div>
</body>
</html>