SuperCollider CLASSES (extension)

ComplexRes
ExtensionExtension

FM-modulable resonating filter
Inherits from: UGen : AbstractFunction : Object

Description

A resonating filter which can be modulated in its resonating frequency at audio rate without blowing up. Implements the filter structure found in

Julian Parker and Till Bovermann (2013): Dynamic FM synthesis using a network of complex resonator filters

Developed as part of the DEIND project.

Class Methods

*ar (in: 0, freq: 100, decay: 0.2)

Arguments:

in

input signal

freq

resonating frequency, can be modulated at audiorate.

decay

decaytime in seconds

Returns:

A UGen.

Inherited class methods

Instance Methods

Inherited instance methods

Examples

{ComplexRes.ar(Pulse.ar(0.1,0.001,0.1),50+ 5000*SinOsc.ar(50),0.5)}.play;

Feed forward network (core part): http://sccode.org/1-4V6

// FM network
dst = freqs.inject([filterIn, 0], {|in, freq, i|
  tmpIter = ComplexRes.ar( filterIn,
    freq + (fms[i] * in[0]),
    decays[i] );
  [ tmpIter * amps[i], in[1] + tmpIter ] });
dst = Mix.ar(dst * [1,  amps.sum * numNodes.reciprocal]);

Recursive network (core part): http://sccode.org/1-4V7

feedbacks = LocalIn.ar(numOscs);

filterIn = preAmp * in;
oscs = freqs.inject([], {|oscArray, freq, i|
  tmpOsc = ComplexRes.ar(filterIn,
    freq
    + oscArray.inject(0, {|sum, osc, j|
      // modulators from already instantiated oscs
      sum + (feedbacks[j] * modParams[i][j]) })
    + (numOscs - 1 - Array.iota(numOscs - (i))).inject(0, {|sum, g|
      // modulators from to be instantiated oscs
      sum + (feedbacks[g] * modParams[i][g]) }),
    decays[i]
  );
  oscArray ++ tmpOsc;
}); // end inject

LocalOut.ar(oscs); // feedback is pre-"fader"
filterOut = oscs * amps * postAmp;

Full code can be found on http://tai-studio.org/index.php/projects/deind/complexres/ (search for "Full code examples").