Sophie

Sophie

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

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>FLvalue</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="fluidSetInterpMethod.html" title="fluidSetInterpMethod" />
    <link rel="next" href="FLvkeybd.html" title="FLvkeybd" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">FLvalue</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="fluidSetInterpMethod.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="FLvkeybd.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="FLvalue">
      <a id="FLvalue"></a>
      <div class="titlepage"></div>
      <a id="IndexFLvalue" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">FLvalue</span>
        </h2>
        <p>FLvalue — 
      Shows the current value of a FLTK valuator.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp23250536"></a>
        <h2>Description</h2>
        <p>
      <span class="emphasis"><em>FLvalue</em></span> shows current the value of a valuator in a text field.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp23251480"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">ihandle <span class="command"><strong>FLvalue</strong></span> "label", iwidth, iheight, ix, iy</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp23261856"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>ihandle</em></span> -- handle value (an integer number) that unequivocally references the corresponding valuator. It can be used for the <span class="emphasis"><em>idisp</em></span> argument of a valuator.
    </p>
        <p>
      <span class="emphasis"><em><span class="quote">“<span class="quote">label</span>”</span></em></span> -- a double-quoted string containing some user-provided text, placed near the corresponding widget.
    </p>
        <p>
      <span class="emphasis"><em>iwidth</em></span> -- width of widget.
    </p>
        <p>
      <span class="emphasis"><em>iheight</em></span> -- height of widget.
    </p>
        <p>
      <span class="emphasis"><em>ix</em></span> -- horizontal position of upper left corner of the valuator, relative to the upper left corner of corresponding window (expressed in pixels).
    </p>
        <p>
      <span class="emphasis"><em>iy</em></span> -- vertical position of upper left corner of the valuator, relative to the upper
left corner of corresponding window (expressed in pixels).
    </p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp23325400"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>FLvalue</em></span> shows the current values of a valuator in a text field. It outputs <span class="emphasis"><em>ihandle</em></span> that can then be used for the <span class="emphasis"><em>idisp</em></span> argument of a valuator (see the <a class="link" href="ControlFltkValuators.html" title="FLTK Valuators"><em class="citetitle">FLTK Valuators section</em></a>). In this way, the values of that valuator will be dynamically be shown in a text field.
    </p>
        <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
          <table border="0" summary="Note">
            <tr>
              <td rowspan="2" align="center" valign="top" width="25">
                <img alt="[Note]" src="images/note.png" />
              </td>
              <th align="left">Note</th>
            </tr>
            <tr>
              <td align="left" valign="top">
                <p>Note that <span class="emphasis"><em>FLvalue</em></span> is not a valuator and its value cannot be modified.The value for an <span class="emphasis"><em>FLvalue</em></span> widget should be set only by other widgets, and NOT from <a class="link" href="FLsetVal.html" title="FLsetVal"><em class="citetitle">FLsetVal</em></a> or <a class="link" href="FLsetVal_i.html" title="FLsetVal_i"><em class="citetitle">FLsetVal_i</em></a> since this can cause Csound to crash.</p>
              </td>
            </tr>
          </table>
        </div>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp23329456"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the FLvalue opcode. It uses the file <a class="ulink" href="examples/FLvalue.csd" target="_top"><em class="citetitle">FLvalue.csd</em></a>.

      </p>
        <div class="example">
          <a id="idp23330440"></a>
          <p class="title">
            <strong>Example 269. Example of the FLvalue 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>
<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 FLvalue.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="comment">; Using the opcode flvalue to display the output of a slider </span>
<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">kr</span> <span class="op">=</span> 441
<span class="ohdr">ksmps</span> <span class="op">=</span> 100
<span class="ohdr">nchnls</span> <span class="op">=</span> 1

<span class="opc">FLpanel</span> "Value Display Box", 900, 200, 50, 50
    <span class="comment">; Width of the value display box in pixels</span>
    iwidth <span class="op">=</span> 50
    <span class="comment">; Height of the value display box in pixels</span>
    iheight <span class="op">=</span> 20
    <span class="comment">; Distance of the left edge of the value display</span>
    <span class="comment">; box from the left edge of the panel</span>
    ix <span class="op">=</span> 65
    <span class="comment">; Distance of the top edge of the value display</span>
    <span class="comment">; box from the top edge of the panel</span>
    iy <span class="op">=</span> 55

    idisp <span class="opc">FLvalue</span> "Hertz", iwidth, iheight, ix, iy
    gkfreq, ihandle <span class="opc">FLslider</span> "Frequency", 200, 5000, <span class="op">-</span>1, 5, idisp, 750, 30, 125, 50
    <span class="opc">FLsetVal_i</span> 500, ihandle
<span class="comment">; End of panel contents</span>
<span class="opc">FLpanelEnd</span>
<span class="comment">; Run the widget thread!</span>
<span class="opc">FLrun</span>

<span class="oblock">instr</span> 1
    iamp <span class="op">=</span> 15000
    ifn <span class="op">=</span> 1
    asig <span class="opc">oscili</span> iamp, gkfreq, ifn
    <span class="opc">out</span> asig
<span class="oblock">endin</span>


<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>

<span class="comment">; Function table that defines a single cycle</span>
<span class="comment">; of a sine wave.</span>
<span class="stamnt">f</span> 1 0 1024 10 1

<span class="comment">; Instrument 1 will play a note for 1 hour.</span>
<span class="stamnt">i</span> 1 0 3600
<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="idp23332736"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="FLbox.html" title="FLbox"><em class="citetitle">FLbox</em></a>,
      <a class="link" href="FLbutBank.html" title="FLbutBank"><em class="citetitle">FLbutBank</em></a>,
      <a class="link" href="FLbutton.html" title="FLbutton"><em class="citetitle">FLbutton</em></a>,
      <a class="link" href="FLprintk.html" title="FLprintk"><em class="citetitle">FLprintk</em></a>,
      <a class="link" href="FLprintk2.html" title="FLprintk2"><em class="citetitle">FLprintk2</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp23335736"></a>
        <h2>Credits</h2>
        <p>Author: Gabriel Maldonado</p>
        <p>New in version 4.22</p>
        <p>Example written by Iain McCurdy, edited by Kevin Conder.</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="fluidSetInterpMethod.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="FLvkeybd.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">fluidSetInterpMethod </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> FLvkeybd</td>
        </tr>
      </table>
    </div>
  </body>
</html>