Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > b707d9a4ee443103660a75ccb6e51334 > files > 2302

csound-doc-5.19.01-10.mga5.noarch.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>outch</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.76.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="outc.html" title="outc" />
    <link rel="next" href="outh.html" title="outh" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">outch</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="outc.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="outh.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="outch">
      <a id="outch"></a>
      <div class="titlepage"></div>
      <a id="IndexOutch" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">outch</span>
        </h2>
        <p>outch — 
      Writes multi-channel audio data, with user-controllable channels, to an external device or stream.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp34102912"></a>
        <h2>Description</h2>
        <p>
      Writes multi-channel audio data, with user-controllable channels, to an external device or stream.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp34103624"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>outch</strong></span> kchan1, asig1 [, kchan2] [, asig2] [...]</pre>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp34143880"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>outch</em></span> outputs <span class="emphasis"><em>asig1</em></span> on the channel determined by <span class="emphasis"><em>kchan1</em></span>, <span class="emphasis"><em>asig2</em></span> on the channel determined by <span class="emphasis"><em>kchan2</em></span>, etc.
    </p>
        <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
          <table border="0" summary="Note">
            <tr>
              <td rowspan="2" align="center" valign="top" width="25">
                <img alt="[Note]" src="images/note.png" />
              </td>
              <th align="left">Note</th>
            </tr>
            <tr>
              <td align="left" valign="top">
                <p>
        The highest number for <span class="emphasis"><em>kchanX</em></span> available for use with <span class="emphasis"><em>outch</em></span> depends on <a class="link" href="nchnls.html" title="nchnls"><em class="citetitle">nchnls</em></a>. If <span class="emphasis"><em>kchanX</em></span> is greater than <span class="emphasis"><em>nchnls</em></span>, <span class="emphasis"><em>asigX</em></span> will be silent. Note that <span class="emphasis"><em>outch</em></span> will give a warning but not an error in this case.
     </p>
              </td>
            </tr>
          </table>
        </div>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp34147952"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the outch opcode. It uses the file <a class="ulink" href="examples/outch.csd" target="_top"><em class="citetitle">outch.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp34148920"></a>
          <p class="title">
            <strong>Example 538. Example of the outch opcode.</strong>
          </p>
          <div class="example-contents">
            <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac    <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o outch.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 32
<span class="ohdr">nchnls</span> <span class="op">=</span> 5
<span class="ohdr">0dbfs</span>  <span class="op">=</span> 1

<span class="oblock">instr</span> 1

asig <span class="opc">vco2</span> .05, 100	<span class="comment">; sawtooth waveform at low volume</span>

kcut <span class="opc">line</span> 100, p3, 30	<span class="comment">; Vary cutoff frequency</span>
kresonance <span class="op">=</span> .7
inumlayer <span class="op">=</span> 3
asig <span class="opc">lowresx</span> asig, kcut, kresonance, inumlayer

klfo <span class="opc">lfo</span> 4, .5, 4	
klfo <span class="op">=</span> klfo<span class="op">+</span>1		<span class="comment">; offset of 1</span>
<span class="opc">printks</span> "signal is sent to channel <span class="op">%</span>d\\n", .1, klfo
      <span class="opc">outch</span> klfo,asig

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>

<span class="stamnt">i</span> 1 0 30
<span class="stamnt">e</span>
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
            </p>
        <pre class="screen">
signal is sent to channel 5
signal is sent to channel 4
signal is sent to channel 3
signal is sent to channel 2
signal is sent to channel 1
signal is sent to channel 5
........
      </pre>
        <p>
    </p>
        <p>
      Here is another example of the outch opcode. It uses the file <a class="ulink" href="examples/outch.csd" target="_top"><em class="citetitle">outch-2.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp34152256"></a>
          <p class="title">
            <strong>Example 539. Another example of the outch opcode.</strong>
          </p>
          <div class="example-contents">
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac      <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o outch-2.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 32
<span class="ohdr">nchnls</span> <span class="op">=</span> 4
<span class="ohdr">0dbfs</span>  <span class="op">=</span> 1

<span class="ohdr">seed</span>     0

<span class="oblock">instr</span> 1 <span class="comment">;random movements between 4 speakers with outch</span>

ichn1     <span class="opc">random</span>    1, 4.999 <span class="comment">;channel to start</span>
ichn2     <span class="opc">random</span>    1, 4.999 <span class="comment">;channel to end</span>
          <span class="opc">prints</span>    "Moving from speaker <span class="op">%</span>d to speaker <span class="op">%</span>d<span class="op">%</span>n", <span class="opc">int</span>(ichn1), <span class="opc">int</span>(ichn2)
asamp     <span class="opc">soundin</span>   "fox.wav"
kmov      <span class="opc">linseg</span>    0, p3, 1
a1, a2    <span class="opc">pan2</span>      asamp, kmov
          <span class="opc">outch</span>     <span class="opc">int</span>(ichn1), a1, <span class="opc">int</span>(ichn2), a2
<span class="oblock">endin</span>

<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="stamnt">r</span> 5
<span class="stamnt">i</span> 1 0 3
<span class="stamnt">e</span>
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1" title="See Also">
        <a id="idp34153280"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="out32.html" title="out32"><em class="citetitle">out32</em></a>,
      <a class="link" href="outc.html" title="outc"><em class="citetitle">outc</em></a>,
      <a class="link" href="outx.html" title="outx"><em class="citetitle">outx</em></a>,
      <a class="link" href="outz.html" title="outz"><em class="citetitle">outz</em></a>
    </p>
        <p> More information on this opcode: <a class="ulink" href="http://www.csounds.com/journal/issue16/audiorouting.html" target="_top"><em class="citetitle">http://www.csounds.com/journal/issue16/audiorouting.html</em></a>  , written by Andreas Russo </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp34156512"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: John ffitch</td>
          </tr>
          <tr>
            <td>University of Bath/Codemist Ltd.</td>
          </tr>
          <tr>
            <td>Bath, UK</td>
          </tr>
          <tr>
            <td>May 2000</td>
          </tr>
        </table>
        <p>
    </p>
        <p>New in Csound Version 4.07</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="outc.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="outh.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">outc </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> outh</td>
        </tr>
      </table>
    </div>
  </body>
</html>