Mercurial > hg > vamp-docs
comparison code-docs/FixedTempoEstimator_8cpp_source.html @ 6:27319718b1f8 vamp-plugin-sdk-v2.7
Update code docs to v2.7 SDK
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2017 16:44:47 +0000 |
parents | 5c2683745b33 |
children |
comparison
equal
deleted
inserted
replaced
5:5c95f546f0b4 | 6:27319718b1f8 |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
2 <html xmlns="http://www.w3.org/1999/xhtml"> | 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | 4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/> | 5 <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
6 <meta name="generator" content="Doxygen 1.8.13"/> | |
7 <meta name="viewport" content="width=device-width, initial-scale=1"/> | |
6 <title>VampPluginSDK: FixedTempoEstimator.cpp Source File</title> | 8 <title>VampPluginSDK: FixedTempoEstimator.cpp Source File</title> |
7 | |
8 <link href="tabs.css" rel="stylesheet" type="text/css"/> | 9 <link href="tabs.css" rel="stylesheet" type="text/css"/> |
9 <link href="doxygen.css" rel="stylesheet" type="text/css" /> | 10 <script type="text/javascript" src="jquery.js"></script> |
11 <script type="text/javascript" src="dynsections.js"></script> | |
10 <link href="navtree.css" rel="stylesheet" type="text/css"/> | 12 <link href="navtree.css" rel="stylesheet" type="text/css"/> |
11 <script type="text/javascript" src="jquery.js"></script> | |
12 <script type="text/javascript" src="resize.js"></script> | 13 <script type="text/javascript" src="resize.js"></script> |
14 <script type="text/javascript" src="navtreedata.js"></script> | |
13 <script type="text/javascript" src="navtree.js"></script> | 15 <script type="text/javascript" src="navtree.js"></script> |
14 <script type="text/javascript"> | 16 <script type="text/javascript"> |
15 $(document).ready(initResizable); | 17 $(document).ready(initResizable); |
16 </script> | 18 </script> |
17 | 19 <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
18 | |
19 </head> | 20 </head> |
20 <body> | 21 <body> |
21 <div id="top"><!-- do not remove this div! --> | 22 <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
22 | |
23 | |
24 <div id="titlearea"> | 23 <div id="titlearea"> |
25 <table cellspacing="0" cellpadding="0"> | 24 <table cellspacing="0" cellpadding="0"> |
26 <tbody> | 25 <tbody> |
27 <tr style="height: 56px;"> | 26 <tr style="height: 56px;"> |
28 | 27 <td id="projectalign" style="padding-left: 0.5em;"> |
29 | |
30 <td style="padding-left: 0.5em;"> | |
31 <div id="projectname">VampPluginSDK | 28 <div id="projectname">VampPluginSDK |
32  <span id="projectnumber">2.4</span> | 29  <span id="projectnumber">2.7</span> |
33 </div> | 30 </div> |
34 | |
35 </td> | 31 </td> |
36 | |
37 | |
38 | |
39 </tr> | 32 </tr> |
40 </tbody> | 33 </tbody> |
41 </table> | 34 </table> |
42 </div> | 35 </div> |
43 | 36 <!-- end header part --> |
44 <!-- Generated by Doxygen 1.8.0 --> | 37 <!-- Generated by Doxygen 1.8.13 --> |
45 <div id="navrow1" class="tabs"> | 38 <script type="text/javascript" src="menudata.js"></script> |
46 <ul class="tablist"> | 39 <script type="text/javascript" src="menu.js"></script> |
47 <li><a href="index.html"><span>Main Page</span></a></li> | 40 <script type="text/javascript"> |
48 <li><a href="namespaces.html"><span>Namespaces</span></a></li> | 41 $(function() { |
49 <li><a href="annotated.html"><span>Classes</span></a></li> | 42 initMenu('',false,false,'search.php','Search'); |
50 <li class="current"><a href="files.html"><span>Files</span></a></li> | 43 }); |
51 <li><a href="dirs.html"><span>Directories</span></a></li> | 44 </script> |
52 </ul> | 45 <div id="main-nav"></div> |
53 </div> | 46 </div><!-- top --> |
54 <div id="navrow2" class="tabs2"> | |
55 <ul class="tablist"> | |
56 <li><a href="files.html"><span>File List</span></a></li> | |
57 <li><a href="globals.html"><span>File Members</span></a></li> | |
58 </ul> | |
59 </div> | |
60 </div> | |
61 <div id="side-nav" class="ui-resizable side-nav-resizable"> | 47 <div id="side-nav" class="ui-resizable side-nav-resizable"> |
62 <div id="nav-tree"> | 48 <div id="nav-tree"> |
63 <div id="nav-tree-contents"> | 49 <div id="nav-tree-contents"> |
50 <div id="nav-sync" class="sync"></div> | |
64 </div> | 51 </div> |
65 </div> | 52 </div> |
66 <div id="splitbar" style="-moz-user-select:none;" | 53 <div id="splitbar" style="-moz-user-select:none;" |
67 class="ui-resizable-handle"> | 54 class="ui-resizable-handle"> |
68 </div> | 55 </div> |
69 </div> | 56 </div> |
70 <script type="text/javascript"> | 57 <script type="text/javascript"> |
71 initNavTree('FixedTempoEstimator_8cpp.html',''); | 58 $(document).ready(function(){initNavTree('FixedTempoEstimator_8cpp_source.html','');}); |
72 </script> | 59 </script> |
73 <div id="doc-content"> | 60 <div id="doc-content"> |
74 <div class="header"> | 61 <div class="header"> |
75 <div class="headertitle"> | 62 <div class="headertitle"> |
76 <div class="title">FixedTempoEstimator.cpp</div> </div> | 63 <div class="title">FixedTempoEstimator.cpp</div> </div> |
77 </div><!--header--> | 64 </div><!--header--> |
78 <div class="contents"> | 65 <div class="contents"> |
79 <a href="FixedTempoEstimator_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */</span> | 66 <a href="FixedTempoEstimator_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">/*</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Vamp</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> An API for audio analysis and feature extraction plugins.</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> Centre for Digital Music, Queen Mary, University of London.</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> Copyright 2006-2009 Chris Cannam and QMUL.</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"> Permission is hereby granted, free of charge, to any person</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> obtaining a copy of this software and associated documentation</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> files (the "Software"), to deal in the Software without</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> restriction, including without limitation the rights to use, copy,</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> modify, merge, publish, distribute, sublicense, and/or sell copies</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"></span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> The above copyright notice and this permission notice shall be</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> included in all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"></span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> Except as contained in this notice, the names of the Centre for</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> Digital Music; Queen Mary, University of London; and Chris Cannam</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"> shall not be used in advertising or otherwise to promote the sale,</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> use or other dealings in this Software without prior written</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"> authorization.</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">*/</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include "<a class="code" href="FixedTempoEstimator_8h.html">FixedTempoEstimator.h</a>"</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">using</span> std::string;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">using</span> std::vector;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">using</span> std::cerr;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="keyword">using</span> std::endl;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="keyword">using</span> <a class="code" href="structVamp_1_1RealTime.html">Vamp::RealTime</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#include <cmath></span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#include <cstdio></span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html"> 50</a></span> <span class="keyword">class </span><a class="code" href="classFixedTempoEstimator_1_1D.html">FixedTempoEstimator::D</a></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment">// this class just avoids us having to declare any data members in the header</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="keyword">public</span>:</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a104a9b64d47eca678844584f69ca0b9d">D</a>(<span class="keywordtype">float</span> inputSampleRate);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a78a63ac8bbf342cb0405747871adf4cc">~D</a>();</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#af766d753c0e468470fbca43620164aa4"> 57</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#af766d753c0e468470fbca43620164aa4">getPreferredStepSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 64; }</div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a12f1c5dc6b1101a9c8a91e4f3eaed4b7"> 58</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a12f1c5dc6b1101a9c8a91e4f3eaed4b7">getPreferredBlockSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 256; }</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <a class="code" href="classVamp_1_1PluginBase.html#a3b6bb4bbd86affe1ca9deceea1aad4f8">ParameterList</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#aa8c27a6743d666f6d33227374d84360c">getParameterDescriptors</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a18751bfd7126626178bbf5987144c060">getParameter</a>(<span class="keywordtype">string</span> <span class="keywordtype">id</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordtype">void</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a6cafa64d4cc8aa3556bc0ce6b0c49bc4">setParameter</a>(<span class="keywordtype">string</span> <span class="keywordtype">id</span>, <span class="keywordtype">float</span> value);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">OutputList</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a61ce207b248cabe87ca757a858b16e87">getOutputDescriptors</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordtype">bool</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#af0fcad4493650728babb7e341963c91d">initialise</a>(<span class="keywordtype">size_t</span> channels, <span class="keywordtype">size_t</span> stepSize, <span class="keywordtype">size_t</span> blockSize);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordtype">void</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#af5ac8147bfe79371d00aba8a19c2f8fd">reset</a>();</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a7fac74fc9fc54f436408705d1e125e20">process</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> *<span class="keyword">const</span> *, <a class="code" href="structVamp_1_1RealTime.html">RealTime</a>);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a7f9c3603bb3374d6936885010dbdd82b">getRemainingFeatures</a>();</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordtype">void</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a4f2cbc11fba5bc8af3fd2a0078156091">calculate</a>();</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a20389ba1515f6ce4181d3f41e5c4f347">assembleFeatures</a>();</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> </div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">lag2tempo</a>(<span class="keywordtype">int</span>);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordtype">int</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#ac6a75212293fc855de6ed0c6581a0fb9">tempo2lag</a>(<span class="keywordtype">float</span>);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f"> 78</a></span>  <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f"> 79</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>;</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8"> 80</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">m_blockSize</a>;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a768fdbb62e4b21a39897963fdbd486ed"> 82</a></span>  <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a768fdbb62e4b21a39897963fdbd486ed">m_minbpm</a>;</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a33e8d045b222addc6173b50df2553ba8"> 83</a></span>  <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a33e8d045b222addc6173b50df2553ba8">m_maxbpm</a>;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#aca506973452865d436e07462eabdebad"> 84</a></span>  <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#aca506973452865d436e07462eabdebad">m_maxdflen</a>;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad"> 86</a></span>  <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a>;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663"> 88</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a>;</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396"> 89</a></span>  <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>;</div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538"> 90</a></span>  <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167"> 91</a></span>  <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>;</div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c"> 92</a></span>  <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983"> 93</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a>;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0"> 95</a></span>  <a class="code" href="structVamp_1_1RealTime.html">Vamp::RealTime</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">m_start</a>;</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#abacd5ff19c301020efb99c03136b849a"> 96</a></span>  <a class="code" href="structVamp_1_1RealTime.html">Vamp::RealTime</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#abacd5ff19c301020efb99c03136b849a">m_lasttime</a>;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> };</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a104a9b64d47eca678844584f69ca0b9d"> 99</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a104a9b64d47eca678844584f69ca0b9d">FixedTempoEstimator::D::D</a>(<span class="keywordtype">float</span> inputSampleRate) :</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>(inputSampleRate),</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>(0),</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">m_blockSize</a>(0),</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a768fdbb62e4b21a39897963fdbd486ed">m_minbpm</a>(50),</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a33e8d045b222addc6173b50df2553ba8">m_maxbpm</a>(190),</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#aca506973452865d436e07462eabdebad">m_maxdflen</a>(10),</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a>(0),</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>(0),</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>(0),</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>(0),</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>(0),</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a>(0)</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> {</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> </div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a78a63ac8bbf342cb0405747871adf4cc"> 115</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a78a63ac8bbf342cb0405747871adf4cc">FixedTempoEstimator::D::~D</a>()</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> {</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keyword">delete</span>[] <a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a>;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keyword">delete</span>[] <a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keyword">delete</span>[] <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keyword">delete</span>[] <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keyword">delete</span>[] <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> }</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> <a class="code" href="classVamp_1_1PluginBase.html#a3b6bb4bbd86affe1ca9deceea1aad4f8">FixedTempoEstimator::ParameterList</a></div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#aa8c27a6743d666f6d33227374d84360c"> 125</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#aa8c27a6743d666f6d33227374d84360c">FixedTempoEstimator::D::getParameterDescriptors</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="keyword"></span>{</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <a class="code" href="classVamp_1_1PluginBase.html#a3b6bb4bbd86affe1ca9deceea1aad4f8">ParameterList</a> list;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span> </div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html">ParameterDescriptor</a> d;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a116fd9f0dc94c2bc4bbc60b5443c598c">identifier</a> = <span class="stringliteral">"minbpm"</span>;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a0ecebb94fb4ada4aad2640e20aa57084">name</a> = <span class="stringliteral">"Minimum estimated tempo"</span>;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a780ddad41e433d85c82f9ea4d959cbaf">description</a> = <span class="stringliteral">"Minimum beat-per-minute value which the tempo estimator is able to return"</span>;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a3bc3df322e4c02e17e96bc6d44982d7b">unit</a> = <span class="stringliteral">"bpm"</span>;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab3e4d84f5bc199eea8b642b27e425ec8">minValue</a> = 10;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab934b20dd708228a0e3c2811a3e2cec4">maxValue</a> = 360;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#aec4ef77451ec02193ecc4a0856673fbc">defaultValue</a> = 50;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a7c556d58d552f737ee5a34efdf7f9425">isQuantized</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  list.push_back(d);</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> </div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a116fd9f0dc94c2bc4bbc60b5443c598c">identifier</a> = <span class="stringliteral">"maxbpm"</span>;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a0ecebb94fb4ada4aad2640e20aa57084">name</a> = <span class="stringliteral">"Maximum estimated tempo"</span>;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a780ddad41e433d85c82f9ea4d959cbaf">description</a> = <span class="stringliteral">"Maximum beat-per-minute value which the tempo estimator is able to return"</span>;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#aec4ef77451ec02193ecc4a0856673fbc">defaultValue</a> = 190;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  list.push_back(d);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a116fd9f0dc94c2bc4bbc60b5443c598c">identifier</a> = <span class="stringliteral">"maxdflen"</span>;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a0ecebb94fb4ada4aad2640e20aa57084">name</a> = <span class="stringliteral">"Input duration to study"</span>;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a780ddad41e433d85c82f9ea4d959cbaf">description</a> = <span class="stringliteral">"Length of audio input, in seconds, which should be taken into account when estimating tempo. There is no need to supply the plugin with any further input once this time has elapsed since the start of the audio. The tempo estimator may use only the first part of this, up to eight times the slowest beat duration: increasing this value further than that is unlikely to improve results."</span>;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a3bc3df322e4c02e17e96bc6d44982d7b">unit</a> = <span class="stringliteral">"s"</span>;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab3e4d84f5bc199eea8b642b27e425ec8">minValue</a> = 2;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab934b20dd708228a0e3c2811a3e2cec4">maxValue</a> = 40;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#aec4ef77451ec02193ecc4a0856673fbc">defaultValue</a> = 10;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  list.push_back(d);</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordflow">return</span> list;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> }</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span> </div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="keywordtype">float</span></div><div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a18751bfd7126626178bbf5987144c060"> 159</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a18751bfd7126626178bbf5987144c060">FixedTempoEstimator::D::getParameter</a>(<span class="keywordtype">string</span> <span class="keywordtype">id</span>)<span class="keyword"> const</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="keyword"></span>{</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"minbpm"</span>) {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a768fdbb62e4b21a39897963fdbd486ed">m_minbpm</a>;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"maxbpm"</span>) {</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a33e8d045b222addc6173b50df2553ba8">m_maxbpm</a>;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"maxdflen"</span>) {</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#aca506973452865d436e07462eabdebad">m_maxdflen</a>;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  }</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keywordflow">return</span> 0.f;</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> }</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> </div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="keywordtype">void</span></div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a6cafa64d4cc8aa3556bc0ce6b0c49bc4"> 172</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a6cafa64d4cc8aa3556bc0ce6b0c49bc4">FixedTempoEstimator::D::setParameter</a>(<span class="keywordtype">string</span> <span class="keywordtype">id</span>, <span class="keywordtype">float</span> value)</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"minbpm"</span>) {</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a768fdbb62e4b21a39897963fdbd486ed">m_minbpm</a> = value;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"maxbpm"</span>) {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a33e8d045b222addc6173b50df2553ba8">m_maxbpm</a> = value;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"maxdflen"</span>) {</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#aca506973452865d436e07462eabdebad">m_maxdflen</a> = value;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  }</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span> }</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="FixedTempoEstimator_8cpp.html#a7a8511e62dffb5334ad3b70d57b2fcee"> 183</a></span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#a7a8511e62dffb5334ad3b70d57b2fcee">TempoOutput</a> = 0;</div><div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="FixedTempoEstimator_8cpp.html#a554b16c6b7516530e52c65318bfe08eb"> 184</a></span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#a554b16c6b7516530e52c65318bfe08eb">CandidatesOutput</a> = 1;</div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="FixedTempoEstimator_8cpp.html#acaa4524f29afce03c812a88ff31159c1"> 185</a></span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#acaa4524f29afce03c812a88ff31159c1">DFOutput</a> = 2;</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="FixedTempoEstimator_8cpp.html#a382c1fe740ac8911c6078cfbceffc870"> 186</a></span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#a382c1fe740ac8911c6078cfbceffc870">ACFOutput</a> = 3;</div><div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="FixedTempoEstimator_8cpp.html#a5b284021783d79785d46b043b458368d"> 187</a></span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#a5b284021783d79785d46b043b458368d">FilteredACFOutput</a> = 4;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span> <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">FixedTempoEstimator::OutputList</a></div><div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a61ce207b248cabe87ca757a858b16e87"> 190</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a61ce207b248cabe87ca757a858b16e87">FixedTempoEstimator::D::getOutputDescriptors</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span> <span class="keyword"></span>{</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">OutputList</a> list;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html">OutputDescriptor</a> d;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b">identifier</a> = <span class="stringliteral">"tempo"</span>;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87">name</a> = <span class="stringliteral">"Tempo"</span>;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1">description</a> = <span class="stringliteral">"Estimated tempo"</span>;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4">unit</a> = <span class="stringliteral">"bpm"</span>;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d">hasFixedBinCount</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#afdd006959a995e40ef7d565a3a4df6dc">binCount</a> = 1;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31">hasKnownExtents</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a1b4858928d23bfd7d5bc557c82a83fb4">isQuantized</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a0d1194980d44e31b25ef3b4b070d6b5d">sampleType</a> = <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#abffa9ed50cd756df70fd51f0355f448cadea995a737867f7b22b52f1c43c5432e">OutputDescriptor::VariableSampleRate</a>;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#add0cbbdfa9c91764037c39365b1d42af">sampleRate</a> = <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab0d7cc6ab19e53b5bd12ee234f549ea3">hasDuration</a> = <span class="keyword">true</span>; <span class="comment">// our returned tempo spans a certain range</span></div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  list.push_back(d);</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>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b">identifier</a> = <span class="stringliteral">"candidates"</span>;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87">name</a> = <span class="stringliteral">"Tempo candidates"</span>;</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1">description</a> = <span class="stringliteral">"Possible tempo estimates, one per bin with the most likely in the first bin"</span>;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4">unit</a> = <span class="stringliteral">"bpm"</span>;</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d">hasFixedBinCount</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  list.push_back(d);</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span> </div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b">identifier</a> = <span class="stringliteral">"detectionfunction"</span>;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87">name</a> = <span class="stringliteral">"Detection Function"</span>;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1">description</a> = <span class="stringliteral">"Onset detection function"</span>;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4">unit</a> = <span class="stringliteral">""</span>;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d">hasFixedBinCount</a> = 1;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#afdd006959a995e40ef7d565a3a4df6dc">binCount</a> = 1;</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31">hasKnownExtents</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ac9f5924c0be7571bba8e7ae7e7a921f4">minValue</a> = 0.0;</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a907b4e8fbb48a46ac5a05f880d72719f">maxValue</a> = 1.0;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a1b4858928d23bfd7d5bc557c82a83fb4">isQuantized</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a3bed37153067b625b95acb40b60dbf0b">quantizeStep</a> = 0.0;</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a0d1194980d44e31b25ef3b4b070d6b5d">sampleType</a> = <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#abffa9ed50cd756df70fd51f0355f448ca4c74bd2fc96dfe2815623f94b40e5629">OutputDescriptor::FixedSampleRate</a>;</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>) {</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#add0cbbdfa9c91764037c39365b1d42af">sampleRate</a> = <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a> / <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#add0cbbdfa9c91764037c39365b1d42af">sampleRate</a> = <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a> / (<a class="code" href="classFixedTempoEstimator_1_1D.html#a12f1c5dc6b1101a9c8a91e4f3eaed4b7">getPreferredBlockSize</a>()/2);</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  }</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab0d7cc6ab19e53b5bd12ee234f549ea3">hasDuration</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  list.push_back(d);</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span> </div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b">identifier</a> = <span class="stringliteral">"acf"</span>;</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87">name</a> = <span class="stringliteral">"Autocorrelation Function"</span>;</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1">description</a> = <span class="stringliteral">"Autocorrelation of onset detection function"</span>;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31">hasKnownExtents</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4">unit</a> = <span class="stringliteral">"r"</span>;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  list.push_back(d);</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> </div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b">identifier</a> = <span class="stringliteral">"filtered_acf"</span>;</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87">name</a> = <span class="stringliteral">"Filtered Autocorrelation"</span>;</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1">description</a> = <span class="stringliteral">"Filtered autocorrelation of onset detection function"</span>;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4">unit</a> = <span class="stringliteral">"r"</span>;</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  list.push_back(d);</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span> </div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordflow">return</span> list;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span> }</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span> </div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> <span class="keywordtype">bool</span></div><div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#af0fcad4493650728babb7e341963c91d"> 252</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#af0fcad4493650728babb7e341963c91d">FixedTempoEstimator::D::initialise</a>(<span class="keywordtype">size_t</span>, <span class="keywordtype">size_t</span> stepSize, <span class="keywordtype">size_t</span> blockSize)</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span> {</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a> = stepSize;</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">m_blockSize</a> = blockSize;</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span> </div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordtype">float</span> dfLengthSecs = <a class="code" href="classFixedTempoEstimator_1_1D.html#aca506973452865d436e07462eabdebad">m_maxdflen</a>;</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a> = (dfLengthSecs * <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>) / <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>;</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span> </div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[<a class="code" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">m_blockSize</a>/2];</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[<a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a>];</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> </div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < <a class="code" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">m_blockSize</a>/2; ++i) {</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a>[i] = 0.f;</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  }</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < <a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a>; ++i) {</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>[i] = 0.f;</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  }</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>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a> = 0;</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>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</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> </div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="keywordtype">void</span></div><div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#af5ac8147bfe79371d00aba8a19c2f8fd"> 276</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#af5ac8147bfe79371d00aba8a19c2f8fd">FixedTempoEstimator::D::reset</a>()</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> {</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="keywordflow">if</span> (!<a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span> </div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < <a class="code" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">m_blockSize</a>/2; ++i) {</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a>[i] = 0.f;</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="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < <a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a>; ++i) {</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>[i] = 0.f;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  }</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span> </div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="keyword">delete</span>[] <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a> = 0;</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span> </div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keyword">delete</span>[] <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>; </div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a> = 0;</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span> </div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keyword">delete</span>[] <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>; </div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a> = 0;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span> </div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a> = 0;</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span> </div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">m_start</a> = RealTime::zeroTime;</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#abacd5ff19c301020efb99c03136b849a">m_lasttime</a> = RealTime::zeroTime;</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span> }</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span> </div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a></div><div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a7fac74fc9fc54f436408705d1e125e20"> 303</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a7fac74fc9fc54f436408705d1e125e20">FixedTempoEstimator::D::process</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> *<span class="keyword">const</span> *inputBuffers, <a class="code" href="structVamp_1_1RealTime.html">RealTime</a> ts)</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span> {</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> fs;</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span> </div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a> == 0) {</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  cerr << <span class="stringliteral">"ERROR: FixedTempoEstimator::process: "</span></div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  << <span class="stringliteral">"FixedTempoEstimator has not been initialised"</span></div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  << endl;</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="keywordflow">return</span> fs;</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  }</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span> </div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a> == 0) <a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">m_start</a> = ts;</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#abacd5ff19c301020efb99c03136b849a">m_lasttime</a> = ts;</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span> </div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a> == <a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a>) {</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  <span class="comment">// If we have seen enough input, do the estimation and return</span></div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a4f2cbc11fba5bc8af3fd2a0078156091">calculate</a>();</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  fs = <a class="code" href="classFixedTempoEstimator_1_1D.html#a20389ba1515f6ce4181d3f41e5c4f347">assembleFeatures</a>();</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  ++<a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a>;</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">return</span> fs;</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  }</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span> </div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  <span class="comment">// If we have seen more than enough, just discard and return!</span></div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a> > <a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a>) <span class="keywordflow">return</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a>();</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span> </div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  <span class="keywordtype">float</span> value = 0.f;</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span> </div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  <span class="comment">// m_df will contain an onset detection function based on the rise</span></div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <span class="comment">// in overall power from one spectral frame to the next --</span></div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <span class="comment">// simplistic but reasonably effective for our purposes.</span></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="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i < <a class="code" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">m_blockSize</a>/2; ++i) {</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span> </div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  <span class="keywordtype">float</span> real = inputBuffers[0][i*2];</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <span class="keywordtype">float</span> imag = inputBuffers[0][i*2 + 1];</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span> </div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="keywordtype">float</span> sqrmag = real * real + imag * imag;</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  value += fabsf(sqrmag - <a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a>[i]);</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span> </div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a>[i] = sqrmag;</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> </div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>[<a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a>] = value;</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span> </div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  ++<a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a>;</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="keywordflow">return</span> fs;</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</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> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a></div><div class="line"><a name="l00352"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a7f9c3603bb3374d6936885010dbdd82b"> 352</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a7f9c3603bb3374d6936885010dbdd82b">FixedTempoEstimator::D::getRemainingFeatures</a>()</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span> {</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> fs;</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a> > <a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a>) <span class="keywordflow">return</span> fs;</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a4f2cbc11fba5bc8af3fd2a0078156091">calculate</a>();</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  fs = <a class="code" href="classFixedTempoEstimator_1_1D.html#a20389ba1515f6ce4181d3f41e5c4f347">assembleFeatures</a>();</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  ++<a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a>;</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keywordflow">return</span> fs;</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span> }</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span> </div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span> <span class="keywordtype">float</span></div><div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5"> 363</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">FixedTempoEstimator::D::lag2tempo</a>(<span class="keywordtype">int</span> lag)</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span> {</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="keywordflow">return</span> 60.f / ((lag * <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>) / <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>);</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span> }</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> <span class="keywordtype">int</span></div><div class="line"><a name="l00369"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#ac6a75212293fc855de6ed0c6581a0fb9"> 369</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#ac6a75212293fc855de6ed0c6581a0fb9">FixedTempoEstimator::D::tempo2lag</a>(<span class="keywordtype">float</span> tempo)</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span> {</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <span class="keywordflow">return</span> ((60.f / tempo) * <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>) / <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>;</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span> }</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span> </div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span> <span class="keywordtype">void</span></div><div class="line"><a name="l00375"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a4f2cbc11fba5bc8af3fd2a0078156091"> 375</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a4f2cbc11fba5bc8af3fd2a0078156091">FixedTempoEstimator::D::calculate</a>()</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span> { </div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>) {</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  cerr << <span class="stringliteral">"FixedTempoEstimator::calculate: calculation already happened?"</span> << endl;</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="keywordflow">return</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> </div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a> < <a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a> / 9 &&</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a> < (1.0 * <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>) / <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>) { <span class="comment">// 1 second</span></div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  cerr << <span class="stringliteral">"FixedTempoEstimator::calculate: Input is too short"</span> << endl;</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  }</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span> </div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="comment">// This function takes m_df (the detection function array filled</span></div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  <span class="comment">// out in process()) and calculates m_r (the raw autocorrelation)</span></div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  <span class="comment">// and m_fr (the filtered autocorrelation from whose peaks tempo</span></div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  <span class="comment">// estimates will be taken).</span></div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span> </div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  <span class="keywordtype">int</span> n = <a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a>; <span class="comment">// length of actual df array (m_dfsize is the theoretical max)</span></div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span> </div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[n/2]; <span class="comment">// raw autocorrelation</span></div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[n/2]; <span class="comment">// filtered autocorrelation</span></div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[n/2]; <span class="comment">// averaged tempo estimate for each lag value</span></div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span> </div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n/2; ++i) {</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[i] = 0.f;</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i] = 0.f;</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>[i] = <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">lag2tempo</a>(i);</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  }</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span> </div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <span class="comment">// Calculate the raw autocorrelation of the detection function</span></div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span> </div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n/2; ++i) {</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span> </div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i; j < n; ++j) {</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[i] += <a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>[j] * <a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>[j - i];</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  }</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span> </div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[i] /= n - i - 1;</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  }</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span> </div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="comment">// Filter the autocorrelation and average out the tempo estimates</span></div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  </div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordtype">float</span> related[] = { 0.5, 2, 4, 8 };</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span> </div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i < n/2-1; ++i) {</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span> </div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i] = <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[i];</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span> </div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <span class="keywordtype">int</span> div = 1;</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span> </div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < int(<span class="keyword">sizeof</span>(related)/<span class="keyword">sizeof</span>(related[0])); ++j) {</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span> </div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <span class="comment">// Check for an obvious peak at each metrically related lag</span></div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span> </div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="keywordtype">int</span> k0 = int(i * related[j] + 0.5);</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span> </div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <span class="keywordflow">if</span> (k0 >= 0 && k0 < <span class="keywordtype">int</span>(n/2)) {</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span> </div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  <span class="keywordtype">int</span> kmax = 0;</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keywordtype">float</span> kvmax = 0, kvmin = 0;</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="keywordtype">bool</span> have = <span class="keyword">false</span>;</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span> </div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = k0 - 1; k <= k0 + 1; ++k) {</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span> </div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <span class="keywordflow">if</span> (k < 0 || k >= n/2) <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span> </div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="keywordflow">if</span> (!have || (<a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[k] > kvmax)) { kvmax = <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[k]; kmax = k; }</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  <span class="keywordflow">if</span> (!have || (<a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[k] < kvmin)) { kvmin = <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[k]; }</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  </div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  have = <span class="keyword">true</span>;</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  }</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  </div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  <span class="comment">// Boost the original lag according to the strongest</span></div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  <span class="comment">// value found close to this related lag</span></div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span> </div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i] += <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[kmax] / 5;</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span> </div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  <span class="keywordflow">if</span> ((kmax == 0 || <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[kmax] > <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[kmax-1]) &&</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  (kmax == n/2-1 || <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[kmax] > <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[kmax+1]) &&</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  kvmax > kvmin * 1.05) {</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span> </div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <span class="comment">// The strongest value close to the related lag is</span></div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <span class="comment">// also a pretty good looking peak, so use it to</span></div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="comment">// improve our tempo estimate for the original lag</span></div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  </div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>[i] = <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>[i] + <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">lag2tempo</a>(kmax) * related[j];</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  ++div;</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  }</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  }</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  }</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  </div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>[i] /= div;</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  </div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  <span class="comment">// Finally apply a primitive perceptual weighting (to prefer</span></div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <span class="comment">// tempi of around 120-130)</span></div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span> </div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  <span class="keywordtype">float</span> weight = 1.f - fabsf(128.f - <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">lag2tempo</a>(i)) * 0.005;</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  <span class="keywordflow">if</span> (weight < 0.f) weight = 0.f;</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  weight = weight * weight * weight;</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span> </div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i] += <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i] * (weight / 3);</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  }</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span> }</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  </div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a></div><div class="line"><a name="l00481"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator_1_1D.html#a20389ba1515f6ce4181d3f41e5c4f347"> 481</a></span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a20389ba1515f6ce4181d3f41e5c4f347">FixedTempoEstimator::D::assembleFeatures</a>()</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span> {</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> fs;</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <span class="keywordflow">if</span> (!<a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>) <span class="keywordflow">return</span> fs; <span class="comment">// No autocorrelation: no results</span></div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span> </div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  <a class="code" href="structVamp_1_1Plugin_1_1Feature.html">Feature</a> feature;</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a98907091d0b6a589720ae35ae588a82b">hasTimestamp</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a33686757bd4481c72494122e9bfb9fba">hasDuration</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036">label</a> = <span class="stringliteral">""</span>;</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>.clear();</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>.push_back(0.f);</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span> </div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  <span class="keywordtype">char</span> buffer[40];</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span> </div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  <span class="keywordtype">int</span> n = <a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a>;</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span> </div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n; ++i) {</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span> </div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  <span class="comment">// Return the detection function in the DF output</span></div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span> </div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#acaa605f36839c07e76f4882f5e22d8d7">timestamp</a> = <a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">m_start</a> +</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  RealTime::frame2RealTime(i * <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>, <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>);</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>[0] = <a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>[i];</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036">label</a> = <span class="stringliteral">""</span>;</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  fs[<a class="code" href="FixedTempoEstimator_8cpp.html#acaa4524f29afce03c812a88ff31159c1">DFOutput</a>].push_back(feature);</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  }</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span> </div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i < n/2; ++i) {</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span> </div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  <span class="comment">// Return the raw autocorrelation in the ACF output, each</span></div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="comment">// value labelled according to its corresponding tempo</span></div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span> </div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#acaa605f36839c07e76f4882f5e22d8d7">timestamp</a> = <a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">m_start</a> +</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  RealTime::frame2RealTime(i * <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>, <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>);</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>[0] = <a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>[i];</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  sprintf(buffer, <span class="stringliteral">"%.1f bpm"</span>, <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">lag2tempo</a>(i));</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="keywordflow">if</span> (i == n/2-1) feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036">label</a> = <span class="stringliteral">""</span>;</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  <span class="keywordflow">else</span> feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036">label</a> = buffer;</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  fs[<a class="code" href="FixedTempoEstimator_8cpp.html#a382c1fe740ac8911c6078cfbceffc870">ACFOutput</a>].push_back(feature);</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  }</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span> </div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <span class="keywordtype">float</span> t0 = <a class="code" href="classFixedTempoEstimator_1_1D.html#a768fdbb62e4b21a39897963fdbd486ed">m_minbpm</a>; <span class="comment">// our minimum detected tempo</span></div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  <span class="keywordtype">float</span> t1 = <a class="code" href="classFixedTempoEstimator_1_1D.html#a33e8d045b222addc6173b50df2553ba8">m_maxbpm</a>; <span class="comment">// our maximum detected tempo</span></div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span> </div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  <span class="keywordtype">int</span> p0 = <a class="code" href="classFixedTempoEstimator_1_1D.html#ac6a75212293fc855de6ed0c6581a0fb9">tempo2lag</a>(t1);</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  <span class="keywordtype">int</span> p1 = <a class="code" href="classFixedTempoEstimator_1_1D.html#ac6a75212293fc855de6ed0c6581a0fb9">tempo2lag</a>(t0);</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span> </div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  std::map<float, int> candidates;</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span> </div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = p0; i <= p1 && i+1 < n/2; ++i) {</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span> </div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i] > <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i-1] &&</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i] > <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i+1]) {</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span> </div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  <span class="comment">// This is a peak in the filtered autocorrelation: stick</span></div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  <span class="comment">// it into the map from filtered autocorrelation to lag</span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  <span class="comment">// index -- this sorts our peaks by filtered acf value</span></div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span> </div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  candidates[<a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i]] = i;</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  }</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span> </div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  <span class="comment">// Also return the filtered autocorrelation in its own output</span></div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span> </div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#acaa605f36839c07e76f4882f5e22d8d7">timestamp</a> = <a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">m_start</a> +</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  RealTime::frame2RealTime(i * <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>, <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>);</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>[0] = <a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>[i];</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  sprintf(buffer, <span class="stringliteral">"%.1f bpm"</span>, <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">lag2tempo</a>(i));</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  <span class="keywordflow">if</span> (i == p1 || i == n/2-2) feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036">label</a> = <span class="stringliteral">""</span>;</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  <span class="keywordflow">else</span> feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036">label</a> = buffer;</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  fs[<a class="code" href="FixedTempoEstimator_8cpp.html#a5b284021783d79785d46b043b458368d">FilteredACFOutput</a>].push_back(feature);</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  }</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span> </div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  <span class="keywordflow">if</span> (candidates.empty()) {</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  cerr << <span class="stringliteral">"No tempo candidates!"</span> << endl;</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  <span class="keywordflow">return</span> fs;</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  }</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span> </div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a98907091d0b6a589720ae35ae588a82b">hasTimestamp</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#acaa605f36839c07e76f4882f5e22d8d7">timestamp</a> = <a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">m_start</a>;</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  </div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a33686757bd4481c72494122e9bfb9fba">hasDuration</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#af687c0a7fe041757e922ec296862b115">duration</a> = <a class="code" href="classFixedTempoEstimator_1_1D.html#abacd5ff19c301020efb99c03136b849a">m_lasttime</a> - <a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">m_start</a>;</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span> </div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  <span class="comment">// The map contains only peaks and is sorted by filtered acf</span></div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>  <span class="comment">// value, so the final element in it is our "best" tempo guess</span></div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span> </div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  std::map<float, int>::const_iterator ci = candidates.end();</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  --ci;</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  <span class="keywordtype">int</span> maxpi = ci->second;</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span> </div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>[maxpi] > 0) {</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span> </div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  <span class="comment">// This lag has an adjusted tempo from the averaging process:</span></div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  <span class="comment">// use it</span></div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span> </div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>[0] = <a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>[maxpi];</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span> </div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span> </div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  <span class="comment">// shouldn't happen -- it would imply that this high value was</span></div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  <span class="comment">// not a peak!</span></div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span> </div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>[0] = <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">lag2tempo</a>(maxpi);</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  cerr << <span class="stringliteral">"WARNING: No stored tempo for index "</span> << maxpi << endl;</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  }</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span> </div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  sprintf(buffer, <span class="stringliteral">"%.1f bpm"</span>, feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>[0]);</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036">label</a> = buffer;</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span> </div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  <span class="comment">// Return the best tempo in the main output</span></div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span> </div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  fs[<a class="code" href="FixedTempoEstimator_8cpp.html#a7a8511e62dffb5334ad3b70d57b2fcee">TempoOutput</a>].push_back(feature);</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span> </div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>  <span class="comment">// And return the other estimates (up to the arbitrarily chosen</span></div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  <span class="comment">// number of 10 of them) in the candidates output</span></div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span> </div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>.clear();</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036">label</a> = <span class="stringliteral">""</span>;</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span> </div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  <span class="keywordflow">while</span> (feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>.size() < 10) {</div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  <span class="keywordflow">if</span> (<a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>[ci->second] > 0) {</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>.push_back(<a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>[ci->second]);</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>.push_back(<a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">lag2tempo</a>(ci->second));</div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  }</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  <span class="keywordflow">if</span> (ci == candidates.begin()) <span class="keywordflow">break</span>;</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  --ci;</div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  }</div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span> </div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span>  fs[<a class="code" href="FixedTempoEstimator_8cpp.html#a554b16c6b7516530e52c65318bfe08eb">CandidatesOutput</a>].push_back(feature);</div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  </div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span>  <span class="keywordflow">return</span> fs;</div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span> }</div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span> </div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>  </div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span> </div><div class="line"><a name="l00617"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a3967c189f054f864639837c2519bd64d"> 617</a></span> <a class="code" href="classFixedTempoEstimator.html#a3967c189f054f864639837c2519bd64d">FixedTempoEstimator::FixedTempoEstimator</a>(<span class="keywordtype">float</span> inputSampleRate) :</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>  <a class="code" href="classVamp_1_1Plugin.html#a1b78c4f46c72ef345ed27f0b9bf20ac9">Plugin</a>(inputSampleRate),</div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>  <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>(new <a class="code" href="classFixedTempoEstimator_1_1D.html">D</a>(inputSampleRate))</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span> {</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span> }</div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span> </div><div class="line"><a name="l00623"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a0302c4bfdc163a3d34478cde93c96a53"> 623</a></span> <a class="code" href="classFixedTempoEstimator.html#a0302c4bfdc163a3d34478cde93c96a53">FixedTempoEstimator::~FixedTempoEstimator</a>()</div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span> {</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  <span class="keyword">delete</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>;</div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span> }</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span> </div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span> <span class="keywordtype">string</span></div><div class="line"><a name="l00629"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a149f40bbccc3cf3bc05f35e32e6cedac"> 629</a></span> <a class="code" href="classFixedTempoEstimator.html#a149f40bbccc3cf3bc05f35e32e6cedac">FixedTempoEstimator::getIdentifier</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span> <span class="keyword"></span>{</div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  <span class="keywordflow">return</span> <span class="stringliteral">"fixedtempo"</span>;</div><div class="line"><a name="l00632"></a><span class="lineno"> 632</span> }</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span> </div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span> <span class="keywordtype">string</span></div><div class="line"><a name="l00635"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#aad3f044387fb8fd4dbadca8f397dd798"> 635</a></span> <a class="code" href="classFixedTempoEstimator.html#aad3f044387fb8fd4dbadca8f397dd798">FixedTempoEstimator::getName</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span> <span class="keyword"></span>{</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span>  <span class="keywordflow">return</span> <span class="stringliteral">"Simple Fixed Tempo Estimator"</span>;</div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span> }</div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span> </div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span> <span class="keywordtype">string</span></div><div class="line"><a name="l00641"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a4e48cbf0eedb001c0824db864ee4d942"> 641</a></span> <a class="code" href="classFixedTempoEstimator.html#a4e48cbf0eedb001c0824db864ee4d942">FixedTempoEstimator::getDescription</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span> <span class="keyword"></span>{</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>  <span class="keywordflow">return</span> <span class="stringliteral">"Study a short section of audio and estimate its tempo, assuming the tempo is constant"</span>;</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span> }</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span> </div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span> <span class="keywordtype">string</span></div><div class="line"><a name="l00647"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a5ade364056e5ff7c3e2978d9a75a2988"> 647</a></span> <a class="code" href="classFixedTempoEstimator.html#a5ade364056e5ff7c3e2978d9a75a2988">FixedTempoEstimator::getMaker</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span> <span class="keyword"></span>{</div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>  <span class="keywordflow">return</span> <span class="stringliteral">"Vamp SDK Example Plugins"</span>;</div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span> }</div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span> </div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span> <span class="keywordtype">int</span></div><div class="line"><a name="l00653"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a243f85a07ef5236e5c547a183969e0d2"> 653</a></span> <a class="code" href="classFixedTempoEstimator.html#a243f85a07ef5236e5c547a183969e0d2">FixedTempoEstimator::getPluginVersion</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span> <span class="keyword"></span>{</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span> }</div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span> </div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span> <span class="keywordtype">string</span></div><div class="line"><a name="l00659"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a3bcf5f3d231454792d9abef114ad21b6"> 659</a></span> <a class="code" href="classFixedTempoEstimator.html#a3bcf5f3d231454792d9abef114ad21b6">FixedTempoEstimator::getCopyright</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00660"></a><span class="lineno"> 660</span> <span class="keyword"></span>{</div><div class="line"><a name="l00661"></a><span class="lineno"> 661</span>  <span class="keywordflow">return</span> <span class="stringliteral">"Code copyright 2008 Queen Mary, University of London. Freely redistributable (BSD license)"</span>;</div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span> }</div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span> </div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span> <span class="keywordtype">size_t</span></div><div class="line"><a name="l00665"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#ac7c25bbeeef013210f4ab808ad12b659"> 665</a></span> <a class="code" href="classFixedTempoEstimator.html#ac7c25bbeeef013210f4ab808ad12b659">FixedTempoEstimator::getPreferredStepSize</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span> <span class="keyword"></span>{</div><div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#af766d753c0e468470fbca43620164aa4">getPreferredStepSize</a>();</div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span> }</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span> </div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span> <span class="keywordtype">size_t</span></div><div class="line"><a name="l00671"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a9a2706b057bb269531f5c2797c42ddf4"> 671</a></span> <a class="code" href="classFixedTempoEstimator.html#a9a2706b057bb269531f5c2797c42ddf4">FixedTempoEstimator::getPreferredBlockSize</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span> <span class="keyword"></span>{</div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a12f1c5dc6b1101a9c8a91e4f3eaed4b7">getPreferredBlockSize</a>();</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span> }</div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span> </div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span> <span class="keywordtype">bool</span></div><div class="line"><a name="l00677"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#aa7500a4ffbc4653baaf5101defdb37f5"> 677</a></span> <a class="code" href="classFixedTempoEstimator.html#aa7500a4ffbc4653baaf5101defdb37f5">FixedTempoEstimator::initialise</a>(<span class="keywordtype">size_t</span> channels, <span class="keywordtype">size_t</span> stepSize, <span class="keywordtype">size_t</span> blockSize)</div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span> {</div><div class="line"><a name="l00679"></a><span class="lineno"> 679</span>  <span class="keywordflow">if</span> (channels < <a class="code" href="classVamp_1_1Plugin.html#ab74f7634c6ac6e3da115667808a79c30">getMinChannelCount</a>() ||</div><div class="line"><a name="l00680"></a><span class="lineno"> 680</span>  channels > <a class="code" href="classVamp_1_1Plugin.html#a0bff9464bc8c117470136c396b2405dd">getMaxChannelCount</a>()) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span> </div><div class="line"><a name="l00682"></a><span class="lineno"> 682</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#af0fcad4493650728babb7e341963c91d">initialise</a>(channels, stepSize, blockSize);</div><div class="line"><a name="l00683"></a><span class="lineno"> 683</span> }</div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span> </div><div class="line"><a name="l00685"></a><span class="lineno"> 685</span> <span class="keywordtype">void</span></div><div class="line"><a name="l00686"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#ac41708397255400c6682fee6c1b3d45f"> 686</a></span> <a class="code" href="classFixedTempoEstimator.html#ac41708397255400c6682fee6c1b3d45f">FixedTempoEstimator::reset</a>()</div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span> {</div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#af5ac8147bfe79371d00aba8a19c2f8fd">reset</a>();</div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span> }</div><div class="line"><a name="l00690"></a><span class="lineno"> 690</span> </div><div class="line"><a name="l00691"></a><span class="lineno"> 691</span> <a class="code" href="classVamp_1_1PluginBase.html#a3b6bb4bbd86affe1ca9deceea1aad4f8">FixedTempoEstimator::ParameterList</a></div><div class="line"><a name="l00692"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a4d5edffcea6c8757e0c077913b098aea"> 692</a></span> <a class="code" href="classFixedTempoEstimator.html#a4d5edffcea6c8757e0c077913b098aea">FixedTempoEstimator::getParameterDescriptors</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00693"></a><span class="lineno"> 693</span> <span class="keyword"></span>{</div><div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#aa8c27a6743d666f6d33227374d84360c">getParameterDescriptors</a>();</div><div class="line"><a name="l00695"></a><span class="lineno"> 695</span> }</div><div class="line"><a name="l00696"></a><span class="lineno"> 696</span> </div><div class="line"><a name="l00697"></a><span class="lineno"> 697</span> <span class="keywordtype">float</span></div><div class="line"><a name="l00698"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#ae988b4015672a73914e83c1589952752"> 698</a></span> <a class="code" href="classFixedTempoEstimator.html#ae988b4015672a73914e83c1589952752">FixedTempoEstimator::getParameter</a>(std::string <span class="keywordtype">id</span>)<span class="keyword"> const</span></div><div class="line"><a name="l00699"></a><span class="lineno"> 699</span> <span class="keyword"></span>{</div><div class="line"><a name="l00700"></a><span class="lineno"> 700</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a18751bfd7126626178bbf5987144c060">getParameter</a>(<span class="keywordtype">id</span>);</div><div class="line"><a name="l00701"></a><span class="lineno"> 701</span> }</div><div class="line"><a name="l00702"></a><span class="lineno"> 702</span> </div><div class="line"><a name="l00703"></a><span class="lineno"> 703</span> <span class="keywordtype">void</span></div><div class="line"><a name="l00704"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a8a5a413025384cf451c64d2c2ce13a75"> 704</a></span> <a class="code" href="classFixedTempoEstimator.html#a8a5a413025384cf451c64d2c2ce13a75">FixedTempoEstimator::setParameter</a>(std::string <span class="keywordtype">id</span>, <span class="keywordtype">float</span> value)</div><div class="line"><a name="l00705"></a><span class="lineno"> 705</span> {</div><div class="line"><a name="l00706"></a><span class="lineno"> 706</span>  <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a6cafa64d4cc8aa3556bc0ce6b0c49bc4">setParameter</a>(<span class="keywordtype">id</span>, value);</div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span> }</div><div class="line"><a name="l00708"></a><span class="lineno"> 708</span> </div><div class="line"><a name="l00709"></a><span class="lineno"> 709</span> <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">FixedTempoEstimator::OutputList</a></div><div class="line"><a name="l00710"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#af8d3aaa1025078a6ee004f615cc68cbb"> 710</a></span> <a class="code" href="classFixedTempoEstimator.html#af8d3aaa1025078a6ee004f615cc68cbb">FixedTempoEstimator::getOutputDescriptors</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00711"></a><span class="lineno"> 711</span> <span class="keyword"></span>{</div><div class="line"><a name="l00712"></a><span class="lineno"> 712</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a61ce207b248cabe87ca757a858b16e87">getOutputDescriptors</a>();</div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span> }</div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span> </div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a></div><div class="line"><a name="l00716"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a1cf76b0e55cf4ed3da095cffcdeaec3c"> 716</a></span> <a class="code" href="classFixedTempoEstimator.html#a1cf76b0e55cf4ed3da095cffcdeaec3c">FixedTempoEstimator::process</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> *<span class="keyword">const</span> *inputBuffers, <a class="code" href="structVamp_1_1RealTime.html">RealTime</a> ts)</div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span> {</div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a7fac74fc9fc54f436408705d1e125e20">process</a>(inputBuffers, ts);</div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span> }</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span> </div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a></div><div class="line"><a name="l00722"></a><span class="lineno"><a class="line" href="classFixedTempoEstimator.html#a4965cf99be77fc4d1de51e11d83936b0"> 722</a></span> <a class="code" href="classFixedTempoEstimator.html#a4965cf99be77fc4d1de51e11d83936b0">FixedTempoEstimator::getRemainingFeatures</a>()</div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span> {</div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a7f9c3603bb3374d6936885010dbdd82b">getRemainingFeatures</a>();</div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span> }</div><div class="ttc" id="classVamp_1_1Plugin_html_a30f531b8fb69fac41a24e3d2a6a08ed9"><div class="ttname"><a href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">Vamp::Plugin::OutputList</a></div><div class="ttdeci">std::vector< OutputDescriptor > OutputList</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00335">vamp-sdk/Plugin.h:335</a></div></div> |
80 <a name="l00002"></a>00002 | 67 <div class="ttc" id="classFixedTempoEstimator_html_ac7c25bbeeef013210f4ab808ad12b659"><div class="ttname"><a href="classFixedTempoEstimator.html#ac7c25bbeeef013210f4ab808ad12b659">FixedTempoEstimator::getPreferredStepSize</a></div><div class="ttdeci">size_t getPreferredStepSize() const</div><div class="ttdoc">Get the preferred step size (window increment – the distance in sample frames between the start fram...</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00665">FixedTempoEstimator.cpp:665</a></div></div> |
81 <a name="l00003"></a>00003 <span class="comment">/*</span> | 68 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_aa59cf1cb5640a910c70884579e5d99ad"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">FixedTempoEstimator::D::m_priorMagnitudes</a></div><div class="ttdeci">float * m_priorMagnitudes</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00086">FixedTempoEstimator.cpp:86</a></div></div> |
82 <a name="l00004"></a>00004 <span class="comment"> Vamp</span> | 69 <div class="ttc" id="classFixedTempoEstimator_html_af8d3aaa1025078a6ee004f615cc68cbb"><div class="ttname"><a href="classFixedTempoEstimator.html#af8d3aaa1025078a6ee004f615cc68cbb">FixedTempoEstimator::getOutputDescriptors</a></div><div class="ttdeci">OutputList getOutputDescriptors() const</div><div class="ttdoc">Get the outputs of this plugin. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00710">FixedTempoEstimator.cpp:710</a></div></div> |
83 <a name="l00005"></a>00005 <span class="comment"></span> | 70 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_ab0d7cc6ab19e53b5bd12ee234f549ea3"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab0d7cc6ab19e53b5bd12ee234f549ea3">Vamp::Plugin::OutputDescriptor::hasDuration</a></div><div class="ttdeci">bool hasDuration</div><div class="ttdoc">True if the returned results for this output are known to have a duration field. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00320">vamp-sdk/Plugin.h:320</a></div></div> |
84 <a name="l00006"></a>00006 <span class="comment"> An API for audio analysis and feature extraction plugins.</span> | 71 <div class="ttc" id="FixedTempoEstimator_8cpp_html_a382c1fe740ac8911c6078cfbceffc870"><div class="ttname"><a href="FixedTempoEstimator_8cpp.html#a382c1fe740ac8911c6078cfbceffc870">ACFOutput</a></div><div class="ttdeci">static int ACFOutput</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00186">FixedTempoEstimator.cpp:186</a></div></div> |
85 <a name="l00007"></a>00007 <span class="comment"></span> | 72 <div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html_a8eb1fb35f73b247ed13de9527c18f036"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036">Vamp::Plugin::Feature::label</a></div><div class="ttdeci">std::string label</div><div class="ttdoc">Label for the sample of this feature. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00387">vamp-sdk/Plugin.h:387</a></div></div> |
86 <a name="l00008"></a>00008 <span class="comment"> Centre for Digital Music, Queen Mary, University of London.</span> | 73 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a33e8d045b222addc6173b50df2553ba8"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a33e8d045b222addc6173b50df2553ba8">FixedTempoEstimator::D::m_maxbpm</a></div><div class="ttdeci">float m_maxbpm</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00083">FixedTempoEstimator.cpp:83</a></div></div> |
87 <a name="l00009"></a>00009 <span class="comment"> Copyright 2006-2009 Chris Cannam and QMUL.</span> | 74 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html">Vamp::Plugin::OutputDescriptor</a></div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00206">vamp-sdk/Plugin.h:206</a></div></div> |
88 <a name="l00010"></a>00010 <span class="comment"> </span> | 75 <div class="ttc" id="classFixedTempoEstimator_html_a1cf76b0e55cf4ed3da095cffcdeaec3c"><div class="ttname"><a href="classFixedTempoEstimator.html#a1cf76b0e55cf4ed3da095cffcdeaec3c">FixedTempoEstimator::process</a></div><div class="ttdeci">FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp)</div><div class="ttdoc">Process a single block of input data. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00716">FixedTempoEstimator.cpp:716</a></div></div> |
89 <a name="l00011"></a>00011 <span class="comment"> Permission is hereby granted, free of charge, to any person</span> | 76 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_add0cbbdfa9c91764037c39365b1d42af"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#add0cbbdfa9c91764037c39365b1d42af">Vamp::Plugin::OutputDescriptor::sampleRate</a></div><div class="ttdeci">float sampleRate</div><div class="ttdoc">Sample rate of the output results, as samples per second. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00314">vamp-sdk/Plugin.h:314</a></div></div> |
90 <a name="l00012"></a>00012 <span class="comment"> obtaining a copy of this software and associated documentation</span> | 77 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a7f9c3603bb3374d6936885010dbdd82b"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a7f9c3603bb3374d6936885010dbdd82b">FixedTempoEstimator::D::getRemainingFeatures</a></div><div class="ttdeci">FeatureSet getRemainingFeatures()</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00352">FixedTempoEstimator.cpp:352</a></div></div> |
91 <a name="l00013"></a>00013 <span class="comment"> files (the "Software"), to deal in the Software without</span> | 78 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_af0e577e1a256ff6eed6ea42133fec77d"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d">Vamp::Plugin::OutputDescriptor::hasFixedBinCount</a></div><div class="ttdeci">bool hasFixedBinCount</div><div class="ttdoc">True if the output has the same number of values per sample for every output sample. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00239">vamp-sdk/Plugin.h:239</a></div></div> |
92 <a name="l00014"></a>00014 <span class="comment"> restriction, including without limitation the rights to use, copy,</span> | 79 <div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html_a60b9f3057386820dbcaec0eb1189ce71"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">Vamp::Plugin::Feature::values</a></div><div class="ttdeci">std::vector< float > values</div><div class="ttdoc">Results for a single sample of this feature. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00382">vamp-sdk/Plugin.h:382</a></div></div> |
93 <a name="l00015"></a>00015 <span class="comment"> modify, merge, publish, distribute, sublicense, and/or sell copies</span> | 80 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_abffa9ed50cd756df70fd51f0355f448ca4c74bd2fc96dfe2815623f94b40e5629"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#abffa9ed50cd756df70fd51f0355f448ca4c74bd2fc96dfe2815623f94b40e5629">Vamp::Plugin::OutputDescriptor::FixedSampleRate</a></div><div class="ttdoc">Results are evenly spaced in time (sampleRate specified below) </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00293">vamp-sdk/Plugin.h:293</a></div></div> |
94 <a name="l00016"></a>00016 <span class="comment"> of the Software, and to permit persons to whom the Software is</span> | 81 <div class="ttc" id="classFixedTempoEstimator_html_a0302c4bfdc163a3d34478cde93c96a53"><div class="ttname"><a href="classFixedTempoEstimator.html#a0302c4bfdc163a3d34478cde93c96a53">FixedTempoEstimator::~FixedTempoEstimator</a></div><div class="ttdeci">virtual ~FixedTempoEstimator()</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00623">FixedTempoEstimator.cpp:623</a></div></div> |
95 <a name="l00017"></a>00017 <span class="comment"> furnished to do so, subject to the following conditions:</span> | 82 <div class="ttc" id="classVamp_1_1Plugin_html_a448fb57dc245d47923ec9eeaf9856c5f"><div class="ttname"><a href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">Vamp::Plugin::FeatureSet</a></div><div class="ttdeci">std::map< int, FeatureList > FeatureSet</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00395">vamp-sdk/Plugin.h:395</a></div></div> |
96 <a name="l00018"></a>00018 <span class="comment"></span> | 83 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_a3bed37153067b625b95acb40b60dbf0b"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a3bed37153067b625b95acb40b60dbf0b">Vamp::Plugin::OutputDescriptor::quantizeStep</a></div><div class="ttdeci">float quantizeStep</div><div class="ttdoc">Quantization resolution of the output values (e.g. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00285">vamp-sdk/Plugin.h:285</a></div></div> |
97 <a name="l00019"></a>00019 <span class="comment"> The above copyright notice and this permission notice shall be</span> | 84 <div class="ttc" id="classFixedTempoEstimator_html_ae988b4015672a73914e83c1589952752"><div class="ttname"><a href="classFixedTempoEstimator.html#ae988b4015672a73914e83c1589952752">FixedTempoEstimator::getParameter</a></div><div class="ttdeci">float getParameter(std::string id) const</div><div class="ttdoc">Get the value of a named parameter. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00698">FixedTempoEstimator.cpp:698</a></div></div> |
98 <a name="l00020"></a>00020 <span class="comment"> included in all copies or substantial portions of the Software.</span> | 85 <div class="ttc" id="classFixedTempoEstimator_html_a5ade364056e5ff7c3e2978d9a75a2988"><div class="ttname"><a href="classFixedTempoEstimator.html#a5ade364056e5ff7c3e2978d9a75a2988">FixedTempoEstimator::getMaker</a></div><div class="ttdeci">std::string getMaker() const</div><div class="ttdoc">Get the name of the author or vendor of the plugin in human-readable form. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00647">FixedTempoEstimator.cpp:647</a></div></div> |
99 <a name="l00021"></a>00021 <span class="comment"></span> | 86 <div class="ttc" id="classFixedTempoEstimator_html_a3bcf5f3d231454792d9abef114ad21b6"><div class="ttname"><a href="classFixedTempoEstimator.html#a3bcf5f3d231454792d9abef114ad21b6">FixedTempoEstimator::getCopyright</a></div><div class="ttdeci">std::string getCopyright() const</div><div class="ttdoc">Get the copyright statement or licensing summary for the plugin. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00659">FixedTempoEstimator.cpp:659</a></div></div> |
100 <a name="l00022"></a>00022 <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span> | 87 <div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html_acaa605f36839c07e76f4882f5e22d8d7"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html#acaa605f36839c07e76f4882f5e22d8d7">Vamp::Plugin::Feature::timestamp</a></div><div class="ttdeci">RealTime timestamp</div><div class="ttdoc">Timestamp of the output feature. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00360">vamp-sdk/Plugin.h:360</a></div></div> |
101 <a name="l00023"></a>00023 <span class="comment"> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span> | 88 <div class="ttc" id="structVamp_1_1PluginBase_1_1ParameterDescriptor_html_a116fd9f0dc94c2bc4bbc60b5443c598c"><div class="ttname"><a href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a116fd9f0dc94c2bc4bbc60b5443c598c">Vamp::PluginBase::ParameterDescriptor::identifier</a></div><div class="ttdeci">std::string identifier</div><div class="ttdoc">The name of the parameter, in computer-usable form. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00133">vamp-sdk/PluginBase.h:133</a></div></div> |
102 <a name="l00024"></a>00024 <span class="comment"> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span> | 89 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_af9b4fe8f78e7126ead820ba5dc55efd1"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1">Vamp::Plugin::OutputDescriptor::description</a></div><div class="ttdeci">std::string description</div><div class="ttdoc">A human-readable short text describing the output. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00227">vamp-sdk/Plugin.h:227</a></div></div> |
103 <a name="l00025"></a>00025 <span class="comment"> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR</span> | 90 <div class="ttc" id="classVamp_1_1Plugin_html_a1b78c4f46c72ef345ed27f0b9bf20ac9"><div class="ttname"><a href="classVamp_1_1Plugin.html#a1b78c4f46c72ef345ed27f0b9bf20ac9">Vamp::Plugin::Plugin</a></div><div class="ttdeci">Plugin(float inputSampleRate)</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00441">vamp-sdk/Plugin.h:441</a></div></div> |
104 <a name="l00026"></a>00026 <span class="comment"> ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF</span> | 91 <div class="ttc" id="classFixedTempoEstimator_html_ac41708397255400c6682fee6c1b3d45f"><div class="ttname"><a href="classFixedTempoEstimator.html#ac41708397255400c6682fee6c1b3d45f">FixedTempoEstimator::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">Reset the plugin after use, to prepare it for another clean run. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00686">FixedTempoEstimator.cpp:686</a></div></div> |
105 <a name="l00027"></a>00027 <span class="comment"> CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION</span> | 92 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_aa8c27a6743d666f6d33227374d84360c"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#aa8c27a6743d666f6d33227374d84360c">FixedTempoEstimator::D::getParameterDescriptors</a></div><div class="ttdeci">ParameterList getParameterDescriptors() const</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00125">FixedTempoEstimator.cpp:125</a></div></div> |
106 <a name="l00028"></a>00028 <span class="comment"> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span> | 93 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_ae2c893ddb1860589517ab7eaa989a18b"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b">Vamp::Plugin::OutputDescriptor::identifier</a></div><div class="ttdeci">std::string identifier</div><div class="ttdoc">The name of the output, in computer-usable form. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00214">vamp-sdk/Plugin.h:214</a></div></div> |
107 <a name="l00029"></a>00029 <span class="comment"></span> | 94 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_ac9f5924c0be7571bba8e7ae7e7a921f4"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ac9f5924c0be7571bba8e7ae7e7a921f4">Vamp::Plugin::OutputDescriptor::minValue</a></div><div class="ttdeci">float minValue</div><div class="ttdoc">Minimum value of the results in the output. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00266">vamp-sdk/Plugin.h:266</a></div></div> |
108 <a name="l00030"></a>00030 <span class="comment"> Except as contained in this notice, the names of the Centre for</span> | 95 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_ac6a75212293fc855de6ed0c6581a0fb9"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#ac6a75212293fc855de6ed0c6581a0fb9">FixedTempoEstimator::D::tempo2lag</a></div><div class="ttdeci">int tempo2lag(float)</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00369">FixedTempoEstimator.cpp:369</a></div></div> |
109 <a name="l00031"></a>00031 <span class="comment"> Digital Music; Queen Mary, University of London; and Chris Cannam</span> | 96 <div class="ttc" id="classFixedTempoEstimator_html_aad3f044387fb8fd4dbadca8f397dd798"><div class="ttname"><a href="classFixedTempoEstimator.html#aad3f044387fb8fd4dbadca8f397dd798">FixedTempoEstimator::getName</a></div><div class="ttdeci">std::string getName() const</div><div class="ttdoc">Get a human-readable name or title of the plugin. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00635">FixedTempoEstimator.cpp:635</a></div></div> |
110 <a name="l00032"></a>00032 <span class="comment"> shall not be used in advertising or otherwise to promote the sale,</span> | 97 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a768fdbb62e4b21a39897963fdbd486ed"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a768fdbb62e4b21a39897963fdbd486ed">FixedTempoEstimator::D::m_minbpm</a></div><div class="ttdeci">float m_minbpm</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00082">FixedTempoEstimator.cpp:82</a></div></div> |
111 <a name="l00033"></a>00033 <span class="comment"> use or other dealings in this Software without prior written</span> | 98 <div class="ttc" id="structVamp_1_1PluginBase_1_1ParameterDescriptor_html_a0ecebb94fb4ada4aad2640e20aa57084"><div class="ttname"><a href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a0ecebb94fb4ada4aad2640e20aa57084">Vamp::PluginBase::ParameterDescriptor::name</a></div><div class="ttdeci">std::string name</div><div class="ttdoc">The human-readable name of the parameter. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00138">vamp-sdk/PluginBase.h:138</a></div></div> |
112 <a name="l00034"></a>00034 <span class="comment"> authorization.</span> | 99 <div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html">Vamp::Plugin::Feature</a></div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00344">vamp-sdk/Plugin.h:344</a></div></div> |
113 <a name="l00035"></a>00035 <span class="comment">*/</span> | 100 <div class="ttc" id="classFixedTempoEstimator_1_1D_html"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html">FixedTempoEstimator::D</a></div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00050">FixedTempoEstimator.cpp:50</a></div></div> |
114 <a name="l00036"></a>00036 | 101 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a837da9722c63fe3c66c738255990c45f"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">FixedTempoEstimator::D::m_stepSize</a></div><div class="ttdeci">size_t m_stepSize</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00079">FixedTempoEstimator.cpp:79</a></div></div> |
115 <a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="FixedTempoEstimator_8h.html">FixedTempoEstimator.h</a>"</span> | 102 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_a907b4e8fbb48a46ac5a05f880d72719f"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a907b4e8fbb48a46ac5a05f880d72719f">Vamp::Plugin::OutputDescriptor::maxValue</a></div><div class="ttdeci">float maxValue</div><div class="ttdoc">Maximum value of the results in the output. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00272">vamp-sdk/Plugin.h:272</a></div></div> |
116 <a name="l00038"></a>00038 | 103 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_abacd5ff19c301020efb99c03136b849a"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#abacd5ff19c301020efb99c03136b849a">FixedTempoEstimator::D::m_lasttime</a></div><div class="ttdeci">Vamp::RealTime m_lasttime</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00096">FixedTempoEstimator.cpp:96</a></div></div> |
117 <a name="l00039"></a>00039 <span class="keyword">using</span> std::string; | 104 <div class="ttc" id="FixedTempoEstimator_8cpp_html_acaa4524f29afce03c812a88ff31159c1"><div class="ttname"><a href="FixedTempoEstimator_8cpp.html#acaa4524f29afce03c812a88ff31159c1">DFOutput</a></div><div class="ttdeci">static int DFOutput</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00185">FixedTempoEstimator.cpp:185</a></div></div> |
118 <a name="l00040"></a>00040 <span class="keyword">using</span> std::vector; | 105 <div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html_af687c0a7fe041757e922ec296862b115"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html#af687c0a7fe041757e922ec296862b115">Vamp::Plugin::Feature::duration</a></div><div class="ttdeci">RealTime duration</div><div class="ttdoc">Duration of the output feature. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00375">vamp-sdk/Plugin.h:375</a></div></div> |
119 <a name="l00041"></a>00041 <span class="keyword">using</span> std::cerr; | 106 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_ae739e006f2d10ef2b13677770b23e663"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">FixedTempoEstimator::D::m_dfsize</a></div><div class="ttdeci">size_t m_dfsize</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00088">FixedTempoEstimator.cpp:88</a></div></div> |
120 <a name="l00042"></a>00042 <span class="keyword">using</span> std::endl; | 107 <div class="ttc" id="structVamp_1_1PluginBase_1_1ParameterDescriptor_html_ab3e4d84f5bc199eea8b642b27e425ec8"><div class="ttname"><a href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab3e4d84f5bc199eea8b642b27e425ec8">Vamp::PluginBase::ParameterDescriptor::minValue</a></div><div class="ttdeci">float minValue</div><div class="ttdoc">The minimum value of the parameter. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00154">vamp-sdk/PluginBase.h:154</a></div></div> |
121 <a name="l00043"></a>00043 | 108 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a7a8c8658ecfeec98962078df89fcd538"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">FixedTempoEstimator::D::m_r</a></div><div class="ttdeci">float * m_r</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00090">FixedTempoEstimator.cpp:90</a></div></div> |
122 <a name="l00044"></a>00044 <span class="keyword">using</span> <a class="code" href="structVamp_1_1RealTime.html" title="RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...">Vamp::RealTime</a>; | 109 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a3a3a0b4a4c259087f02d0046241674d0"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">FixedTempoEstimator::D::m_start</a></div><div class="ttdeci">Vamp::RealTime m_start</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00095">FixedTempoEstimator.cpp:95</a></div></div> |
123 <a name="l00045"></a>00045 | 110 <div class="ttc" id="structVamp_1_1PluginBase_1_1ParameterDescriptor_html_a3bc3df322e4c02e17e96bc6d44982d7b"><div class="ttname"><a href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a3bc3df322e4c02e17e96bc6d44982d7b">Vamp::PluginBase::ParameterDescriptor::unit</a></div><div class="ttdeci">std::string unit</div><div class="ttdoc">The unit of the parameter, in human-readable form. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00149">vamp-sdk/PluginBase.h:149</a></div></div> |
124 <a name="l00046"></a>00046 <span class="preprocessor">#include <cmath></span> | 111 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_aa057a8833fa037f06ac9f7b85b85d5e4"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4">Vamp::Plugin::OutputDescriptor::unit</a></div><div class="ttdeci">std::string unit</div><div class="ttdoc">The unit of the output, in human-readable form. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00232">vamp-sdk/Plugin.h:232</a></div></div> |
125 <a name="l00047"></a>00047 <span class="preprocessor">#include <cstdio></span> | 112 <div class="ttc" id="classVamp_1_1Plugin_html_ab74f7634c6ac6e3da115667808a79c30"><div class="ttname"><a href="classVamp_1_1Plugin.html#ab74f7634c6ac6e3da115667808a79c30">Vamp::Plugin::getMinChannelCount</a></div><div class="ttdeci">virtual size_t getMinChannelCount() const</div><div class="ttdoc">Get the minimum supported number of input channels. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00199">vamp-sdk/Plugin.h:199</a></div></div> |
126 <a name="l00048"></a>00048 | 113 <div class="ttc" id="FixedTempoEstimator_8h_html"><div class="ttname"><a href="FixedTempoEstimator_8h.html">FixedTempoEstimator.h</a></div></div> |
127 <a name="l00049"></a>00049 | 114 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_ab824b2b34ee50f897a30901c620e8d87"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87">Vamp::Plugin::OutputDescriptor::name</a></div><div class="ttdeci">std::string name</div><div class="ttdoc">The human-readable name of the output. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00220">vamp-sdk/Plugin.h:220</a></div></div> |
128 <a name="l00050"></a><a class="code" href="classFixedTempoEstimator_1_1D.html">00050</a> <span class="keyword">class </span><a class="code" href="classFixedTempoEstimator_1_1D.html">FixedTempoEstimator::D</a> | 115 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a61ce207b248cabe87ca757a858b16e87"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a61ce207b248cabe87ca757a858b16e87">FixedTempoEstimator::D::getOutputDescriptors</a></div><div class="ttdeci">OutputList getOutputDescriptors() const</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00190">FixedTempoEstimator.cpp:190</a></div></div> |
129 <a name="l00051"></a>00051 <span class="comment">// this class just avoids us having to declare any data members in the header</span> | 116 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a12f1c5dc6b1101a9c8a91e4f3eaed4b7"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a12f1c5dc6b1101a9c8a91e4f3eaed4b7">FixedTempoEstimator::D::getPreferredBlockSize</a></div><div class="ttdeci">size_t getPreferredBlockSize() const</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00058">FixedTempoEstimator.cpp:58</a></div></div> |
130 <a name="l00052"></a>00052 { | 117 <div class="ttc" id="classVamp_1_1Plugin_html_a0bff9464bc8c117470136c396b2405dd"><div class="ttname"><a href="classVamp_1_1Plugin.html#a0bff9464bc8c117470136c396b2405dd">Vamp::Plugin::getMaxChannelCount</a></div><div class="ttdeci">virtual size_t getMaxChannelCount() const</div><div class="ttdoc">Get the maximum supported number of input channels. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00204">vamp-sdk/Plugin.h:204</a></div></div> |
131 <a name="l00053"></a>00053 <span class="keyword">public</span>: | 118 <div class="ttc" id="classFixedTempoEstimator_html_a149f40bbccc3cf3bc05f35e32e6cedac"><div class="ttname"><a href="classFixedTempoEstimator.html#a149f40bbccc3cf3bc05f35e32e6cedac">FixedTempoEstimator::getIdentifier</a></div><div class="ttdeci">std::string getIdentifier() const</div><div class="ttdoc">Get the computer-usable name of the plugin. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00629">FixedTempoEstimator.cpp:629</a></div></div> |
132 <a name="l00054"></a>00054 <a class="code" href="classFixedTempoEstimator_1_1D.html#a104a9b64d47eca678844584f69ca0b9d">D</a>(<span class="keywordtype">float</span> inputSampleRate); | 119 <div class="ttc" id="structVamp_1_1RealTime_html"><div class="ttname"><a href="structVamp_1_1RealTime.html">Vamp::RealTime</a></div><div class="ttdoc">RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2RealTime_8h_source.html#l00066">vamp-sdk/RealTime.h:66</a></div></div> |
133 <a name="l00055"></a>00055 <a class="code" href="classFixedTempoEstimator_1_1D.html#a78a63ac8bbf342cb0405747871adf4cc">~D</a>(); | 120 <div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html_a98907091d0b6a589720ae35ae588a82b"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html#a98907091d0b6a589720ae35ae588a82b">Vamp::Plugin::Feature::hasTimestamp</a></div><div class="ttdeci">bool hasTimestamp</div><div class="ttdoc">True if an output feature has its own timestamp. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00352">vamp-sdk/Plugin.h:352</a></div></div> |
134 <a name="l00056"></a>00056 | 121 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a698446aad2c0f737732a392fb86a612c"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">FixedTempoEstimator::D::m_t</a></div><div class="ttdeci">float * m_t</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00092">FixedTempoEstimator.cpp:92</a></div></div> |
135 <a name="l00057"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#add749be18355ab1ae5c1ccbacfd2e192">00057</a> <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#add749be18355ab1ae5c1ccbacfd2e192">getPreferredStepSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 64; } | 122 <div class="ttc" id="classFixedTempoEstimator_html_a4965cf99be77fc4d1de51e11d83936b0"><div class="ttname"><a href="classFixedTempoEstimator.html#a4965cf99be77fc4d1de51e11d83936b0">FixedTempoEstimator::getRemainingFeatures</a></div><div class="ttdeci">FeatureSet getRemainingFeatures()</div><div class="ttdoc">After all blocks have been processed, calculate and return any remaining features derived from the co...</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00722">FixedTempoEstimator.cpp:722</a></div></div> |
136 <a name="l00058"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#ac02826f981736fc2aa5d835fa14e174d">00058</a> <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#ac02826f981736fc2aa5d835fa14e174d">getPreferredBlockSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 256; } | 123 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_af766d753c0e468470fbca43620164aa4"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#af766d753c0e468470fbca43620164aa4">FixedTempoEstimator::D::getPreferredStepSize</a></div><div class="ttdeci">size_t getPreferredStepSize() const</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00057">FixedTempoEstimator.cpp:57</a></div></div> |
137 <a name="l00059"></a>00059 | 124 <div class="ttc" id="classFixedTempoEstimator_html_a8a5a413025384cf451c64d2c2ce13a75"><div class="ttname"><a href="classFixedTempoEstimator.html#a8a5a413025384cf451c64d2c2ce13a75">FixedTempoEstimator::setParameter</a></div><div class="ttdeci">void setParameter(std::string id, float value)</div><div class="ttdoc">Set a named parameter. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00704">FixedTempoEstimator.cpp:704</a></div></div> |
138 <a name="l00060"></a>00060 <a class="code" href="classVamp_1_1PluginBase.html#a3b6bb4bbd86affe1ca9deceea1aad4f8">ParameterList</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a06fcf80a9a22c4b90abbc88eb592621a">getParameterDescriptors</a>() <span class="keyword">const</span>; | 125 <div class="ttc" id="structVamp_1_1PluginBase_1_1ParameterDescriptor_html_a780ddad41e433d85c82f9ea4d959cbaf"><div class="ttname"><a href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a780ddad41e433d85c82f9ea4d959cbaf">Vamp::PluginBase::ParameterDescriptor::description</a></div><div class="ttdeci">std::string description</div><div class="ttdoc">A human-readable short text describing the parameter. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00144">vamp-sdk/PluginBase.h:144</a></div></div> |
139 <a name="l00061"></a>00061 <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a968ef2e555c81e4a3bde89d19fafb31a">getParameter</a>(<span class="keywordtype">string</span> <span class="keywordtype">id</span>) <span class="keyword">const</span>; | 126 <div class="ttc" id="structVamp_1_1PluginBase_1_1ParameterDescriptor_html"><div class="ttname"><a href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html">Vamp::PluginBase::ParameterDescriptor</a></div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00126">vamp-sdk/PluginBase.h:126</a></div></div> |
140 <a name="l00062"></a>00062 <span class="keywordtype">void</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a6cafa64d4cc8aa3556bc0ce6b0c49bc4">setParameter</a>(<span class="keywordtype">string</span> <span class="keywordtype">id</span>, <span class="keywordtype">float</span> value); | 127 <div class="ttc" id="structVamp_1_1PluginBase_1_1ParameterDescriptor_html_ab934b20dd708228a0e3c2811a3e2cec4"><div class="ttname"><a href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab934b20dd708228a0e3c2811a3e2cec4">Vamp::PluginBase::ParameterDescriptor::maxValue</a></div><div class="ttdeci">float maxValue</div><div class="ttdoc">The maximum value of the parameter. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00159">vamp-sdk/PluginBase.h:159</a></div></div> |
141 <a name="l00063"></a>00063 | 128 <div class="ttc" id="FixedTempoEstimator_8cpp_html_a554b16c6b7516530e52c65318bfe08eb"><div class="ttname"><a href="FixedTempoEstimator_8cpp.html#a554b16c6b7516530e52c65318bfe08eb">CandidatesOutput</a></div><div class="ttdeci">static int CandidatesOutput</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00184">FixedTempoEstimator.cpp:184</a></div></div> |
142 <a name="l00064"></a>00064 <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">OutputList</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a7ce98af800f36045a0dae4b1dbed943f">getOutputDescriptors</a>() <span class="keyword">const</span>; | 129 <div class="ttc" id="classFixedTempoEstimator_html_a9a2706b057bb269531f5c2797c42ddf4"><div class="ttname"><a href="classFixedTempoEstimator.html#a9a2706b057bb269531f5c2797c42ddf4">FixedTempoEstimator::getPreferredBlockSize</a></div><div class="ttdeci">size_t getPreferredBlockSize() const</div><div class="ttdoc">Get the preferred block size (window size – the number of sample frames passed in each block to the ...</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00671">FixedTempoEstimator.cpp:671</a></div></div> |
143 <a name="l00065"></a>00065 | 130 <div class="ttc" id="classFixedTempoEstimator_html_a5e1c9abaf33e9f48eb7d3b48f8af3308"><div class="ttname"><a href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">FixedTempoEstimator::m_d</a></div><div class="ttdeci">D * m_d</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8h_source.html#l00079">FixedTempoEstimator.h:79</a></div></div> |
144 <a name="l00066"></a>00066 <span class="keywordtype">bool</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#af0fcad4493650728babb7e341963c91d">initialise</a>(<span class="keywordtype">size_t</span> channels, <span class="keywordtype">size_t</span> stepSize, <span class="keywordtype">size_t</span> blockSize); | 131 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a7fac74fc9fc54f436408705d1e125e20"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a7fac74fc9fc54f436408705d1e125e20">FixedTempoEstimator::D::process</a></div><div class="ttdeci">FeatureSet process(const float *const *, RealTime)</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00303">FixedTempoEstimator.cpp:303</a></div></div> |
145 <a name="l00067"></a>00067 <span class="keywordtype">void</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#af5ac8147bfe79371d00aba8a19c2f8fd">reset</a>(); | 132 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a072a0fc30b3912a54858eefdd47f4d4f"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">FixedTempoEstimator::D::m_inputSampleRate</a></div><div class="ttdeci">float m_inputSampleRate</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00078">FixedTempoEstimator.cpp:78</a></div></div> |
146 <a name="l00068"></a>00068 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a7fac74fc9fc54f436408705d1e125e20">process</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> *<span class="keyword">const</span> *, <a class="code" href="structVamp_1_1RealTime.html" title="RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...">RealTime</a>); | 133 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a0b9bf37e600f0564b9f305f73a9517c8"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">FixedTempoEstimator::D::m_blockSize</a></div><div class="ttdeci">size_t m_blockSize</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00080">FixedTempoEstimator.cpp:80</a></div></div> |
147 <a name="l00069"></a>00069 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a7f9c3603bb3374d6936885010dbdd82b">getRemainingFeatures</a>(); | 134 <div class="ttc" id="classFixedTempoEstimator_html_a4d5edffcea6c8757e0c077913b098aea"><div class="ttname"><a href="classFixedTempoEstimator.html#a4d5edffcea6c8757e0c077913b098aea">FixedTempoEstimator::getParameterDescriptors</a></div><div class="ttdeci">ParameterList getParameterDescriptors() const</div><div class="ttdoc">Get the controllable parameters of this plugin. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00692">FixedTempoEstimator.cpp:692</a></div></div> |
148 <a name="l00070"></a>00070 | 135 <div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html_a33686757bd4481c72494122e9bfb9fba"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html#a33686757bd4481c72494122e9bfb9fba">Vamp::Plugin::Feature::hasDuration</a></div><div class="ttdeci">bool hasDuration</div><div class="ttdoc">True if an output feature has a specified duration. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00368">vamp-sdk/Plugin.h:368</a></div></div> |
149 <a name="l00071"></a>00071 <span class="keyword">private</span>: | 136 <div class="ttc" id="classFixedTempoEstimator_html_a4e48cbf0eedb001c0824db864ee4d942"><div class="ttname"><a href="classFixedTempoEstimator.html#a4e48cbf0eedb001c0824db864ee4d942">FixedTempoEstimator::getDescription</a></div><div class="ttdeci">std::string getDescription() const</div><div class="ttdoc">Get a human-readable description for the plugin, typically a line of text that may optionally be disp...</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00641">FixedTempoEstimator.cpp:641</a></div></div> |
150 <a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a4f2cbc11fba5bc8af3fd2a0078156091">calculate</a>(); | 137 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_ab73af7f1943b76388de04cbb4696a983"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">FixedTempoEstimator::D::m_n</a></div><div class="ttdeci">size_t m_n</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00093">FixedTempoEstimator.cpp:93</a></div></div> |
151 <a name="l00073"></a>00073 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a20389ba1515f6ce4181d3f41e5c4f347">assembleFeatures</a>(); | 138 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a8e2312120e87ad9a48fedeebbaefa396"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">FixedTempoEstimator::D::m_df</a></div><div class="ttdeci">float * m_df</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00089">FixedTempoEstimator.cpp:89</a></div></div> |
152 <a name="l00074"></a>00074 | 139 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a18751bfd7126626178bbf5987144c060"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a18751bfd7126626178bbf5987144c060">FixedTempoEstimator::D::getParameter</a></div><div class="ttdeci">float getParameter(string id) const</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00159">FixedTempoEstimator.cpp:159</a></div></div> |
153 <a name="l00075"></a>00075 <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">lag2tempo</a>(<span class="keywordtype">int</span>); | 140 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a78a63ac8bbf342cb0405747871adf4cc"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a78a63ac8bbf342cb0405747871adf4cc">FixedTempoEstimator::D::~D</a></div><div class="ttdeci">~D()</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00115">FixedTempoEstimator.cpp:115</a></div></div> |
154 <a name="l00076"></a>00076 <span class="keywordtype">int</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#ac6a75212293fc855de6ed0c6581a0fb9">tempo2lag</a>(<span class="keywordtype">float</span>); | 141 <div class="ttc" id="FixedTempoEstimator_8cpp_html_a5b284021783d79785d46b043b458368d"><div class="ttname"><a href="FixedTempoEstimator_8cpp.html#a5b284021783d79785d46b043b458368d">FilteredACFOutput</a></div><div class="ttdeci">static int FilteredACFOutput</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00187">FixedTempoEstimator.cpp:187</a></div></div> |
155 <a name="l00077"></a>00077 | 142 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_afdd006959a995e40ef7d565a3a4df6dc"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#afdd006959a995e40ef7d565a3a4df6dc">Vamp::Plugin::OutputDescriptor::binCount</a></div><div class="ttdeci">size_t binCount</div><div class="ttdoc">The number of values per result of the output. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00247">vamp-sdk/Plugin.h:247</a></div></div> |
156 <a name="l00078"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">00078</a> <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a072a0fc30b3912a54858eefdd47f4d4f">m_inputSampleRate</a>; | 143 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a6cafa64d4cc8aa3556bc0ce6b0c49bc4"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a6cafa64d4cc8aa3556bc0ce6b0c49bc4">FixedTempoEstimator::D::setParameter</a></div><div class="ttdeci">void setParameter(string id, float value)</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00172">FixedTempoEstimator.cpp:172</a></div></div> |
157 <a name="l00079"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">00079</a> <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a837da9722c63fe3c66c738255990c45f">m_stepSize</a>; | 144 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_aca506973452865d436e07462eabdebad"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#aca506973452865d436e07462eabdebad">FixedTempoEstimator::D::m_maxdflen</a></div><div class="ttdeci">float m_maxdflen</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00084">FixedTempoEstimator.cpp:84</a></div></div> |
158 <a name="l00080"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">00080</a> <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a0b9bf37e600f0564b9f305f73a9517c8">m_blockSize</a>; | 145 <div class="ttc" id="classFixedTempoEstimator_html_aa7500a4ffbc4653baaf5101defdb37f5"><div class="ttname"><a href="classFixedTempoEstimator.html#aa7500a4ffbc4653baaf5101defdb37f5">FixedTempoEstimator::initialise</a></div><div class="ttdeci">bool initialise(size_t channels, size_t stepSize, size_t blockSize)</div><div class="ttdoc">Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames). </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00677">FixedTempoEstimator.cpp:677</a></div></div> |
159 <a name="l00081"></a>00081 | 146 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_af0fcad4493650728babb7e341963c91d"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#af0fcad4493650728babb7e341963c91d">FixedTempoEstimator::D::initialise</a></div><div class="ttdeci">bool initialise(size_t channels, size_t stepSize, size_t blockSize)</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00252">FixedTempoEstimator.cpp:252</a></div></div> |
160 <a name="l00082"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a768fdbb62e4b21a39897963fdbd486ed">00082</a> <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a768fdbb62e4b21a39897963fdbd486ed">m_minbpm</a>; | 147 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a4f2cbc11fba5bc8af3fd2a0078156091"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a4f2cbc11fba5bc8af3fd2a0078156091">FixedTempoEstimator::D::calculate</a></div><div class="ttdeci">void calculate()</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00375">FixedTempoEstimator.cpp:375</a></div></div> |
161 <a name="l00083"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a33e8d045b222addc6173b50df2553ba8">00083</a> <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#a33e8d045b222addc6173b50df2553ba8">m_maxbpm</a>; | 148 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_a1b4858928d23bfd7d5bc557c82a83fb4"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a1b4858928d23bfd7d5bc557c82a83fb4">Vamp::Plugin::OutputDescriptor::isQuantized</a></div><div class="ttdeci">bool isQuantized</div><div class="ttdoc">True if the output values are quantized to a particular resolution. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00278">vamp-sdk/Plugin.h:278</a></div></div> |
162 <a name="l00084"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#aca506973452865d436e07462eabdebad">00084</a> <span class="keywordtype">float</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#aca506973452865d436e07462eabdebad">m_maxdflen</a>; | 149 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a0a7cb0705938097ab23a6f9187e6bae5"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">FixedTempoEstimator::D::lag2tempo</a></div><div class="ttdeci">float lag2tempo(int)</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00363">FixedTempoEstimator.cpp:363</a></div></div> |
163 <a name="l00085"></a>00085 | 150 <div class="ttc" id="FixedTempoEstimator_8cpp_html_a7a8511e62dffb5334ad3b70d57b2fcee"><div class="ttname"><a href="FixedTempoEstimator_8cpp.html#a7a8511e62dffb5334ad3b70d57b2fcee">TempoOutput</a></div><div class="ttdeci">static int TempoOutput</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00183">FixedTempoEstimator.cpp:183</a></div></div> |
164 <a name="l00086"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">00086</a> <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#aa59cf1cb5640a910c70884579e5d99ad">m_priorMagnitudes</a>; | 151 <div class="ttc" id="structVamp_1_1PluginBase_1_1ParameterDescriptor_html_aec4ef77451ec02193ecc4a0856673fbc"><div class="ttname"><a href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#aec4ef77451ec02193ecc4a0856673fbc">Vamp::PluginBase::ParameterDescriptor::defaultValue</a></div><div class="ttdeci">float defaultValue</div><div class="ttdoc">The default value of the parameter. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00167">vamp-sdk/PluginBase.h:167</a></div></div> |
165 <a name="l00087"></a>00087 | 152 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_af5ac8147bfe79371d00aba8a19c2f8fd"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#af5ac8147bfe79371d00aba8a19c2f8fd">FixedTempoEstimator::D::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00276">FixedTempoEstimator.cpp:276</a></div></div> |
166 <a name="l00088"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">00088</a> <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#ae739e006f2d10ef2b13677770b23e663">m_dfsize</a>; | 153 <div class="ttc" id="classFixedTempoEstimator_html_a243f85a07ef5236e5c547a183969e0d2"><div class="ttname"><a href="classFixedTempoEstimator.html#a243f85a07ef5236e5c547a183969e0d2">FixedTempoEstimator::getPluginVersion</a></div><div class="ttdeci">int getPluginVersion() const</div><div class="ttdoc">Get the version number of the plugin. </div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00653">FixedTempoEstimator.cpp:653</a></div></div> |
167 <a name="l00089"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">00089</a> <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#a8e2312120e87ad9a48fedeebbaefa396">m_df</a>; | 154 <div class="ttc" id="structVamp_1_1PluginBase_1_1ParameterDescriptor_html_a7c556d58d552f737ee5a34efdf7f9425"><div class="ttname"><a href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a7c556d58d552f737ee5a34efdf7f9425">Vamp::PluginBase::ParameterDescriptor::isQuantized</a></div><div class="ttdeci">bool isQuantized</div><div class="ttdoc">True if the parameter values are quantized to a particular resolution. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00173">vamp-sdk/PluginBase.h:173</a></div></div> |
168 <a name="l00090"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">00090</a> <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#a7a8c8658ecfeec98962078df89fcd538">m_r</a>; | 155 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a20389ba1515f6ce4181d3f41e5c4f347"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a20389ba1515f6ce4181d3f41e5c4f347">FixedTempoEstimator::D::assembleFeatures</a></div><div class="ttdeci">FeatureSet assembleFeatures()</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00481">FixedTempoEstimator.cpp:481</a></div></div> |
169 <a name="l00091"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">00091</a> <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">m_fr</a>; | 156 <div class="ttc" id="classFixedTempoEstimator_html_a3967c189f054f864639837c2519bd64d"><div class="ttname"><a href="classFixedTempoEstimator.html#a3967c189f054f864639837c2519bd64d">FixedTempoEstimator::FixedTempoEstimator</a></div><div class="ttdeci">FixedTempoEstimator(float inputSampleRate)</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00617">FixedTempoEstimator.cpp:617</a></div></div> |
170 <a name="l00092"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">00092</a> <span class="keywordtype">float</span> *<a class="code" href="classFixedTempoEstimator_1_1D.html#a698446aad2c0f737732a392fb86a612c">m_t</a>; | 157 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_ab255006072672653e645fc315eea6167"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#ab255006072672653e645fc315eea6167">FixedTempoEstimator::D::m_fr</a></div><div class="ttdeci">float * m_fr</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00091">FixedTempoEstimator.cpp:91</a></div></div> |
171 <a name="l00093"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">00093</a> <span class="keywordtype">size_t</span> <a class="code" href="classFixedTempoEstimator_1_1D.html#ab73af7f1943b76388de04cbb4696a983">m_n</a>; | 158 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_a0d1194980d44e31b25ef3b4b070d6b5d"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a0d1194980d44e31b25ef3b4b070d6b5d">Vamp::Plugin::OutputDescriptor::sampleType</a></div><div class="ttdeci">SampleType sampleType</div><div class="ttdoc">Positioning in time of the output results. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00302">vamp-sdk/Plugin.h:302</a></div></div> |
172 <a name="l00094"></a>00094 | 159 <div class="ttc" id="classFixedTempoEstimator_1_1D_html_a104a9b64d47eca678844584f69ca0b9d"><div class="ttname"><a href="classFixedTempoEstimator_1_1D.html#a104a9b64d47eca678844584f69ca0b9d">FixedTempoEstimator::D::D</a></div><div class="ttdeci">D(float inputSampleRate)</div><div class="ttdef"><b>Definition:</b> <a href="FixedTempoEstimator_8cpp_source.html#l00099">FixedTempoEstimator.cpp:99</a></div></div> |
173 <a name="l00095"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">00095</a> <a class="code" href="structVamp_1_1RealTime.html" title="RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...">Vamp::RealTime</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a3a3a0b4a4c259087f02d0046241674d0">m_start</a>; | 160 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_abffa9ed50cd756df70fd51f0355f448cadea995a737867f7b22b52f1c43c5432e"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#abffa9ed50cd756df70fd51f0355f448cadea995a737867f7b22b52f1c43c5432e">Vamp::Plugin::OutputDescriptor::VariableSampleRate</a></div><div class="ttdoc">Results are unevenly spaced and have individual timestamps. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00296">vamp-sdk/Plugin.h:296</a></div></div> |
174 <a name="l00096"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#abacd5ff19c301020efb99c03136b849a">00096</a> <a class="code" href="structVamp_1_1RealTime.html" title="RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...">Vamp::RealTime</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#abacd5ff19c301020efb99c03136b849a">m_lasttime</a>; | 161 <div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_ae9ccb65f99f477096b65dd031f4c5e31"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31">Vamp::Plugin::OutputDescriptor::hasKnownExtents</a></div><div class="ttdeci">bool hasKnownExtents</div><div class="ttdoc">True if the results in each output bin fall within a fixed numeric range (minimum and maximum values)...</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00260">vamp-sdk/Plugin.h:260</a></div></div> |
175 <a name="l00097"></a>00097 }; | 162 <div class="ttc" id="classVamp_1_1PluginBase_html_a3b6bb4bbd86affe1ca9deceea1aad4f8"><div class="ttname"><a href="classVamp_1_1PluginBase.html#a3b6bb4bbd86affe1ca9deceea1aad4f8">Vamp::PluginBase::ParameterList</a></div><div class="ttdeci">std::vector< ParameterDescriptor > ParameterList</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2PluginBase_8h_source.html#l00203">vamp-sdk/PluginBase.h:203</a></div></div> |
176 <a name="l00098"></a>00098 | 163 </div><!-- fragment --></div><!-- contents --> |
177 <a name="l00099"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a104a9b64d47eca678844584f69ca0b9d">00099</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a104a9b64d47eca678844584f69ca0b9d">FixedTempoEstimator::D::D</a>(<span class="keywordtype">float</span> inputSampleRate) : | 164 </div><!-- doc-content --> |
178 <a name="l00100"></a>00100 m_inputSampleRate(inputSampleRate), | 165 <!-- start footer part --> |
179 <a name="l00101"></a>00101 m_stepSize(0), | 166 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
180 <a name="l00102"></a>00102 m_blockSize(0), | 167 <ul> |
181 <a name="l00103"></a>00103 m_minbpm(50), | 168 <li class="navelem"><a class="el" href="dir_d28a4824dc47e487b107a5db32ef43c4.html">examples</a></li><li class="navelem"><a class="el" href="FixedTempoEstimator_8cpp.html">FixedTempoEstimator.cpp</a></li> |
182 <a name="l00104"></a>00104 m_maxbpm(190), | 169 <li class="footer">Generated by |
183 <a name="l00105"></a>00105 m_maxdflen(10), | 170 <a href="http://www.doxygen.org/index.html"> |
184 <a name="l00106"></a>00106 m_priorMagnitudes(0), | 171 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
185 <a name="l00107"></a>00107 m_df(0), | 172 </ul> |
186 <a name="l00108"></a>00108 m_r(0), | |
187 <a name="l00109"></a>00109 m_fr(0), | |
188 <a name="l00110"></a>00110 m_t(0), | |
189 <a name="l00111"></a>00111 m_n(0) | |
190 <a name="l00112"></a>00112 { | |
191 <a name="l00113"></a>00113 } | |
192 <a name="l00114"></a>00114 | |
193 <a name="l00115"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a78a63ac8bbf342cb0405747871adf4cc">00115</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a78a63ac8bbf342cb0405747871adf4cc">FixedTempoEstimator::D::~D</a>() | |
194 <a name="l00116"></a>00116 { | |
195 <a name="l00117"></a>00117 <span class="keyword">delete</span>[] m_priorMagnitudes; | |
196 <a name="l00118"></a>00118 <span class="keyword">delete</span>[] m_df; | |
197 <a name="l00119"></a>00119 <span class="keyword">delete</span>[] m_r; | |
198 <a name="l00120"></a>00120 <span class="keyword">delete</span>[] m_fr; | |
199 <a name="l00121"></a>00121 <span class="keyword">delete</span>[] m_t; | |
200 <a name="l00122"></a>00122 } | |
201 <a name="l00123"></a>00123 | |
202 <a name="l00124"></a>00124 <a class="code" href="classVamp_1_1PluginBase.html#a3b6bb4bbd86affe1ca9deceea1aad4f8">FixedTempoEstimator::ParameterList</a> | |
203 <a name="l00125"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a06fcf80a9a22c4b90abbc88eb592621a">00125</a> <a class="code" href="classFixedTempoEstimator.html#ae157465a4e07d180bab05b5c3a4d8987" title="Get the controllable parameters of this plugin.">FixedTempoEstimator::D::getParameterDescriptors</a>()<span class="keyword"> const</span> | |
204 <a name="l00126"></a>00126 <span class="keyword"></span>{ | |
205 <a name="l00127"></a>00127 <a class="code" href="classVamp_1_1PluginBase.html#a3b6bb4bbd86affe1ca9deceea1aad4f8">ParameterList</a> list; | |
206 <a name="l00128"></a>00128 | |
207 <a name="l00129"></a>00129 <a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html">ParameterDescriptor</a> d; | |
208 <a name="l00130"></a>00130 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a116fd9f0dc94c2bc4bbc60b5443c598c" title="The name of the parameter, in computer-usable form.">identifier</a> = <span class="stringliteral">"minbpm"</span>; | |
209 <a name="l00131"></a>00131 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a0ecebb94fb4ada4aad2640e20aa57084" title="The human-readable name of the parameter.">name</a> = <span class="stringliteral">"Minimum estimated tempo"</span>; | |
210 <a name="l00132"></a>00132 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a780ddad41e433d85c82f9ea4d959cbaf" title="A human-readable short text describing the parameter.">description</a> = <span class="stringliteral">"Minimum beat-per-minute value which the tempo estimator is able to return"</span>; | |
211 <a name="l00133"></a>00133 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a3bc3df322e4c02e17e96bc6d44982d7b" title="The unit of the parameter, in human-readable form.">unit</a> = <span class="stringliteral">"bpm"</span>; | |
212 <a name="l00134"></a>00134 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab3e4d84f5bc199eea8b642b27e425ec8" title="The minimum value of the parameter.">minValue</a> = 10; | |
213 <a name="l00135"></a>00135 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab934b20dd708228a0e3c2811a3e2cec4" title="The maximum value of the parameter.">maxValue</a> = 360; | |
214 <a name="l00136"></a>00136 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#aec4ef77451ec02193ecc4a0856673fbc" title="The default value of the parameter.">defaultValue</a> = 50; | |
215 <a name="l00137"></a>00137 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a7c556d58d552f737ee5a34efdf7f9425" title="True if the parameter values are quantized to a particular resolution.">isQuantized</a> = <span class="keyword">false</span>; | |
216 <a name="l00138"></a>00138 list.push_back(d); | |
217 <a name="l00139"></a>00139 | |
218 <a name="l00140"></a>00140 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a116fd9f0dc94c2bc4bbc60b5443c598c" title="The name of the parameter, in computer-usable form.">identifier</a> = <span class="stringliteral">"maxbpm"</span>; | |
219 <a name="l00141"></a>00141 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a0ecebb94fb4ada4aad2640e20aa57084" title="The human-readable name of the parameter.">name</a> = <span class="stringliteral">"Maximum estimated tempo"</span>; | |
220 <a name="l00142"></a>00142 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a780ddad41e433d85c82f9ea4d959cbaf" title="A human-readable short text describing the parameter.">description</a> = <span class="stringliteral">"Maximum beat-per-minute value which the tempo estimator is able to return"</span>; | |
221 <a name="l00143"></a>00143 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#aec4ef77451ec02193ecc4a0856673fbc" title="The default value of the parameter.">defaultValue</a> = 190; | |
222 <a name="l00144"></a>00144 list.push_back(d); | |
223 <a name="l00145"></a>00145 | |
224 <a name="l00146"></a>00146 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a116fd9f0dc94c2bc4bbc60b5443c598c" title="The name of the parameter, in computer-usable form.">identifier</a> = <span class="stringliteral">"maxdflen"</span>; | |
225 <a name="l00147"></a>00147 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a0ecebb94fb4ada4aad2640e20aa57084" title="The human-readable name of the parameter.">name</a> = <span class="stringliteral">"Input duration to study"</span>; | |
226 <a name="l00148"></a>00148 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a780ddad41e433d85c82f9ea4d959cbaf" title="A human-readable short text describing the parameter.">description</a> = <span class="stringliteral">"Length of audio input, in seconds, which should be taken into account when estimating tempo. There is no need to supply the plugin with any further input once this time has elapsed since the start of the audio. The tempo estimator may use only the first part of this, up to eight times the slowest beat duration: increasing this value further than that is unlikely to improve results."</span>; | |
227 <a name="l00149"></a>00149 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#a3bc3df322e4c02e17e96bc6d44982d7b" title="The unit of the parameter, in human-readable form.">unit</a> = <span class="stringliteral">"s"</span>; | |
228 <a name="l00150"></a>00150 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab3e4d84f5bc199eea8b642b27e425ec8" title="The minimum value of the parameter.">minValue</a> = 2; | |
229 <a name="l00151"></a>00151 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#ab934b20dd708228a0e3c2811a3e2cec4" title="The maximum value of the parameter.">maxValue</a> = 40; | |
230 <a name="l00152"></a>00152 d.<a class="code" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html#aec4ef77451ec02193ecc4a0856673fbc" title="The default value of the parameter.">defaultValue</a> = 10; | |
231 <a name="l00153"></a>00153 list.push_back(d); | |
232 <a name="l00154"></a>00154 | |
233 <a name="l00155"></a>00155 <span class="keywordflow">return</span> list; | |
234 <a name="l00156"></a>00156 } | |
235 <a name="l00157"></a>00157 | |
236 <a name="l00158"></a>00158 <span class="keywordtype">float</span> | |
237 <a name="l00159"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a968ef2e555c81e4a3bde89d19fafb31a">00159</a> <a class="code" href="classFixedTempoEstimator.html#a2030b05fb1228b30ace16200780c9152" title="Get the value of a named parameter.">FixedTempoEstimator::D::getParameter</a>(<span class="keywordtype">string</span> <span class="keywordtype">id</span>)<span class="keyword"> const</span> | |
238 <a name="l00160"></a>00160 <span class="keyword"></span>{ | |
239 <a name="l00161"></a>00161 <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"minbpm"</span>) { | |
240 <a name="l00162"></a>00162 <span class="keywordflow">return</span> m_minbpm; | |
241 <a name="l00163"></a>00163 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"maxbpm"</span>) { | |
242 <a name="l00164"></a>00164 <span class="keywordflow">return</span> m_maxbpm; | |
243 <a name="l00165"></a>00165 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"maxdflen"</span>) { | |
244 <a name="l00166"></a>00166 <span class="keywordflow">return</span> m_maxdflen; | |
245 <a name="l00167"></a>00167 } | |
246 <a name="l00168"></a>00168 <span class="keywordflow">return</span> 0.f; | |
247 <a name="l00169"></a>00169 } | |
248 <a name="l00170"></a>00170 | |
249 <a name="l00171"></a>00171 <span class="keywordtype">void</span> | |
250 <a name="l00172"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a6cafa64d4cc8aa3556bc0ce6b0c49bc4">00172</a> <a class="code" href="classFixedTempoEstimator.html#a8a5a413025384cf451c64d2c2ce13a75" title="Set a named parameter.">FixedTempoEstimator::D::setParameter</a>(<span class="keywordtype">string</span> <span class="keywordtype">id</span>, <span class="keywordtype">float</span> value) | |
251 <a name="l00173"></a>00173 { | |
252 <a name="l00174"></a>00174 <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"minbpm"</span>) { | |
253 <a name="l00175"></a>00175 m_minbpm = value; | |
254 <a name="l00176"></a>00176 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"maxbpm"</span>) { | |
255 <a name="l00177"></a>00177 m_maxbpm = value; | |
256 <a name="l00178"></a>00178 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">id</span> == <span class="stringliteral">"maxdflen"</span>) { | |
257 <a name="l00179"></a>00179 m_maxdflen = value; | |
258 <a name="l00180"></a>00180 } | |
259 <a name="l00181"></a>00181 } | |
260 <a name="l00182"></a>00182 | |
261 <a name="l00183"></a><a class="code" href="FixedTempoEstimator_8cpp.html#a7a8511e62dffb5334ad3b70d57b2fcee">00183</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#a7a8511e62dffb5334ad3b70d57b2fcee">TempoOutput</a> = 0; | |
262 <a name="l00184"></a><a class="code" href="FixedTempoEstimator_8cpp.html#a554b16c6b7516530e52c65318bfe08eb">00184</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#a554b16c6b7516530e52c65318bfe08eb">CandidatesOutput</a> = 1; | |
263 <a name="l00185"></a><a class="code" href="FixedTempoEstimator_8cpp.html#acaa4524f29afce03c812a88ff31159c1">00185</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#acaa4524f29afce03c812a88ff31159c1">DFOutput</a> = 2; | |
264 <a name="l00186"></a><a class="code" href="FixedTempoEstimator_8cpp.html#a382c1fe740ac8911c6078cfbceffc870">00186</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#a382c1fe740ac8911c6078cfbceffc870">ACFOutput</a> = 3; | |
265 <a name="l00187"></a><a class="code" href="FixedTempoEstimator_8cpp.html#a5b284021783d79785d46b043b458368d">00187</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="FixedTempoEstimator_8cpp.html#a5b284021783d79785d46b043b458368d">FilteredACFOutput</a> = 4; | |
266 <a name="l00188"></a>00188 | |
267 <a name="l00189"></a>00189 <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">FixedTempoEstimator::OutputList</a> | |
268 <a name="l00190"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a7ce98af800f36045a0dae4b1dbed943f">00190</a> <a class="code" href="classFixedTempoEstimator.html#a83121c205a723fe6297e2bf8870622a4" title="Get the outputs of this plugin.">FixedTempoEstimator::D::getOutputDescriptors</a>()<span class="keyword"> const</span> | |
269 <a name="l00191"></a>00191 <span class="keyword"></span>{ | |
270 <a name="l00192"></a>00192 <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">OutputList</a> list; | |
271 <a name="l00193"></a>00193 | |
272 <a name="l00194"></a>00194 <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html">OutputDescriptor</a> d; | |
273 <a name="l00195"></a>00195 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b" title="The name of the output, in computer-usable form.">identifier</a> = <span class="stringliteral">"tempo"</span>; | |
274 <a name="l00196"></a>00196 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87" title="The human-readable name of the output.">name</a> = <span class="stringliteral">"Tempo"</span>; | |
275 <a name="l00197"></a>00197 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1" title="A human-readable short text describing the output.">description</a> = <span class="stringliteral">"Estimated tempo"</span>; | |
276 <a name="l00198"></a>00198 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4" title="The unit of the output, in human-readable form.">unit</a> = <span class="stringliteral">"bpm"</span>; | |
277 <a name="l00199"></a>00199 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d" title="True if the output has the same number of values per sample for every output sample.">hasFixedBinCount</a> = <span class="keyword">true</span>; | |
278 <a name="l00200"></a>00200 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#afdd006959a995e40ef7d565a3a4df6dc" title="The number of values per result of the output.">binCount</a> = 1; | |
279 <a name="l00201"></a>00201 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31" title="True if the results in each output bin fall within a fixed numeric range (minimum and maximum values)...">hasKnownExtents</a> = <span class="keyword">false</span>; | |
280 <a name="l00202"></a>00202 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a1b4858928d23bfd7d5bc557c82a83fb4" title="True if the output values are quantized to a particular resolution.">isQuantized</a> = <span class="keyword">false</span>; | |
281 <a name="l00203"></a>00203 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a0d1194980d44e31b25ef3b4b070d6b5d" title="Positioning in time of the output results.">sampleType</a> = <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#abffa9ed50cd756df70fd51f0355f448cadea995a737867f7b22b52f1c43c5432e" title="Results are unevenly spaced and have individual timestamps.">OutputDescriptor::VariableSampleRate</a>; | |
282 <a name="l00204"></a>00204 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#add0cbbdfa9c91764037c39365b1d42af" title="Sample rate of the output results, as samples per second.">sampleRate</a> = <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>; | |
283 <a name="l00205"></a>00205 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab0d7cc6ab19e53b5bd12ee234f549ea3" title="True if the returned results for this output are known to have a duration field.">hasDuration</a> = <span class="keyword">true</span>; <span class="comment">// our returned tempo spans a certain range</span> | |
284 <a name="l00206"></a>00206 list.push_back(d); | |
285 <a name="l00207"></a>00207 | |
286 <a name="l00208"></a>00208 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b" title="The name of the output, in computer-usable form.">identifier</a> = <span class="stringliteral">"candidates"</span>; | |
287 <a name="l00209"></a>00209 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87" title="The human-readable name of the output.">name</a> = <span class="stringliteral">"Tempo candidates"</span>; | |
288 <a name="l00210"></a>00210 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1" title="A human-readable short text describing the output.">description</a> = <span class="stringliteral">"Possible tempo estimates, one per bin with the most likely in the first bin"</span>; | |
289 <a name="l00211"></a>00211 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4" title="The unit of the output, in human-readable form.">unit</a> = <span class="stringliteral">"bpm"</span>; | |
290 <a name="l00212"></a>00212 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d" title="True if the output has the same number of values per sample for every output sample.">hasFixedBinCount</a> = <span class="keyword">false</span>; | |
291 <a name="l00213"></a>00213 list.push_back(d); | |
292 <a name="l00214"></a>00214 | |
293 <a name="l00215"></a>00215 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b" title="The name of the output, in computer-usable form.">identifier</a> = <span class="stringliteral">"detectionfunction"</span>; | |
294 <a name="l00216"></a>00216 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87" title="The human-readable name of the output.">name</a> = <span class="stringliteral">"Detection Function"</span>; | |
295 <a name="l00217"></a>00217 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1" title="A human-readable short text describing the output.">description</a> = <span class="stringliteral">"Onset detection function"</span>; | |
296 <a name="l00218"></a>00218 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4" title="The unit of the output, in human-readable form.">unit</a> = <span class="stringliteral">""</span>; | |
297 <a name="l00219"></a>00219 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d" title="True if the output has the same number of values per sample for every output sample.">hasFixedBinCount</a> = 1; | |
298 <a name="l00220"></a>00220 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#afdd006959a995e40ef7d565a3a4df6dc" title="The number of values per result of the output.">binCount</a> = 1; | |
299 <a name="l00221"></a>00221 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31" title="True if the results in each output bin fall within a fixed numeric range (minimum and maximum values)...">hasKnownExtents</a> = <span class="keyword">true</span>; | |
300 <a name="l00222"></a>00222 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ac9f5924c0be7571bba8e7ae7e7a921f4" title="Minimum value of the results in the output.">minValue</a> = 0.0; | |
301 <a name="l00223"></a>00223 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a907b4e8fbb48a46ac5a05f880d72719f" title="Maximum value of the results in the output.">maxValue</a> = 1.0; | |
302 <a name="l00224"></a>00224 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a1b4858928d23bfd7d5bc557c82a83fb4" title="True if the output values are quantized to a particular resolution.">isQuantized</a> = <span class="keyword">false</span>; | |
303 <a name="l00225"></a>00225 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a3bed37153067b625b95acb40b60dbf0b" title="Quantization resolution of the output values (e.g.">quantizeStep</a> = 0.0; | |
304 <a name="l00226"></a>00226 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a0d1194980d44e31b25ef3b4b070d6b5d" title="Positioning in time of the output results.">sampleType</a> = <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#abffa9ed50cd756df70fd51f0355f448ca4c74bd2fc96dfe2815623f94b40e5629" title="Results are evenly spaced in time (sampleRate specified below)">OutputDescriptor::FixedSampleRate</a>; | |
305 <a name="l00227"></a>00227 <span class="keywordflow">if</span> (m_stepSize) { | |
306 <a name="l00228"></a>00228 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#add0cbbdfa9c91764037c39365b1d42af" title="Sample rate of the output results, as samples per second.">sampleRate</a> = <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a> / m_stepSize; | |
307 <a name="l00229"></a>00229 } <span class="keywordflow">else</span> { | |
308 <a name="l00230"></a>00230 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#add0cbbdfa9c91764037c39365b1d42af" title="Sample rate of the output results, as samples per second.">sampleRate</a> = <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a> / (<a class="code" href="classFixedTempoEstimator.html#a68b8569b71504a0478caf990dbe30683" title="Get the preferred block size (window size -- the number of sample frames passed in each block to the ...">getPreferredBlockSize</a>()/2); | |
309 <a name="l00231"></a>00231 } | |
310 <a name="l00232"></a>00232 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab0d7cc6ab19e53b5bd12ee234f549ea3" title="True if the returned results for this output are known to have a duration field.">hasDuration</a> = <span class="keyword">false</span>; | |
311 <a name="l00233"></a>00233 list.push_back(d); | |
312 <a name="l00234"></a>00234 | |
313 <a name="l00235"></a>00235 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b" title="The name of the output, in computer-usable form.">identifier</a> = <span class="stringliteral">"acf"</span>; | |
314 <a name="l00236"></a>00236 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87" title="The human-readable name of the output.">name</a> = <span class="stringliteral">"Autocorrelation Function"</span>; | |
315 <a name="l00237"></a>00237 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1" title="A human-readable short text describing the output.">description</a> = <span class="stringliteral">"Autocorrelation of onset detection function"</span>; | |
316 <a name="l00238"></a>00238 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31" title="True if the results in each output bin fall within a fixed numeric range (minimum and maximum values)...">hasKnownExtents</a> = <span class="keyword">false</span>; | |
317 <a name="l00239"></a>00239 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4" title="The unit of the output, in human-readable form.">unit</a> = <span class="stringliteral">"r"</span>; | |
318 <a name="l00240"></a>00240 list.push_back(d); | |
319 <a name="l00241"></a>00241 | |
320 <a name="l00242"></a>00242 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b" title="The name of the output, in computer-usable form.">identifier</a> = <span class="stringliteral">"filtered_acf"</span>; | |
321 <a name="l00243"></a>00243 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87" title="The human-readable name of the output.">name</a> = <span class="stringliteral">"Filtered Autocorrelation"</span>; | |
322 <a name="l00244"></a>00244 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1" title="A human-readable short text describing the output.">description</a> = <span class="stringliteral">"Filtered autocorrelation of onset detection function"</span>; | |
323 <a name="l00245"></a>00245 d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4" title="The unit of the output, in human-readable form.">unit</a> = <span class="stringliteral">"r"</span>; | |
324 <a name="l00246"></a>00246 list.push_back(d); | |
325 <a name="l00247"></a>00247 | |
326 <a name="l00248"></a>00248 <span class="keywordflow">return</span> list; | |
327 <a name="l00249"></a>00249 } | |
328 <a name="l00250"></a>00250 | |
329 <a name="l00251"></a>00251 <span class="keywordtype">bool</span> | |
330 <a name="l00252"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#af0fcad4493650728babb7e341963c91d">00252</a> <a class="code" href="classFixedTempoEstimator.html#aa7500a4ffbc4653baaf5101defdb37f5" title="Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).">FixedTempoEstimator::D::initialise</a>(<span class="keywordtype">size_t</span>, <span class="keywordtype">size_t</span> stepSize, <span class="keywordtype">size_t</span> blockSize) | |
331 <a name="l00253"></a>00253 { | |
332 <a name="l00254"></a>00254 m_stepSize = stepSize; | |
333 <a name="l00255"></a>00255 m_blockSize = blockSize; | |
334 <a name="l00256"></a>00256 | |
335 <a name="l00257"></a>00257 <span class="keywordtype">float</span> dfLengthSecs = m_maxdflen; | |
336 <a name="l00258"></a>00258 m_dfsize = (dfLengthSecs * <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>) / m_stepSize; | |
337 <a name="l00259"></a>00259 | |
338 <a name="l00260"></a>00260 m_priorMagnitudes = <span class="keyword">new</span> <span class="keywordtype">float</span>[m_blockSize/2]; | |
339 <a name="l00261"></a>00261 m_df = <span class="keyword">new</span> <span class="keywordtype">float</span>[m_dfsize]; | |
340 <a name="l00262"></a>00262 | |
341 <a name="l00263"></a>00263 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < m_blockSize/2; ++i) { | |
342 <a name="l00264"></a>00264 m_priorMagnitudes[i] = 0.f; | |
343 <a name="l00265"></a>00265 } | |
344 <a name="l00266"></a>00266 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < m_dfsize; ++i) { | |
345 <a name="l00267"></a>00267 m_df[i] = 0.f; | |
346 <a name="l00268"></a>00268 } | |
347 <a name="l00269"></a>00269 | |
348 <a name="l00270"></a>00270 m_n = 0; | |
349 <a name="l00271"></a>00271 | |
350 <a name="l00272"></a>00272 <span class="keywordflow">return</span> <span class="keyword">true</span>; | |
351 <a name="l00273"></a>00273 } | |
352 <a name="l00274"></a>00274 | |
353 <a name="l00275"></a>00275 <span class="keywordtype">void</span> | |
354 <a name="l00276"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#af5ac8147bfe79371d00aba8a19c2f8fd">00276</a> <a class="code" href="classFixedTempoEstimator.html#ac41708397255400c6682fee6c1b3d45f" title="Reset the plugin after use, to prepare it for another clean run.">FixedTempoEstimator::D::reset</a>() | |
355 <a name="l00277"></a>00277 { | |
356 <a name="l00278"></a>00278 <span class="keywordflow">if</span> (!m_priorMagnitudes) <span class="keywordflow">return</span>; | |
357 <a name="l00279"></a>00279 | |
358 <a name="l00280"></a>00280 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < m_blockSize/2; ++i) { | |
359 <a name="l00281"></a>00281 m_priorMagnitudes[i] = 0.f; | |
360 <a name="l00282"></a>00282 } | |
361 <a name="l00283"></a>00283 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < m_dfsize; ++i) { | |
362 <a name="l00284"></a>00284 m_df[i] = 0.f; | |
363 <a name="l00285"></a>00285 } | |
364 <a name="l00286"></a>00286 | |
365 <a name="l00287"></a>00287 <span class="keyword">delete</span>[] m_r; | |
366 <a name="l00288"></a>00288 m_r = 0; | |
367 <a name="l00289"></a>00289 | |
368 <a name="l00290"></a>00290 <span class="keyword">delete</span>[] m_fr; | |
369 <a name="l00291"></a>00291 m_fr = 0; | |
370 <a name="l00292"></a>00292 | |
371 <a name="l00293"></a>00293 <span class="keyword">delete</span>[] m_t; | |
372 <a name="l00294"></a>00294 m_t = 0; | |
373 <a name="l00295"></a>00295 | |
374 <a name="l00296"></a>00296 m_n = 0; | |
375 <a name="l00297"></a>00297 | |
376 <a name="l00298"></a>00298 m_start = RealTime::zeroTime; | |
377 <a name="l00299"></a>00299 m_lasttime = RealTime::zeroTime; | |
378 <a name="l00300"></a>00300 } | |
379 <a name="l00301"></a>00301 | |
380 <a name="l00302"></a>00302 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a> | |
381 <a name="l00303"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a7fac74fc9fc54f436408705d1e125e20">00303</a> <a class="code" href="classFixedTempoEstimator.html#a1cf76b0e55cf4ed3da095cffcdeaec3c" title="Process a single block of input data.">FixedTempoEstimator::D::process</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> *<span class="keyword">const</span> *inputBuffers, <a class="code" href="structVamp_1_1RealTime.html" title="RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...">RealTime</a> ts) | |
382 <a name="l00304"></a>00304 { | |
383 <a name="l00305"></a>00305 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> fs; | |
384 <a name="l00306"></a>00306 | |
385 <a name="l00307"></a>00307 <span class="keywordflow">if</span> (m_stepSize == 0) { | |
386 <a name="l00308"></a>00308 cerr << <span class="stringliteral">"ERROR: FixedTempoEstimator::process: "</span> | |
387 <a name="l00309"></a>00309 << <span class="stringliteral">"FixedTempoEstimator has not been initialised"</span> | |
388 <a name="l00310"></a>00310 << endl; | |
389 <a name="l00311"></a>00311 <span class="keywordflow">return</span> fs; | |
390 <a name="l00312"></a>00312 } | |
391 <a name="l00313"></a>00313 | |
392 <a name="l00314"></a>00314 <span class="keywordflow">if</span> (m_n == 0) m_start = ts; | |
393 <a name="l00315"></a>00315 m_lasttime = ts; | |
394 <a name="l00316"></a>00316 | |
395 <a name="l00317"></a>00317 <span class="keywordflow">if</span> (m_n == m_dfsize) { | |
396 <a name="l00318"></a>00318 <span class="comment">// If we have seen enough input, do the estimation and return</span> | |
397 <a name="l00319"></a>00319 calculate(); | |
398 <a name="l00320"></a>00320 fs = assembleFeatures(); | |
399 <a name="l00321"></a>00321 ++m_n; | |
400 <a name="l00322"></a>00322 <span class="keywordflow">return</span> fs; | |
401 <a name="l00323"></a>00323 } | |
402 <a name="l00324"></a>00324 | |
403 <a name="l00325"></a>00325 <span class="comment">// If we have seen more than enough, just discard and return!</span> | |
404 <a name="l00326"></a>00326 <span class="keywordflow">if</span> (m_n > m_dfsize) <span class="keywordflow">return</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a>(); | |
405 <a name="l00327"></a>00327 | |
406 <a name="l00328"></a>00328 <span class="keywordtype">float</span> value = 0.f; | |
407 <a name="l00329"></a>00329 | |
408 <a name="l00330"></a>00330 <span class="comment">// m_df will contain an onset detection function based on the rise</span> | |
409 <a name="l00331"></a>00331 <span class="comment">// in overall power from one spectral frame to the next --</span> | |
410 <a name="l00332"></a>00332 <span class="comment">// simplistic but reasonably effective for our purposes.</span> | |
411 <a name="l00333"></a>00333 | |
412 <a name="l00334"></a>00334 <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i < m_blockSize/2; ++i) { | |
413 <a name="l00335"></a>00335 | |
414 <a name="l00336"></a>00336 <span class="keywordtype">float</span> real = inputBuffers[0][i*2]; | |
415 <a name="l00337"></a>00337 <span class="keywordtype">float</span> imag = inputBuffers[0][i*2 + 1]; | |
416 <a name="l00338"></a>00338 | |
417 <a name="l00339"></a>00339 <span class="keywordtype">float</span> sqrmag = real * real + imag * imag; | |
418 <a name="l00340"></a>00340 value += fabsf(sqrmag - m_priorMagnitudes[i]); | |
419 <a name="l00341"></a>00341 | |
420 <a name="l00342"></a>00342 m_priorMagnitudes[i] = sqrmag; | |
421 <a name="l00343"></a>00343 } | |
422 <a name="l00344"></a>00344 | |
423 <a name="l00345"></a>00345 m_df[m_n] = value; | |
424 <a name="l00346"></a>00346 | |
425 <a name="l00347"></a>00347 ++m_n; | |
426 <a name="l00348"></a>00348 <span class="keywordflow">return</span> fs; | |
427 <a name="l00349"></a>00349 } | |
428 <a name="l00350"></a>00350 | |
429 <a name="l00351"></a>00351 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a> | |
430 <a name="l00352"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a7f9c3603bb3374d6936885010dbdd82b">00352</a> <a class="code" href="classFixedTempoEstimator.html#a4965cf99be77fc4d1de51e11d83936b0" title="After all blocks have been processed, calculate and return any remaining features derived from the co...">FixedTempoEstimator::D::getRemainingFeatures</a>() | |
431 <a name="l00353"></a>00353 { | |
432 <a name="l00354"></a>00354 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> fs; | |
433 <a name="l00355"></a>00355 <span class="keywordflow">if</span> (m_n > m_dfsize) <span class="keywordflow">return</span> fs; | |
434 <a name="l00356"></a>00356 calculate(); | |
435 <a name="l00357"></a>00357 fs = assembleFeatures(); | |
436 <a name="l00358"></a>00358 ++m_n; | |
437 <a name="l00359"></a>00359 <span class="keywordflow">return</span> fs; | |
438 <a name="l00360"></a>00360 } | |
439 <a name="l00361"></a>00361 | |
440 <a name="l00362"></a>00362 <span class="keywordtype">float</span> | |
441 <a name="l00363"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">00363</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a0a7cb0705938097ab23a6f9187e6bae5">FixedTempoEstimator::D::lag2tempo</a>(<span class="keywordtype">int</span> lag) | |
442 <a name="l00364"></a>00364 { | |
443 <a name="l00365"></a>00365 <span class="keywordflow">return</span> 60.f / ((lag * m_stepSize) / <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>); | |
444 <a name="l00366"></a>00366 } | |
445 <a name="l00367"></a>00367 | |
446 <a name="l00368"></a>00368 <span class="keywordtype">int</span> | |
447 <a name="l00369"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#ac6a75212293fc855de6ed0c6581a0fb9">00369</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#ac6a75212293fc855de6ed0c6581a0fb9">FixedTempoEstimator::D::tempo2lag</a>(<span class="keywordtype">float</span> tempo) | |
448 <a name="l00370"></a>00370 { | |
449 <a name="l00371"></a>00371 <span class="keywordflow">return</span> ((60.f / tempo) * <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>) / m_stepSize; | |
450 <a name="l00372"></a>00372 } | |
451 <a name="l00373"></a>00373 | |
452 <a name="l00374"></a>00374 <span class="keywordtype">void</span> | |
453 <a name="l00375"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a4f2cbc11fba5bc8af3fd2a0078156091">00375</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a4f2cbc11fba5bc8af3fd2a0078156091">FixedTempoEstimator::D::calculate</a>() | |
454 <a name="l00376"></a>00376 { | |
455 <a name="l00377"></a>00377 <span class="keywordflow">if</span> (m_r) { | |
456 <a name="l00378"></a>00378 cerr << <span class="stringliteral">"FixedTempoEstimator::calculate: calculation already happened?"</span> << endl; | |
457 <a name="l00379"></a>00379 <span class="keywordflow">return</span>; | |
458 <a name="l00380"></a>00380 } | |
459 <a name="l00381"></a>00381 | |
460 <a name="l00382"></a>00382 <span class="keywordflow">if</span> (m_n < m_dfsize / 9 && | |
461 <a name="l00383"></a>00383 m_n < (1.0 * <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>) / m_stepSize) { <span class="comment">// 1 second</span> | |
462 <a name="l00384"></a>00384 cerr << <span class="stringliteral">"FixedTempoEstimator::calculate: Input is too short"</span> << endl; | |
463 <a name="l00385"></a>00385 <span class="keywordflow">return</span>; | |
464 <a name="l00386"></a>00386 } | |
465 <a name="l00387"></a>00387 | |
466 <a name="l00388"></a>00388 <span class="comment">// This function takes m_df (the detection function array filled</span> | |
467 <a name="l00389"></a>00389 <span class="comment">// out in process()) and calculates m_r (the raw autocorrelation)</span> | |
468 <a name="l00390"></a>00390 <span class="comment">// and m_fr (the filtered autocorrelation from whose peaks tempo</span> | |
469 <a name="l00391"></a>00391 <span class="comment">// estimates will be taken).</span> | |
470 <a name="l00392"></a>00392 | |
471 <a name="l00393"></a>00393 <span class="keywordtype">int</span> n = m_n; <span class="comment">// length of actual df array (m_dfsize is the theoretical max)</span> | |
472 <a name="l00394"></a>00394 | |
473 <a name="l00395"></a>00395 m_r = <span class="keyword">new</span> <span class="keywordtype">float</span>[n/2]; <span class="comment">// raw autocorrelation</span> | |
474 <a name="l00396"></a>00396 m_fr = <span class="keyword">new</span> <span class="keywordtype">float</span>[n/2]; <span class="comment">// filtered autocorrelation</span> | |
475 <a name="l00397"></a>00397 m_t = <span class="keyword">new</span> <span class="keywordtype">float</span>[n/2]; <span class="comment">// averaged tempo estimate for each lag value</span> | |
476 <a name="l00398"></a>00398 | |
477 <a name="l00399"></a>00399 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n/2; ++i) { | |
478 <a name="l00400"></a>00400 m_r[i] = 0.f; | |
479 <a name="l00401"></a>00401 m_fr[i] = 0.f; | |
480 <a name="l00402"></a>00402 m_t[i] = lag2tempo(i); | |
481 <a name="l00403"></a>00403 } | |
482 <a name="l00404"></a>00404 | |
483 <a name="l00405"></a>00405 <span class="comment">// Calculate the raw autocorrelation of the detection function</span> | |
484 <a name="l00406"></a>00406 | |
485 <a name="l00407"></a>00407 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n/2; ++i) { | |
486 <a name="l00408"></a>00408 | |
487 <a name="l00409"></a>00409 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i; j < n; ++j) { | |
488 <a name="l00410"></a>00410 m_r[i] += m_df[j] * m_df[j - i]; | |
489 <a name="l00411"></a>00411 } | |
490 <a name="l00412"></a>00412 | |
491 <a name="l00413"></a>00413 m_r[i] /= n - i - 1; | |
492 <a name="l00414"></a>00414 } | |
493 <a name="l00415"></a>00415 | |
494 <a name="l00416"></a>00416 <span class="comment">// Filter the autocorrelation and average out the tempo estimates</span> | |
495 <a name="l00417"></a>00417 | |
496 <a name="l00418"></a>00418 <span class="keywordtype">float</span> related[] = { 0.5, 2, 4, 8 }; | |
497 <a name="l00419"></a>00419 | |
498 <a name="l00420"></a>00420 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i < n/2-1; ++i) { | |
499 <a name="l00421"></a>00421 | |
500 <a name="l00422"></a>00422 m_fr[i] = m_r[i]; | |
501 <a name="l00423"></a>00423 | |
502 <a name="l00424"></a>00424 <span class="keywordtype">int</span> div = 1; | |
503 <a name="l00425"></a>00425 | |
504 <a name="l00426"></a>00426 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < int(<span class="keyword">sizeof</span>(related)/<span class="keyword">sizeof</span>(related[0])); ++j) { | |
505 <a name="l00427"></a>00427 | |
506 <a name="l00428"></a>00428 <span class="comment">// Check for an obvious peak at each metrically related lag</span> | |
507 <a name="l00429"></a>00429 | |
508 <a name="l00430"></a>00430 <span class="keywordtype">int</span> k0 = int(i * related[j] + 0.5); | |
509 <a name="l00431"></a>00431 | |
510 <a name="l00432"></a>00432 <span class="keywordflow">if</span> (k0 >= 0 && k0 < <span class="keywordtype">int</span>(n/2)) { | |
511 <a name="l00433"></a>00433 | |
512 <a name="l00434"></a>00434 <span class="keywordtype">int</span> kmax = 0, kmin = 0; | |
513 <a name="l00435"></a>00435 <span class="keywordtype">float</span> kvmax = 0, kvmin = 0; | |
514 <a name="l00436"></a>00436 <span class="keywordtype">bool</span> have = <span class="keyword">false</span>; | |
515 <a name="l00437"></a>00437 | |
516 <a name="l00438"></a>00438 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = k0 - 1; k <= k0 + 1; ++k) { | |
517 <a name="l00439"></a>00439 | |
518 <a name="l00440"></a>00440 <span class="keywordflow">if</span> (k < 0 || k >= n/2) <span class="keywordflow">continue</span>; | |
519 <a name="l00441"></a>00441 | |
520 <a name="l00442"></a>00442 <span class="keywordflow">if</span> (!have || (m_r[k] > kvmax)) { kmax = k; kvmax = m_r[k]; } | |
521 <a name="l00443"></a>00443 <span class="keywordflow">if</span> (!have || (m_r[k] < kvmin)) { kmin = k; kvmin = m_r[k]; } | |
522 <a name="l00444"></a>00444 | |
523 <a name="l00445"></a>00445 have = <span class="keyword">true</span>; | |
524 <a name="l00446"></a>00446 } | |
525 <a name="l00447"></a>00447 | |
526 <a name="l00448"></a>00448 <span class="comment">// Boost the original lag according to the strongest</span> | |
527 <a name="l00449"></a>00449 <span class="comment">// value found close to this related lag</span> | |
528 <a name="l00450"></a>00450 | |
529 <a name="l00451"></a>00451 m_fr[i] += m_r[kmax] / 5; | |
530 <a name="l00452"></a>00452 | |
531 <a name="l00453"></a>00453 <span class="keywordflow">if</span> ((kmax == 0 || m_r[kmax] > m_r[kmax-1]) && | |
532 <a name="l00454"></a>00454 (kmax == n/2-1 || m_r[kmax] > m_r[kmax+1]) && | |
533 <a name="l00455"></a>00455 kvmax > kvmin * 1.05) { | |
534 <a name="l00456"></a>00456 | |
535 <a name="l00457"></a>00457 <span class="comment">// The strongest value close to the related lag is</span> | |
536 <a name="l00458"></a>00458 <span class="comment">// also a pretty good looking peak, so use it to</span> | |
537 <a name="l00459"></a>00459 <span class="comment">// improve our tempo estimate for the original lag</span> | |
538 <a name="l00460"></a>00460 | |
539 <a name="l00461"></a>00461 m_t[i] = m_t[i] + lag2tempo(kmax) * related[j]; | |
540 <a name="l00462"></a>00462 ++div; | |
541 <a name="l00463"></a>00463 } | |
542 <a name="l00464"></a>00464 } | |
543 <a name="l00465"></a>00465 } | |
544 <a name="l00466"></a>00466 | |
545 <a name="l00467"></a>00467 m_t[i] /= div; | |
546 <a name="l00468"></a>00468 | |
547 <a name="l00469"></a>00469 <span class="comment">// Finally apply a primitive perceptual weighting (to prefer</span> | |
548 <a name="l00470"></a>00470 <span class="comment">// tempi of around 120-130)</span> | |
549 <a name="l00471"></a>00471 | |
550 <a name="l00472"></a>00472 <span class="keywordtype">float</span> weight = 1.f - fabsf(128.f - lag2tempo(i)) * 0.005; | |
551 <a name="l00473"></a>00473 <span class="keywordflow">if</span> (weight < 0.f) weight = 0.f; | |
552 <a name="l00474"></a>00474 weight = weight * weight * weight; | |
553 <a name="l00475"></a>00475 | |
554 <a name="l00476"></a>00476 m_fr[i] += m_fr[i] * (weight / 3); | |
555 <a name="l00477"></a>00477 } | |
556 <a name="l00478"></a>00478 } | |
557 <a name="l00479"></a>00479 | |
558 <a name="l00480"></a>00480 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a> | |
559 <a name="l00481"></a><a class="code" href="classFixedTempoEstimator_1_1D.html#a20389ba1515f6ce4181d3f41e5c4f347">00481</a> <a class="code" href="classFixedTempoEstimator_1_1D.html#a20389ba1515f6ce4181d3f41e5c4f347">FixedTempoEstimator::D::assembleFeatures</a>() | |
560 <a name="l00482"></a>00482 { | |
561 <a name="l00483"></a>00483 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> fs; | |
562 <a name="l00484"></a>00484 <span class="keywordflow">if</span> (!m_r) <span class="keywordflow">return</span> fs; <span class="comment">// No autocorrelation: no results</span> | |
563 <a name="l00485"></a>00485 | |
564 <a name="l00486"></a>00486 <a class="code" href="structVamp_1_1Plugin_1_1Feature.html">Feature</a> feature; | |
565 <a name="l00487"></a>00487 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a98907091d0b6a589720ae35ae588a82b" title="True if an output feature has its own timestamp.">hasTimestamp</a> = <span class="keyword">true</span>; | |
566 <a name="l00488"></a>00488 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a33686757bd4481c72494122e9bfb9fba" title="True if an output feature has a specified duration.">hasDuration</a> = <span class="keyword">false</span>; | |
567 <a name="l00489"></a>00489 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036" title="Label for the sample of this feature.">label</a> = <span class="stringliteral">""</span>; | |
568 <a name="l00490"></a>00490 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>.clear(); | |
569 <a name="l00491"></a>00491 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>.push_back(0.f); | |
570 <a name="l00492"></a>00492 | |
571 <a name="l00493"></a>00493 <span class="keywordtype">char</span> buffer[40]; | |
572 <a name="l00494"></a>00494 | |
573 <a name="l00495"></a>00495 <span class="keywordtype">int</span> n = m_n; | |
574 <a name="l00496"></a>00496 | |
575 <a name="l00497"></a>00497 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n; ++i) { | |
576 <a name="l00498"></a>00498 | |
577 <a name="l00499"></a>00499 <span class="comment">// Return the detection function in the DF output</span> | |
578 <a name="l00500"></a>00500 | |
579 <a name="l00501"></a>00501 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#acaa605f36839c07e76f4882f5e22d8d7" title="Timestamp of the output feature.">timestamp</a> = m_start + | |
580 <a name="l00502"></a>00502 RealTime::frame2RealTime(i * m_stepSize, <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>); | |
581 <a name="l00503"></a>00503 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>[0] = m_df[i]; | |
582 <a name="l00504"></a>00504 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036" title="Label for the sample of this feature.">label</a> = <span class="stringliteral">""</span>; | |
583 <a name="l00505"></a>00505 fs[<a class="code" href="FixedTempoEstimator_8cpp.html#acaa4524f29afce03c812a88ff31159c1">DFOutput</a>].push_back(feature); | |
584 <a name="l00506"></a>00506 } | |
585 <a name="l00507"></a>00507 | |
586 <a name="l00508"></a>00508 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i < n/2; ++i) { | |
587 <a name="l00509"></a>00509 | |
588 <a name="l00510"></a>00510 <span class="comment">// Return the raw autocorrelation in the ACF output, each</span> | |
589 <a name="l00511"></a>00511 <span class="comment">// value labelled according to its corresponding tempo</span> | |
590 <a name="l00512"></a>00512 | |
591 <a name="l00513"></a>00513 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#acaa605f36839c07e76f4882f5e22d8d7" title="Timestamp of the output feature.">timestamp</a> = m_start + | |
592 <a name="l00514"></a>00514 RealTime::frame2RealTime(i * m_stepSize, <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>); | |
593 <a name="l00515"></a>00515 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>[0] = m_r[i]; | |
594 <a name="l00516"></a>00516 sprintf(buffer, <span class="stringliteral">"%.1f bpm"</span>, lag2tempo(i)); | |
595 <a name="l00517"></a>00517 <span class="keywordflow">if</span> (i == n/2-1) feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036" title="Label for the sample of this feature.">label</a> = <span class="stringliteral">""</span>; | |
596 <a name="l00518"></a>00518 <span class="keywordflow">else</span> feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036" title="Label for the sample of this feature.">label</a> = buffer; | |
597 <a name="l00519"></a>00519 fs[<a class="code" href="FixedTempoEstimator_8cpp.html#a382c1fe740ac8911c6078cfbceffc870">ACFOutput</a>].push_back(feature); | |
598 <a name="l00520"></a>00520 } | |
599 <a name="l00521"></a>00521 | |
600 <a name="l00522"></a>00522 <span class="keywordtype">float</span> t0 = m_minbpm; <span class="comment">// our minimum detected tempo</span> | |
601 <a name="l00523"></a>00523 <span class="keywordtype">float</span> t1 = m_maxbpm; <span class="comment">// our maximum detected tempo</span> | |
602 <a name="l00524"></a>00524 | |
603 <a name="l00525"></a>00525 <span class="keywordtype">int</span> p0 = tempo2lag(t1); | |
604 <a name="l00526"></a>00526 <span class="keywordtype">int</span> p1 = tempo2lag(t0); | |
605 <a name="l00527"></a>00527 | |
606 <a name="l00528"></a>00528 std::map<float, int> candidates; | |
607 <a name="l00529"></a>00529 | |
608 <a name="l00530"></a>00530 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = p0; i <= p1 && i+1 < n/2; ++i) { | |
609 <a name="l00531"></a>00531 | |
610 <a name="l00532"></a>00532 <span class="keywordflow">if</span> (m_fr[i] > m_fr[i-1] && | |
611 <a name="l00533"></a>00533 m_fr[i] > m_fr[i+1]) { | |
612 <a name="l00534"></a>00534 | |
613 <a name="l00535"></a>00535 <span class="comment">// This is a peak in the filtered autocorrelation: stick</span> | |
614 <a name="l00536"></a>00536 <span class="comment">// it into the map from filtered autocorrelation to lag</span> | |
615 <a name="l00537"></a>00537 <span class="comment">// index -- this sorts our peaks by filtered acf value</span> | |
616 <a name="l00538"></a>00538 | |
617 <a name="l00539"></a>00539 candidates[m_fr[i]] = i; | |
618 <a name="l00540"></a>00540 } | |
619 <a name="l00541"></a>00541 | |
620 <a name="l00542"></a>00542 <span class="comment">// Also return the filtered autocorrelation in its own output</span> | |
621 <a name="l00543"></a>00543 | |
622 <a name="l00544"></a>00544 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#acaa605f36839c07e76f4882f5e22d8d7" title="Timestamp of the output feature.">timestamp</a> = m_start + | |
623 <a name="l00545"></a>00545 RealTime::frame2RealTime(i * m_stepSize, <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>); | |
624 <a name="l00546"></a>00546 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>[0] = m_fr[i]; | |
625 <a name="l00547"></a>00547 sprintf(buffer, <span class="stringliteral">"%.1f bpm"</span>, lag2tempo(i)); | |
626 <a name="l00548"></a>00548 <span class="keywordflow">if</span> (i == p1 || i == n/2-2) feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036" title="Label for the sample of this feature.">label</a> = <span class="stringliteral">""</span>; | |
627 <a name="l00549"></a>00549 <span class="keywordflow">else</span> feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036" title="Label for the sample of this feature.">label</a> = buffer; | |
628 <a name="l00550"></a>00550 fs[<a class="code" href="FixedTempoEstimator_8cpp.html#a5b284021783d79785d46b043b458368d">FilteredACFOutput</a>].push_back(feature); | |
629 <a name="l00551"></a>00551 } | |
630 <a name="l00552"></a>00552 | |
631 <a name="l00553"></a>00553 <span class="keywordflow">if</span> (candidates.empty()) { | |
632 <a name="l00554"></a>00554 cerr << <span class="stringliteral">"No tempo candidates!"</span> << endl; | |
633 <a name="l00555"></a>00555 <span class="keywordflow">return</span> fs; | |
634 <a name="l00556"></a>00556 } | |
635 <a name="l00557"></a>00557 | |
636 <a name="l00558"></a>00558 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a98907091d0b6a589720ae35ae588a82b" title="True if an output feature has its own timestamp.">hasTimestamp</a> = <span class="keyword">true</span>; | |
637 <a name="l00559"></a>00559 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#acaa605f36839c07e76f4882f5e22d8d7" title="Timestamp of the output feature.">timestamp</a> = m_start; | |
638 <a name="l00560"></a>00560 | |
639 <a name="l00561"></a>00561 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a33686757bd4481c72494122e9bfb9fba" title="True if an output feature has a specified duration.">hasDuration</a> = <span class="keyword">true</span>; | |
640 <a name="l00562"></a>00562 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#af687c0a7fe041757e922ec296862b115" title="Duration of the output feature.">duration</a> = m_lasttime - m_start; | |
641 <a name="l00563"></a>00563 | |
642 <a name="l00564"></a>00564 <span class="comment">// The map contains only peaks and is sorted by filtered acf</span> | |
643 <a name="l00565"></a>00565 <span class="comment">// value, so the final element in it is our "best" tempo guess</span> | |
644 <a name="l00566"></a>00566 | |
645 <a name="l00567"></a>00567 std::map<float, int>::const_iterator ci = candidates.end(); | |
646 <a name="l00568"></a>00568 --ci; | |
647 <a name="l00569"></a>00569 <span class="keywordtype">int</span> maxpi = ci->second; | |
648 <a name="l00570"></a>00570 | |
649 <a name="l00571"></a>00571 <span class="keywordflow">if</span> (m_t[maxpi] > 0) { | |
650 <a name="l00572"></a>00572 | |
651 <a name="l00573"></a>00573 <span class="comment">// This lag has an adjusted tempo from the averaging process:</span> | |
652 <a name="l00574"></a>00574 <span class="comment">// use it</span> | |
653 <a name="l00575"></a>00575 | |
654 <a name="l00576"></a>00576 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>[0] = m_t[maxpi]; | |
655 <a name="l00577"></a>00577 | |
656 <a name="l00578"></a>00578 } <span class="keywordflow">else</span> { | |
657 <a name="l00579"></a>00579 | |
658 <a name="l00580"></a>00580 <span class="comment">// shouldn't happen -- it would imply that this high value was</span> | |
659 <a name="l00581"></a>00581 <span class="comment">// not a peak!</span> | |
660 <a name="l00582"></a>00582 | |
661 <a name="l00583"></a>00583 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>[0] = lag2tempo(maxpi); | |
662 <a name="l00584"></a>00584 cerr << <span class="stringliteral">"WARNING: No stored tempo for index "</span> << maxpi << endl; | |
663 <a name="l00585"></a>00585 } | |
664 <a name="l00586"></a>00586 | |
665 <a name="l00587"></a>00587 sprintf(buffer, <span class="stringliteral">"%.1f bpm"</span>, feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>[0]); | |
666 <a name="l00588"></a>00588 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036" title="Label for the sample of this feature.">label</a> = buffer; | |
667 <a name="l00589"></a>00589 | |
668 <a name="l00590"></a>00590 <span class="comment">// Return the best tempo in the main output</span> | |
669 <a name="l00591"></a>00591 | |
670 <a name="l00592"></a>00592 fs[<a class="code" href="FixedTempoEstimator_8cpp.html#a7a8511e62dffb5334ad3b70d57b2fcee">TempoOutput</a>].push_back(feature); | |
671 <a name="l00593"></a>00593 | |
672 <a name="l00594"></a>00594 <span class="comment">// And return the other estimates (up to the arbitrarily chosen</span> | |
673 <a name="l00595"></a>00595 <span class="comment">// number of 10 of them) in the candidates output</span> | |
674 <a name="l00596"></a>00596 | |
675 <a name="l00597"></a>00597 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>.clear(); | |
676 <a name="l00598"></a>00598 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a8eb1fb35f73b247ed13de9527c18f036" title="Label for the sample of this feature.">label</a> = <span class="stringliteral">""</span>; | |
677 <a name="l00599"></a>00599 | |
678 <a name="l00600"></a>00600 <span class="keywordflow">while</span> (feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>.size() < 10) { | |
679 <a name="l00601"></a>00601 <span class="keywordflow">if</span> (m_t[ci->second] > 0) { | |
680 <a name="l00602"></a>00602 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>.push_back(m_t[ci->second]); | |
681 <a name="l00603"></a>00603 } <span class="keywordflow">else</span> { | |
682 <a name="l00604"></a>00604 feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>.push_back(lag2tempo(ci->second)); | |
683 <a name="l00605"></a>00605 } | |
684 <a name="l00606"></a>00606 <span class="keywordflow">if</span> (ci == candidates.begin()) <span class="keywordflow">break</span>; | |
685 <a name="l00607"></a>00607 --ci; | |
686 <a name="l00608"></a>00608 } | |
687 <a name="l00609"></a>00609 | |
688 <a name="l00610"></a>00610 fs[<a class="code" href="FixedTempoEstimator_8cpp.html#a554b16c6b7516530e52c65318bfe08eb">CandidatesOutput</a>].push_back(feature); | |
689 <a name="l00611"></a>00611 | |
690 <a name="l00612"></a>00612 <span class="keywordflow">return</span> fs; | |
691 <a name="l00613"></a>00613 } | |
692 <a name="l00614"></a>00614 | |
693 <a name="l00615"></a>00615 | |
694 <a name="l00616"></a>00616 | |
695 <a name="l00617"></a><a class="code" href="classFixedTempoEstimator.html#a3967c189f054f864639837c2519bd64d">00617</a> <a class="code" href="classFixedTempoEstimator.html#a3967c189f054f864639837c2519bd64d">FixedTempoEstimator::FixedTempoEstimator</a>(<span class="keywordtype">float</span> inputSampleRate) : | |
696 <a name="l00618"></a>00618 <a class="code" href="classVamp_1_1Plugin.html#a1b78c4f46c72ef345ed27f0b9bf20ac9">Plugin</a>(inputSampleRate), | |
697 <a name="l00619"></a>00619 <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>(new <a class="code" href="classFixedTempoEstimator_1_1D.html">D</a>(inputSampleRate)) | |
698 <a name="l00620"></a>00620 { | |
699 <a name="l00621"></a>00621 } | |
700 <a name="l00622"></a>00622 | |
701 <a name="l00623"></a><a class="code" href="classFixedTempoEstimator.html#a0302c4bfdc163a3d34478cde93c96a53">00623</a> <a class="code" href="classFixedTempoEstimator.html#a0302c4bfdc163a3d34478cde93c96a53">FixedTempoEstimator::~FixedTempoEstimator</a>() | |
702 <a name="l00624"></a>00624 { | |
703 <a name="l00625"></a>00625 <span class="keyword">delete</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>; | |
704 <a name="l00626"></a>00626 } | |
705 <a name="l00627"></a>00627 | |
706 <a name="l00628"></a>00628 <span class="keywordtype">string</span> | |
707 <a name="l00629"></a><a class="code" href="classFixedTempoEstimator.html#ab818edcf1555177d10260e197e3a5e7a">00629</a> <a class="code" href="classFixedTempoEstimator.html#ab818edcf1555177d10260e197e3a5e7a" title="Get the computer-usable name of the plugin.">FixedTempoEstimator::getIdentifier</a>()<span class="keyword"> const</span> | |
708 <a name="l00630"></a>00630 <span class="keyword"></span>{ | |
709 <a name="l00631"></a>00631 <span class="keywordflow">return</span> <span class="stringliteral">"fixedtempo"</span>; | |
710 <a name="l00632"></a>00632 } | |
711 <a name="l00633"></a>00633 | |
712 <a name="l00634"></a>00634 <span class="keywordtype">string</span> | |
713 <a name="l00635"></a><a class="code" href="classFixedTempoEstimator.html#af9eb6fa8a98aa66b55e64e1795f9405f">00635</a> <a class="code" href="classFixedTempoEstimator.html#af9eb6fa8a98aa66b55e64e1795f9405f" title="Get a human-readable name or title of the plugin.">FixedTempoEstimator::getName</a>()<span class="keyword"> const</span> | |
714 <a name="l00636"></a>00636 <span class="keyword"></span>{ | |
715 <a name="l00637"></a>00637 <span class="keywordflow">return</span> <span class="stringliteral">"Simple Fixed Tempo Estimator"</span>; | |
716 <a name="l00638"></a>00638 } | |
717 <a name="l00639"></a>00639 | |
718 <a name="l00640"></a>00640 <span class="keywordtype">string</span> | |
719 <a name="l00641"></a><a class="code" href="classFixedTempoEstimator.html#a06b00853f00c2e78d490697fcd7d1920">00641</a> <a class="code" href="classFixedTempoEstimator.html#a06b00853f00c2e78d490697fcd7d1920" title="Get a human-readable description for the plugin, typically a line of text that may optionally be disp...">FixedTempoEstimator::getDescription</a>()<span class="keyword"> const</span> | |
720 <a name="l00642"></a>00642 <span class="keyword"></span>{ | |
721 <a name="l00643"></a>00643 <span class="keywordflow">return</span> <span class="stringliteral">"Study a short section of audio and estimate its tempo, assuming the tempo is constant"</span>; | |
722 <a name="l00644"></a>00644 } | |
723 <a name="l00645"></a>00645 | |
724 <a name="l00646"></a>00646 <span class="keywordtype">string</span> | |
725 <a name="l00647"></a><a class="code" href="classFixedTempoEstimator.html#ae910d1b9250b11097fd6b51cd8285b68">00647</a> <a class="code" href="classFixedTempoEstimator.html#ae910d1b9250b11097fd6b51cd8285b68" title="Get the name of the author or vendor of the plugin in human-readable form.">FixedTempoEstimator::getMaker</a>()<span class="keyword"> const</span> | |
726 <a name="l00648"></a>00648 <span class="keyword"></span>{ | |
727 <a name="l00649"></a>00649 <span class="keywordflow">return</span> <span class="stringliteral">"Vamp SDK Example Plugins"</span>; | |
728 <a name="l00650"></a>00650 } | |
729 <a name="l00651"></a>00651 | |
730 <a name="l00652"></a>00652 <span class="keywordtype">int</span> | |
731 <a name="l00653"></a><a class="code" href="classFixedTempoEstimator.html#ad002fddb3735c2dd7e31e6a9def9949f">00653</a> <a class="code" href="classFixedTempoEstimator.html#ad002fddb3735c2dd7e31e6a9def9949f" title="Get the version number of the plugin.">FixedTempoEstimator::getPluginVersion</a>()<span class="keyword"> const</span> | |
732 <a name="l00654"></a>00654 <span class="keyword"></span>{ | |
733 <a name="l00655"></a>00655 <span class="keywordflow">return</span> 1; | |
734 <a name="l00656"></a>00656 } | |
735 <a name="l00657"></a>00657 | |
736 <a name="l00658"></a>00658 <span class="keywordtype">string</span> | |
737 <a name="l00659"></a><a class="code" href="classFixedTempoEstimator.html#a50c6b64530c84c0707ba3936c5022a48">00659</a> <a class="code" href="classFixedTempoEstimator.html#a50c6b64530c84c0707ba3936c5022a48" title="Get the copyright statement or licensing summary for the plugin.">FixedTempoEstimator::getCopyright</a>()<span class="keyword"> const</span> | |
738 <a name="l00660"></a>00660 <span class="keyword"></span>{ | |
739 <a name="l00661"></a>00661 <span class="keywordflow">return</span> <span class="stringliteral">"Code copyright 2008 Queen Mary, University of London. Freely redistributable (BSD license)"</span>; | |
740 <a name="l00662"></a>00662 } | |
741 <a name="l00663"></a>00663 | |
742 <a name="l00664"></a>00664 <span class="keywordtype">size_t</span> | |
743 <a name="l00665"></a><a class="code" href="classFixedTempoEstimator.html#ad450bb7e7df559ae3d68dfbfb085676f">00665</a> <a class="code" href="classFixedTempoEstimator.html#ad450bb7e7df559ae3d68dfbfb085676f" title="Get the preferred step size (window increment -- the distance in sample frames between the start fram...">FixedTempoEstimator::getPreferredStepSize</a>()<span class="keyword"> const</span> | |
744 <a name="l00666"></a>00666 <span class="keyword"></span>{ | |
745 <a name="l00667"></a>00667 <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#add749be18355ab1ae5c1ccbacfd2e192">getPreferredStepSize</a>(); | |
746 <a name="l00668"></a>00668 } | |
747 <a name="l00669"></a>00669 | |
748 <a name="l00670"></a>00670 <span class="keywordtype">size_t</span> | |
749 <a name="l00671"></a><a class="code" href="classFixedTempoEstimator.html#a68b8569b71504a0478caf990dbe30683">00671</a> <a class="code" href="classFixedTempoEstimator.html#a68b8569b71504a0478caf990dbe30683" title="Get the preferred block size (window size -- the number of sample frames passed in each block to the ...">FixedTempoEstimator::getPreferredBlockSize</a>()<span class="keyword"> const</span> | |
750 <a name="l00672"></a>00672 <span class="keyword"></span>{ | |
751 <a name="l00673"></a>00673 <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#ac02826f981736fc2aa5d835fa14e174d">getPreferredBlockSize</a>(); | |
752 <a name="l00674"></a>00674 } | |
753 <a name="l00675"></a>00675 | |
754 <a name="l00676"></a>00676 <span class="keywordtype">bool</span> | |
755 <a name="l00677"></a><a class="code" href="classFixedTempoEstimator.html#aa7500a4ffbc4653baaf5101defdb37f5">00677</a> <a class="code" href="classFixedTempoEstimator.html#aa7500a4ffbc4653baaf5101defdb37f5" title="Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).">FixedTempoEstimator::initialise</a>(<span class="keywordtype">size_t</span> channels, <span class="keywordtype">size_t</span> stepSize, <span class="keywordtype">size_t</span> blockSize) | |
756 <a name="l00678"></a>00678 { | |
757 <a name="l00679"></a>00679 <span class="keywordflow">if</span> (channels < <a class="code" href="classVamp_1_1Plugin.html#a267b42e866df3cf0d190893e8096f525" title="Get the minimum supported number of input channels.">getMinChannelCount</a>() || | |
758 <a name="l00680"></a>00680 channels > <a class="code" href="classVamp_1_1Plugin.html#a2c5ab12b6fa4847cb244bd1e9cb3ae5e" title="Get the maximum supported number of input channels.">getMaxChannelCount</a>()) <span class="keywordflow">return</span> <span class="keyword">false</span>; | |
759 <a name="l00681"></a>00681 | |
760 <a name="l00682"></a>00682 <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#af0fcad4493650728babb7e341963c91d">initialise</a>(channels, stepSize, blockSize); | |
761 <a name="l00683"></a>00683 } | |
762 <a name="l00684"></a>00684 | |
763 <a name="l00685"></a>00685 <span class="keywordtype">void</span> | |
764 <a name="l00686"></a><a class="code" href="classFixedTempoEstimator.html#ac41708397255400c6682fee6c1b3d45f">00686</a> <a class="code" href="classFixedTempoEstimator.html#ac41708397255400c6682fee6c1b3d45f" title="Reset the plugin after use, to prepare it for another clean run.">FixedTempoEstimator::reset</a>() | |
765 <a name="l00687"></a>00687 { | |
766 <a name="l00688"></a>00688 <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#af5ac8147bfe79371d00aba8a19c2f8fd">reset</a>(); | |
767 <a name="l00689"></a>00689 } | |
768 <a name="l00690"></a>00690 | |
769 <a name="l00691"></a>00691 <a class="code" href="classVamp_1_1PluginBase.html#a3b6bb4bbd86affe1ca9deceea1aad4f8">FixedTempoEstimator::ParameterList</a> | |
770 <a name="l00692"></a><a class="code" href="classFixedTempoEstimator.html#ae157465a4e07d180bab05b5c3a4d8987">00692</a> <a class="code" href="classFixedTempoEstimator.html#ae157465a4e07d180bab05b5c3a4d8987" title="Get the controllable parameters of this plugin.">FixedTempoEstimator::getParameterDescriptors</a>()<span class="keyword"> const</span> | |
771 <a name="l00693"></a>00693 <span class="keyword"></span>{ | |
772 <a name="l00694"></a>00694 <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a06fcf80a9a22c4b90abbc88eb592621a">getParameterDescriptors</a>(); | |
773 <a name="l00695"></a>00695 } | |
774 <a name="l00696"></a>00696 | |
775 <a name="l00697"></a>00697 <span class="keywordtype">float</span> | |
776 <a name="l00698"></a><a class="code" href="classFixedTempoEstimator.html#a2030b05fb1228b30ace16200780c9152">00698</a> <a class="code" href="classFixedTempoEstimator.html#a2030b05fb1228b30ace16200780c9152" title="Get the value of a named parameter.">FixedTempoEstimator::getParameter</a>(std::string <span class="keywordtype">id</span>)<span class="keyword"> const</span> | |
777 <a name="l00699"></a>00699 <span class="keyword"></span>{ | |
778 <a name="l00700"></a>00700 <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a968ef2e555c81e4a3bde89d19fafb31a">getParameter</a>(<span class="keywordtype">id</span>); | |
779 <a name="l00701"></a>00701 } | |
780 <a name="l00702"></a>00702 | |
781 <a name="l00703"></a>00703 <span class="keywordtype">void</span> | |
782 <a name="l00704"></a><a class="code" href="classFixedTempoEstimator.html#a8a5a413025384cf451c64d2c2ce13a75">00704</a> <a class="code" href="classFixedTempoEstimator.html#a8a5a413025384cf451c64d2c2ce13a75" title="Set a named parameter.">FixedTempoEstimator::setParameter</a>(std::string <span class="keywordtype">id</span>, <span class="keywordtype">float</span> value) | |
783 <a name="l00705"></a>00705 { | |
784 <a name="l00706"></a>00706 <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a6cafa64d4cc8aa3556bc0ce6b0c49bc4">setParameter</a>(<span class="keywordtype">id</span>, value); | |
785 <a name="l00707"></a>00707 } | |
786 <a name="l00708"></a>00708 | |
787 <a name="l00709"></a>00709 <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">FixedTempoEstimator::OutputList</a> | |
788 <a name="l00710"></a><a class="code" href="classFixedTempoEstimator.html#a83121c205a723fe6297e2bf8870622a4">00710</a> <a class="code" href="classFixedTempoEstimator.html#a83121c205a723fe6297e2bf8870622a4" title="Get the outputs of this plugin.">FixedTempoEstimator::getOutputDescriptors</a>()<span class="keyword"> const</span> | |
789 <a name="l00711"></a>00711 <span class="keyword"></span>{ | |
790 <a name="l00712"></a>00712 <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a7ce98af800f36045a0dae4b1dbed943f">getOutputDescriptors</a>(); | |
791 <a name="l00713"></a>00713 } | |
792 <a name="l00714"></a>00714 | |
793 <a name="l00715"></a>00715 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a> | |
794 <a name="l00716"></a><a class="code" href="classFixedTempoEstimator.html#a1cf76b0e55cf4ed3da095cffcdeaec3c">00716</a> <a class="code" href="classFixedTempoEstimator.html#a1cf76b0e55cf4ed3da095cffcdeaec3c" title="Process a single block of input data.">FixedTempoEstimator::process</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> *<span class="keyword">const</span> *inputBuffers, <a class="code" href="structVamp_1_1RealTime.html" title="RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...">RealTime</a> ts) | |
795 <a name="l00717"></a>00717 { | |
796 <a name="l00718"></a>00718 <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a7fac74fc9fc54f436408705d1e125e20">process</a>(inputBuffers, ts); | |
797 <a name="l00719"></a>00719 } | |
798 <a name="l00720"></a>00720 | |
799 <a name="l00721"></a>00721 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FixedTempoEstimator::FeatureSet</a> | |
800 <a name="l00722"></a><a class="code" href="classFixedTempoEstimator.html#a4965cf99be77fc4d1de51e11d83936b0">00722</a> <a class="code" href="classFixedTempoEstimator.html#a4965cf99be77fc4d1de51e11d83936b0" title="After all blocks have been processed, calculate and return any remaining features derived from the co...">FixedTempoEstimator::getRemainingFeatures</a>() | |
801 <a name="l00723"></a>00723 { | |
802 <a name="l00724"></a>00724 <span class="keywordflow">return</span> <a class="code" href="classFixedTempoEstimator.html#a5e1c9abaf33e9f48eb7d3b48f8af3308">m_d</a>-><a class="code" href="classFixedTempoEstimator_1_1D.html#a7f9c3603bb3374d6936885010dbdd82b">getRemainingFeatures</a>(); | |
803 <a name="l00725"></a>00725 } | |
804 </pre></div></div><!-- contents --> | |
805 </div> | 173 </div> |
806 <div id="nav-path" class="navpath"> | |
807 <ul> | |
808 <li class="navelem"><a class="el" href="FixedTempoEstimator_8cpp.html">FixedTempoEstimator.cpp</a> </li> | |
809 | |
810 <li class="footer">Generated on Fri Jul 13 2012 13:28:48 for VampPluginSDK by | |
811 <a href="http://www.doxygen.org/index.html"> | |
812 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0 </li> | |
813 </ul> | |
814 </div> | |
815 | |
816 | |
817 </body> | 174 </body> |
818 </html> | 175 </html> |