<?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>scantable</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="scans.html" title="scans" /> <link rel="next" href="scanu.html" title="scanu" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">scantable</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="scans.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="scanu.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="scantable"> <a id="scantable"></a> <div class="titlepage"></div> <a id="IndexScantable" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">scantable</span> </h2> <p>scantable — A simpler scanned synthesis implementation. </p> </div> <div class="refsect1" title="Description"> <a id="id3174161"></a> <h2>Description</h2> <p> A simpler scanned synthesis implementation. This is an implementation of a circular string scanned using external tables. This opcode will allow direct modification and reading of values with the table opcodes. </p> </div> <div class="refsect1" title="Syntax"> <a id="id3174179"></a> <h2>Syntax</h2> <pre class="synopsis">aout <span class="command"><strong>scantable</strong></span> kamp, kpch, ipos, imass, istiff, idamp, ivel</pre> </div> <div class="refsect1" title="Initialization"> <a id="id3174198"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>ipos</em></span> -- table containing position array. </p> <p> <span class="emphasis"><em>imass</em></span> -- table containing the mass of the string. </p> <p> <span class="emphasis"><em>istiff</em></span> -- table containing the stiffness of the string. </p> <p> <span class="emphasis"><em>idamp</em></span> -- table containing the damping factors of the string. </p> <p> <span class="emphasis"><em>ivel</em></span> -- table containing the velocities. </p> </div> <div class="refsect1" title="Performance"> <a id="id3174248"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>kamp</em></span> -- amplitude (gain) of the string. </p> <p> <span class="emphasis"><em>kpch</em></span> -- the string's scanned frequency. </p> </div> <div class="refsect1" title="Examples"> <a id="id3174846"></a> <h2>Examples</h2> <p> Here is an example of the scantable opcode. It uses the file <a class="ulink" href="examples/scantable.csd" target="_top"><em class="citetitle">scantable.csd</em></a>. </p> <div class="example"> <a id="id3174862"></a> <p class="title"> <b>Example 541. Example of the scantable opcode.</b> </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 scantable.wav -W ;;; for file output any platform</span> <span class="csdtag"></CsOptions></span> <span class="csdtag"><CsInstruments></span> <span class="comment">; Initialize the global variables.</span> <span class="ohdr">sr</span> <span class="op">=</span> 44100 <span class="ohdr">kr</span> <span class="op">=</span> 4410 <span class="ohdr">ksmps</span> <span class="op">=</span> 10 <span class="ohdr">nchnls</span> <span class="op">=</span> 1 <span class="comment">; Table #1 - initial position</span> git1 <span class="ohdr">ftgen</span> 1, 0, 128, 7, 0, 64, 1, 64, 0 <span class="comment">; Table #2 - masses</span> git2 <span class="ohdr">ftgen</span> 2, 0, 128, <span class="op">-</span>7, 1, 128, 1 <span class="comment">; Table #3 - stiffness</span> git3 <span class="ohdr">ftgen</span> 3, 0, 128, <span class="op">-</span>7, 0, 64, 100, 64, 0 <span class="comment">; Table #4 - damping</span> git4 <span class="ohdr">ftgen</span> 4, 0, 128, <span class="op">-</span>7, 1, 128, 1 <span class="comment">; Table #5 - initial velocity</span> git5 <span class="ohdr">ftgen</span> 5, 0, 128, <span class="op">-</span>7, 0, 128, 0 <span class="comment">; Instrument #1.</span> <span class="oblock">instr</span> 1 kamp <span class="opc">init</span> 20000 kpch <span class="opc">init</span> 220 ipos <span class="op">=</span> 1 imass <span class="op">=</span> 2 istiff <span class="op">=</span> 3 idamp <span class="op">=</span> 4 ivel <span class="op">=</span> 5 a1 <span class="opc">scantable</span> kamp, kpch, ipos, imass, istiff, idamp, ivel a2 <span class="opc">dcblock</span> a1 <span class="opc">out</span> a2 <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="comment">; Play Instrument #1 for ten seconds.</span> <span class="stamnt">i</span> 1 0 10 <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="See Also"> <a id="id3174900"></a> <h2>See Also</h2> <p> <a class="link" href="scanhammer.html" title="scanhammer"><em class="citetitle">scanhammer</em></a> </p> </div> <div class="refsect1" title="Credits"> <a id="id3174917"></a> <h2>Credits</h2> <p> </p> <table border="0" summary="Simple list" class="simplelist"> <tr> <td>Author: Matt Gilliard</td> </tr> <tr> <td>April 2002</td> </tr> </table> <p> </p> <p>Example written by Kevin Conder.</p> <p>New in version 4.20</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="scans.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="scanu.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">scans </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> scanu</td> </tr> </table> </div> </body> </html>