summaryrefslogtreecommitdiff
path: root/opcodes/nlfilt2.xml
blob: d0036ede2387c5b895f4d3d29c2c991f0528a53f (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
126
<refentry id="nlfilt2">
<indexterm id="IndexNlfilt2"><primary>nlfilt2</primary></indexterm>
  <refentryinfo><title>Signal Modifiers:Specialized Filters</title></refentryinfo>
  <refmeta>
    <refentrytitle>nlfilt2</refentrytitle>
  </refmeta>


 
  <refnamediv>
    <refname>nlfilt2</refname>
    <refpurpose>
      A filter with a non-linear effect and blowup protection.
          </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Implements the filter:
      <literallayout>
Y{n} =tanh(a Y{n-1} + b Y{n-2} + d Y^2{n-L} + X{n} - C)
      </literallayout>
      described in Dobson and Fitch (ICMC'96) as modified by Risto Holopainen.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ares <command>nlfilt2</command> ain, ka, kb, kd, kC, kL</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <orderedlist>
        <listitem>
          <para>
            Non-linear effect. The range of parameters are:
            <literallayout>
  a = b = 0
  d = 0.8, 0.9, 0.7
  C = 0.4, 0.5, 0.6
  L = 20
            </literallayout>
            This affects the lower register most but there are audible effects over the whole range. We suggest that it may be useful for coloring drums, and for adding arbitrary highlights to notes.
          </para>
        </listitem>

        <listitem>
          <para>
            Low Pass with non-linear. The range of parameters are:
            <literallayout>
  a = 0.4
  b = 0.2
  d = 0.7
  C = 0.11
  L = 20, ... 200
            </literallayout>
            There are instability problems with this variant but the effect is more pronounced of the lower register, but is otherwise much like the pure comb. Short values of <emphasis>L</emphasis> can add attack to a sound.
          </para>
        </listitem>

        <listitem>
          <para>
            High Pass with non-linear. The range of parameters are:
            <literallayout>
  a = 0.35
  b = -0.3
  d = 0.95
  C = 0,2, ... 0.4
  L = 200
            </literallayout>
          </para>
        </listitem>

        <listitem>
          <para>
            High Pass with non-linear. The range of parameters are:
            <literallayout>
  a = 0.7
  b = -0.2, ... 0.5
  d = 0.9
  C = 0.12, ... 0.24
  L = 500, 10
            </literallayout>
            The high pass version is less likely to oscillate. It adds scintillation to medium-high registers. With a large delay <emphasis>L</emphasis> it is a little like a reverberation, while with small values there appear to be formant-like regions. There are arbitrary color changes and resonances as the pitch changes. Works well with individual notes.
          </para>
        </listitem>
      </orderedlist>
    </para>

    <warning>
      <title>Warning</title>
      <para>
        The &quot;useful&quot; ranges of parameters are not yet mapped.
      </para>
    </warning>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the nlfilt2 opcode. It uses the file <ulink url="examples/nlfilt2.csd"><citetitle>nlfilt2.csd</citetitle></ulink>.
      <example>
        <title>Example of the nlfilt2 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/nlfilt2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
      </example>
    </para>
  </refsect1>
   
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namejohn;</member>
        <member>University of Bath/Codemist Ltd.</member>
        <member>Bath, UK</member>
        <member>2012</member>
      </simplelist>
    </para>
    <para>New in version 5.19</para>
  </refsect1>
</refentry>