Sophie

Sophie

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

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>date</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="dam.html" title="dam" />
    <link rel="next" href="dates.html" title="dates" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">date</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="dam.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="dates.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="date">
      <a id="date"></a>
      <div class="titlepage"></div>
      <a id="IndexDate" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">date</span>
        </h2>
        <p>date — 
      Returns the number seconds since a base date.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp17542008"></a>
        <h2>Description</h2>
        <p>
      Returns the number seconds since a base date, using the
      operating system's clock.  The base is 1 January 1970 for Csound
      using doubles, and 1 January 2010 for versions using floats.

    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp17542888"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">ir <span class="command"><strong>date</strong></span></pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp17597488"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>ir</em></span> -- value at i-time, of the system clock
      in seconds since the start of the epoch.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp17598504"></a>
        <p>
      Note that the base date was originally 1970 but since verson
      5.14 it has been changed as single precission floating point
      numbers are insufficient to indicate changes.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp17599184"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the date opcode. It uses the file <a class="ulink" href="examples/date.csd" target="_top"><em class="citetitle">date.csd</em></a>.

      </p>
        <div class="example">
          <a id="idp17600160"></a>
          <p class="title">
            <strong>Example 151. Example of the date opcode.</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>
<span class="comment">; Audio out   Audio in</span>
-odac           -iadc    <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 date.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>
<span class="oblock">instr</span> 1
      ii <span class="opc">date</span>
      <span class="opc">print</span> ii
      Sa <span class="opc">dates</span> ii
      <span class="opc">prints</span> Sa
      Ss <span class="opc">dates</span> <span class="op">-</span>1
      <span class="opc">prints</span> Ss
      St <span class="opc">dates</span> 1
      <span class="opc">prints</span> St 
<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 1
<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" />

      Its output should include lines like this:
      </p>
        <pre class="screen">
instr 1:  ii = 1165665152.000
Sat Dec  9 11:52:32 2006
Sat Dec  9 11:51:46 2006
Thu Jan  1 01:00:01 1970
      </pre>
        <p>
    </p>
      </div>
      <div class="refsect1" title="See Also">
        <a id="idp17601808"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="dates.html" title="dates"><em class="citetitle">dates</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp17602880"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: John ffitch</td>
          </tr>
          <tr>
            <td>University of Bath/Codemist Ltd.</td>
          </tr>
          <tr>
            <td>Bath, UK</td>
          </tr>
          <tr>
            <td>December 2006</td>
          </tr>
        </table>
        <p>
    </p>
        <p>New in Csound version 5.05</p>
        <p>Changed in Csound version 5.14</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="dam.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="dates.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">dam </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> dates</td>
        </tr>
      </table>
    </div>
  </body>
</html>