Debian Codegraph @

opcodes/balance.xml

raw symbols SCIP
1
2 <refentry id="balance">
3 <indexterm id="IndexBalance"><primary>balance</primary></indexterm>
4 <refentryinfo><title>Signal Modifiers:Amplitude Modifiers</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>balance</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>balance</refname>
13 <refpurpose>
14 Adjust one audio signal according to the values of another.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 The rms power of asig can be interrogated, set, or adjusted to match that of a comparator signal.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>ares <command>balance</command> asig, acomp [, ihp] [, iskip]</synopsis>
28 </refsect1>
29
30 <refsect1>
31 <title>Initialization</title>
32 <para>
33 <emphasis>ihp</emphasis> (optional) -- half-power point (in Hz) of a special internal low-pass filter. The default value is 10.
34 </para>
35
36 <para>
37 <emphasis>iskip</emphasis> (optional, default=0) -- initial disposition of internal data space (see <link linkend="reson"><citetitle>reson</citetitle></link>). The default value is 0.
38 </para>
39 </refsect1>
40
41 <refsect1>
42 <title>Performance</title>
43 <para>
44 <emphasis>asig</emphasis> -- input audio signal
45 </para>
46
47 <para>
48 <emphasis>acomp</emphasis> -- the comparator signal
49 </para>
50
51 <para>
52 <emphasis>balance</emphasis> outputs a version of <emphasis>asig</emphasis>, amplitude-modified so that its rms power is equal to that of a comparator signal <emphasis>acomp</emphasis>. Thus a signal that has suffered loss of power (eg., in passing through a filter bank) can be restored by matching it with, for instance, its own source. It should be noted that <link linkend="gain"><citetitle>gain</citetitle></link> and <emphasis>balance</emphasis> provide amplitude modification only - output signals are not altered in any other respect.
53 </para>
54 </refsect1>
55
56
57 <refsect1>
58 <title>Examples</title>
59 <para>
60 Here is an example of the balance opcode. It uses the file <ulink url="examples/balance.csd"><citetitle>balance.csd</citetitle></ulink>.
61
62 <example>
63 <title>Example of the balance opcode.</title>
64
65
66
67 <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>
68 <xi:include href="examples-xml/balance.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
69 </example>
70 </para>
71 </refsect1>
72
73 <refsect1>
74 <title>See also</title>
75 <para><link linkend="SigProcAmpMod"><citetitle>Amplitude Modifiers and Dynamic processing</citetitle></link></para>
76 </refsect1>
77
78 </refentry>