Sophie

Sophie

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

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>strlower</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="strlenk.html" title="strlenk" />
    <link rel="next" href="strlowerk.html" title="strlowerk" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">strlower</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="strlenk.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="strlowerk.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="strlower">
      <a id="strlower"></a>
      <div class="titlepage"></div>
      <a id="Indexstrlower" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">strlower</span>
        </h2>
        <p>strlower — 
      Convert a string to lower case
          </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp46411512"></a>
        <h2>Description</h2>
        <p>
      Convert Ssrc to lower case, and write the result to Sdst.
      strlower runs at init time only.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp46412224"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">Sdst <span class="command"><strong>strlower</strong></span> Ssrc</pre>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp46504424"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the strlower opcode. It uses the file <a class="ulink" href="examples/strlower.csd" target="_top"><em class="citetitle">strlower.csd</em></a>.

      </p>
        <div class="example">
          <a id="idp46505408"></a>
          <p class="title">
            <strong>Example 832. Example of the strlower 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>
-n    <span class="comment">;;;no sound output</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>
<span class="comment">;example of Joachim Heintz</span>

  <span class="oblock">opcode</span> FilSuf, S, So
  <span class="comment">;returns the suffix of a filename or path, optional in lower case </span>
Spath,ilow <span class="opc">xin</span>
ipos   <span class="opc">strrindex</span> Spath, "."	<span class="comment">;look for the rightmost '.'</span>
Suf    <span class="opc">strsub</span>    Spath, ipos<span class="op">+</span>1	<span class="comment">;extract the substring after "."</span>
 <span class="octrl">if</span> ilow <span class="op">!=</span> 0 then		<span class="comment">;if ilow input is not 0 then </span>
Suf    <span class="opc">strlower</span>  Suf 		<span class="comment">;convert to lower case</span>
 <span class="octrl">endif</span>
       <span class="opc">xout</span>      Suf
  <span class="oblock">endop</span>

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

ilow <span class="op">=</span> p4
       <span class="opc">prints</span>    "Printing suffix<span class="op">:</span>\n"
Suf    FilSuf    "<span class="op">/</span>my<span class="op">/</span>dir<span class="op">/</span>my<span class="op">/</span>file.WAV", ilow
       <span class="opc">puts</span>      Suf, 1

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="stamnt">i</span> "suff" 0 1 0	<span class="comment">;do not convert to lower case</span>
<span class="stamnt">i</span> "suff" 3 1 1	<span class="comment">;convert to lower case</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="idp46507688"></a>
        <h2>See also</h2>
        <p>
          <a class="link" href="strlowerk.html" title="strlowerk">
            <em class="citetitle">strlowerk</em>
          </a>
        </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp46508576"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: Istvan Varga</td>
          </tr>
          <tr>
            <td>2006</td>
          </tr>
        </table>
        <p>
    </p>
        <p>New in version 5.02</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="strlenk.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="strlowerk.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">strlenk </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> strlowerk</td>
        </tr>
      </table>
    </div>
  </body>
</html>