Sophie

Sophie

distrib > Mageia > 6 > armv7hl > by-pkgid > 52c675b343936dc300a25ab661f24b1f > files > 280

libaubio-devel-0.4.2-2.2.mga6.armv7hl.rpm

<!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"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>aubio: spectral/test-tss.c</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/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">aubio
   &#160;<span id="projectnumber">0.4.2~alpha</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">spectral/test-tss.c</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="aubio_8h.html">aubio.h</a>&gt;</span></div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>)</div><div class="line">{</div><div class="line">  <a class="code" href="types_8h.html#a12a1e9b3ce141648783a82445d02b58d">uint_t</a> n = 10; <span class="comment">// compute n times</span></div><div class="line">  <a class="code" href="types_8h.html#a12a1e9b3ce141648783a82445d02b58d">uint_t</a> win_s = 1024; <span class="comment">// window size</span></div><div class="line">  <a class="code" href="types_8h.html#a12a1e9b3ce141648783a82445d02b58d">uint_t</a> hop_s = 256;  <span class="comment">// hop size</span></div><div class="line"></div><div class="line">  <span class="comment">// create some vectors</span></div><div class="line">  <a name="_a0"></a><a class="code" href="structfvec__t.html">fvec_t</a> * in       = <a name="a1"></a><a class="code" href="fvec_8h.html#aa9bc0906651523429a4ebf7b4342fe73">new_fvec</a> (hop_s); <span class="comment">// input buffer</span></div><div class="line">  <a name="_a2"></a><a class="code" href="structcvec__t.html">cvec_t</a> * fftgrain = <a name="a3"></a><a class="code" href="cvec_8h.html#afbb7fc65d12893e512be56ec0f5dc5f0">new_cvec</a> (win_s); <span class="comment">// fft norm and phase</span></div><div class="line">  <a class="code" href="structcvec__t.html">cvec_t</a> * cstead   = <a class="code" href="cvec_8h.html#afbb7fc65d12893e512be56ec0f5dc5f0">new_cvec</a> (win_s); <span class="comment">// fft norm and phase</span></div><div class="line">  <a class="code" href="structcvec__t.html">cvec_t</a> * ctrans   = <a class="code" href="cvec_8h.html#afbb7fc65d12893e512be56ec0f5dc5f0">new_cvec</a> (win_s); <span class="comment">// fft norm and phase</span></div><div class="line">  <a class="code" href="structfvec__t.html">fvec_t</a> * stead    = <a class="code" href="fvec_8h.html#aa9bc0906651523429a4ebf7b4342fe73">new_fvec</a> (hop_s); <span class="comment">// output buffer</span></div><div class="line">  <a class="code" href="structfvec__t.html">fvec_t</a> * trans    = <a class="code" href="fvec_8h.html#aa9bc0906651523429a4ebf7b4342fe73">new_fvec</a> (hop_s); <span class="comment">// output buffer</span></div><div class="line"></div><div class="line">  <span class="comment">// create phase vocoder for analysis of input signal </span></div><div class="line">  <a class="code" href="phasevoc_8h.html#a0ab307b4e3ade23af88ccebbe81900e5">aubio_pvoc_t</a> * pv = <a name="a4"></a><a class="code" href="phasevoc_8h.html#aff037315bd1ae2caca67ee95e735c31b">new_aubio_pvoc</a> (win_s,hop_s);</div><div class="line">  <span class="comment">// create transient/steady-state separation object</span></div><div class="line">  <a class="code" href="tss_8h.html#a0f2171977e7d540f713657d37e9ae66f">aubio_tss_t</a> *  tss = <a name="a5"></a><a class="code" href="tss_8h.html#a7a033e11fcfe0c832d7f603e8e653027">new_aubio_tss</a>(win_s,hop_s);</div><div class="line">  <span class="comment">// create phase vocoder objects for synthesis of output signals</span></div><div class="line">  <a class="code" href="phasevoc_8h.html#a0ab307b4e3ade23af88ccebbe81900e5">aubio_pvoc_t</a> * pvt = <a class="code" href="phasevoc_8h.html#aff037315bd1ae2caca67ee95e735c31b">new_aubio_pvoc</a>(win_s,hop_s);</div><div class="line">  <a class="code" href="phasevoc_8h.html#a0ab307b4e3ade23af88ccebbe81900e5">aubio_pvoc_t</a> * pvs = <a class="code" href="phasevoc_8h.html#aff037315bd1ae2caca67ee95e735c31b">new_aubio_pvoc</a>(win_s,hop_s);</div><div class="line"></div><div class="line">  <span class="comment">/* execute stft */</span></div><div class="line">  <span class="keywordflow">while</span> ( n-- ) {</div><div class="line">    <span class="comment">// fftgrain = pv(in)</span></div><div class="line">    <a name="a6"></a><a class="code" href="phasevoc_8h.html#a0ebb6ba0e58c4b929af069ebc005a064">aubio_pvoc_do</a> (pv, in, fftgrain);</div><div class="line">    <span class="comment">// ctrans, cstead = tss (fftgrain)</span></div><div class="line">    <a name="a7"></a><a class="code" href="tss_8h.html#ada4b5c554200b672dfab5a242a22ecfe">aubio_tss_do</a> (tss, fftgrain, ctrans, cstead);</div><div class="line">    <span class="comment">// stead = pvt_inverse (cstead)</span></div><div class="line">    <span class="comment">// trans = pvt_inverse (ctrans)</span></div><div class="line">    <a name="a8"></a><a class="code" href="phasevoc_8h.html#ad5ec51e7ea8f250951ab4a16bd51a57c">aubio_pvoc_rdo</a> (pvt, cstead, stead);</div><div class="line">    <a class="code" href="phasevoc_8h.html#ad5ec51e7ea8f250951ab4a16bd51a57c">aubio_pvoc_rdo</a> (pvs, ctrans, trans);</div><div class="line">  }</div><div class="line"></div><div class="line">  <a name="a9"></a><a class="code" href="phasevoc_8h.html#ae3d86b769a4076986ea3435be740c1d0">del_aubio_pvoc</a>(pv);</div><div class="line">  <a class="code" href="phasevoc_8h.html#ae3d86b769a4076986ea3435be740c1d0">del_aubio_pvoc</a>(pvt);</div><div class="line">  <a class="code" href="phasevoc_8h.html#ae3d86b769a4076986ea3435be740c1d0">del_aubio_pvoc</a>(pvs);</div><div class="line">  <a name="a10"></a><a class="code" href="tss_8h.html#a496235306bc0fab76cc7602b75bb5390">del_aubio_tss</a>(tss);</div><div class="line"></div><div class="line">  <a name="a11"></a><a class="code" href="fvec_8h.html#a86fad6d27aad91c910d1b48195922cb9">del_fvec</a>(in);</div><div class="line">  <a name="a12"></a><a class="code" href="cvec_8h.html#a98c745b15cea1b81e62cbb6fb21b0c56">del_cvec</a>(fftgrain);</div><div class="line">  <a class="code" href="cvec_8h.html#a98c745b15cea1b81e62cbb6fb21b0c56">del_cvec</a>(cstead);</div><div class="line">  <a class="code" href="cvec_8h.html#a98c745b15cea1b81e62cbb6fb21b0c56">del_cvec</a>(ctrans);</div><div class="line">  <a class="code" href="fvec_8h.html#a86fad6d27aad91c910d1b48195922cb9">del_fvec</a>(stead);</div><div class="line">  <a class="code" href="fvec_8h.html#a86fad6d27aad91c910d1b48195922cb9">del_fvec</a>(trans);</div><div class="line"></div><div class="line">  <a name="a13"></a><a class="code" href="musicutils_8h.html#a2b5d813f8d70b69add6f4811a68c9424">aubio_cleanup</a>();</div><div class="line"></div><div class="line">  <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>