Debian Codegraph @

opcodes/scanu.xml

raw symbols SCIP
1
2 <refentry id="scanu">
3 <indexterm id="IndexScanu"><primary>scanu</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Scanned Synthesis</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>scanu</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>scanu</refname>
11 <refpurpose>
12 Compute the waveform and the wavetable for use in scanned synthesis.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>Plugin opcode in scansyn.</para>
19 <para>
20 Compute the waveform and the wavetable for use in scanned synthesis.
21 </para>
22 </refsect1>
23
24 <refsect1>
25 <title>Syntax</title>
26 <synopsis><command>scanu</command> init, irate, ifndisplace,
27 ifnmass, ifnmatrix, ifncentr, ifndamp, kmass, kmtrxstiff, kcentr,
28 kdamp, ileft, iright, kpos, kdisplace, ain, idisp, id</synopsis>
29 </refsect1>
30
31 <refsect1>
32 <title>Initialization</title>
33 <para>
34 <emphasis>init</emphasis> -- the initial position of the masses. If this is a negative number, then the absolute of <emphasis>init</emphasis> signifies the table to use as a hammer shape. If <emphasis>init</emphasis> &gt; 0, the length of it should be the same as the intended mass number, otherwise it can be anything.
35 </para>
36 <para>
37 <emphasis>irate</emphasis> -- the amount of time between successive updates of the mass state. Kind of like the sample period of the system. If the number is big, the string will update at a slow rate showing little timbral variability; otherwise it will change rapidly resulting in a more dynamic sound.
38 </para>
39 <para>
40 <emphasis>ifndisplace</emphasis> -- the ftable that contains the
41 initial velocity for each mass. It should have the same size as
42 the intended mass number.
43 </para>
44
45 <para>
46 <emphasis>ifnmass</emphasis> -- ftable that contains the mass of each mass. It should have the same size as the intended mass number.
47 </para>
48
49 <para>
50 <emphasis>ifnmatrix</emphasis> -- ftable that contains the spring
51 stiffness of each connection. It should have the same size as
52 the square of the intended mass number. The data ordering is a
53 row after row dump of the connection matrix of the system.
54 </para>
55
56 <para>
57 <emphasis>ifncentr</emphasis> -- ftable that contains the centering force of each mass. It should have the same size as the intended mass number.
58 </para>
59
60 <para>
61 <emphasis>ifndamp</emphasis> -- the ftable that contains the damping factor of each mass. It should have the same size as the intended mass number.
62 </para>
63
64 <para>
65 <emphasis>ileft</emphasis> -- If <emphasis>init</emphasis> &lt; 0, the position of the left hammer (<emphasis>ileft</emphasis> = 0 is hit at leftmost, <emphasis>ileft</emphasis> = 1 is hit at rightmost). Ignored when <emphasis>init</emphasis> &gt; 0.
66 </para>
67
68 <para>
69 <emphasis>iright</emphasis> -- If <emphasis>init</emphasis> &lt; 0, the position of the right hammer (<emphasis>iright</emphasis> = 0 is hit at leftmost, <emphasis>iright</emphasis> = 1 is hit at rightmost). Ignored when <emphasis>init</emphasis> &gt; 0.
70 </para>
71
72 <para>
73 <emphasis>idisp</emphasis> -- If 0, no display of the masses is provided.
74 </para>
75
76 <para>
77 <emphasis>id</emphasis> -- If positive, the ID of the opcode. This will be used to point the scanning opcode to the proper waveform maker. If this value is negative, the absolute of this value is the wavetable on which to write the waveshape. That wavetable can be used later from an other opcode to generate sound. The initial contents of this table will be destroyed.
78 </para>
79 </refsect1>
80
81 <refsect1>
82 <title>Performance</title>
83 <para>
84 <emphasis>kmass</emphasis> -- scales the masses
85 </para>
86
87 <para>
88 <emphasis>kmtrxstiff</emphasis> -- scales the spring stiffness.
89 </para>
90
91 <para>
92 <emphasis>kcentr</emphasis> -- scales the centering force
93 </para>
94
95 <para>
96 <emphasis>kdamp</emphasis> -- scales the damping
97 </para>
98
99 <para>
100 <emphasis>kpos</emphasis> -- position of an active hammer along the string (<emphasis>kpos</emphasis> = 0 is leftmost, <emphasis>kpos</emphasis> = 1 is rightmost). The shape of the hammer is determined by <emphasis>init</emphasis> and the power it pushes with is <emphasis>kdisplace</emphasis>.
101 </para>
102
103 <para>
104 <emphasis>kdisplace</emphasis> -- power that the active hammer uses.
105 </para>
106
107 <para>
108 <emphasis>ain</emphasis> -- audio input that adds to the velocity of the masses. Amplitude should not be too great.
109 </para>
110
111 <note>
112 <title>Note</title>
113 <para>Both scanu and scanu2 are capable of reading the binary (.matrxB) and text (.matrxT) matrix format. However, using scanu2 is to be preferred because of its accuracy and better sound quality.
114 </para>
115 </note>
116 </refsect1>
117
118 <refsect1>
119 <title>Examples</title>
120 <para>
121 Here is an example of the scanu opcode. It uses the file <ulink url="examples/scanu.csd"><citetitle>scanu.csd</citetitle></ulink>.
122 <example>
123 <title>Example of the scanu opcode.</title>
124 <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
125 <xi:include href="examples-xml/scanu.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
126 </example>
127 </para>
128 <para>
129 Here is another example of the scanu opcode. It uses the file <ulink url="examples/scanu-2.csd"><citetitle>scanu-2.csd</citetitle></ulink>.
130 <example>
131 <title>Second example of the scanu opcode.</title>
132 <xi:include href="examples-xml/scanu-2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
133 </example>
134 </para>
135 <para>
136 A musical example featuring the scanu opcode: <ulink url="examples/musical/Scanu_Shengzheng_Zhang.csd"><citetitle>Scanu_Shengzheng_Zhang.csd</citetitle></ulink> by Shengzheng Zhang. This musical example also needs <ulink url="examples/MIDIpad.mid"><citetitle>MIDIpad.mid</citetitle></ulink>.
137 </para>
138 </refsect1>
139
140 <refsect1>
141 <title>See also</title>
142 <para><link linkend="SiggenScanTop"><citetitle>Scanned Synthesis</citetitle></link></para>
143 <para> More information on the Scanned Synthesis opcodes: <ulink url="http://www.csounds.com/stevenyi/scanned/yi_scannedSynthesis.html"><citetitle>Working with Scanned Synthesis</citetitle></ulink>, written by Steven Yi, and some <ulink url="http://www.csounds.com/scanned/"><citetitle>tutorials</citetitle></ulink> by Richard Boulanger.</para>
144 </refsect1>
145
146 <refsect1>
147 <title>Credits</title>
148 <para>
149 <simplelist>
150 <member>Author: &nameparis;</member>
151 <member>MIT Media Lab</member>
152 <member>Boston, Massachussetts USA</member>
153 <member>March 2000</member>
154 </simplelist>
155 </para>
156
157 <para>New in Csound version 4.05</para>
158 </refsect1>
159 </refentry>