1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!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"/>
<title>libaudiomask: libaudiomask - Simultaneous audio mask threshold estimation library</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<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><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.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)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
</div>
<div class="contents">
<h1>libaudiomask - Simultaneous audio mask threshold estimation library </h1><h3 class="version">1.0 </h3><dl class="author"><dt><b>Authors:</b></dt><dd>Dr Matt R. Flax <flatmax@></dd></dl>
<div align="center">
<img src="masking.example.jpg" alt="masking.example.jpg"/>
</div>
<h2><a class="anchor" id="docs">
Academic</a></h2>
<p>This code also implements the roex auditory filters.</p>
<p>Please read the article located on the debian file system <a href="file:///usr/shar/doc/libaudiomask-1.0/Flax.2000.Improved.Auditory.Masking.Models.pdf">file:///usr/shar/doc/libaudiomask-1.0/Flax.2000.Improved.Auditory.Masking.Models.pdf</a></p>
<p>It may also be found on the web <a href="http://www.assta.org/sst/SST-00/cache/SST-00-Chapter9-p2.pdf">http://www.assta.org/sst/SST-00/cache/SST-00-Chapter9-p2.pdf</a> </p>
<h2><a class="anchor" id="intro">
Introduction</a></h2>
<p>This example shows how to use Dr M.R. Flax's (2000) hybrid simultaneous audio masking class to find the masking threshold of a time domain signal.</p>
<p>The compilation of this file is demonstrated in Makefile. Run this file : ./AudioMaskerExample View the results of this file using www.octave.org by running the script view.m</p>
<ul>
<li>simply type view once octave has started and you are in the suitable directory.</li>
</ul>
<p>The input audio should be stored in the file INPUTFILENAME in text format - each sample seperated by a white space.</p>
<p>========================= HOWTO =============================== </p>
<div class="fragment"><pre class="fragment"> <span class="comment">// First find the masking threshold</span>
<a class="code" href="classAudioMasker.html">AudioMasker</a> masker(sampleFreq, count); <span class="comment">// Create the audio masker class using fs=sampleFreq and count filters</span>
masker.excite(input, sampleCount); <span class="comment">// find the mask for the array of input data which has sampleCount time samples.</span>
<span class="comment">// Now do something with the masking threshold ...</span>
<span class="comment">// The frequency domain mask is now located here</span>
<span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0; j<count;j++)
masker.mask[j]; <span class="comment">// This is the mask at each of the count frequencies of interest</span>
<span class="comment">// A more sophisticated example - find the threshold for each Fourier bin</span>
<span class="keywordtype">double</span> fact=(<span class="keywordtype">double</span>)sampleFreq/((double)sampleCount-1.0); <span class="comment">// convert from an index to the equivalent * Fourier bin frequency</span>
<span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0; j<halfSampleCount;j++){
cout<<<span class="stringliteral">"finding for freq "</span><<j*fact<<<span class="charliteral">'\t'</span>; <span class="comment">// The frequency we are inspecting</span>
<span class="keywordtype">double</span> threshold=masker.findThreshold(j*fact); <span class="comment">// The masking threshold</span>
20*log10(threshold); <span class="comment">// The threshold in decibels (dB)</span>
}
</pre></div> </div>
<!--- 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>Variables</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sat Jun 19 15:23:28 2010 for libaudiomask by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|