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
|
<refentry id="MixerClear">
<indexterm id="IndexMixerClear"><primary>MixerClear</primary></indexterm>
<refentryinfo><title>Mixer Opcodes</title></refentryinfo>
<refmeta>
<refentrytitle>MixerClear</refentrytitle>
</refmeta>
<refnamediv>
<refname>MixerClear</refname>
<refpurpose>
Resets all channels of a buss to 0.
</refpurpose>
</refnamediv>
<refsect1>
<title>Syntax</title>
<synopsis><command>MixerClear</command></synopsis>
</refsect1>
<refsect1>
<title>Description</title>
<para>Resets all channels of a buss to 0.
</para>
</refsect1>
<refsect1>
<title>Performance</title>
<para>
Use of the mixer requires that instruments setting gains have smaller numbers than instruments sending signals,
and that instruments sending signals have smaller numbers than instruments receiving those signals.
However, an instrument may have any number of sends or receives. After the final signal is received,
<link linkend="MixerClear"><citetitle>MixerClear</citetitle></link> must be invoked to reset the busses to 0 before the next kperiod.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<programlisting>
instr 220 ; Master output
; It applies a bass enhancement, compression and fadeout
; to the whole piece, outputs signals, and clears the mixer.
a1 MixerReceive 220, 0
a2 MixerReceive 220, 1
; Bass enhancement
al1 butterlp a1, 100
al2 butterlp a2, 100
a1 = al1*1.5 +a1
a2 = al2*1.5 +a2
; Global amplitude shape
kenv linseg 0., p5 / 2.0, p4, p3 - p5, p4, p5 / 2.0, 0.
a1=a1*kenv
a2=a2*kenv
; Compression
a1 dam a1, 5000, 0.5, 1, 0.2, 0.1
a2 dam a2, 5000, 0.5, 1, 0.2, 0.1
; Remove DC bias
a1blocked dcblock a1
a2blocked dcblock a2
; Output signals
outs a1blocked, a2blocked
MixerClear
endin
</programlisting>
</refsect1>
<refsect1>
<title>Credits</title>
<para>Michael Gogins (gogins at pipeline dot com).</para>
</refsect1>
</refentry>
|