Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 2eb128636afdc4a8c8207ec3ec09861d > files > 82

fluidsynth-devel-1.1.3-1.fc14.i686.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: _fluid_preset_t Struct 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 class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><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="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<h1>_fluid_preset_t Struct Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="_fluid_preset_t" -->
<p>Virtual SoundFont preset.  
<a href="#_details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe0cdcf920e3014a4d84d1348cc88383"></a><!-- doxytag: member="_fluid_preset_t::data" ref="afe0cdcf920e3014a4d84d1348cc88383" args="" -->
void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__preset__t.html#afe0cdcf920e3014a4d84d1348cc88383">data</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">User supplied data. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a88abb2db089ec85c8793fadf6c6e12c3"></a><!-- doxytag: member="_fluid_preset_t::sfont" ref="a88abb2db089ec85c8793fadf6c6e12c3" args="" -->
<a class="el" href="struct__fluid__sfont__t.html">fluid_sfont_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__preset__t.html#a88abb2db089ec85c8793fadf6c6e12c3">sfont</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parent virtual SoundFont. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__preset__t.html#abf96051b0cacf392115762774c7dac12">free</a> )(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Method to free a virtual SoundFont preset.  <a href="#abf96051b0cacf392115762774c7dac12"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__preset__t.html#a9772d413ddbc6791db307369566d32ed">get_name</a> )(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Method to get a virtual SoundFont preset name.  <a href="#a9772d413ddbc6791db307369566d32ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__preset__t.html#a5a5e1367a5cfb660e3e5cddaa2600095">get_banknum</a> )(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Method to get a virtual SoundFont preset MIDI bank number.  <a href="#a5a5e1367a5cfb660e3e5cddaa2600095"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__preset__t.html#a013694e0d24a6261686db38f5ee0afd7">get_num</a> )(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Method to get a virtual SoundFont preset MIDI program number.  <a href="#a013694e0d24a6261686db38f5ee0afd7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__preset__t.html#a8abd8ea52f43760beabbc9acdb8d3fdc">noteon</a> )(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset, <a class="el" href="types_8h.html#ae265f10ae174a13afe010de50d87e1a4">fluid_synth_t</a> *synth, int chan, int key, int vel)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Method to handle a noteon event (synthesize the instrument).  <a href="#a8abd8ea52f43760beabbc9acdb8d3fdc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__fluid__preset__t.html#a11386ab3a18ad9c4e1abbdb6bf3f810a">notify</a> )(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset, int reason, int chan)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual SoundFont preset notify method.  <a href="#a11386ab3a18ad9c4e1abbdb6bf3f810a"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Virtual SoundFont preset. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="abf96051b0cacf392115762774c7dac12"></a><!-- doxytag: member="_fluid_preset_t::free" ref="abf96051b0cacf392115762774c7dac12" args=")(fluid_preset_t *preset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="struct__fluid__preset__t.html#abf96051b0cacf392115762774c7dac12">_fluid_preset_t::free</a>)(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Method to free a virtual SoundFont preset. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>preset</em>&nbsp;</td><td>Virtual SoundFont preset </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Should return 0 </dd></dl>

</div>
</div>
<a class="anchor" id="a9772d413ddbc6791db307369566d32ed"></a><!-- doxytag: member="_fluid_preset_t::get_name" ref="a9772d413ddbc6791db307369566d32ed" args=")(fluid_preset_t *preset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char*(* <a class="el" href="struct__fluid__preset__t.html#a9772d413ddbc6791db307369566d32ed">_fluid_preset_t::get_name</a>)(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Method to get a virtual SoundFont preset name. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>preset</em>&nbsp;</td><td>Virtual SoundFont preset </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Should return the name of the preset. The returned string must be valid for the duration of the virtual preset (or the duration of the SoundFont, in the case of preset iteration). </dd></dl>

</div>
</div>
<a class="anchor" id="a5a5e1367a5cfb660e3e5cddaa2600095"></a><!-- doxytag: member="_fluid_preset_t::get_banknum" ref="a5a5e1367a5cfb660e3e5cddaa2600095" args=")(fluid_preset_t *preset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="struct__fluid__preset__t.html#a5a5e1367a5cfb660e3e5cddaa2600095">_fluid_preset_t::get_banknum</a>)(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Method to get a virtual SoundFont preset MIDI bank number. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>preset</em>&nbsp;</td><td>Virtual SoundFont preset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>return</em>&nbsp;</td><td>The bank number of the preset </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a013694e0d24a6261686db38f5ee0afd7"></a><!-- doxytag: member="_fluid_preset_t::get_num" ref="a013694e0d24a6261686db38f5ee0afd7" args=")(fluid_preset_t *preset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="struct__fluid__preset__t.html#a013694e0d24a6261686db38f5ee0afd7">_fluid_preset_t::get_num</a>)(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Method to get a virtual SoundFont preset MIDI program number. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>preset</em>&nbsp;</td><td>Virtual SoundFont preset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>return</em>&nbsp;</td><td>The program number of the preset </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8abd8ea52f43760beabbc9acdb8d3fdc"></a><!-- doxytag: member="_fluid_preset_t::noteon" ref="a8abd8ea52f43760beabbc9acdb8d3fdc" args=")(fluid_preset_t *preset, fluid_synth_t *synth, int chan, int key, int vel)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="struct__fluid__preset__t.html#a8abd8ea52f43760beabbc9acdb8d3fdc">_fluid_preset_t::noteon</a>)(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset, <a class="el" href="types_8h.html#ae265f10ae174a13afe010de50d87e1a4">fluid_synth_t</a> *synth, int chan, int key, int vel)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Method to handle a noteon event (synthesize the instrument). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>preset</em>&nbsp;</td><td>Virtual SoundFont preset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>synth</em>&nbsp;</td><td>Synthesizer instance </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>chan</em>&nbsp;</td><td>MIDI channel number of the note on event </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>MIDI note number (0-127) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>vel</em>&nbsp;</td><td>MIDI velocity (0-127) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="misc_8h.html#ae4efb1c3ce0d550c922504adfb0fb886" title="Value that indicates success, used by most libfluidsynth functions.">FLUID_OK</a> on success (0) or <a class="el" href="misc_8h.html#a90e8bdbc5a507bbfa5c45bac85a63a61" title="Value that indicates failure, used by most libfluidsynth functions.">FLUID_FAILED</a> (-1) otherwise</dd></dl>
<p>This method may be called from within synthesis context and therefore should be as efficient as possible and not perform any operations considered bad for realtime audio output (memory allocations and other OS calls).</p>
<p>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. Starting with FluidSynth 1.1.0 all voices created will be started at the same time. </p>

</div>
</div>
<a class="anchor" id="a11386ab3a18ad9c4e1abbdb6bf3f810a"></a><!-- doxytag: member="_fluid_preset_t::notify" ref="a11386ab3a18ad9c4e1abbdb6bf3f810a" args=")(fluid_preset_t *preset, int reason, int chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="struct__fluid__preset__t.html#a11386ab3a18ad9c4e1abbdb6bf3f810a">_fluid_preset_t::notify</a>)(<a class="el" href="struct__fluid__preset__t.html">fluid_preset_t</a> *preset, int reason, int chan)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Virtual SoundFont preset notify method. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>preset</em>&nbsp;</td><td>Virtual SoundFont preset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>reason</em>&nbsp;</td><td><a class="el" href="sfont_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba3b9d777321001517ceb0fc4f69fb35b1" title="Preset selected notify.">FLUID_PRESET_SELECTED</a> or <a class="el" href="sfont_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba5d10f094a7a45e62fa19d559ac29e7f1" title="Preset unselected notify.">FLUID_PRESET_UNSELECTED</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>chan</em>&nbsp;</td><td>MIDI channel number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Should return <a class="el" href="misc_8h.html#ae4efb1c3ce0d550c922504adfb0fb886" title="Value that indicates success, used by most libfluidsynth functions.">FLUID_OK</a></dd></dl>
<p>Implement this optional method if the preset needs to be notified about preset select and unselect events.</p>
<p>This method may be called from within synthesis context and therefore should be as efficient as possible and not perform any operations considered bad for realtime audio output (memory allocations and other OS calls). </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="sfont_8h.html">sfont.h</a></li>
</ul>
</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>