<?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>xscanmap</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="xout.html" title="xout" /> <link rel="next" href="xscansmap.html" title="xscansmap" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">xscanmap</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="xout.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="xscansmap.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="xscanmap"> <a id="xscanmap"></a> <div class="titlepage"></div> <a id="IndexXscanmap" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">xscanmap</span> </h2> <p>xscanmap — Allows the position and velocity of a node in a scanned process to be read. </p> </div> <div class="refsect1" title="Description"> <a id="idp54331720"></a> <h2>Description</h2> <p> Allows the position and velocity of a node in a scanned process to be read. </p> </div> <div class="refsect1" title="Syntax"> <a id="idp54318520"></a> <h2>Syntax</h2> <pre class="synopsis">kpos, kvel <span class="command"><strong>xscanmap</strong></span> iscan, kamp, kvamp [, iwhich]</pre> </div> <div class="refsect1" title="Initialization"> <a id="idp54319576"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>iscan</em></span> -- which scan process to read </p> <p> <span class="emphasis"><em>iwhich</em></span> (optional) -- which node to sense. The default is 0. </p> </div> <div class="refsect1" title="Performance"> <a id="idp54370064"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>kamp</em></span> -- amount to amplify the <span class="emphasis"><em>kpos</em></span> value. </p> <p> <span class="emphasis"><em>kvamp</em></span> -- amount to amplify the <span class="emphasis"><em>kvel</em></span> value. </p> <p> The internal state of a node is read. This includes its position and velocity. They are amplified by the <span class="emphasis"><em>kamp</em></span> and <span class="emphasis"><em>kvamp</em></span> values. </p> </div> <div class="refsect1" title="Examples"> <a id="idp54372528"></a> <h2>Examples</h2> <p> Here is an example of the xscanmap opcode. It uses the file <a class="ulink" href="examples/xscanmap.csd" target="_top"><em class="citetitle">xscanmap.csd</em></a>. </p> <div class="example"> <a id="idp54373512"></a> <p class="title"> <strong>Example 1002. Example of the xscanmap 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> -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 xscanmap.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="comment">;the matrices can be found in /manual/examples</span> <span class="oblock">instr</span> 1 <span class="comment">; Plain scanned syntnesis</span> <span class="comment">; note - scanu display is turned off</span> a0 <span class="op">=</span> 0 <span class="opc">xscanu</span> 1, .01, 6, 2, "128<span class="op">-</span>stringcircularX", 4, 5, 2, .1, .1, <span class="op">-</span>.01, .1, .5, 0, 0, a0, 0, 0 a1 <span class="opc">xscans</span> p4, <span class="opc">cpspch</span>(p5), 7, 0, 3 k1,k2 <span class="opc">xscanmap</span> 0, 1000, 1000, 64 <span class="opc">display</span> k1, .25 <span class="comment">; note - display is updated every second</span> <span class="opc">outs</span> a1, a1 <span class="oblock">endin</span> <span class="oblock">instr</span> 2 <span class="comment">; Scan synthesis with audio injection and dual scan paths</span> <span class="comment">; note - scanu display is turned off</span> ain <span class="opc">diskin2</span> "fox.wav",1,0,1 ain <span class="opc">in</span> a0 <span class="op">=</span> ain<span class="op">/</span>10000 <span class="opc">xscanu</span> 1, .01, 6, 2, "128,8<span class="op">-</span>gridX", 14, 5, 2, .01, .05, <span class="op">-</span>.05, .1, .5, 0, 0, a0, 0, 0 a1 <span class="opc">xscans</span> p4, <span class="opc">cpspch</span>(p5), 7, 0, 2 a2 <span class="opc">xscans</span> p4, <span class="opc">cpspch</span>(p6), 77, 0, 3 k1,k2 <span class="opc">xscanmap</span> 0, 1000, 1000, 127 <span class="opc">display</span> k2, .5 <span class="comment">; note - display is updated ever 500ms</span> <span class="opc">outs</span> a1,a2 <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="comment">; Initial condition</span> <span class="comment">;f1 0 16 7 0 8 1 8 0</span> <span class="stamnt">f</span>1 0 128 7 0 64 1 64 0 <span class="comment">; Masses</span> <span class="stamnt">f</span>2 0 128 -7 1 128 1 <span class="comment">; Centering force</span> <span class="stamnt">f</span>4 0 128 -7 0 128 2 <span class="stamnt">f</span>14 0 128 -7 2 64 0 64 2 <span class="comment">; Damping</span> <span class="stamnt">f</span>5 0 128 -7 1 128 1 <span class="comment">; Initial velocity</span> <span class="stamnt">f</span>6 0 128 -7 -.0 128 .0 <span class="comment">; Trajectories</span> <span class="stamnt">f</span>7 0 128 -5 .001 128 128 <span class="stamnt">f</span>77 0 128 -23 "128-spiral-8,16,128,2,1over2" <span class="comment">; Sine</span> <span class="stamnt">f</span>9 0 1024 10 1 <span class="comment">;--------------------------------</span> <span class="comment">; Note list</span> <span class="stamnt">i</span>1 0 10 .9 7.00 <span class="stamnt">s</span> <span class="stamnt">i</span>2 0 10 1 8.00 6.00 <span class="stamnt">i</span>2 0 10 1 7.00 8.05 <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="idp54375792"></a> <h2>See Also</h2> <p> More information on Scanned Synthesis (as well as several other matrices) is available on the <a class="ulink" href="http://www.csounds.com/scanned/" target="_top"><em class="citetitle">Scanned Synthesis page</em></a> at cSounds.com. </p> <p> Also an article on these opcodes: <a class="ulink" href="http://www.csounds.com/stevenyi/scanned/yi_scannedSynthesis.html" target="_top"><em class="citetitle">http://www.csounds.com/stevenyi/scanned/yi_scannedSynthesis.html</em></a> , written by Steven Yi </p> </div> <div class="refsect1" title="Credits"> <a id="idp54377736"></a> <h2>Credits</h2> <p>Author: John ffitch</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="xout.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="xscansmap.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">xout </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> xscansmap</td> </tr> </table> </div> </body> </html>