summaryrefslogtreecommitdiff
path: root/opcodes/flooper.xml
blob: 954ce4fcad9ede351b1e7246ac05fabeee11868f (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
<refentry id="flooper">
<indexterm id="Indexflooper"><primary>flooper</primary></indexterm>
  <refentryinfo><title>Signal Generators:Sample Playback</title></refentryinfo>
  <refmeta>
    <refentrytitle>flooper</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>flooper</refname>
    <refpurpose>
      Function-table-based crossfading looper.
    </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Description</title>
    <para>
   This opcode reads audio from a function table and plays it back in a loop with user-defined
   start time, duration and crossfade time. It also allows the pitch of the loop to be controlled,
   including reversed playback. It accepts non-power-of-two tables, such as deferred-allocation
   GEN01 tables.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>asig <command>flooper</command> kamp, kpitch, istart, idur, ifad, ifn</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
        <para>
      <emphasis>istart </emphasis> -- loop start pos in seconds
    </para>
    <para>
      <emphasis>idur </emphasis> -- loop duration in seconds
    </para>
        <para>
      <emphasis>ifad </emphasis> -- crossfade duration in seconds
    </para>
        <para>
      <emphasis>ifn </emphasis> -- function table number, generally created using GEN01
    </para>

</refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>asig</emphasis> -- output sig
    </para>
    <para>
      <emphasis>kamp</emphasis> -- amplitude control </para>
    <para>
      <emphasis>kpitch</emphasis> -- pitch control (transposition ratio); negative values play the loop back in reverse
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      <example>
        <programlisting>
aout <emphasis role="opc">flooper</emphasis> 16000, 1, 1, 4, 0.05, 1  <emphasis role="comment">; loop starts at 1 sec, for 4 secs, 0.05 crossfade</emphasis>
     <emphasis role="opc">out</emphasis>     aout</programlisting>
      </example>
    </para>

    <para>
The example above shows the basic operation of <emphasis>flooper</emphasis>. Pitch can
be controlled at the k-rate, as well as amplitude. The example assumes
table 1 to contain at least 5.05 seconds of audio (4 secs loop duration,
starting 1 sec into the table, using 0.05 secs after the loop end for the
crossfade).
    </para>

    <para>
      Here is another example of the flooper opcode. It uses the file <ulink url="examples/flooper.csd"><citetitle>flooper.csd</citetitle></ulink> and <ulink url="examples/fox.wav"><citetitle>fox.wav</citetitle></ulink>.
      <example>
       
        <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/flooper.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
      </example>
    </para>
  </refsect1>
  
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namevictor;</member>
        <member>April 2005 </member>
      </simplelist>
    </para>

    <para>New plugin in version 5</para>
    <para>April 2005.</para>
  </refsect1>
</refentry>