Sophie

Sophie

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

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>FLslidBnk2</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="FLslidBnk.html" title="FLslidBnk" />
    <link rel="next" href="FLslidBnkGetHandle.html" title="FLslidBnkGetHandle" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">FLslidBnk2</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="FLslidBnk.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="FLslidBnkGetHandle.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="FLslidBnk2">
      <a id="FLslidBnk2"></a>
      <div class="titlepage"></div>
      <a id="IndexFLslidBnk2" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">FLslidBnk2</span>
        </h2>
        <p>FLslidBnk2 — 
      A FLTK widget containing a bank of horizontal sliders.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp22477760"></a>
        <h2>Description</h2>
        <p>
      <span class="emphasis"><em>FLslidBnk2</em></span> is a widget containing a bank of horizontal sliders.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp22478624"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>FLslidBnk2</strong></span> "names", inumsliders, ioutable, iconfigtable [,iwidth, iheight, ix, iy, istart_index] </pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp22513192"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em><span class="quote">“<span class="quote">names</span>”</span></em></span> -- a double-quoted string containing the names of each slider.  Each slider can have a different name. Separate each name with <span class="quote">“<span class="quote">@</span>”</span> character, for example: <span class="quote">“<span class="quote">frequency@amplitude@cutoff</span>”</span>. It is possible to not provide any name by giving a single space <span class="quote">“<span class="quote"> </span>”</span>. In this case, the opcode will automatically assign a progressive number as a label for each slider.
    </p>
        <p>
      <span class="emphasis"><em>inumsliders</em></span> -- the number of sliders.
    </p>
        <p>
      <span class="emphasis"><em>ioutable</em></span> (optional, default=0) -- number of a previously-allocated table in which to store output values of each slider. The user must be sure that table size is large enough to contain all output cells, otherwise a segfault will crash Csound. By assigning zero to this argument, the output will be directed to the zak space in the k-rate zone. In this case, the zak space must be previously allocated with the <a class="link" href="zakinit.html" title="zakinit"><em class="citetitle">zakinit</em></a> opcode and the user must be sure that the allocation size is big enough to cover all sliders. The default value is zero (i.e. store output in zak space).
    </p>
        <p>
      <span class="emphasis"><em>iconfigtable</em></span> -- in the <span class="emphasis"><em>FLslidBnk2</em></span> and FLvslidBnk2 opcodes, this table replaces <span class="emphasis"><em>iminmaxtable</em></span>, <span class="emphasis"><em>iexptable</em></span> and <span class="emphasis"><em>istyletable</em></span>, all these parameters being placed into a single table. This table has to be filled with a group of 4 parameters for each slider in this way:
    </p>
        <div class="literallayout">
          <p>min1, max1, exp1, style1, min2, max2, exp2, style2, min3, max3, exp3, style3 etc.</p>
        </div>
        <p>for example using GEN02 you can type:</p>
        <div class="literallayout">
          <p>inum <span class="emphasis"><em>ftgen</em></span> 1,0,256, -2,     0,1,0,1,    100, 5000, -1, 3,      50, 200, -1, 5,….. [etcetera]</p>
        </div>
        <p>
      In this example the first slider will be affected by the [0,1,0,1] parameters (the range will be 0 to 1, it will have linear response, and its aspect will be a fill slider), the second slider will be affected by the [100,5000,-1,3] parameters (the range is 100 to 5000, the response is exponential and the aspect is a normal slider), the third slider will be affected by the [50,200,-1,5] parameters (the range is 50 to 200, the behavior exponential, and the aspect is a nice slider), and so on.
    </p>
        <p>
      <span class="emphasis"><em>iwidth</em></span> (optional) -- width of the rectangular area containing all sliders of the bank, excluding text labels, that are placed to the left of that area.
    </p>
        <p>
      <span class="emphasis"><em>iheight</em></span> (optional) -- height of the rectangular area containing all sliders of the bank, excluding text labels, that are placed to the left of that area.
    </p>
        <p>
      <span class="emphasis"><em>ix</em></span> (optional) -- horizontal position of the upper left corner of the rectangular area containing all sliders belonging to the bank. You have to leave enough space, at the left of that rectangle, in order to make sure labels of sliders to be visible. This is because the labels themselves are external to the rectangular area.
    </p>
        <p>
      <span class="emphasis"><em>iy</em></span> (optional) -- vertical position of the upper left corner of the rectangular area containing all sliders belonging to the bank. You have to leave enough space, at the left of that rectangle, in order to make sure labels of sliders to be visible. This is because the labels themselves are external to the rectangular area.
    </p>
        <p>
      <span class="emphasis"><em>istart_index</em></span> (optional, default=0) -- an integer number referring to a starting offset of output cell locations. It can be positive to allow multiple banks of sliders to output in the same table or in the zak space. The default value is zero (no offset).
    </p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp22524288"></a>
        <h2>Performance</h2>
        <p>
      There are no k-rate arguments, even if cells of the output table (or the zak space) are updated at k-rate.
    </p>
        <p>
      <span class="emphasis"><em>FLslidBnk2</em></span> is a widget containing a bank of horizontal sliders. Any number of sliders can be placed into the bank (<span class="emphasis"><em>inumsliders</em></span> argument). The output of all sliders is stored into a previously allocated table or into the zak space (<span class="emphasis"><em>ioutable</em></span> argument). It is possible to determine the first location of the table (or of the zak space) in which to store the output of the first slider by means of <span class="emphasis"><em>istart_index</em></span> argument.
    </p>
        <p>
      Each slider can have an individual label that is placed to the left of it. Labels are defined by the <span class="emphasis"><em><span class="quote">“<span class="quote">names</span>”</span></em></span> argument. The output range of each slider can be individually set by means of the <span class="emphasis"><em>min</em></span> and <span class="emphasis"><em>max</em></span> values inside the <span class="emphasis"><em>iconfigtable</em></span> table. The curve response of each slider can be set individually, by means of a list of identifiers placed in the <span class="emphasis"><em>iconfigtable</em></span> table (<span class="emphasis"><em>exp</em></span> argument). It is possible to define the aspect of each slider independently or to make all sliders have the same aspect (<span class="emphasis"><em>style</em></span> argument in the <span class="emphasis"><em>iconfigtable</em></span> table).
    </p>
        <p>
      The <span class="emphasis"><em>iwidth</em></span>, <span class="emphasis"><em>iheight</em></span>, <span class="emphasis"><em>ix</em></span>, and <span class="emphasis"><em>iy</em></span> arguments determine width, height, horizontal and vertical position of the rectangular area containing sliders. Notice that the label of each slider is placed to the left of them and is not included in the rectangular area containing sliders. So the user should leave enough space to the left of the bank by assigning a proper <span class="emphasis"><em>ix</em></span> value in order to leave labels visible.
    </p>
        <div class="warning" title="IMPORTANT!" style="margin-left: 0.5in; margin-right: 0.5in;">
          <table border="0" summary="Warning: IMPORTANT!">
            <tr>
              <td rowspan="2" align="center" valign="top" width="25">
                <img alt="[Warning]" src="images/warning.png" />
              </td>
              <th align="left">IMPORTANT!</th>
            </tr>
            <tr>
              <td align="left" valign="top">
                <p>
        Notice that the tables used by <span class="emphasis"><em>FLslidBnk2</em></span> must be created with the <a class="link" href="ftgen.html" title="ftgen"><em class="citetitle">ftgen</em></a> opcode and placed in the orchestra before the corresponding valuator. They can not placed in the score. This is because tables placed in the score are created later than the initialization of the opcodes placed in the header section of the orchestra.
      </p>
              </td>
            </tr>
          </table>
        </div>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp22532120"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the FLslidBnk2 opcode. It uses the file <a class="ulink" href="examples/FLslidBnk2.csd" target="_top"><em class="citetitle">FLslidBnk2.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp22533112"></a>
          <p class="title">
            <strong>Example 259. Example of the FLslidBnk2 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</span>
-odac           -iadc       -M0 <span class="comment">;;;RT audio I/O with MIDI in</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>	100
<span class="ohdr">nchnls</span>	<span class="op">=</span>	2

<span class="comment">;Example by Gabriel Maldonado</span>

giElem	<span class="opc">init</span>	8
giOutTab	<span class="ohdr">ftgen</span>	1,0,128, 2, 	0

              <span class="comment">;min1, max1, exp1, type1, min2, max2, exp2, type2, min3, max3, exp3, type3 etc.</span>
giConfigTab <span class="ohdr">ftgen</span>	2,0,128,<span class="op">-</span>2,         .1, 1000, <span class="op">-</span>1, 3,      .1, 1000, <span class="op">-</span>1, 3,     .1, 1000, <span class="op">-</span>1, 3,     30, 2000, <span class="op">-</span>1, 3, \
                                        .1, 5000, <span class="op">-</span>1,  5,      .1, 5000, <span class="op">-</span>1,  5,     .1, 5000, <span class="op">-</span>1,  5,     .1, 5000, <span class="op">-</span>1,  5
giSine	<span class="ohdr">ftgen</span>	3,0,256,10,	1

	<span class="opc">FLpanel</span>	"This Panel contains <span class="opc">a</span> Slider Bank",600,600
	<span class="opc">FLslidBnk2</span> "mod1@mod2@mod3@amp@freq1@freq2@freq3@freqPo", giElem, giOutTab, giConfigTab, 400, 500, 100, 10
	<span class="opc">FLpanel_end</span>

	<span class="opc">FLrun</span>

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

kmodindex1 	<span class="opc">init</span> 0
kmodindex2 	<span class="opc">init</span> 0 
kmodindex3 	<span class="opc">init</span> 0 
kamp 		<span class="opc">init</span> 0 
kfreq1 		<span class="opc">init</span> 0 
kfreq2	  	<span class="opc">init</span> 0 
kfreq3	 	<span class="opc">init</span> 0 
kfreq4 		<span class="opc">init</span> 0


       <span class="opc">vtable1k</span>  giOutTab, kmodindex1 , kmodindex2, kmodindex3, kamp, kfreq1, kfreq2 , kfreq3, kfreq4

amod1	<span class="opc">oscili</span>	kmodindex1, kfreq1, giSine
amod2	<span class="opc">oscili</span>	kmodindex2, kfreq2, giSine
amod3	<span class="opc">oscili</span>	kmodindex3, kfreq3, giSine
aout	<span class="opc">oscili</span>	kamp,       kfreq4<span class="op">+</span>amod1<span class="op">+</span>amod2<span class="op">+</span>amod3, giSine
	
	<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 3600
<span class="stamnt">f</span>0 3600

<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="idp22535392"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="FLslider.html" title="FLslider"><em class="citetitle">FLslider</em></a>,
      <a class="link" href="FLslidBnk.html" title="FLslidBnk"><em class="citetitle">FLslidBnk</em></a>,
      <a class="link" href="FLvslidBnk.html" title="FLvslidBnk"><em class="citetitle">FLvslidBnk</em></a>,
      <a class="link" href="FLvslidBnk2.html" title="FLvslidBnk2"><em class="citetitle">FLvslidBnk2</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp22537848"></a>
        <h2>Credits</h2>
        <p>Author: Gabriel Maldonado</p>
        <p>New in version 5.06</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="FLslidBnk.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="FLslidBnkGetHandle.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">FLslidBnk </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> FLslidBnkGetHandle</td>
        </tr>
      </table>
    </div>
  </body>
</html>