Sophie

Sophie

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

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>nchnls</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="mxadsr.html" title="mxadsr" />
    <link rel="next" href="nchnls_hw.html" title="nchnls_hw" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">nchnls</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="mxadsr.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="nchnls_hw.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="nchnls"></a>
      <div class="titlepage"></div>
      <a id="IndexNchnls" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">nchnls</span>
        </h2>
        <p>nchnls — 
      Sets the number of channels of audio output.
          </p>
      </div>
      <div class="refsect1">
        <a id="idm281472911352280"></a>
        <h2>Description</h2>
        <p> 
      These statements are global value <a class="link" href="assign.html" title="="><em class="citetitle">assignments</em></a>, made at the beginning of an orchestra, before any instrument block is defined. Their function is to set certain <a class="link" href="OrchKvar.html#VariableTypes" title="Table 3. Types of Variables"><em class="citetitle">reserved symbol variables</em></a> that are required for performance. Once set, these reserved symbols can be used in expressions anywhere in the orchestra.
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472911306744"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>nchnls</strong></span> = iarg</pre>
      </div>
      <div class="refsect1">
        <a id="idm281472911304728"></a>
        <h2>Initialization</h2>
        <p>
<span class="emphasis"><em>nchnls</em></span> = (optional) -- set number of channels of audio output to <span class="emphasis"><em>iarg</em></span>. (1 = mono, 2 = stereo, 4 = quadraphonic.) The default value is 1 (mono).
    </p>
        <p>
      In addition, any <a class="link" href="OrchKvar.html#GlobalVariables"><em class="citetitle">global variable</em></a> can be initialized by an <span class="emphasis"><em>init-time assignment</em></span> anywhere before the first <a class="link" href="instr.html" title="instr"><em class="citetitle">instr statement</em></a>.  All of the above assignments are run as instrument 0 (i-pass only) at the start of real performance.
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472911299704"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the nchnls opcode. It uses the file <a class="ulink" href="examples/nchnls.csd" target="_top"><em class="citetitle">nchnls.csd</em></a>.
      </p>
        <div class="example">
          <a id="idm281472911297848"></a>
          <p class="title">
            <strong>Example 594. Example of the nchnls 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="idm281472734754776"></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   -idac   <span class="c1">;;;realtime audio I/O</span>
<span class="c1">; For Non-realtime ouput leave only the line below:</span>
<span class="c1">; nchnls.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">2</span>				<span class="c1">;two channels out</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> 

a<span class="n">in1</span><span class="p">,</span> a<span class="n">inr</span> <span class="nb">ins</span>				<span class="c1">;grab your mic and sing</span>
a<span class="n">del</span>  <span class="nb">linseg</span> <span class="mi">0</span><span class="p">,</span> <span class="nb">p3</span><span class="o">*</span><span class="mf">.5</span><span class="p">,</span> <span class="mf">0.02</span><span class="p">,</span> <span class="nb">p3</span><span class="o">*</span><span class="mf">.5</span><span class="p">,</span> <span class="mi">0</span>	<span class="c1">;max delay time = 20ms</span>
a<span class="n">outl</span> <span class="nb">flanger</span> a<span class="n">in1</span><span class="p">,</span> a<span class="n">del</span><span class="p">,</span> <span class="mf">.7</span>
a<span class="n">outr</span> <span class="nb">flanger</span> a<span class="n">in1</span><span class="p">,</span> a<span class="n">del</span><span class="o">*</span><span class="mi">2</span><span class="p">,</span> <span class="mf">.8</span>
      <span class="nb">fout</span> <span class="s">"in_s.wav"</span><span class="p">,</span> <span class="mi">14</span><span class="p">,</span> a<span class="n">outl</span><span class="p">,</span> a<span class="n">outr</span> <span class="c1">;write to stereo file,</span>
      <span class="nb">outs</span> a<span class="n">outl</span><span class="p">,</span> a<span class="n">outr</span>			<span class="c1">;16 bits with header</span>

<span class="kd">endin</span>
<span class="nt">&lt;/CsInstruments&gt;</span>
<span class="nt">&lt;CsScore&gt;</span>

<span class="nb">i</span> <span class="mi">1</span> <span class="mi">0</span> <span class="mi">10</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="idm281472911293560"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="kr.html" title="kr"><em class="citetitle">kr</em></a>,
      <a class="link" href="ksmps.html" title="ksmps"><em class="citetitle">ksmps</em></a>,
      <a class="link" href="sr.html" title="sr"><em class="citetitle">sr</em></a>
    </p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="mxadsr.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="nchnls_hw.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">mxadsr </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> nchnls_hw</td>
        </tr>
      </table>
    </div>
  </body>
</html>