Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 6ed14ebfd686aa32f7956e552aa2e21d > files > 2551

csound-manual-5.13.0-5.fc15.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>readk4</title>
    <link rel="stylesheet" href="csound.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.75.2" />
    <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="readk3.html" title="readk3" />
    <link rel="next" href="reinit.html" title="reinit" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">readk4</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="readk3.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="reinit.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="readk4">
      <a id="readk4"></a>
      <div class="titlepage"></div>
      <a id="IndexReadk4" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">readk4</span>
        </h2>
        <p>readk4 — 
      Periodically reads four orchestra control-signal values from an external file.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="id3156475"></a>
        <h2>Description</h2>
        <p>
      Periodically reads four orchestra control-signal values from an external file.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="id3157392"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">kr1, kr2, kr3, kr4 <span class="command"><strong>readk4</strong></span> ifilname, iformat, iprd</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="id3157411"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>ifilname</em></span> -- an integer N denoting a file named "readk.N" or a character string (in double quotes, spaces permitted) denoting the external file name. For a string, it may either be a full path name with directory specified or a simple filename.  In the later case, the file is sought first in the current directory, then in <a class="link" href="CommandEnvironment.html" title="Csound Environment Variables"><em class="citetitle">SSDIR</em></a>, and finally in <a class="link" href="CommandEnvironment.html" title="Csound Environment Variables"><em class="citetitle">SFDIR</em></a>.
    </p>
        <p>
      <span class="emphasis"><em>iformat</em></span> -- specifies the input data format:
      </p>
        <div class="itemizedlist">
          <ul class="itemizedlist" type="disc">
            <li class="listitem">
              <p>1 = 8-bit signed integers (char)</p>
            </li>
            <li class="listitem">
              <p>4 = 16-bit short integers</p>
            </li>
            <li class="listitem">
              <p>5 = 32-bit long integers</p>
            </li>
            <li class="listitem">
              <p>6 = 32-bit floats</p>
            </li>
            <li class="listitem">
              <p>7 = ASCII long integers (plain text)</p>
            </li>
            <li class="listitem">
              <p>8 = ASCII floats (plain text)</p>
            </li>
          </ul>
        </div>
        <p>
    </p>
        <p>
      Note that A-law and U-law formats are not available, and that all formats except the last two are binary. The input file should be a "raw", headerless data file.
    </p>
        <p>
      <span class="emphasis"><em>iprd</em></span> -- the rate (period) in seconds, rounded to the nearest orchestra control period, at which the signals are read from the input file.  A value of 0 implies one control period (the enforced minimum), which will read new values at the orchestra control rate.  Longer periods will cause the same values to repeat for more than one control period.
      
    </p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="id3157528"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>kr1, kr2, kr3, kr4</em></span> -- output of the signals read from <span class="emphasis"><em>ifilname</em></span>.
    </p>
        <p>
      This opcode allows four generated control signal values to be read from a named external file. The file should contain no header information but it should contain a regularly sampled time series of control values. For binary formats, the individual samples of each signal are interleaved. For ASCII text formats, the values are assumed to be separated by at least one whitespace character.  The four "channels" in a sample frame may be on the same line or separated by newline characters, it does not matter. There may be any number of <span class="emphasis"><em>readk4</em></span> opcodes in an instrument or orchestra and they may read from the same or different files.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="id3157568"></a>
        <h2>Examples</h2>
        <p>
      See the example for <a class="link" href="readk.html" title="readk"><em class="citetitle">readk</em></a>. The only difference between <a class="link" href="readk.html" title="readk"><em class="citetitle">readk</em></a> and <span class="emphasis"><em>readk4</em></span> is that <span class="emphasis"><em>readk4</em></span> can read four values at a time from the file.

    </p>
      </div>
      <div class="refsect1" title="See Also">
        <a id="id3157604"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="dumpk.html" title="dumpk"><em class="citetitle">dumpk</em></a>,
      <a class="link" href="dumpk2.html" title="dumpk2"><em class="citetitle">dumpk2</em></a>,
      <a class="link" href="dumpk3.html" title="dumpk3"><em class="citetitle">dumpk3</em></a>,
      <a class="link" href="dumpk4.html" title="dumpk4"><em class="citetitle">dumpk4</em></a>,
      <a class="link" href="readk.html" title="readk"><em class="citetitle">readk</em></a>,
      <a class="link" href="readk2.html" title="readk2"><em class="citetitle">readk2</em></a>,
      <a class="link" href="readk3.html" title="readk3"><em class="citetitle">readk3</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="id3157680"></a>
        <h2>Credits</h2>
        <p>By: John ffitch and Barry Vercoe</p>
        <p>1999 or earlier</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="readk3.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="reinit.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">readk3 </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> reinit</td>
        </tr>
      </table>
    </div>
  </body>
</html>