Sophie

Sophie

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

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>flooper</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="FLmouse.html" title="FLmouse" />
    <link rel="next" href="flooper2.html" title="flooper2" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">flooper</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="FLmouse.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="flooper2.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="flooper">
      <a id="flooper"></a>
      <div class="titlepage"></div>
      <a id="Indexflooper" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">flooper</span>
        </h2>
        <p>flooper — 
      Function-table-based crossfading looper.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp21266952"></a>
        <h2>Description</h2>
        <p>
   This opcode reads audio from a function table and plays it back in a loop with user-defined
   start time, duration and crossfade time. It also allows the pitch of the loop to be controlled,
   including reversed playback. It accepts non-power-of-two tables, such as deferred-allocation
   GEN01 tables.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp21267864"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">asig <span class="command"><strong>flooper</strong></span> kamp, kpitch, istart, idur, ifad, ifn</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp21276088"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>istart </em></span> -- loop start pos in seconds
    </p>
        <p>
      <span class="emphasis"><em>idur </em></span> -- loop duration in seconds
    </p>
        <p>
      <span class="emphasis"><em>ifad </em></span> -- crossfade duration in seconds
    </p>
        <p>
      <span class="emphasis"><em>ifn </em></span> -- function table number, generally created using GEN01
    </p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp21278248"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>asig</em></span> -- output sig
    </p>
        <p>
      <span class="emphasis"><em>kamp</em></span> -- amplitude control </p>
        <p>
      <span class="emphasis"><em>kpitch</em></span> -- pitch control (transposition ratio); negative values play the loop back in reverse
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp21279968"></a>
        <h2>Examples</h2>
        <p>
      </p>
        <div class="example">
          <a id="idp21280432"></a>
          <p class="title">
            <strong>Example 246. </strong>
          </p>
          <div class="example-contents">
            <pre class="programlisting">
aout <span class="opc">flooper</span> 16000, 1, 1, 4, 0.05, 1  <span class="comment">; loop starts at 1 sec, for 4 secs, 0.05 crossfade</span>
     <span class="opc">out</span>     aout</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
        <p>
The example above shows the basic operation of <span class="emphasis"><em>flooper</em></span>. Pitch can
be controlled at the k-rate, as well as amplitude. The example assumes
table 1 to contain at least 5.05 seconds of audio (4 secs loop duration,
starting 1 sec into the table, using 0.05 secs after the loop end for the
crossfade).
    </p>
        <p>
      Here is another example of the flooper opcode. It uses the file <a class="ulink" href="examples/flooper.csd" target="_top"><em class="citetitle">flooper.csd</em></a> and <a class="ulink" href="examples/fox.wav" target="_top"><em class="citetitle">fox.wav</em></a>.
      </p>
        <div class="example">
          <a id="idp21320184"></a>
          <p class="title">
            <strong>Example 247. </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>
<span class="comment">; Audio out   Audio in    No messages</span>
-odac           -iadc     -d     <span class="comment">;;;RT audio I/O</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o flooper.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>  10
<span class="ohdr">nchnls</span>  <span class="op">=</span>  1

       <span class="oblock">instr</span> 1
kpitch	<span class="opc">line</span>	1, p3, 4
aout	<span class="opc">flooper</span>	26000, kpitch, 1, .53, 0.05, 1  <span class="comment">; loop starts at 1 sec, for .53 secs, 0.05 crossfade</span>
	<span class="opc">out</span>	aout

       <span class="oblock">endin</span>

<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="comment">; Table #1: an audio file.</span>
<span class="comment">; Its table size is deferred,</span>
<span class="comment">; and format taken from the soundfile header.</span>
<span class="stamnt">f</span> 1 0 0 1 "beats.wav" 0 0 0

<span class="stamnt">i</span> 1 0 4
<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="Credits">
        <a id="idp21322256"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: Victor Lazzarini</td>
          </tr>
          <tr>
            <td>April 2005 </td>
          </tr>
        </table>
        <p>
    </p>
        <p>New plugin in version 5</p>
        <p>April 2005.</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="FLmouse.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="flooper2.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">FLmouse </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> flooper2</td>
        </tr>
      </table>
    </div>
  </body>
</html>