Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 0a2d1da5078620d6abbc0a5e920f2a92 > files > 78

fluidsynth-devel-1.1.3-1.fc14.x86_64.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"/>
<title>libfluidsynth: sfont.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<h1>sfont.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>SoundFont plugins.  
<a href="#_details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__sfloader__t.html">_fluid_sfloader_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">SoundFont loader structure.  <a href="struct__fluid__sfloader__t.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__sfont__t.html">_fluid_sfont_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual SoundFont instance structure.  <a href="struct__fluid__sfont__t.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__preset__t.html">_fluid_preset_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual SoundFont preset.  <a href="struct__fluid__preset__t.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__sample__t.html">_fluid_sample_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual SoundFont sample.  <a href="struct__fluid__sample__t.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sfont_8h.html#a0b95cae7587539906dec2602ac29b743">fluid_sample_refcount</a>(_sample)&nbsp;&nbsp;&nbsp;((_sample)-&gt;refcount)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the reference count of a sample.  <a href="#a0b95cae7587539906dec2602ac29b743"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a501aa3c84a31b590891c0e080681895f"></a><!-- doxytag: member="sfont.h::FLUID_SAMPLETYPE_MONO" ref="a501aa3c84a31b590891c0e080681895f" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sfont_8h.html#a501aa3c84a31b590891c0e080681895f">FLUID_SAMPLETYPE_MONO</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag for <a class="el" href="types_8h.html#abf9174d452679ca1a4ee7d693fb773cf" title="SoundFont sample.">fluid_sample_t</a> <em>sampletype</em> field for mono samples. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07582e4dc7657d0303a66c560c496d06"></a><!-- doxytag: member="sfont.h::FLUID_SAMPLETYPE_RIGHT" ref="a07582e4dc7657d0303a66c560c496d06" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sfont_8h.html#a07582e4dc7657d0303a66c560c496d06">FLUID_SAMPLETYPE_RIGHT</a>&nbsp;&nbsp;&nbsp;2</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag for <a class="el" href="types_8h.html#abf9174d452679ca1a4ee7d693fb773cf" title="SoundFont sample.">fluid_sample_t</a> <em>sampletype</em> field for right samples of a stereo pair. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab4903bcb19a00df0480135339007bb7f"></a><!-- doxytag: member="sfont.h::FLUID_SAMPLETYPE_LEFT" ref="ab4903bcb19a00df0480135339007bb7f" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sfont_8h.html#ab4903bcb19a00df0480135339007bb7f">FLUID_SAMPLETYPE_LEFT</a>&nbsp;&nbsp;&nbsp;4</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag for <a class="el" href="types_8h.html#abf9174d452679ca1a4ee7d693fb773cf" title="SoundFont sample.">fluid_sample_t</a> <em>sampletype</em> field for left samples of a stereo pair. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4566ed6619b8f5f3ea6db05ec02b4f0"></a><!-- doxytag: member="sfont.h::FLUID_SAMPLETYPE_LINKED" ref="aa4566ed6619b8f5f3ea6db05ec02b4f0" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sfont_8h.html#aa4566ed6619b8f5f3ea6db05ec02b4f0">FLUID_SAMPLETYPE_LINKED</a>&nbsp;&nbsp;&nbsp;8</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag for <a class="el" href="types_8h.html#abf9174d452679ca1a4ee7d693fb773cf" title="SoundFont sample.">fluid_sample_t</a> <em>sampletype</em> field, not used currently. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f977322c4a336ef8ad35d2205a82352"></a><!-- doxytag: member="sfont.h::FLUID_SAMPLETYPE_ROM" ref="a2f977322c4a336ef8ad35d2205a82352" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sfont_8h.html#a2f977322c4a336ef8ad35d2205a82352">FLUID_SAMPLETYPE_ROM</a>&nbsp;&nbsp;&nbsp;0x8000</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag for <a class="el" href="types_8h.html#abf9174d452679ca1a4ee7d693fb773cf" title="SoundFont sample.">fluid_sample_t</a> <em>sampletype</em> field, ROM sample, causes sample to be ignored. <br/></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="sfont_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba3b9d777321001517ceb0fc4f69fb35b1">FLUID_PRESET_SELECTED</a>, 
<a class="el" href="sfont_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba5d10f094a7a45e62fa19d559ac29e7f1">FLUID_PRESET_UNSELECTED</a>, 
<a class="el" href="sfont_8h.html#a06fc87d81c62e9abb8790b6e5713c55bad5841d407c7bcd3b59b787de8d506a7c">FLUID_SAMPLE_DONE</a>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Some notification enums for presets and samples. </p>
 <a href="sfont_8h.html#a06fc87d81c62e9abb8790b6e5713c55b">More...</a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>SoundFont plugins. </p>
<p>It is possible to add new SoundFont loaders to the synthesizer. The API uses a couple of "interfaces" (structures with callback functions): <a class="el" href="types_8h.html#ad3e880056d2262e48468719757b3f5e6" title="SoundFont loader plugin.">fluid_sfloader_t</a>, <a class="el" href="types_8h.html#aa6c18288f76608acbb10b80a153f4ab8" title="SoundFont.">fluid_sfont_t</a>, and <a class="el" href="types_8h.html#a985e5ee05f433da841127750f67a4723" title="SoundFont preset.">fluid_preset_t</a>. This API allows for virtual SoundFont files to be loaded and synthesized, which may not actually be SoundFont files, as long as they can be represented by the SoundFont synthesis model.</p>
<p>To add a new SoundFont loader to the synthesizer, call <a class="el" href="synth_8h.html#a4b35dcb250542b8e60cf5dccd0ec1589" title="Add a SoundFont loader interface.">fluid_synth_add_sfloader()</a> and pass a pointer to an fluid_sfloader_t structure. The important callback function in this structure is "load", which should try to load a file and returns a <a class="el" href="types_8h.html#aa6c18288f76608acbb10b80a153f4ab8" title="SoundFont.">fluid_sfont_t</a> structure, or NULL if it fails.</p>
<p>The <a class="el" href="types_8h.html#aa6c18288f76608acbb10b80a153f4ab8" title="SoundFont.">fluid_sfont_t</a> structure contains a callback to obtain the name of the SoundFont. It contains two functions to iterate though the contained presets, and one function to obtain a preset corresponding to a bank and preset number. This function should return a <a class="el" href="types_8h.html#a985e5ee05f433da841127750f67a4723" title="SoundFont preset.">fluid_preset_t</a> structure.</p>
<p>The <a class="el" href="types_8h.html#a985e5ee05f433da841127750f67a4723" title="SoundFont preset.">fluid_preset_t</a> structure contains some functions to obtain information from the preset (name, bank, number). The most important callback is the noteon function. The noteon function should call <a class="el" href="synth_8h.html#a005a5e8e6b34eb5a44b41d9020ce32d5" title="Allocate a synthesis voice.">fluid_synth_alloc_voice()</a> for every sample that has to be played. <a class="el" href="synth_8h.html#a005a5e8e6b34eb5a44b41d9020ce32d5" title="Allocate a synthesis voice.">fluid_synth_alloc_voice()</a> expects a pointer to a <a class="el" href="types_8h.html#abf9174d452679ca1a4ee7d693fb773cf" title="SoundFont sample.">fluid_sample_t</a> structure and returns a pointer to the opaque <a class="el" href="types_8h.html#a5123ae5ef2d7806475267380c33604c3" title="Synthesis voice instance.">fluid_voice_t</a> structure. To set or increment the values of a generator, use <a class="el" href="voice_8h.html#aa72691425953a90635ddc32ad246528e" title="Set the value of a generator.">fluid_voice_gen_set()</a> or <a class="el" href="voice_8h.html#a7113dbb4a08d8097d4188658876749c5" title="Offset the value of a generator.">fluid_voice_gen_incr()</a>. When you are finished initializing the voice call fluid_voice_start() to start playing the synthesis voice. </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a0b95cae7587539906dec2602ac29b743"></a><!-- doxytag: member="sfont.h::fluid_sample_refcount" ref="a0b95cae7587539906dec2602ac29b743" args="(_sample)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define fluid_sample_refcount</td>
          <td>(</td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname">_sample</td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;((_sample)-&gt;refcount)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the reference count of a sample. </p>
<p>Should only be called from within synthesis context (noteon method for example) </p>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="a06fc87d81c62e9abb8790b6e5713c55b"></a><!-- doxytag: member="sfont.h::@0" ref="a06fc87d81c62e9abb8790b6e5713c55b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Some notification enums for presets and samples. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a06fc87d81c62e9abb8790b6e5713c55ba3b9d777321001517ceb0fc4f69fb35b1"></a><!-- doxytag: member="FLUID_PRESET_SELECTED" ref="a06fc87d81c62e9abb8790b6e5713c55ba3b9d777321001517ceb0fc4f69fb35b1" args="" -->FLUID_PRESET_SELECTED</em>&nbsp;</td><td>
<p>Preset selected notify. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a06fc87d81c62e9abb8790b6e5713c55ba5d10f094a7a45e62fa19d559ac29e7f1"></a><!-- doxytag: member="FLUID_PRESET_UNSELECTED" ref="a06fc87d81c62e9abb8790b6e5713c55ba5d10f094a7a45e62fa19d559ac29e7f1" args="" -->FLUID_PRESET_UNSELECTED</em>&nbsp;</td><td>
<p>Preset unselected notify. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a06fc87d81c62e9abb8790b6e5713c55bad5841d407c7bcd3b59b787de8d506a7c"></a><!-- doxytag: member="FLUID_SAMPLE_DONE" ref="a06fc87d81c62e9abb8790b6e5713c55bad5841d407c7bcd3b59b787de8d506a7c" args="" -->FLUID_SAMPLE_DONE</em>&nbsp;</td><td>
<p>Sample no longer needed notify. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 12 2010 for libfluidsynth by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>