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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libfluidsynth: sfont.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6-20040222 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>sfont.h File Reference</h1>
<p>
<a href="sfont_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="struct__fluid__sfloader__t.html">_fluid_sfloader_t</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="struct__fluid__sfont__t.html">_fluid_sfont_t</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="struct__fluid__preset__t.html">_fluid_preset_t</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="struct__fluid__sample__t.html">_fluid_sample_t</a></td></tr>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="sfont_8h.html#a0">fluid_sfont_get_id</a>(_sf) ((_sf)->id)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="sfont_8h.html#a1">fluid_sample_refcount</a>(_sample) ((_sample)->refcount)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="sfont_8h.html#a2">FLUID_SAMPLETYPE_MONO</a> 1</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sample types. <a href="#a2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="sfont_8h.html#a3">FLUID_SAMPLETYPE_RIGHT</a> 2</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="sfont_8h.html#a4">FLUID_SAMPLETYPE_LEFT</a> 4</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="sfont_8h.html#a5">FLUID_SAMPLETYPE_LINKED</a> 8</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="sfont_8h.html#a6">FLUID_SAMPLETYPE_ROM</a> 0x8000</td></tr>
<tr><td colspan=2><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom>{ <a class="el" href="sfont_8h.html#a10a7">FLUID_PRESET_SELECTED</a>,
<a class="el" href="sfont_8h.html#a10a8">FLUID_PRESET_UNSELECTED</a>,
<a class="el" href="sfont_8h.html#a10a9">FLUID_SAMPLE_DONE</a>
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">SoundFont plugins. <a href="#a10">More...</a><br><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="a1" doxytag="sfont.h::fluid_sample_refcount" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define fluid_sample_refcount</td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">_sample </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> ((_sample)->refcount)
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="sfont_8h-source.html#l00176">176</a> of file <a class="el" href="sfont_8h-source.html">sfont.h</a>. </td>
</tr>
</table>
<a class="anchor" name="a4" doxytag="sfont.h::FLUID_SAMPLETYPE_LEFT" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define FLUID_SAMPLETYPE_LEFT 4
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="sfont_8h-source.html#l00183">183</a> of file <a class="el" href="sfont_8h-source.html">sfont.h</a>. </td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="sfont.h::FLUID_SAMPLETYPE_LINKED" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define FLUID_SAMPLETYPE_LINKED 8
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="sfont_8h-source.html#l00184">184</a> of file <a class="el" href="sfont_8h-source.html">sfont.h</a>. </td>
</tr>
</table>
<a class="anchor" name="a2" doxytag="sfont.h::FLUID_SAMPLETYPE_MONO" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define FLUID_SAMPLETYPE_MONO 1
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sample types.
<p>
<p>
Definition at line <a class="el" href="sfont_8h-source.html#l00181">181</a> of file <a class="el" href="sfont_8h-source.html">sfont.h</a>. </td>
</tr>
</table>
<a class="anchor" name="a3" doxytag="sfont.h::FLUID_SAMPLETYPE_RIGHT" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define FLUID_SAMPLETYPE_RIGHT 2
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="sfont_8h-source.html#l00182">182</a> of file <a class="el" href="sfont_8h-source.html">sfont.h</a>. </td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="sfont.h::FLUID_SAMPLETYPE_ROM" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define FLUID_SAMPLETYPE_ROM 0x8000
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="sfont_8h-source.html#l00185">185</a> of file <a class="el" href="sfont_8h-source.html">sfont.h</a>. </td>
</tr>
</table>
<a class="anchor" name="a0" doxytag="sfont.h::fluid_sfont_get_id" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> #define fluid_sfont_get_id</td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">_sf </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> ((_sf)->id)
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="sfont_8h-source.html#l00115">115</a> of file <a class="el" href="sfont_8h-source.html">sfont.h</a>. </td>
</tr>
</table>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="a10" doxytag="sfont.h::@0" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> anonymous enum
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
SoundFont plugins.
<p>
It is possible to add new SoundFont loaders to the synthesizer. The API uses a couple of "interfaces" (structures with callback functions): fluid_sfloader_t, fluid_sfont_t, and fluid_preset_t.<p>
To add a new SoundFont loader to the synthesizer, call <a class="el" href="synth_8h.html#a86">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 fluid_sfont_t structure, or NULL if it fails.<p>
The fluid_sfont_t 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 an fluid_preset_t structure.<p>
The fluid_preset_t 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#a87">fluid_synth_alloc_voice()</a> for every sample that has to be played. <a class="el" href="synth_8h.html#a87">fluid_synth_alloc_voice()</a> expects a pointer to a fluid_sample_t structure and returns a pointer to the opaque fluid_voice_t structure. To set or increments the values of a generator, use fluid_voice_gen_{set,incr}. When you are finished initializing the voice call fluid_voice_start() to start playing the synthesis voice. <dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="anchor" name="a10a7" doxytag="FLUID_PRESET_SELECTED" ></a>FLUID_PRESET_SELECTED</em> </td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="a10a8" doxytag="FLUID_PRESET_UNSELECTED" ></a>FLUID_PRESET_UNSELECTED</em> </td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="a10a9" doxytag="FLUID_SAMPLE_DONE" ></a>FLUID_SAMPLE_DONE</em> </td><td>
</td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="sfont_8h-source.html#l00063">63</a> of file <a class="el" href="sfont_8h-source.html">sfont.h</a>. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Aug 17 14:37:47 2004 for libfluidsynth by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6-20040222 </small></address>
</body>
</html>
|