SuperCollider CLASSES (extension)

NLFiltC
ExtensionExtension

Non-linear Filter
Inherits from: NLFiltN : UGen : AbstractFunction : Object

Description

Implements the filter Y{n} =a Y{n-1} + b Y{n-2} + d Y^2{n-l} + X{n} - c described in Dobson and sigmoid clipping. This filter is inherently unstable, so pick some sane values and move slowly from there.

Class Methods

*ar (input, a, b, d, c, l, mul: 1, add: 0)

From superclass: NLFiltN

*kr (input, a, b, d, c, l, mul: 1, add: 0)

From superclass: NLFiltN

Inherited class methods

Instance Methods

Inherited instance methods

Examples

(
{
    NLFiltC.ar(
        LFSaw.ar([120, 180], 0, mul:0.1),
        0.5,
        -0.04,
        0.8,
        0.2,
        LFCub.kr(0.2, [0, 0.5 * pi], 63, 103)
    )
}.play
)

(
{
    NLFiltC.ar(
        LFSaw.ar(XLine.kr([60, 90], [360, 540], 20), 0, mul:0.1),
        0.0,
        0.0,
        0.8,
        0.4,
        LFCub.kr(0.2, [0, 0.5 * pi], 3, 9)
    )
}.play
)

(
// internal mirroring keeps it from blowing up and makes for some gross distortion
// this is a little loud
{
    NLFiltC.ar(
        LFPulse.ar([100, 150], mul:0.1),
        LFNoise2.kr(1).range(0.3, 0.5),
        0.2,
        0.7,
        0.4,
        LFCub.kr(0.2, [0, 0.5 * pi], 100, 400)
    )
}.play
)

(
{
    NLFiltC.ar(
        LFPulse.ar([100, 150], mul:0.1),
        0.7,
        -0.2,
        0.9,
        0.2,
        LFCub.kr(0.2, [0, 0.5 * pi], 100, 400)
    )
}.play
)

(
{
    NLFiltC.ar(
        LFPulse.ar([100, 150], mul:0.1),
        0.35,
        -0.3,
        0.95,
        0.2,
        LFCub.kr(0.2, [0, 0.5 * pi], 50, 100)
    )
}.play
)