<?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>freeverb</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="fractalnoise.html" title="fractalnoise" /> <link rel="next" href="ftchnls.html" title="ftchnls" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">freeverb</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="fractalnoise.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="ftchnls.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="freeverb"> <a id="freeverb"></a> <div class="titlepage"></div> <a id="IndexFreeverb" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">freeverb</span> </h2> <p>freeverb — Opcode version of Jezar's Freeverb </p> </div> <div class="refsect1" title="Description"> <a id="idp24461912"></a> <h2>Description</h2> <p> freeverb is a stereo reverb unit based on Jezar's public domain C++ sources, composed of eight parallel comb filters on both channels, followed by four allpass units in series. The filters on the right channel are slightly detuned compared to the left channel in order to create a stereo effect. </p> </div> <div class="refsect1" title="Syntax"> <a id="idp24463192"></a> <h2>Syntax</h2> <pre class="synopsis">aoutL, aoutR <span class="command"><strong>freeverb</strong></span> ainL, ainR, kRoomSize, kHFDamp[, iSRate[, iSkip]] </pre> </div> <div class="refsect1" title="Initialization"> <a id="idp24464344"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>iSRate</em></span> (optional, defaults to 44100): adjusts the reverb parameters for use with the specified sample rate (this will affect the length of the delay lines in samples, and, as of the latest CVS version, the high frequency attenuation). Only integer multiples of 44100 will reproduce the original character of the reverb exactly, so it may be useful to set this to 44100 or 88200 for an orchestra sample rate of 48000 or 96000 Hz, respectively. While iSRate is normally expected to be close to the orchestra sample rate, different settings may be useful for special effects. </p> <p> <span class="emphasis"><em>iSkip</em></span> (optional, defaults to zero): if non-zero, initialization of the opcode will be skipped, whenever possible. </p> </div> <div class="refsect1" title="Performance"> <a id="idp24466584"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>ainL, ainR</em></span> -- input signals; usually both are the same, but different inputs can be used for special effect </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <table border="0" summary="Note: Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"> <img alt="[Note]" src="images/note.png" /> </td> <th align="left">Note</th> </tr> <tr> <td align="left" valign="top"> <p>It is recommended to process the input signal(s) with the denorm opcode in order to avoid denormalized numbers which could significantly increase CPU usage in some cases </p> </td> </tr> </table> </div> <p> </p> <p> <span class="emphasis"><em>aoutL, aoutR</em></span> -- output signals for left and right channel </p> <p> <span class="emphasis"><em>kRoomSize</em></span> (range: 0 to 1) -- controls the length of the reverb, a higher value means longer reverb. Settings above 1 may make the opcode unstable. </p> <p> <span class="emphasis"><em>kHFDamp</em></span> (range: 0 to 1): high frequency attenuation; a value of zero means all frequencies decay at the same rate, while higher settings will result in a faster decay of the high frequency range. </p> </div> <div class="refsect1" title="Examples"> <a id="idp24527392"></a> <h2>Examples</h2> <p> Here is an example of the <span class="emphasis"><em>freeverb</em></span> opcode. It uses the file <a class="ulink" href="examples/freeverb.csd" target="_top"><em class="citetitle">freeverb.csd</em></a>. </p> <div class="example"> <a id="idp24528592"></a> <p class="title"> <strong>Example 300. An example of the freeverb 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"><CsoundSynthesizer></span> <span class="csdtag"><CsOptions></span> <span class="comment">; Select audio/midi flags here according to platform</span> <span class="comment">; Audio out Audio in No messages</span> -odac -iadc -d <span class="comment">;;;RT audio I/O</span> <span class="comment">; For Non-realtime ouput leave only the line below:</span> <span class="comment">; -o freeverb.wav -W ;;; for file output any platform</span> <span class="csdtag"></CsOptions></span> <span class="csdtag"><CsInstruments></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 a1 <span class="opc">vco2</span> 0.75, 440, 10 kfrq <span class="opc">port</span> 100, 0.008, 20000 a1 <span class="opc">butterlp</span> a1, kfrq a2 <span class="opc">linseg</span> 0, 0.003, 1, 0.01, 0.7, 0.005, 0, 1, 0 a1 <span class="op">=</span> a1 <span class="op">*</span> a2 <span class="opc">denorm</span> a1 aL, aR <span class="opc">freeverb</span> a1, a1, 0.9, 0.35, sr, 0 <span class="opc">outs</span> a1 <span class="op">+</span> aL, a1 <span class="op">+</span> aR <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="stamnt">i</span> 1 0 5 <span class="stamnt">e</span> <span class="csdtag"></CsScore></span> <span class="csdtag"></CsoundSynthesizer></span> </pre> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1" title="Credits"> <a id="idp24530840"></a> <h2>Credits</h2> <p> </p> <table border="0" summary="Simple list" class="simplelist"> <tr> <td>Author: Istvan Varga</td> </tr> <tr> <td>2005</td> </tr> </table> <p> </p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="fractalnoise.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="ftchnls.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">fractalnoise </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> ftchnls</td> </tr> </table> </div> </body> </html>