summaryrefslogtreecommitdiff
path: root/opcodes/scanu.xml
blob: bea7c4f5d312c2e608e0a5c32584c786dca5b618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<refentry id="scanu">
<indexterm id="IndexScanu"><primary>scanu</primary></indexterm>
  <refentryinfo><title>Signal Generators:Scanned Synthesis</title></refentryinfo>
  <refmeta>
    <refentrytitle>scanu</refentrytitle>
  </refmeta>


 
  <refnamediv>
    <refname>scanu</refname>
    <refpurpose>
      Compute the waveform and the wavetable for use in scanned synthesis.
          </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Compute the waveform and the wavetable for use in scanned synthesis.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>scanu</command> init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, \
      kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <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.
    </para>

    <para>
      <emphasis>ifnvel</emphasis> -- the ftable that contains the initial velocity for each mass.  It should have the same size as the intended mass number.
    </para>

    <para>
      <emphasis>ifnmass</emphasis> -- ftable that contains the mass of each mass.  It should have the same size as the intended mass number.
    </para>

    <para>
      <emphasis>ifnstif</emphasis> -- ftable that contains the spring stiffness of each connection. It should have the same size as the square of the intended mass number.  The data ordering is a row after row dump of the connection matrix of the system.
    </para>

    <para>
      <emphasis>ifncentr</emphasis> -- ftable that contains the centering force of each mass. It should have the same size as the intended mass number.
    </para>

    <para>
      <emphasis>ifndamp</emphasis> -- the ftable that contains the damping factor of each mass. It should have the same size as the intended mass number.
    </para>

    <para>
      <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).
    </para>

    <para>
      <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).
    </para>

    <para>
      <emphasis>idisp</emphasis> -- If 0, no display of the masses is provided.
    </para>

    <para>
      <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.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kmass</emphasis> -- scales the masses
    </para>

    <para>
      <emphasis>kstif</emphasis> -- scales the spring stiffness
    </para>

    <para>
      <emphasis>kcentr</emphasis> -- scales the centering force
    </para>

    <para>
      <emphasis>kdamp</emphasis> -- scales the damping
    </para>

    <para>
      <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>kstrngth</emphasis>.
    </para>

    <para>
      <emphasis>kstrngth</emphasis> -- power that the active hammer uses
    </para>

    <para>
      <emphasis>ain</emphasis> -- audio input that adds to the velocity of the masses. Amplitude should not be too great.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      For an example, see the documentation on <link linkend="scans"><citetitle>scans</citetitle></link>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &nameparis;</member>
        <member>MIT Media Lab</member>
        <member>Boston, Massachussetts USA</member>
        <member>March 2000</member>
      </simplelist>
    </para>

    <para>New in Csound version 4.05</para>
  </refsect1>
</refentry>