Sophie

Sophie

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

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>v Statement</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="ScoregensTop.html" title="Score Statements and GEN Routines" />
    <link rel="prev" href="t.html" title="t Statement (Tempo Statement)" />
    <link rel="next" href="x.html" title="x Statement" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">v Statement</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="t.html">Prev</a> </td>
          <th width="60%" align="center">Score Statements and GEN Routines</th>
          <td width="20%" align="right"> <a accesskey="n" href="x.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="v Statement">
      <a id="v"></a>
      <div class="titlepage"></div>
      <a id="IndexVStatement" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">v Statement</span>
        </h2>
        <p>v — 
      Provides for locally variable time warping of score events.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp76859448"></a>
        <h2>Description</h2>
        <p>
      The <span class="emphasis"><em>v statement</em></span> provides for locally variable time warping of score events.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp76898008"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>v</strong></span> p1</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp76898968"></a>
        <h2>Initialization</h2>
        <p>
      <span class="command"><strong>p1</strong></span> -- Time warp factor (must be positive).
    </p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp76899952"></a>
        <h2>Performance</h2>
        <p>
      The <span class="emphasis"><em>v statement</em></span> takes effect with the following <a class="link" href="i.html" title="i Statement (Instrument or Note Statement)"><em class="citetitle">i statement</em></a>, and remains in effect until the next <a class="link" href="v.html" title="v Statement"><em class="citetitle">v statement</em></a>, <a class="link" href="s.html" title="s Statement"><em class="citetitle">s statement</em></a>, or <a class="link" href="e.html" title="e Statement"><em class="citetitle">e statement</em></a>.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp76902680"></a>
        <h2>Examples</h2>
        <p>
      The value of p1 is used as a multiplier for the start times (p2) of subsequent <a class="link" href="i.html" title="i Statement (Instrument or Note Statement)"><em class="citetitle">i statements</em></a>.
    </p>
        <p>
      </p>
        <div class="informalexample">
          <pre class="programlisting">
<span class="stamnt">i</span>1   0 1  <span class="comment">; note1</span>
<span class="stamnt">v</span>2
<span class="stamnt">i</span>1   1 1  <span class="comment">; note2</span></pre>
        </div>
        <p>

      In this example, the second note occurs two beats after the first note, and is twice as long.
    </p>
        <p>
      Although the <span class="emphasis"><em>v statement</em></span> is similar to the <a class="link" href="t.html" title="t Statement (Tempo Statement)"><em class="citetitle">t statement</em></a>, the <span class="emphasis"><em>v statement</em></span> is local in operation. That is, <span class="emphasis"><em>v</em></span> affects only the following notes, and its effect may be cancelled or changed by another <span class="emphasis"><em>v statement</em></span>.
    </p>
        <p>
      Carried values are unaffected by the <span class="emphasis"><em>v statement</em></span> (see <a class="link" href="ScoreTop.html#ScoreCarry" title="Carry"><em class="citetitle">Carry</em></a>).
    </p>
        <p>
      </p>
        <div class="informalexample">
          <pre class="programlisting">
<span class="stamnt">i</span>1   0 1
<span class="stamnt">v</span>2
<span class="stamnt">i</span>.   + .
<span class="stamnt">i</span>.   . .</pre>
        </div>
        <p>

      In this example, the <span class="emphasis"><em>v statement</em></span> has no effect.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp76911328"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the v statement. It uses the file <a class="ulink" href="examples/v.csd" target="_top"><em class="citetitle">v.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp76912296"></a>
          <p class="title">
            <strong>Example 1032. Example of the v statement.</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     <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if RT audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o v.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

aenv <span class="opc">expseg</span> .01, p3<span class="op">*</span>0.25, 1, p3<span class="op">*</span>0.75, 0.01
asig <span class="opc">poscil3</span> .4<span class="op">*</span>aenv, p4, 1
     <span class="opc">outs</span> asig, 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 16384 10 1	<span class="comment">;sine wave</span>
<span class="comment">;because note 3 and 5 are played simultaneously and are nearly of the same frequency,</span>
<span class="comment">;played together they will create a "beating" sound.</span>

<span class="stamnt">i</span> 1 0 2  110	<span class="comment">; note1</span>
<span class="stamnt">v</span>2
<span class="stamnt">i</span> 1 3 .  220	<span class="comment">; note2</span>
<span class="stamnt">i</span> 1 6 .  110	<span class="comment">; note3</span>
<span class="stamnt">v</span>1
<span class="stamnt">i</span> 1 9 .  880	<span class="comment">; note4</span>
<span class="stamnt">i</span> 1 12 . 100	<span class="comment">; note5</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" />
      In this example, note3 and note5 occur simultaneously, while note4 actually occurs before note3, that is, at its original place. Durations are unaffected.
    </p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="t.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="ScoregensTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="x.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">t Statement (Tempo Statement) </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> x Statement</td>
        </tr>
      </table>
    </div>
  </body>
</html>