| 1 | |
| 2 | <refentry id="MixerSend"> |
| 3 | <indexterm id="IndexMixerSend"><primary>MixerSend</primary></indexterm> |
| 4 | <refentryinfo><title>Mixer Opcodes</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>MixerSend</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>MixerSend</refname> |
| 11 | <refpurpose> |
| 12 | Mixes an arate signal into a channel of a buss. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para>Mixes an arate signal into a channel of a buss. |
| 19 | </para> |
| 20 | </refsect1> |
| 21 | |
| 22 | <refsect1> |
| 23 | <title>Syntax</title> |
| 24 | <synopsis><command>MixerSend</command> asignal, isend, ibuss, ichannel</synopsis> |
| 25 | </refsect1> |
| 26 | |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | |
| 31 | <para><emphasis>isend</emphasis> -- The number of the send, for example the number of the instrument sending the signal. |
| 32 | The gain of the send is controlled by the <link linkend="MixerSetLevel"><citetitle>MixerSetLevel</citetitle></link> opcode. |
| 33 | The reason that the sends are numbered is to enable different levels for different sends to be set independently |
| 34 | of the actual level of the signals.</para> |
| 35 | |
| 36 | <para><emphasis>ibuss</emphasis> -- The number of the buss, for example the number of the instrument receiving the signal.</para> |
| 37 | |
| 38 | <para><emphasis>ichannel</emphasis> -- The number of the channel. Each buss has <literal>nchnls</literal> channels.</para> |
| 39 | </refsect1> |
| 40 | |
| 41 | <refsect1> |
| 42 | <title>Performance</title> |
| 43 | <para><emphasis>asignal</emphasis> -- The signal that will be mixed into the indicated channel of the buss.</para> |
| 44 | <para> |
| 45 | Use of the mixer requires that instruments setting gains have smaller numbers than instruments sending signals, |
| 46 | and that instruments sending signals have smaller numbers than instruments receiving those signals. |
| 47 | However, an instrument may have any number of sends or receives. After the final signal is received, |
| 48 | <link linkend="MixerClear"><citetitle>MixerClear</citetitle></link> must be invoked to reset the busses to 0 before the next kperiod. |
| 49 | </para> |
| 50 | </refsect1> |
| 51 | |
| 52 | <refsect1> |
| 53 | <title>Examples</title> |
| 54 | |
| 55 | <programlisting> |
| 56 | <emphasis role="oblock">instr</emphasis> 100 <emphasis role="comment">; Fluidsynth output</emphasis> |
| 57 | <emphasis role="comment">; INITIALIZATION</emphasis> |
| 58 | <emphasis role="comment">; Normalize so iamplitude for p5 of 80 == ampdb(80).</emphasis> |
| 59 | iamplitude <emphasis role="op">=</emphasis> <emphasis role="opc">ampdb</emphasis>(p5) <emphasis role="op">*</emphasis> 2.0 |
| 60 | <emphasis role="comment">; AUDIO</emphasis> |
| 61 | aleft, aright <emphasis role="opc">fluidAllOut</emphasis> giFluidsynth |
| 62 | asig1 <emphasis role="op">=</emphasis> aleft <emphasis role="op">*</emphasis> iamplitude |
| 63 | asig2 <emphasis role="op">=</emphasis> aright <emphasis role="op">*</emphasis> iamplitude |
| 64 | <emphasis role="comment">; To the chorus.</emphasis> |
| 65 | <emphasis role="opc">MixerSend</emphasis> asig1, 100, 200, 0 |
| 66 | <emphasis role="opc">MixerSend</emphasis> asig2, 100, 200, 1 |
| 67 | <emphasis role="comment">; To the reverb.</emphasis> |
| 68 | <emphasis role="opc">MixerSend</emphasis> asig1, 100, 210, 0 |
| 69 | <emphasis role="opc">MixerSend</emphasis> asig2, 100, 210, 1 |
| 70 | <emphasis role="comment">; To the output.</emphasis> |
| 71 | <emphasis role="opc">MixerSend</emphasis> asig1, 100, 220, 0 |
| 72 | <emphasis role="opc">MixerSend</emphasis> asig2, 100, 220, 1 |
| 73 | <emphasis role="oblock">endin</emphasis></programlisting> |
| 74 | <para> |
| 75 | Here is a complete example of the MixerSend opcode. It uses the file <ulink url="examples/Mixer.csd"><citetitle>Mixer.csd</citetitle></ulink> |
| 76 | <example> |
| 77 | <title>Complete example of the MixerSend opcode.</title> |
| 78 | <xi:include href="examples-xml/Mixer.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 79 | </example> |
| 80 | </para> |
| 81 | </refsect1> |
| 82 | |
| 83 | <refsect1> |
| 84 | <title>See also</title> |
| 85 | <para><link linkend="MixerOpcodes"><citetitle>Mixer Opcodes</citetitle></link></para> |
| 86 | </refsect1> |
| 87 | |
| 88 | <refsect1> |
| 89 | <title>Credits</title> |
| 90 | <para>Michael Gogins (gogins at pipeline dot com).</para> |
| 91 | </refsect1> |
| 92 | </refentry> |