Sophie

Sophie

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

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>inq</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="ino.html" title="ino" />
    <link rel="next" href="inrg.html" title="inrg" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">inq</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="ino.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="inrg.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="inq">
      <a id="inq"></a>
      <div class="titlepage"></div>
      <a id="Indexinq" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">inq</span>
        </h2>
        <p>inq — 
      Reads quad audio data from an external device or stream.
          </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp27209488"></a>
        <h2>Description</h2>
        <p>
      Reads quad audio data from an external device or stream.
    </p>
        <div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
          <table border="0" summary="Warning: Warning">
            <tr>
              <td rowspan="2" align="center" valign="top" width="25">
                <img alt="[Warning]" src="images/warning.png" />
              </td>
              <th align="left">Warning</th>
            </tr>
            <tr>
              <td align="left" valign="top">
                <p>
        This opcode is designed to be used only with orchestras that have
        nchnls_i=4. Doing so with orchestras with nchnls_i &gt; 4 will
        cause incorrect audio input.
      </p>
              </td>
            </tr>
          </table>
        </div>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp27211032"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">ar1, ar2,  ar3, a4 <span class="command"><strong>inq</strong></span></pre>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp27238648"></a>
        <h2>Performance</h2>
        <p>
      Reads quad audio data from an external device or stream. If the command-line <a class="link" href="CommandFlags.html#FlagsMinusLowerI"><em class="citetitle">-i</em></a> flag is set, sound is read continuously from the audio input stream (e.g. <span class="emphasis"><em>stdin</em></span> or a soundfile) into an internal buffer. Any number of these opcodes can read freely from this buffer.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp27240232"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the inq opcode. It uses the file <a class="ulink" href="examples/inq.csd" target="_top"><em class="citetitle">inq.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp27241176"></a>
          <p class="title">
            <strong>Example 368. Example of the inq 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  -idac <span class="comment">;;;realtime audio I/O</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; inq.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> 2	<span class="comment">;2 channels out</span>
<span class="ohdr">0dbfs</span>    <span class="op">=</span> 1
nchnls_i <span class="op">=</span> 4	<span class="comment">;4 channels in</span>

<span class="oblock">instr</span> 1 <span class="comment">;4 channels in, two channels out</span>

ain1, ain2, ain3, ain4 <span class="opc">inq</span>		<span class="comment">;grab your mics and sing</span>

adel   <span class="opc">linseg</span> 0, p3<span class="op">*</span>.5, 0.02, p3<span class="op">*</span>.5, 0	  <span class="comment">;max delay time = 20ms</span>
adel2  <span class="opc">linseg</span> 0.02, p3<span class="op">*</span>.5, 0, p3<span class="op">*</span>.5, 0.02 <span class="comment">;max delay time = 20ms	</span>
aoutl  <span class="opc">flanger</span> ain1, adel, .7
aoutr  <span class="opc">flanger</span> ain2, adel<span class="op">*</span>2, .8
aoutla <span class="opc">flanger</span> ain3, adel2, .9
aoutra <span class="opc">flanger</span> ain4, adel2<span class="op">*</span>2, .5
<span class="comment">;write to quad file, 16 bits with header</span>
       <span class="opc">fout</span> "in_4.wav", 14, aoutl, aoutr, aoutla, aoutra	
       <span class="opc">outs</span> (aoutl<span class="op">+</span>aoutla)<span class="op">*</span>.5, (aoutr<span class="op">+</span>aoutra)<span class="op">*</span>.5 <span class="comment">;stereo out</span>

<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 10
<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="idp27242176"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="diskin.html" title="diskin"><em class="citetitle">diskin</em></a>,
      <a class="link" href="in.html" title="in"><em class="citetitle">in</em></a>,
      <a class="link" href="inch.html" title="inch"><em class="citetitle">inh</em></a>,
      <a class="link" href="inh.html" title="inh"><em class="citetitle">inh</em></a>,
      <a class="link" href="ino.html" title="ino"><em class="citetitle">ino</em></a>,
      <a class="link" href="ins.html" title="ins"><em class="citetitle">ins</em></a>,
      <a class="link" href="soundin.html" title="soundin"><em class="citetitle">soundin</em></a>
     </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp27245928"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Authors: Barry L. Vercoe, Matt Ingalls/Mike Berry</td>
          </tr>
          <tr>
            <td>MIT, Mills College</td>
          </tr>
          <tr>
            <td>1993-1997</td>
          </tr>
        </table>
        <p>
    </p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="ino.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="inrg.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">ino </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> inrg</td>
        </tr>
      </table>
    </div>
  </body>
</html>