Sophie

Sophie

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

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>inleta</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="initc7.html" title="initc7" />
    <link rel="next" href="inletk.html" title="inletk" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">inleta</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="initc7.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="inletk.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="inleta">
      <a id="inleta"></a>
      <div class="titlepage"></div>
      <a id="Indexinleta" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">inleta</span>
        </h2>
        <p>inleta — 
      Receives an arate signal into an instrument through a named port.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp27053776"></a>
        <h2>Description</h2>
        <p>
      Receives an arate signal into an instrument through a named port. 
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp27054456"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">asignal <span class="command"><strong>inleta </strong></span>Sname</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp27055568"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>Sname</em></span> -- String name of the inlet port.       
      The name of the inlet is implicitly qualified by the instrument name 
      or number, so it is valid to use the same inlet name in more than one 
      instrument (but not to use the same inlet name twice in one instrument).
    </p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp27104368"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>asignal</em></span> -- audio input signal
    </p>
        <p>
      During performance, the arate inlet signal is received from each instance of an instrument
      containing an outlet port to which this inlet has been connected using the <a class="link" href="connect.html" title="connect">connect</a> opcode.
      The signals of all the outlets connected to an inlet are summed in the inlet.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp27105928"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the inleta opcode. It uses the file <a class="ulink" href="examples/inleta.csd" target="_top"><em class="citetitle">inleta.csd</em></a>.

      </p>
        <div class="example">
          <a id="idp27106880"></a>
          <p class="title">
            <strong>Example 366. Example of the inleta 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>
-odac     <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o inleta.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

<span class="comment">; Connect up instruments and effects to create the signal flow graph. </span>

<span class="opc">connect</span> "SimpleSine",   "leftout", "Reverberator", "leftin" 
<span class="opc">connect</span> "SimpleSine",   "rightout","Reverberator", "rightin" 

<span class="opc">connect</span> "Moogy",        "leftout", "Reverberator", "leftin" 
<span class="opc">connect</span> "Moogy",        "rightout","Reverberator", "rightin" 

<span class="opc">connect</span> "Reverberator", "leftout", "Compressor",   "leftin" 
<span class="opc">connect</span> "Reverberator", "rightout","Compressor",   "rightin" 

<span class="opc">connect</span> "Compressor",   "leftout", "Soundfile",    "leftin" 
<span class="opc">connect</span> "Compressor",   "rightout","Soundfile",    "rightin" 

<span class="comment">; Turn on the "effect" units in the signal flow graph. </span>

<span class="opc">alwayson</span> "Reverberator", 0.91, 12000 
<span class="opc">alwayson</span> "Compressor" 
<span class="opc">alwayson</span> "Soundfile" 

<span class="comment">; Define instruments and effects in order of signal flow.</span>

<span class="oblock">instr</span> SimpleSine 
<span class="comment">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span class="comment">; Default values:   p1  p2  p3  p4  p5  p6  p7  p8  p9  p10</span>
                <span class="opc">pset</span>	        0,  0,  10, 0,  0,  0,  0.5
iattack		<span class="op">=</span> 0.015
idecay		<span class="op">=</span> 0.07
isustain	<span class="op">=</span> p3
irelease	<span class="op">=</span> 0.3
p3		<span class="op">=</span> iattack <span class="op">+</span> idecay <span class="op">+</span> isustain <span class="op">+</span> irelease
adamping	<span class="opc">linsegr</span> 0.0, iattack, 1.0, idecay <span class="op">+</span> isustain, 1.0, irelease, 0.0
iHz 		<span class="op">=</span> <span class="opc">cpsmidinn</span>(p4) 
<span class="comment">; Rescale MIDI velocity range to a musically usable range of dB. </span>
iamplitude 	<span class="op">=</span> <span class="opc">ampdb</span>(p5 <span class="op">/</span> 127 <span class="op">*</span> 15.0 <span class="op">+</span> 60.0) 
<span class="comment">; Use ftgenonce instead of ftgen, ftgentmp, or f statement. </span>
icosine		<span class="opc">ftgenonce</span> 0, 0, 65537, 11, 1 
aoscili		<span class="opc">oscili</span> iamplitude, iHz, icosine 
aadsr 		<span class="opc">madsr</span> iattack, idecay, 0.6, irelease 
asignal 	<span class="op">=</span> aoscili <span class="op">*</span> aadsr 
aleft, aright	<span class="opc">pan2</span> asignal, p7
<span class="comment">; Stereo audio output to be routed in the orchestra header. </span>
		<span class="opc">outleta</span> "leftout", aleft
		<span class="opc">outleta</span> "rightout", aright
<span class="oblock">endin</span> 

<span class="oblock">instr</span> Moogy 
<span class="comment">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span class="comment">; Default values:   p1  p2  p3  p4  p5  p6  p7  p8  p9  p10</span>
		<span class="opc">pset</span>            0,  0,  10, 0,  0,  0,  0.5
iattack		<span class="op">=</span> 0.003
isustain	<span class="op">=</span> p3
irelease	<span class="op">=</span> 0.05
p3		<span class="op">=</span> iattack <span class="op">+</span> isustain <span class="op">+</span> irelease
adamping	<span class="opc">linsegr</span>	0.0, iattack, 1.0, isustain, 1.0, irelease, 0.0
iHz 		<span class="op">=</span> <span class="opc">cpsmidinn</span>(p4)
<span class="comment">; Rescale MIDI velocity range to a musically usable range of dB. </span>
iamplitude 	<span class="op">=</span> <span class="opc">ampdb</span>(p5 <span class="op">/</span> 127 <span class="op">*</span> 20.0 <span class="op">+</span> 60.0) 
		<span class="opc">print</span> iHz, iamplitude 
<span class="comment">; Use ftgenonce instead of ftgen, ftgentmp, or f statement. </span>
isine 		<span class="opc">ftgenonce</span> 0, 0, 65537, 10, 1 
asignal 	<span class="opc">vco</span> iamplitude, iHz, 1, 0.5, isine 
kfco 		<span class="opc">line</span> 2000, p3, 200
krez 		<span class="op">=</span> 0.8 
asignal 	<span class="opc">moogvcf</span> asignal, kfco, krez, 100000 
asignal		<span class="op">=</span> asignal <span class="op">*</span> adamping
aleft, aright	<span class="opc">pan2</span> asignal, p7
<span class="comment">; Stereo audio output to be routed in the orchestra header. </span>
		<span class="opc">outleta</span> "leftout", aleft
		<span class="opc">outleta</span> "rightout", aright 
<span class="oblock">endin</span> 

<span class="oblock">instr</span> Reverberator 
<span class="comment">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span class="comment">; Stereo input. </span>
aleftin 	<span class="opc">inleta</span> "leftin" 
arightin 	<span class="opc">inleta</span> "rightin" 
idelay 		<span class="op">=</span> p4 
icutoff 	<span class="op">=</span> p5 
aleft, aright 	<span class="opc">reverbsc</span> aleftin, arightin, idelay, icutoff 
<span class="comment">; Stereo output. </span>
		<span class="opc">outleta</span> "leftout", aleft 
		<span class="opc">outleta</span> "rightout", aright 
<span class="oblock">endin</span> 

<span class="oblock">instr</span> Compressor 
<span class="comment">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span class="comment">; Stereo input. </span>
aleftin 	<span class="opc">inleta</span> "leftin" 
arightin 	<span class="opc">inleta</span> "rightin" 
kthreshold 	<span class="op">=</span> 25000 
icomp1 		<span class="op">=</span> 0.5 
icomp2 		<span class="op">=</span> 0.763 
irtime 		<span class="op">=</span> 0.1 
iftime 		<span class="op">=</span> 0.1 
aleftout 	<span class="opc">dam</span> aleftin, kthreshold, icomp1, icomp2, irtime, iftime 
arightout 	<span class="opc">dam</span> arightin, kthreshold, icomp1, icomp2, irtime, iftime 
<span class="comment">; Stereo output. </span>
		<span class="opc">outleta</span> "leftout", aleftout 
		<span class="opc">outleta</span> "rightout", arightout 
<span class="oblock">endin</span> 

<span class="oblock">instr</span> Soundfile 
<span class="comment">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span class="comment">; Stereo input. </span>
aleftin 	<span class="opc">inleta</span> "leftin" 
arightin 	<span class="opc">inleta</span> "rightin" 
		<span class="opc">outs</span> aleftin, arightin 
<span class="oblock">endin</span> 

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

<span class="comment">; It is not necessary to activate "effects" or create f-tables in the score! </span>
<span class="comment">; Overlapping notes create new instances of instruments with proper connections. </span>

<span class="stamnt">i</span> "S<span class="stamnt">i</span>mpleS<span class="stamnt">i</span>ne" 1 5 60 85 
<span class="stamnt">i</span> "S<span class="stamnt">i</span>mpleS<span class="stamnt">i</span>ne" 2 5 64 80 
<span class="stamnt">i</span> "Moogy" 3 5 67 75 
<span class="stamnt">i</span> "Moogy" 4 5 71 70 
<span class="comment">;1 extra second after the performance</span>
<span class="stamnt">e</span> 1 

<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="idp27107888"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="outleta.html" title="outleta"><em class="citetitle">outleta</em></a>
      <a class="link" href="outletk.html" title="outletk"><em class="citetitle">outletk</em></a>
      <a class="link" href="outletkid.html" title="outletkid"><em class="citetitle">outletkid</em></a>
      <a class="link" href="outletf.html" title="outletf"><em class="citetitle">outletf</em></a>
      <a class="link" href="inletk.html" title="inletk"><em class="citetitle">inletk</em></a>
      <a class="link" href="inletkid.html" title="inletkid"><em class="citetitle">inletkid</em></a>
      <a class="link" href="inletf.html" title="inletf"><em class="citetitle">inletf</em></a>
      <a class="link" href="connect.html" title="connect"><em class="citetitle">connect</em></a>
      <a class="link" href="alwayson.html" title="alwayson"><em class="citetitle">alwayson</em></a>
      <a class="link" href="ftgenonce.html" title="ftgenonce"><em class="citetitle">ftgenonce</em></a>
    </p>
        <p> More information on this opcode: <a class="ulink" href="http://www.csounds.com/journal/issue13/signalFlowGraphOpcodes.html" target="_top"><em class="citetitle">http://www.csounds.com/journal/issue13/signalFlowGraphOpcodes.html</em></a>  , written by Michael Gogins </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp27113872"></a>
        <h2>Credits</h2>
        <p>By: Michael Gogins 2009</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="initc7.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="inletk.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">initc7 </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> inletk</td>
        </tr>
      </table>
    </div>
  </body>
</html>