Sophie

Sophie

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

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>oscil1i</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="oscil1.html" title="oscil1" />
    <link rel="next" href="oscil3.html" title="oscil3" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">oscil1i</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="oscil1.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="oscil3.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="oscil1i">
      <a id="oscil1i"></a>
      <div class="titlepage"></div>
      <a id="IndexOscil1i" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">oscil1i</span>
        </h2>
        <p>oscil1i — 
      Accesses table values by incremental sampling with linear interpolation.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp33710672"></a>
        <h2>Description</h2>
        <p>
      Accesses table values by incremental sampling with linear interpolation.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp33711360"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">kres <span class="command"><strong>oscil1i</strong></span> idel, kamp, idur, ifn</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp33721896"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>idel</em></span> -- delay in seconds before <span class="emphasis"><em>oscil1i</em></span> incremental sampling begins.
    </p>
        <p>
      <span class="emphasis"><em>idur</em></span> -- duration in seconds to sample through the <span class="emphasis"><em>oscil1i</em></span> table just once. A zero or negative value will cause all initialization to be skipped.
    </p>
        <p>
      <span class="emphasis"><em>ifn</em></span> -- function table number. <span class="emphasis"><em>oscil1i</em></span> requires the extended guard point.
    </p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp33724432"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>kamp</em></span> -- amplitude factor
    </p>
        <p>
      <span class="emphasis"><em>oscil1i</em></span> is an interpolating unit in which the fractional part of index is used to interpolate between adjacent table entries. The smoothness gained by interpolation is at some small cost in execution time (see also <a class="link" href="oscili.html" title="oscili"><em class="citetitle">oscili</em></a>, etc.), but the interpolating and non-interpolating units are otherwise interchangeable. 
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp33765680"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the oscil1i opcode. It uses the file <a class="ulink" href="examples/oscil1i.csd" target="_top"><em class="citetitle">oscil1i.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp33766656"></a>
          <p class="title">
            <strong>Example 527. Example of the oscil1i 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 oscil1i.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="ohdr">0dbfs</span>  <span class="op">=</span> 1

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

ipanfn <span class="op">=</span> p4
asig   <span class="opc">vco2</span> .3, 220
kpan   <span class="opc">oscil1i</span> 0, 1, p3, ipanfn	<span class="comment">;create panning &amp;</span>
kleft  <span class="op">=</span> <span class="opc">sqrt</span>(kpan)		<span class="comment">;start right away</span>
kright <span class="op">=</span> <span class="opc">sqrt</span>(1<span class="op">-</span>kpan)     
       <span class="opc">outs</span> kleft<span class="op">*</span>asig, kright<span class="op">*</span>asig

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
                                                                                  
<span class="stamnt">f</span> 1 0  3 -7 .5  3  .5		<span class="comment">;remain in center (.5 CONSTANT)                                                                          </span>
<span class="stamnt">f</span> 2 0 129 7  1 129 0 		<span class="comment">;left--&gt;right                                                                                                     </span>
<span class="stamnt">f</span> 3 0 129 7 .5  32 1 64 0 33 .5 <span class="comment">;center--&gt;left--&gt;right--&gt;center    </span>

<span class="stamnt">i</span> 1  0  2  1			<span class="comment">;use table 1</span>
<span class="stamnt">i</span> 1  3  2  2			<span class="comment">;use table 2</span>
<span class="stamnt">i</span> 1  6  2  3			<span class="comment">;use table 3</span>

<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="idp33768936"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="table.html" title="table"><em class="citetitle">table</em></a>,
      <a class="link" href="tablei.html" title="tablei"><em class="citetitle">tablei</em></a>,
      <a class="link" href="table3.html" title="table3"><em class="citetitle">table3</em></a>,
      <a class="link" href="oscil1.html" title="oscil1"><em class="citetitle">oscil1</em></a>,
      <a class="link" href="osciln.html" title="osciln"><em class="citetitle">osciln</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="oscil1.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="oscil3.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">oscil1 </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> oscil3</td>
        </tr>
      </table>
    </div>
  </body>
</html>