<?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>jitter2</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" /> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /> <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="jitter.html" title="jitter" /> <link rel="next" href="joystick.html" title="joystick" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">jitter2</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="jitter.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="joystick.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="jitter2"></a> <div class="titlepage"></div> <a id="IndexJitter2" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">jitter2</span> </h2> <p>jitter2 — Generates a segmented line with user-controllable random segments. </p> </div> <div class="refsect1"> <a id="idm281472921763912"></a> <h2>Description</h2> <p> Generates a segmented line with user-controllable random segments. </p> </div> <div class="refsect1"> <a id="idm281472921698936"></a> <h2>Syntax</h2> <pre class="synopsis">kout <span class="command"><strong>jitter2</strong></span> ktotamp, kamp1, kcps1, kamp2, kcps2, kamp3, kcps3[ , iopt]</pre> </div> <div class="refsect1"> <a id="idm281472921696616"></a> <h2>Initialisation</h2> <p> <span class="emphasis"><em>iopt</em></span> -- Optional, controls time of onset of effects. If zero (default) the output is zero until the end of the shortest kcps value. If not zero the effect starts immediately</p> </div> <div class="refsect1"> <a id="idm281472921694744"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>ktotamp</em></span> -- Resulting amplitude of jitter2 </p> <p> <span class="emphasis"><em>kamp1</em></span> -- Amplitude of the first jitter component </p> <p> <span class="emphasis"><em>kcps1</em></span> -- Speed of random variation of the first jitter component (expressed in cps) </p> <p> <span class="emphasis"><em>kamp2</em></span> -- Amplitude of the second jitter component </p> <p> <span class="emphasis"><em>kcps2</em></span> -- Speed of random variation of the second jitter component (expressed in cps) </p> <p> <span class="emphasis"><em>kamp3</em></span> -- Amplitude of the third jitter component </p> <p> <span class="emphasis"><em>kcps3</em></span> -- Speed of random variation of the third jitter component (expressed in cps) </p> <p> <span class="emphasis"><em>jitter2</em></span> also generates a segmented line such as <a class="link" href="jitter.html" title="jitter"><em class="citetitle">jitter</em></a>, but in this case the result is similar to the sum of three <span class="emphasis"><em>randi</em></span> opcodes, each one with a different amplitude and frequency value (see <a class="link" href="randi.html" title="randi"><em class="citetitle">randi</em></a> for more details), that can be varied at k-rate. Different effects can be obtained by varying the input arguments. </p> <p> <span class="emphasis"><em>jitter2</em></span> can be used to make more natural and <span class="quote">“<span class="quote">analog-sounding</span>”</span> some static, dull sound. For best results, it is suggested to keep its amplitude moderate. </p> </div> <div class="refsect1"> <a id="idm281472921681832"></a> <h2>Examples</h2> <p> Here is an example of the jitter2 opcode. It uses the file <a class="ulink" href="examples/jitter2.csd" target="_top"><em class="citetitle">jitter2.csd</em></a>. </p> <div class="example"> <a id="idm281472921679896"></a> <p class="title"> <strong>Example 448. Example of the jitter2 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> <div class="refsect1"> <a id="idm281472750269672"></a> <pre class="programlisting"> <span class="nt"><CsoundSynthesizer></span> <span class="nt"><CsOptions></span> <span class="c1">; Select audio/midi flags here according to platform</span> -odac <span class="c1">;;;realtime audio out</span> <span class="c1">;-iadc ;;;uncomment -iadc if realtime audio input is needed too</span> <span class="c1">; For Non-realtime ouput leave only the line below:</span> <span class="c1">; -o jitter2.wav -W ;;; for file output any platform</span> <span class="nt"></CsOptions></span> <span class="nt"><CsInstruments></span> <span class="vg">sr</span> <span class="o">=</span> <span class="mi">44100</span> <span class="vg">ksmps</span> <span class="o">=</span> <span class="mi">32</span> <span class="vg">nchnls</span> <span class="o">=</span> <span class="mi">2</span> <span class="vg">0dbfs</span> <span class="o">=</span> <span class="mi">1</span> <span class="kd">instr</span> <span class="nf">1</span> k<span class="n">totamp</span> <span class="nb">init</span> <span class="nb">p4</span> k<span class="n">amp1</span> <span class="nb">init</span> <span class="mf">.5</span> k<span class="n">cps1</span> <span class="nb">init</span> <span class="mi">10</span> k<span class="n">amp2</span> <span class="nb">init</span> <span class="mf">.5</span> k<span class="n">cps2</span> <span class="nb">init</span> <span class="mi">2</span> k<span class="n">amp3</span> <span class="nb">init</span> <span class="mf">.5</span> k<span class="n">cps3</span> <span class="nb">init</span> <span class="mi">3</span> k<span class="n">j2</span> <span class="nb">jitter2</span> k<span class="n">totamp</span><span class="p">,</span> k<span class="n">amp1</span><span class="p">,</span> k<span class="n">cps1</span><span class="p">,</span> k<span class="n">amp2</span><span class="p">,</span> k<span class="n">cps2</span><span class="p">,</span> k<span class="n">amp3</span><span class="p">,</span> k<span class="n">cps3</span> a<span class="n">out</span> <span class="nb">pluck</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">200</span><span class="o">+</span>k<span class="n">j2</span><span class="p">,</span> <span class="mi">1000</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span> a<span class="n">out</span> <span class="nb">dcblock</span> a<span class="n">out</span> <span class="nb">outs</span> a<span class="n">out</span><span class="p">,</span> a<span class="n">out</span> <span class="kd">endin</span> <span class="nt"></CsInstruments></span> <span class="nt"><CsScore></span> <span class="nb">i</span> <span class="mi">1</span> <span class="mi">0</span> <span class="mi">15</span> <span class="mi">2</span> <span class="c1">;a bit jitter</span> <span class="nb">i</span> <span class="mi">1</span> <span class="mi">8</span> <span class="mi">15</span> <span class="mi">10</span> <span class="c1">;some more</span> <span class="nb">i</span> <span class="mi">1</span> <span class="mi">16</span> <span class="mi">15</span> <span class="mi">20</span> <span class="c1">;lots more</span> <span class="nb">e</span> <span class="nt"></CsScore></span> <span class="nt"></CsoundSynthesizer></span> </pre> </div> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1"> <a id="idm281472921675544"></a> <h2>See Also</h2> <p> <a class="link" href="jitter.html" title="jitter"><em class="citetitle">jitter</em></a>, <a class="link" href="vibr.html" title="vibr"><em class="citetitle">vibr</em></a>, <a class="link" href="vibrato.html" title="vibrato"><em class="citetitle">vibrato</em></a> </p> </div> <div class="refsect1"> <a id="idm281472921671512"></a> <h2>Credits</h2> <p>Author: Gabriel Maldonado, John ffitch</p> <p>New in Version 4.15</p> <p>iopt new in version 6.08</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="jitter.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="joystick.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">jitter </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> joystick</td> </tr> </table> </div> </body> </html>