Debian Codegraph @

opcodes/sfpreset.xml

raw symbols SCIP
1
2 <refentry id="sfpreset">
3 <indexterm id="IndexSfpreset"><primary>sfpreset</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Sample Playback</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>sfpreset</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>sfpreset</refname>
13 <refpurpose>
14 Assigns an existing preset of a SoundFont2 (SF2) sample file to an index number.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Assigns an existing preset of a previously loaded SoundFont2 (SF2) sample file to an index number. 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
24 <para>
25 <emphasis>sfpreset</emphasis> should be placed in the header section of a Csound orchestra.
26 </para>
27 </refsect1>
28
29 <refsect1>
30 <title>Syntax</title>
31 <synopsis>ir <command>sfpreset</command> iprog, ibank, ifilhandle, ipreindex</synopsis>
32 </refsect1>
33
34 <refsect1>
35 <title>Initialization</title>
36 <para>
37 <emphasis>ir</emphasis> -- output to be used by other SF2 opcodes. For <emphasis>sfpreset</emphasis>, <emphasis>ir</emphasis> is <emphasis>ipreindex</emphasis>.
38 </para>
39
40 <para>
41 <emphasis>iprog</emphasis> -- program number of a bank of presets in a SF2 file
42 </para>
43
44 <para>
45 <emphasis>ibank</emphasis> -- number of a specific bank of a SF2 file
46 </para>
47
48 <para>
49 <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.
50 </para>
51
52 <para>
53 <emphasis>ipreindex</emphasis> -- preset index
54 </para>
55 </refsect1>
56
57 <refsect1>
58 <title>Performance</title>
59 <para>
60 <emphasis>sfpreset</emphasis> assigns an existing preset of a previously loaded SF2 file to an index number, to be used later with the opcodes <emphasis>sfplay</emphasis> and <emphasis>sfplaym</emphasis>. The user must previously know the program and the bank numbers of the preset in order to fill the corresponding arguments. Any number of <emphasis>sfpreset</emphasis> instances can be placed in the header section of an orchestra, each one assigning a different preset belonging to the same (or different) SF2 file to different index numbers.
61 </para>
62
63 <para>
64 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.
65 </para>
66 </refsect1>
67
68 <refsect1>
69 <title>Examples</title>
70 <para>
71 Here is an example of the sfpreset opcode. It uses the file <ulink url="examples/sfpreset.csd"><citetitle>sfpreset.csd</citetitle></ulink>.
72 <example>
73 <title>Example of the sfpreset opcode.</title>
74 <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>
75 <xi:include href="examples-xml/sfpreset.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
76 </example>
77 </para>
78 </refsect1>
79
80 <refsect1>
81 <title>See also</title>
82 <para><link linkend="SiggenSample"><citetitle>Soundfonts</citetitle></link></para>
83 <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>
84 <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>
85 </refsect1>
86
87 <refsect1>
88 <title>Credits</title>
89 <para>
90 <simplelist>
91 <member>Author: &namegabriel;</member>
92 <member>Italy</member>
93 <member>May 2000</member>
94 </simplelist>
95 </para>
96
97 <para>New in Csound Version 4.07</para>
98 </refsect1>
99 </refentry>