Sophie

Sophie

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

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>minabs</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="min.html" title="min" />
    <link rel="next" href="minabsaccum.html" title="minabsaccum" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">minabs</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="min.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="minabsaccum.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="minabs">
      <a id="minabs"></a>
      <div class="titlepage"></div>
      <a id="IndexMinabs" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">minabs</span>
        </h2>
        <p>minabs — 
      Produces a signal that is the minimum of the absolute values of any number of input signals.
          </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp31593432"></a>
        <h2>Description</h2>
        <p>
      The <span class="emphasis"><em>minabs</em></span> opcode takes any number of a-rate or k-rate signals as input (all of the same rate), and outputs a signal at the same rate that is the minimum of all of the inputs.  It is identical to the <span class="emphasis"><em>min</em></span> opcode except that it takes the absolute value of each input before comparing them.  Therefore, the output is always non-negative.    For a-rate signals, the inputs are compared one sample at a time (i.e. <span class="emphasis"><em>minabs</em></span> does not scan an entire ksmps period of a signal for its local minimum as the <span class="emphasis"><em>max_k</em></span> opcode does).
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp31604784"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">amin <span class="command"><strong>minabs</strong></span> ain1, ain2 [, ain3] [, ain4] [...]</pre>
        <pre class="synopsis">kmin <span class="command"><strong>minabs</strong></span> kin1, kin2 [, kin3] [, kin4] [...]</pre>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp31606656"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>ain1, ain2, ...</em></span> --  a-rate signals to be compared.
    </p>
        <p>
      <span class="emphasis"><em>kin1, kin2, ...</em></span> --  k-rate signals to be compared.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp31607872"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the minabs opcode. It uses the file <a class="ulink" href="examples/minabs.csd" target="_top"><em class="citetitle">minabs.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp31641768"></a>
          <p class="title">
            <strong>Example 476. Example of the minabs 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>
-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 minabs.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="ohdr">0dbfs</span>  <span class="op">=</span> 1

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

k1   <span class="opc">oscili</span> 1, 10.0, 1			<span class="comment">;combine 3 sinusses</span>
k2   <span class="opc">oscili</span> 1, 1.0, 1			<span class="comment">;at different rates</span>
k3   <span class="opc">oscili</span> 1, 3.0, 1
kmin <span class="opc">minabs</span>   k1, k2, k3
kmin <span class="op">=</span> kmin<span class="op">*</span>250				<span class="comment">;scale kmin</span>
<span class="opc">printk2</span> kmin				<span class="comment">;check the values</span>

aout <span class="opc">vco2</span> .5, 220, 6			<span class="comment">;sawtooth</span>
asig <span class="opc">moogvcf2</span> aout, 600<span class="op">+</span>kmin, .5 	<span class="comment">;change filter above 600 Hz		</span>
     <span class="opc">outs</span> asig, asig

<span class="oblock">endin</span>

<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="stamnt">f</span>1 0 32768 10 1

<span class="stamnt">i</span>1 0 5
<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="idp31644040"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="maxabs.html" title="maxabs"><em class="citetitle">maxabs</em></a>, 
      <a class="link" href="max.html" title="max"><em class="citetitle">max</em></a>, 
      <a class="link" href="min.html" title="min"><em class="citetitle">min</em></a>, 
      <a class="link" href="maxaccum.html" title="maxaccum"><em class="citetitle">maxaccum</em></a>, 
      <a class="link" href="minaccum.html" title="minaccum"><em class="citetitle">minaccum</em></a>, 
      <a class="link" href="maxabsaccum.html" title="maxabsaccum"><em class="citetitle">maxabsaccum</em></a>, 
      <a class="link" href="minabsaccum.html" title="minabsaccum"><em class="citetitle">minabsaccum</em></a>, 
      <a class="link" href="max_k.html" title="max_k"><em class="citetitle">max_k</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp31648352"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: Anthony Kozar</td>
          </tr>
          <tr>
            <td>March 2006</td>
          </tr>
        </table>
        <p>
    </p>
        <p>New in Csound version 5.01</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="min.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="minabsaccum.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">min </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> minabsaccum</td>
        </tr>
      </table>
    </div>
  </body>
</html>