diff code-doc/PercussionOnsetDetector_8cpp-source.html @ 21:cc0be37dc9d3 website

* Updates for 2.0
author cannam
date Tue, 09 Dec 2008 11:02:57 +0000
parents 351c4ebce5f9
children 0976232e353b
line wrap: on
line diff
--- a/code-doc/PercussionOnsetDetector_8cpp-source.html	Mon Nov 24 15:17:08 2008 +0000
+++ b/code-doc/PercussionOnsetDetector_8cpp-source.html	Tue Dec 09 11:02:57 2008 +0000
@@ -4,7 +4,7 @@
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
-<!-- Generated by Doxygen 1.5.5 -->
+<!-- Generated by Doxygen 1.5.6 -->
 <div class="navigation" id="top">
   <div class="tabs">
     <ul>
@@ -18,7 +18,7 @@
   <div class="navpath"><a class="el" href="dir_35887283b966ca996e4ff77f459c38ce.html">examples</a>
   </div>
 </div>
-</div>
+<div class="contents">
 <h1>PercussionOnsetDetector.cpp</h1><a href="PercussionOnsetDetector_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>
 <a name="l00002"></a>00002 
 <a name="l00003"></a>00003 <span class="comment">/*</span>
@@ -266,7 +266,7 @@
 <a name="l00245"></a>00245         <span class="keywordflow">if</span> (<a class="code" href="classPercussionOnsetDetector.html#30daa717267251a9d49afe57c328e989">m_priorMagnitudes</a>[i] &gt; 0.f) {
 <a name="l00246"></a>00246             <span class="keywordtype">float</span> diff = 10.f * log10f(sqrmag / <a class="code" href="classPercussionOnsetDetector.html#30daa717267251a9d49afe57c328e989">m_priorMagnitudes</a>[i]);
 <a name="l00247"></a>00247 
-<a name="l00248"></a>00248 <span class="comment">//        std::cout &lt;&lt; "i=" &lt;&lt; i &lt;&lt; ", mag=" &lt;&lt; mag &lt;&lt; ", prior=" &lt;&lt; m_priorMagnitudes[i] &lt;&lt; ", diff=" &lt;&lt; diff &lt;&lt; ", threshold=" &lt;&lt; m_threshold &lt;&lt; std::endl;</span>
+<a name="l00248"></a>00248 <span class="comment">//        std::cout &lt;&lt; "i=" &lt;&lt; i &lt;&lt; ", sqrmag=" &lt;&lt; sqrmag &lt;&lt; ", prior=" &lt;&lt; m_priorMagnitudes[i] &lt;&lt; ", diff=" &lt;&lt; diff &lt;&lt; ", threshold=" &lt;&lt; m_threshold &lt;&lt; " " &lt;&lt; (diff &gt;= m_threshold ? "[*]" : "") &lt;&lt; std::endl;</span>
 <a name="l00249"></a>00249 
 <a name="l00250"></a>00250             <span class="keywordflow">if</span> (diff &gt;= <a class="code" href="classPercussionOnsetDetector.html#b04119adad56d87f2e633de289aab507">m_threshold</a>) ++count;
 <a name="l00251"></a>00251         }
@@ -285,28 +285,30 @@
 <a name="l00264"></a>00264         <a class="code" href="classPercussionOnsetDetector.html#cd80162c65212be7fa91251263fb9c3d">m_dfMinus1</a> &gt;= count &amp;&amp;
 <a name="l00265"></a>00265         <a class="code" href="classPercussionOnsetDetector.html#cd80162c65212be7fa91251263fb9c3d">m_dfMinus1</a> &gt; ((100 - <a class="code" href="classPercussionOnsetDetector.html#4e9770f246ba3bc75e7fc2cb8f9010af">m_sensitivity</a>) * <a class="code" href="classPercussionOnsetDetector.html#920de543dbcf70a2edd80b5b31313285">m_blockSize</a>) / 200) {
 <a name="l00266"></a>00266 
-<a name="l00267"></a>00267         <a class="code" href="structVamp_1_1Plugin_1_1Feature.html">Feature</a> onset;
-<a name="l00268"></a>00268         onset.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#98907091d0b6a589720ae35ae588a82b" title="True if an output feature has its own timestamp.">hasTimestamp</a> = <span class="keyword">true</span>;
-<a name="l00269"></a>00269         onset.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#caa605f36839c07e76f4882f5e22d8d7" title="Timestamp of the output feature.">timestamp</a> = ts - <a class="code" href="structVamp_1_1RealTime.html#3a5ecc8888b559aad3b7d96911786b3a" title="Convert a sample frame at the given sample rate into a RealTime.">Vamp::RealTime::frame2RealTime</a>
-<a name="l00270"></a>00270             (<a class="code" href="classPercussionOnsetDetector.html#abac0cf7e961482b075777e5f0686e6c">m_stepSize</a>, lrintf(<a class="code" href="classVamp_1_1Plugin.html#59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>));
-<a name="l00271"></a>00271         returnFeatures[0].push_back(onset);
-<a name="l00272"></a>00272     }
-<a name="l00273"></a>00273 
-<a name="l00274"></a>00274     <a class="code" href="classPercussionOnsetDetector.html#6ad7d8353cc681ff42a63b127cca5779">m_dfMinus2</a> = <a class="code" href="classPercussionOnsetDetector.html#cd80162c65212be7fa91251263fb9c3d">m_dfMinus1</a>;
-<a name="l00275"></a>00275     <a class="code" href="classPercussionOnsetDetector.html#cd80162c65212be7fa91251263fb9c3d">m_dfMinus1</a> = count;
-<a name="l00276"></a>00276 
-<a name="l00277"></a>00277     <span class="keywordflow">return</span> returnFeatures;
-<a name="l00278"></a>00278 }
-<a name="l00279"></a>00279 
-<a name="l00280"></a>00280 <a class="code" href="classVamp_1_1Plugin.html#448fb57dc245d47923ec9eeaf9856c5f">PercussionOnsetDetector::FeatureSet</a>
-<a name="l00281"></a><a class="code" href="classPercussionOnsetDetector.html#d3d6767ed137783e84f842b4d4732ffa">00281</a> <a class="code" href="classPercussionOnsetDetector.html#d3d6767ed137783e84f842b4d4732ffa" title="After all blocks have been processed, calculate and return any remaining features...">PercussionOnsetDetector::getRemainingFeatures</a>()
-<a name="l00282"></a>00282 {
-<a name="l00283"></a>00283     <span class="keywordflow">return</span> <a class="code" href="classVamp_1_1Plugin.html#448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a>();
-<a name="l00284"></a>00284 }
-<a name="l00285"></a>00285 
+<a name="l00267"></a>00267 <span class="comment">//std::cout &lt;&lt; "result at " &lt;&lt; ts &lt;&lt; "! (count == " &lt;&lt; count &lt;&lt; ", prev == " &lt;&lt; m_dfMinus1 &lt;&lt; ")" &lt;&lt; std::endl;</span>
+<a name="l00268"></a>00268 
+<a name="l00269"></a>00269         <a class="code" href="structVamp_1_1Plugin_1_1Feature.html">Feature</a> onset;
+<a name="l00270"></a>00270         onset.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#98907091d0b6a589720ae35ae588a82b" title="True if an output feature has its own timestamp.">hasTimestamp</a> = <span class="keyword">true</span>;
+<a name="l00271"></a>00271         onset.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#caa605f36839c07e76f4882f5e22d8d7" title="Timestamp of the output feature.">timestamp</a> = ts - <a class="code" href="structVamp_1_1RealTime.html#939b4b1d1ca190db69a418883f16ce8a" title="Convert a sample frame at the given sample rate into a RealTime.">Vamp::RealTime::frame2RealTime</a>
+<a name="l00272"></a>00272             (<a class="code" href="classPercussionOnsetDetector.html#abac0cf7e961482b075777e5f0686e6c">m_stepSize</a>, <span class="keywordtype">int</span>(<a class="code" href="classVamp_1_1Plugin.html#59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a> + 0.5));
+<a name="l00273"></a>00273         returnFeatures[0].push_back(onset);
+<a name="l00274"></a>00274     }
+<a name="l00275"></a>00275 
+<a name="l00276"></a>00276     <a class="code" href="classPercussionOnsetDetector.html#6ad7d8353cc681ff42a63b127cca5779">m_dfMinus2</a> = <a class="code" href="classPercussionOnsetDetector.html#cd80162c65212be7fa91251263fb9c3d">m_dfMinus1</a>;
+<a name="l00277"></a>00277     <a class="code" href="classPercussionOnsetDetector.html#cd80162c65212be7fa91251263fb9c3d">m_dfMinus1</a> = count;
+<a name="l00278"></a>00278 
+<a name="l00279"></a>00279     <span class="keywordflow">return</span> returnFeatures;
+<a name="l00280"></a>00280 }
+<a name="l00281"></a>00281 
+<a name="l00282"></a>00282 <a class="code" href="classVamp_1_1Plugin.html#448fb57dc245d47923ec9eeaf9856c5f">PercussionOnsetDetector::FeatureSet</a>
+<a name="l00283"></a><a class="code" href="classPercussionOnsetDetector.html#d3d6767ed137783e84f842b4d4732ffa">00283</a> <a class="code" href="classPercussionOnsetDetector.html#d3d6767ed137783e84f842b4d4732ffa" title="After all blocks have been processed, calculate and return any remaining features...">PercussionOnsetDetector::getRemainingFeatures</a>()
+<a name="l00284"></a>00284 {
+<a name="l00285"></a>00285     <span class="keywordflow">return</span> <a class="code" href="classVamp_1_1Plugin.html#448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a>();
+<a name="l00286"></a>00286 }
+<a name="l00287"></a>00287 
 </pre></div></div>
-<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jul 9 11:36:06 2008 for VampPluginSDK by&nbsp;
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 8 14:37:18 2008 for VampPluginSDK by&nbsp;
 <a href="http://www.doxygen.org/index.html">
-<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
 </body>
 </html>