-
Notifications
You must be signed in to change notification settings - Fork 29
/
ampmidicurve.xml
125 lines (111 loc) · 4.66 KB
/
ampmidicurve.xml
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
<refentry id="ampmidicurve">
<indexterm id="Indexampmidicurve"><primary>ampmidicurve</primary></indexterm>
<refentryinfo><title>Real-time MIDI:Converters</title></refentryinfo>
<refmeta>
<refentrytitle>ampmidicurve</refentrytitle>
</refmeta>
<refnamediv>
<refname>ampmidicurve</refname>
<refpurpose>
Maps an input MIDI velocity number to an output gain factor with a
maximum value of 1, modifying the output gain by a dynamic range and a
shaping exponent.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>Plugin opcode in ampmidid.</para>
<para>
Maps an input MIDI velocity number to an output gain factor with a
maximum value of 1, modifying the output gain by a dynamic range and a
shaping exponent. The minimum output gain is 1 minus the dynamic range.
A shaping exponent of 1 gives a linear response; increasing the exponent
produces an increasingly depressed knee in the gain response curve.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis>igain <command>ampmidicurve</command> ivelocity, idynamicrange, iexponent</synopsis>
<synopsis>kgain <command>ampmidicurve</command> kvelocity, kdynamicrange, kexponent</synopsis>
</refsect1>
<refsect1>
<title>Initialization</title>
<para>
<emphasis>imidivelocity </emphasis> -- MIDI velocity number, ranging from
0 through 127.
</para>
<para>
<emphasis>idynamicrange</emphasis> -- Intended dynamic range of gain, from
0 through 1.
</para>
<para>
<emphasis>iexponent</emphasis> -- Exponent applied to shape the gain
response curve, 1 or greater.
</para>
</refsect1>
<refsect1>
<title>Performance</title>
<para>
<emphasis>kmidivelocity </emphasis> -- MIDI velocity number, ranging from
0 through 127.
</para>
<para>
<emphasis>kdynamicrange</emphasis> -- Intended dynamic range of gain, from
0 through 1.
</para>
<para>
<emphasis>kexponent</emphasis> -- Exponent applied to shape the gain
response curve, 1 or greater.
</para>
<para>
Maps an input MIDI velocity number to an output gain factor with a
maximum value of 1, modifying the output gain by a dynamic range and a
shaping exponent. The minimum output gain is 1 minus the dynamic range.
A shaping exponent of 1 gives a linear response; increasing the exponent
produces an increasingly depressed knee in the gain response curve,
according to the equation:
y = d * (x/127)^h + 1 - d,
where y = the gain,
x = the input MIDI velocity (from 0 through 127),
d = the dynamic range (from p through 1), and
h = the shaping exponent (1 or greater).
This opcode was suggested by Mauro Giubileo.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Here is an example of the ampmidicurve opcode. It uses the file <ulink url="examples/ampmidicurve.csd"><citetitle>ampmidicurve.csd</citetitle></ulink>.
<example>
<title>Example of the ampmidicurve opcode.</title>
<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>
<xi:include href="examples-xml/ampmidicurve.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="aftouch"><citetitle>aftouch</citetitle></link>,
<link linkend="cpsmidi"><citetitle>cpsmidi</citetitle></link>,
<link linkend="cpsmidib"><citetitle>cpsmidib</citetitle></link>,
<link linkend="midictrl"><citetitle>midictrl</citetitle></link>,
<link linkend="notnum"><citetitle>notnum</citetitle></link>,
<link linkend="octmidi"><citetitle>octmidi</citetitle></link>,
<link linkend="octmidib"><citetitle>octmidib</citetitle></link>,
<link linkend="pchbend"><citetitle>pchbend</citetitle></link>,
<link linkend="pchmidi"><citetitle>pchmidi</citetitle></link>,
<link linkend="pchmidib"><citetitle>pchmidib</citetitle></link>,
<link linkend="veloc"><citetitle>veloc</citetitle></link>
</para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: &namemichael;</member>
<member>2019</member>
</simplelist>
</para>
</refsect1>
</refentry>