Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 5fcfcb7517038d1f44ab4e478e6e61fa > files > 2580

csound-doc-6.10.0-1.mga7.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>out</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" />
    <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" />
    <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="out32.html" title="out32" />
    <link rel="next" href="outc.html" title="outc" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">out</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="out32.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="outc.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="out"></a>
      <div class="titlepage"></div>
      <a id="IndexOut" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">out</span>
        </h2>
        <p>out — 
      Writes audio data to an external device or stream.
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472908269464"></a>
        <h2>Description</h2>
        <p>
      Writes audio data to an external device or stream, either from
      audio variables or from an audio array.
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472908257416"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>out</strong></span> asig1[, asig2,....]</pre>
        <pre class="synopsis"><span class="command"><strong>out</strong></span> aarray</pre>
      </div>
      <div class="refsect1">
        <a id="idm281472908254184"></a>
        <h2>Performance</h2>
        <p>
      Sends audio samples to an accumulating output buffer
      (created at the beginning of performance) which serves to
      collect the output of all active instruments before the sound is
      written to disk. There can be any number of these output units
      in an instrument. 
    </p>
        <p>
      In the array case each element of the arrary is sent to the
      corresponding channel.  This provides a way of using many
      channels.  The nonarray version is limited  to 1999.
    </p>
        <p>
      The type (mono, stereo, quad, hex, or oct) should agree
      with <a class="link" href="nchnls.html" title="nchnls"><em class="citetitle">nchnls</em></a>. But
      as of version 3.50, Csound will attempt to change an incorrect
      opcode to agree with <span class="emphasis"><em>nchnls</em></span> statement. 
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472908209000"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the out opcode. It uses the file <a class="ulink" href="examples/out.csd" target="_top"><em class="citetitle">out.csd</em></a>.
      </p>
        <div class="example">
          <a id="idm281472908207240"></a>
          <p class="title">
            <strong>Example 632. Example of the out 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>
            <div class="refsect1">
              <a id="idm281472731351272"></a>
              <pre class="programlisting">
<span class="nt">&lt;CsoundSynthesizer&gt;</span>
<span class="nt">&lt;CsOptions&gt;</span>
<span class="c1">; Select audio/midi flags here according to platform</span>
-odac     <span class="c1">;;;realtime audio out</span>
<span class="c1">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="c1">; For Non-realtime ouput leave only the line below:</span>
<span class="c1">; -o out.wav -W ;;; for file output any platform</span>
<span class="nt">&lt;/CsOptions&gt;</span>
<span class="nt">&lt;CsInstruments&gt;</span>

<span class="vg">sr</span> <span class="o">=</span> <span class="mi">44100</span>
<span class="vg">ksmps</span> <span class="o">=</span> <span class="mi">32</span>
<span class="vg">nchnls</span> <span class="o">=</span> <span class="mi">1</span>
<span class="vg">0dbfs</span>  <span class="o">=</span> <span class="mi">1</span>

<span class="kd">instr</span> <span class="nf">1</span>

k<span class="n">amp</span> <span class="o">=</span> <span class="mf">.6</span>
k<span class="n">cps</span> <span class="o">=</span> <span class="mi">440</span>
i<span class="n">fn</span>  <span class="o">=</span> <span class="nb">p4</span>

a<span class="n">sig</span> <span class="nb">oscil</span> k<span class="n">amp</span><span class="p">,</span> k<span class="n">cps</span><span class="p">,</span> i<span class="n">fn</span>
     <span class="nb">out</span> a<span class="n">sig</span>	<span class="c1">;one channel</span>

<span class="kd">endin</span>
<span class="nt">&lt;/CsInstruments&gt;</span>
<span class="nt">&lt;CsScore&gt;</span>
<span class="nb">f</span><span class="mi">1</span> <span class="mi">0</span> <span class="mi">16384</span> <span class="mi">10</span> <span class="mi">1</span>                                          <span class="c1">; Sine</span>
<span class="nb">f</span><span class="mi">2</span> <span class="mi">0</span> <span class="mi">16384</span> <span class="mi">10</span> <span class="mi">1</span> <span class="mf">0.5</span> <span class="mf">0.3</span> <span class="mf">0.25</span> <span class="mf">0.2</span> <span class="mf">0.167</span> <span class="mf">0.14</span> <span class="mf">0.125</span> <span class="mf">.111</span>   <span class="c1">; Sawtooth</span>

<span class="nb">i</span> <span class="mi">1</span> <span class="mi">0</span> <span class="mi">2</span> <span class="mi">1</span>
<span class="nb">i</span> <span class="mi">1</span> <span class="mi">3</span> <span class="mi">2</span> <span class="mi">2</span>

<span class="nb">e</span>
<span class="nt">&lt;/CsScore&gt;</span>
<span class="nt">&lt;/CsoundSynthesizer&gt;</span>
</pre>
            </div>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472908202952"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="outh.html" title="outh"><em class="citetitle">outh</em></a>,
      <a class="link" href="outo.html" title="outo"><em class="citetitle">outo</em></a>,
      <a class="link" href="outq.html" title="outq"><em class="citetitle">outq</em></a>,
      <a class="link" href="outq1.html" title="outq1"><em class="citetitle">outq1</em></a>,
      <a class="link" href="outq2.html" title="outq2"><em class="citetitle">outq2</em></a>,
      <a class="link" href="outq3.html" title="outq3"><em class="citetitle">outq3</em></a>,
      <a class="link" href="outq4.html" title="outq4"><em class="citetitle">outq4</em></a>,
      <a class="link" href="outs.html" title="outs"><em class="citetitle">outs</em></a>,
      <a class="link" href="outs1.html" title="outs1"><em class="citetitle">outs1</em></a>,
      <a class="link" href="outs2.html" title="outs2"><em class="citetitle">outs2</em></a>,
      <a class="link" href="soundout.html" title="soundout"><em class="citetitle">soundout</em></a>
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472908191304"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: Barry L. Vercoe, Matt Ingalls/Mike Berry</td>
          </tr>
          <tr>
            <td>MIT, Mills College</td>
          </tr>
          <tr>
            <td>1993-1997</td>
          </tr>
          <tr>
            <td>Author: John ffitch</td>
          </tr>
          <tr>
            <td>NUIM, 2013</td>
          </tr>
        </table>
        <p>
    </p>
        <p>Original in Csound v1</p>
        <p>Aray version in 6.01</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="out32.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="outc.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">out32 </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> outc</td>
        </tr>
      </table>
    </div>
  </body>
</html>