Debian Codegraph @

opcodes/ampmidid.xml

raw symbols SCIP
1 <refentry id="ampmidid">
2 <indexterm id="IndexAmpmidid"><primary>ampmidid</primary></indexterm>
3 <refentryinfo><title>Real-time MIDI:Converters</title></refentryinfo>
4 <refmeta>
5 <refentrytitle>ampmidid</refentrytitle>
6 </refmeta>
7
8 <refnamediv>
9 <refname>ampmidid</refname>
10 <refpurpose>
11 Musically map MIDI velocity to peak amplitude within a specified dynamic range in decibels.
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>Description</title>
17 <para>Plugin opcode in ampmidid.</para>
18 <para>
19 Musically map MIDI velocity to peak amplitude within a specified dynamic range in decibels.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis>iamplitude <command>ampmidid</command> ivelocity, idecibels</synopsis>
26 <synopsis>kamplitude <command>ampmidid</command> kvelocity, idecibels</synopsis>
27 </refsect1>
28
29 <refsect1>
30 <title>Initialization</title>
31 <para>
32 <emphasis>iamplitude</emphasis> -- Amplitude.
33 </para>
34
35 <para>
36 <emphasis>ivelocity</emphasis> -- MIDI velocity number, ranging from 0 through 127.
37 </para>
38
39 <para>
40 <emphasis>idecibels</emphasis> -- Desired dynamic range in decibels.
41 </para>
42 </refsect1>
43
44 <refsect1>
45 <title>Performance</title>
46 <para>
47 <emphasis>kamplitude</emphasis> -- Amplitude.
48 </para>
49
50 <para>
51 <emphasis>kvelocity</emphasis> -- MIDI velocity number, ranging from 0 through 127.
52 </para>
53
54 <para>
55 Musically map MIDI velocity to peak amplitude
56 within a specified dynamic range in decibels:
57 a = (m * v + b) ^ 2,
58 where a = amplitude,
59 v = MIDI velocity,
60 r = 10 ^ (R / 20),
61 b = 127 / (126 * sqrt( r )) - 1 / 126,
62 m = (1 - b) / 127,
63 and R = specified dynamic range in decibels.
64 See Roger Dannenberg, "The Interpretation of MIDI Velocity,"
65 in Georg Essl and Ichiro Fujinaga (Eds.), Proceedings of the
66 2006 International Computer Music Conference,
67 November 6-11, 2006 (San Francisco:
68 The International Computer Music Association), pp. 193-196.
69 </para>
70 </refsect1>
71
72 <refsect1>
73 <title>Examples</title>
74 <para>
75 Here is an example of the ampmidid opcode. It uses the file <ulink url="examples/ampmidid.csd"><citetitle>ampmidid.csd</citetitle></ulink>.
76 <example>
77 <title>Example of the ampmidid opcode.</title>
78 <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>
79 <xi:include href="examples-xml/ampmidid.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
80 </example>
81 </para>
82 </refsect1>
83
84 <refsect1>
85 <title>See also</title>
86 <para><link linkend="MidiConvert"><citetitle>Midi Converters</citetitle></link></para>
87 </refsect1>
88
89 <refsect1>
90 <title>Credits</title>
91 <para>
92 <simplelist>
93 <member>Author: &namemichael;</member>
94 <member>2006</member>
95 </simplelist>
96 </para>
97
98 </refsect1>
99 </refentry>