Debian Codegraph @

opcodes/initc7.xml

raw symbols SCIP
1
2 <refentry id="initc7">
3 <indexterm id="IndexInitc7"><primary>initc7</primary></indexterm>
4 <refentryinfo><title>Real-time MIDI:Input</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>initc7</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>initc7</refname>
13
14 <refpurpose>
15 Initializes the controller used to create a 7-bit MIDI value.
16 </refpurpose>
17 </refnamediv>
18
19 <refsect1>
20 <title>Description</title>
21 <para>
22 Initializes MIDI controller <emphasis>ictlno</emphasis> with <emphasis>ivalue</emphasis>
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis><command>initc7</command> ichan, ictlno, ivalue</synopsis>
29 </refsect1>
30
31 <refsect1>
32 <title>Initialization</title>
33 <para>
34 <emphasis>ichan</emphasis> -- MIDI channel (1-16)
35 </para>
36
37 <para>
38 <emphasis>ictlno</emphasis> -- controller number (0-127)
39 </para>
40
41 <para>
42 <emphasis>ivalue</emphasis> -- floating point value (must be within 0 to 1)
43 </para>
44 </refsect1>
45
46 <refsect1>
47 <title>Performance</title>
48 <para>
49 <emphasis>initc7</emphasis> can be used together with both <link linkend="midic7"><citetitle>midic7</citetitle></link> and <link linkend="ctrl7"><citetitle>ctrl7</citetitle></link> opcodes for initializing the first controller's value. <emphasis>ivalue</emphasis> argument must be set with a number within 0 to 1. An error occurs if it is not. Use the following formula to set <emphasis>ivalue</emphasis> according with <emphasis>midic7</emphasis> and <emphasis>ctrl7</emphasis> min and max range:
50
51 <literallayout>
52 ivalue = (initial_value - min) / (max - min)
53 </literallayout>
54 </para>
55 </refsect1>
56
57 <refsect1>
58 <title>Examples</title>
59 <para>
60 Here is an example of the initc7 opcode. It uses the file <ulink url="examples/initc7.csd"><citetitle>initc7.csd</citetitle></ulink>.
61 <example>
62 <title>Example of the initc7 opcode.</title>
63 <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>
64 <xi:include href="examples-xml/initc7.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
65 </example>
66 </para>
67 </refsect1>
68
69 <refsect1>
70 <title>See also</title>
71 <para><link linkend="MidiInput"><citetitle>MIDI input and Initialization</citetitle></link></para>
72 </refsect1>
73
74 <refsect1>
75 <title>Credits</title>
76 <para>
77 <simplelist>
78 <member>Author: &namegabriel;</member>
79 <member>Italy</member>
80 </simplelist>
81 </para>
82
83 <para>New in Csound version 3.47</para>
84 <para>Thanks goes to &namerasmus; for pointing out the correct MIDI channel and controller number ranges.</para>
85 </refsect1>
86 </refentry>