Klank:
Filter:
Classes | UGens > Generators > Deterministic | UGens > Filters > Linear

Klank : UGen : AbstractFunction : Object

Bank of resonators
Source: FSinOsc.sc

Description

Klank is a bank of fixed frequency resonators which can be used to simulate the resonant modes of an object. Each mode is given a ring time, which is the time for the mode to decay by 60 dB.

NOTE: for dynamic changes of parameters refer to DynKlank
NOTE: The amplitude of the resulting signal depends on the server's sample rate. See Ringz: Interaction with sample rate for details.

Klank is a bank of Ringz filters. Formlet is equivalent to Ringz.ar(... decay...) - Ring.ar(... attack...). Therefore, a more efficient way to make a bank of fixed-parameter Formlet filters is Klank(`decaySpecs, ...) - Klank.ar(`attackSpecs, ...) or Klank.ar(`specs, ..., decayscale: decay) - Klank.ar(`specs, ..., decayscale: attack).

Class Methods

Klank.ar(specificationsArrayRef, input, freqscale: 1.0, freqoffset: 0.0, decayscale: 1.0)

Arguments:

specificationsArrayRef

A Ref to an Array of three Arrays:

frequencies:
An Array of filter frequencies.
amplitudes:
an Array of filter amplitudes, or nil. If nil, then amplitudes default to 1.0.
ring times:
an Array of 60 dB decay times in seconds for the filters.

All subarrays, if not nil, should have the same length.

input

The excitation input to the resonant filter bank.

freqscale

A scale factor multiplied by all frequencies at initialization time.

freqoffset

An offset added to all frequencies at initialization time.

decayscale

A scale factor multiplied by all ring times at initialization time.

Discussion:

The parameters in specificationsArrayRef can't be changed after it has been started. For a modulatable but less efficient version, see DynKlank.

Inherited class methods

Instance Methods

Inherited instance methods

Examples

Four resonators each at maximum amplitude of 1.0 and ring times of 1 second, different exciters and no scaling:

NOTE: Watch the ` before the opening bracket of the parameter array! Also see Multichannel Expansion

Three resonators at maximum amplitude of 1.0, random frequency and ring times. Excited by two pulses at 2 and 2.5 Hz:

Multichannel Expansion via an array of specs (note the ` before the opening bracket of the parameter array!):

A SynthDef that generates 4 partials used in different configurations:

Advanced examples: