summaryrefslogtreecommitdiff
path: root/scoregens/gen32.xml
blob: 2f2afafde871403eef781fd31e27479fb8f9b802 (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
<refentry id="GEN32">
      <indexterm id="IndexGEN32"><primary>GEN32</primary></indexterm>
  <refmeta>
    <refentrytitle>GEN32</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>GEN32</refname>
    <refpurpose>
      Mixes any waveform, resampled with either FFT or linear interpolation.
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      This routine is similar to <link linkend="GEN31"><citetitle>GEN31</citetitle></link>, but allows specifying source ftable for each partial. Tables can be resampled either with FFT, or linear interpolation.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis><command>f</command> # time size  32  srca  pna stra phsa  srcb pnb strb phsb  ...</synopsis>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>srca, srcb</emphasis> -- source table number. A negative value can be used to read the table with linear interpolation (by default, the source waveform is transposed and phase shifted using FFT); this is less accurate, but faster, and allows non-integer and negative partial numbers.
    </para>

    <para>
      <emphasis>pna, pnb, ...</emphasis> -- partial number, must be a positive integer if source table number is positive (i.e. resample with FFT).
    </para>

    <para>
      <emphasis>stra, strb, ...</emphasis> -- amplitude scale
    </para>

    <para>
      <emphasis>phsa, phsb, ...</emphasis> -- start phase (0 to 1)
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the GEN32 routine. It uses the file <ulink url="examples/gen32.csd"><citetitle>gen32.csd</citetitle></ulink>.
      <example>
        <title>Example of the gen32 opcode.</title>
        <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>
          <xi:include href="examples-xml/gen32.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
      </example>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Author: &namerasmus;</para>
    <para>Programmer: &nameistvan;</para>
    <para>New in version 4.17</para>
  </refsect1>
</refentry>