Sophie

Sophie

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

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>dssiinit</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="dssictls.html" title="dssictls" />
    <link rel="next" href="dssilist.html" title="dssilist" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">dssiinit</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="dssictls.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="dssilist.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="dssiinit">
      <a id="dssiinit"></a>
      <div class="titlepage"></div>
      <a id="IndexDssiinit" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">dssiinit</span>
        </h2>
        <p>dssiinit — Loads a DSSI or LADSPA plugin.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp18749168"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">ihandle <span class="command"><strong>dssiinit</strong></span> ilibraryname, iplugindex [, iverbose] </pre>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp18778760"></a>
        <h2>Description</h2>
        <p><span class="emphasis"><em>dssiinit</em></span> is used to load a DSSI or LADSPA plugin into memory for use with
      the other dssi4cs opcodes. Both LADSPA effects and DSSI instruments can be used.</p>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp18779816"></a>
        <h2>Initialization</h2>
        <p><span class="emphasis"><em>ihandle</em></span> - the number which identifies the
      plugin, to be passed to other dssi4cs opcodes.</p>
        <p><span class="emphasis"><em>ilibraryname</em></span> - the name of the .so (shared object) file to load.</p>
        <p><span class="emphasis"><em>iplugindex</em></span> - The index of the plugin to be used.</p>
        <p><span class="emphasis"><em>iverbose</em></span> (optional) - show plugin information and
      parameters when loading. (default = 1)</p>
        <p>  <span class="emphasis"><em>dssiinit</em></span> looks for  <span class="emphasis"><em>ilibraryname</em></span> on LADSPA_PATH and DSSI_PATH. One of these variables must be set, otherwise <span class="emphasis"><em>dssiinit</em></span> will return an error. LADSPA and DSSI libraries may contain more than one plugin which must be referenced by its index. <span class="emphasis"><em>dssiinit</em></span> then attempts to find plugin index <span class="emphasis"><em>iplugindex</em></span> in the library and load the plugin into memory if it is found. To find out which plugins you have available and their index numbers you can use:  <a class="link" href="dssilist.html" title="dssilist"><em class="citetitle">dssilist</em></a>. </p>
        <p>If <span class="emphasis"><em>iverbose</em></span> is not 0 (the default), information about the plugin detailing its characteristics and its ports will be shown. This information is important for opcodes like  <a class="link" href="dssictls.html" title="dssictls"><em class="citetitle">dssictls</em></a>.</p>
        <p>Plugins are set to inactive by default, so you <span class="emphasis"><em>*must*</em></span> use <a class="link" href="dssiactivate.html" title="dssiactivate"><em class="citetitle">dssiactivate</em></a> to get the plugin to produce sound. This is required even if the plugin doesn't provide an activate() function.
    </p>
        <p>
      <span class="emphasis"><em>dssiinit</em></span> may cause audio stream breakups when used in realtime, so it is recommended to load all plugins to be used before playing.</p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp18786984"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the dssinit opcode. It uses the file <a class="ulink" href="examples/dssiinit.csd" target="_top"><em class="citetitle">dssiinit.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp18787976"></a>
          <p class="title">
            <strong>Example 191. Example of the dssiinit opcode. (Remember to change the Library name)</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">;;;RT 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 dssiinit.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

gihandle <span class="opc">dssiinit</span> "g2reverb.so", 0, 1
gaout    <span class="opc">init</span>  0

<span class="oblock">instr</span> 1	<span class="comment">; activate DSSI</span>

<span class="opc">dssiactivate</span> gihandle, 1
<span class="oblock">endin</span>

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

ain1	<span class="opc">diskin2</span> "beats.wav", 1

gaout <span class="op">=</span> gaout<span class="op">+</span>(ain1<span class="op">*</span>.3)
<span class="oblock">endin</span>

<span class="oblock">instr</span> 3 
	
<span class="opc">dssictls</span> gihandle, 4, 100, 1	<span class="comment">; room 10 to 150 </span>
<span class="opc">dssictls</span> gihandle, 5, 10, 1	<span class="comment">; reverb time 1 to 20</span>
<span class="opc">dssictls</span> gihandle, 6, .5, 1	<span class="comment">; input bandwith 0 to 1</span>
<span class="opc">dssictls</span> gihandle, 7, .25, 1	<span class="comment">; damping 0 to 1</span>
<span class="opc">dssictls</span> gihandle, 8, 0, 1	<span class="comment">; dry -80 to 0</span>
<span class="opc">dssictls</span> gihandle, 9, <span class="op">-</span>10, 1	<span class="comment">; reflections -80 to 0</span>
<span class="opc">dssictls</span> gihandle, 10, <span class="op">-</span>15, 1	<span class="comment">; rev. tail -80 to 0</span>
<span class="oblock">endin</span>

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

aout1, aout2 <span class="opc">dssiaudio</span> gihandle, gaout, gaout	<span class="comment">;get beats.wav and</span>
	     <span class="opc">outs</span> aout1,aout2	 		<span class="comment">; stereo DSSI plugin</span>

gaout <span class="op">=</span> 0
<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 2 
<span class="stamnt">i</span> 2 1 10
<span class="stamnt">i</span> 3 1 10
<span class="stamnt">i</span> 4 0 10
<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="Credits">
        <a id="idp18789032"></a>
        <h2>Credits</h2>
        <p>2005</p>
        <p>By: Andrés Cabrera</p>
        <p>Uses code from Richard Furse's LADSPA sdk.</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="dssictls.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="dssilist.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">dssictls </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> dssilist</td>
        </tr>
      </table>
    </div>
  </body>
</html>