Mercurial > hg > btrack
view doc/html/index.html @ 28:7af87d3f2ce2 develop
Added a function to allow updates to the hop and frame size of the beat tracker
author | Adam <adamstark.uk@gmail.com> |
---|---|
date | Tue, 28 Jan 2014 00:31:17 +0000 |
parents | deb49a2590f3 |
children | 687b8dd41934 |
line wrap: on
line source
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>BTrack - A Real-Time Beat Tracker: BTrack - A Real-Time Beat Tracker</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">BTrack - A Real-Time Beat Tracker </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.2 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li class="current"><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> </div><!-- top --> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="headertitle"> <div class="title"><a class="el" href="class_b_track.html">BTrack</a> - A Real-Time Beat Tracker </div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><p>A real-time beat tracker, implemented in C++.</p> <p>Written by Adam Stark, Matthew Davies and Mark Plumbley.</p> <h2>License</h2> <p><a class="el" href="class_b_track.html">BTrack</a> is made available under the GNU General Public License, version 3. Please see the included LICENSE.txt for more details.</p> <h2>Usage - C++</h2> <p><b>STEP 1</b></p> <p>Include the <a class="el" href="class_b_track.html">BTrack</a> header file as follows: </p> <pre class="fragment"> #include "BTrack.h" </pre><p><b>STEP 2</b></p> <p>Instantiate the algorithm by one of the following: </p> <pre class="fragment">// to use the default 512 hop size and 1024 frame size BTrack b; </pre><p>or: </p> <pre class="fragment">// to specify a hop size (e.g. 512) and have a frame size of 2 x the hop size BTrack b(512); </pre><p>or: </p> <pre class="fragment">// to specify both the hop size and frame size BTrack b(512,1024); </pre><p><b>STEP 3.1 - Audio Input</b></p> <p>In the processing loop, fill a double precision array with one frame of audio samples (as determined in step 2): </p> <pre class="fragment">double *frame; // ! // do something here to fill the frame with audio samples // ! </pre><p>and then call: </p> <pre class="fragment">b.processAudioFrame(frame); </pre><p>and to check for beats, simply call: </p> <pre class="fragment">if (b.beatDueInCurrentFrame()) { // do something on the beat } </pre><p><b>STEP 3.2 - Onset Detection Function Input</b></p> <p>The algorithm can process onset detection function samples. Given a double precision onset detection function sample called 'newSamples', at each step, call: </p> <pre class="fragment">b.processOnsetDetectionFunctionSample(newSample); </pre><p>and then check for beats with: </p> <pre class="fragment">if (b.beatDueInCurrentFrame()) { // do something on the beat } </pre><p>For any questions, please email Adam Stark (email at <a href="http://www.adamstark.co.uk">http://www.adamstark.co.uk</a>). </p> </div></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Tue Jan 28 2014 00:29:23 for BTrack - A Real-Time Beat Tracker by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address> </body> </html>