| 1 | |
| 2 | <refentry id="sfplist"> |
| 3 | <indexterm id="IndexSfplist"><primary>sfplist</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Sample Playback</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>sfplist</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>sfplist</refname> |
| 13 | <refpurpose> |
| 14 | Prints a list of all presets of a SoundFont2 (SF2) sample file. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | Prints a list of all presets of a previously loaded SoundFont2 (SF2) sample file. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the <link linkend="SiggenSample"><citetitle>SoundFont2 File Format</citetitle></link> section. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis><command>sfplist</command> ifilhandle</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>ifilhandle</emphasis> -- unique number generated by <emphasis>sfload</emphasis> opcode to be used as an identifier for a SF2 file. Several SF2 files can be loaded and activated at the same time. |
| 34 | </para> |
| 35 | </refsect1> |
| 36 | |
| 37 | <refsect1> |
| 38 | <title>Performance</title> |
| 39 | <para> |
| 40 | <emphasis>sfplist</emphasis> prints a list of all presets of a previously loaded SF2 file to the console. |
| 41 | </para> |
| 42 | |
| 43 | <para> |
| 44 | These opcodes only support the sample structure of SF2 files. The modulator structure of the SoundFont2 format is not supported in Csound. Any modulation or processing to the sample data is left to the Csound user, bypassing all restrictions forced by the SF2 standard. |
| 45 | </para> |
| 46 | </refsect1> |
| 47 | |
| 48 | <refsect1> |
| 49 | <title>Examples</title> |
| 50 | <para> |
| 51 | Here is an example of the sfplist opcode. It uses the file <ulink url="examples/sfplist.csd"><citetitle>sfplist.csd</citetitle></ulink>. |
| 52 | <example> |
| 53 | <title>Example of the sfplist opcode.</title> |
| 54 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 55 | <xi:include href="examples-xml/sfplist.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 56 | </example> |
| 57 | Its output should include lines like this: |
| 58 | <screen> |
| 59 | Preset list of "sf_GMbank.sf2" |
| 60 | 0) Piano 1 prog:0 bank:0 |
| 61 | 1) Piano 2 prog:1 bank:0 |
| 62 | 2) Piano 3 prog:2 bank:0 |
| 63 | 3) Honky Tonk prog:3 bank:0 |
| 64 | 4) E.Piano 1 prog:4 bank:0 |
| 65 | 5) E.Piano 2 prog:5 bank:0 |
| 66 | 6) Harpsichord prog:6 bank:0 |
| 67 | ........ |
| 68 | 146) Car-Pass prog:125 bank:3 |
| 69 | ........ |
| 70 | </screen> |
| 71 | </para> |
| 72 | </refsect1> |
| 73 | |
| 74 | <refsect1> |
| 75 | <title>See also</title> |
| 76 | <para><link linkend="SiggenSample"><citetitle>Soundfonts</citetitle></link></para> |
| 77 | <para> More information on soundfonts is in the Floss Manuals: <ulink url="https://flossmanual.csound.com/midi/reading-midi-files"><citetitle>https://flossmanual.csound.com/midi/reading-midi-files</citetitle></ulink></para> |
| 78 | <para> For other information on soundfonts look in the Wikipedia: <ulink url="http://en.wikipedia.org/wiki/Soundfont"><citetitle>http://en.wikipedia.org/wiki/Soundfont</citetitle></ulink></para> |
| 79 | </refsect1> |
| 80 | |
| 81 | <refsect1> |
| 82 | <title>Credits</title> |
| 83 | <para> |
| 84 | <simplelist> |
| 85 | <member>Author: &namegabriel;</member> |
| 86 | <member>Italy</member> |
| 87 | <member>May 2000</member> |
| 88 | </simplelist> |
| 89 | </para> |
| 90 | |
| 91 | <para>New in Csound Version 4.07</para> |
| 92 | </refsect1> |
| 93 | </refentry> |