<?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>max_k</title> <link rel="stylesheet" href="csound.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /> <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="maxalloc.html" title="maxalloc" /> <link rel="next" href="mclock.html" title="mclock" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">max_k</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="maxalloc.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="mclock.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="max_k"> <a id="max_k"></a> <div class="titlepage"></div> <a id="Indexmax_k" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">max_k</span> </h2> <p>max_k — Local maximum (or minimum) value of an incoming asig signal </p> </div> <div class="refsect1" title="Description"> <a id="id3014300"></a> <h2>Description</h2> <p> <span class="emphasis"><em>max_k</em></span> outputs the local maximum (or minimum) value of the incoming asig signal, checked in the time interval between ktrig has become true twice. </p> </div> <div class="refsect1" title="Syntax"> <a id="id3014316"></a> <h2>Syntax</h2> <pre class="synopsis">knumkout <span class="command"><strong>max_k</strong></span> asig, ktrig, itype</pre> </div> <div class="refsect1" title="Initialization"> <a id="id3014334"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>itype</em></span> - itype determinates the behaviour of max_k (see below) </p> </div> <div class="refsect1" title="Performance"> <a id="id3014349"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>asig</em></span> - incoming (input) signal </p> <p> <span class="emphasis"><em>ktrig</em></span> - trigger signal </p> <p> max_k outputs the local maximum (or minimum) value of the incoming <span class="emphasis"><em>asig</em></span> signal, checked in the time interval between <span class="emphasis"><em>ktrig</em></span> has become true twice. <span class="emphasis"><em>itype</em></span> determinates the behaviour of max_k:</p> <p> 1 - absolute maximum (sign of negative values is changed to positive before evaluation) </p> <p> 2 - actual maximum </p> <p> 3 - actual minimum </p> <p> 4 - calculate average value of <span class="emphasis"><em>asig</em></span> in the time interval </p> <p> This opcode can be useful in several situations, for example to implement a vu-meter. </p> </div> <div class="refsect1" title="Credits"> <a id="id3014413"></a> <h2>Credits</h2> <p>Written by Gabriel Maldonado.</p> <p>New in Csound 5 (Previously available only on CsoundAV)</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="maxalloc.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="mclock.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">maxalloc </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> mclock</td> </tr> </table> </div> </body> </html>