Sophie

Sophie

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

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>rspline</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="round.html" title="round" />
    <link rel="next" href="rtclock.html" title="rtclock" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">rspline</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="round.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="rtclock.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="rspline">
      <a id="rspline"></a>
      <div class="titlepage"></div>
      <a id="IndexRspline" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">rspline</span>
        </h2>
        <p>rspline — 
      Generate random spline curves.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp41091432"></a>
        <h2>Description</h2>
        <p>
      Generate random spline curves.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp41092072"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">ares <span class="command"><strong>rspline</strong></span> xrangeMin, xrangeMax, kcpsMin, kcpsMax</pre>
        <pre class="synopsis">kres <span class="command"><strong>rspline</strong></span> krangeMin, krangeMax, kcpsMin, kcpsMax</pre>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp41103264"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>kres, ares</em></span> -- Output signal
    </p>
        <p>
      <span class="emphasis"><em>xrangeMin, xrangeMax</em></span> -- Range of values of random-generated points
    </p>
        <p>
      <span class="emphasis"><em>kcpsMin, kcpsMax</em></span> -- Range of point-generation rate. Min and max limits are expressed in cps.
    </p>
        <p>
      <span class="emphasis"><em>rspline</em></span> (random-spline-curve generator) is similar to <a class="link" href="jspline.html" title="jspline"><em class="citetitle">jspline</em></a> but output range is defined by means of two limit values. Also in this case, real output range could be a bit greater of range values, because of interpolating curves beetween each pair of random-points.
    </p>
        <p>
      At present time generated curves are quite smooth when <span class="emphasis"><em>cpsMin</em></span> is not too different from <span class="emphasis"><em>cpsMax</em></span>. When <span class="emphasis"><em>cpsMin-cpsMax</em></span> interval is big, some little discontinuity could occurr, but it should not be a problem, in most cases. Maybe the algorithm will be improved in next versions.
    </p>
        <p>
      These opcodes are often better than <a class="link" href="jitter.html" title="jitter"><em class="citetitle">jitter</em></a> when user wants to <span class="quote">“<span class="quote">naturalize</span>”</span> or <span class="quote">“<span class="quote">analogize</span>”</span> digital sounds. They could be used also in algorithmic composition, to generate smooth random melodic lines when used together with <a class="link" href="samphold.html" title="samphold"><em class="citetitle">samphold</em></a> opcode.
    </p>
        <p>
      Note that the result is quite different from the one obtained by filtering white noise, and they allow the user to obtain a much more precise control.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp41146632"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the rspline opcode. It uses the file <a class="ulink" href="examples/rspline.csd" target="_top"><em class="citetitle">rspline.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp41147608"></a>
          <p class="title">
            <strong>Example 733. Example of the rspline 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 jspline.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

krangeMin <span class="opc">init</span> p4
krangeMax <span class="opc">init</span> p5
kcpsmin <span class="opc">init</span> 2
kcpsmax <span class="opc">init</span> 3

ksp  <span class="opc">rspline</span> krangeMin, krangeMax, kcpsmin, kcpsmax
aout <span class="opc">pluck</span> 1, 200<span class="op">+</span>ksp, 1000, 0, 1
aout <span class="opc">dcblock</span> aout	<span class="comment">;remove DC</span>
     <span class="opc">outs</span> aout, aout

<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  2  5	<span class="comment">;a bit jitter</span>
<span class="stamnt">i</span> 1 8  10 10 20	<span class="comment">;some more</span>
<span class="stamnt">i</span> 1 16 10 20 50	<span class="comment">;lots more</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="Credits">
        <a id="idp41149888"></a>
        <h2>Credits</h2>
        <p>Author: Gabriel Maldonado</p>
        <p>New in version 4.15</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="round.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="rtclock.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">round </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> rtclock</td>
        </tr>
      </table>
    </div>
  </body>
</html>