CSL
6.0
|
#include "CSL_Core.h"
Go to the source code of this file.
Classes | |
class | csl::FrequencyAmount |
FrequencyAmount – mix-in class with frequency and amount (BW) control inputs (may be constants or generators). amount (probably 0..1) is a generalised placeholder for bandwidth, resonance or radius, according to filter type or could equally be used as a kind of x,y location in the frequency domain. More... | |
class | csl::Filter |
Filter: the canonical-form n-pole/m-zero filter class. More... | |
class | csl::Butter |
Butterworth IIR (2nd order recursive) filter. More... | |
class | csl::Biquad |
General-purpose Biquad IIR (2nd order recursive) filter. This is simplified and optimized, but doesn't support dynamic or scalable controls. It uses inst vars rather than arrays for the coefficients. NB: peak gain (dB) is used only for the peak and shelf types) More... | |
class | csl::Formant |
Formant Filter with zeros at +-z and complex conjugate poles at +-omega. setupCoeffs() looks at the member var called normalize; if normalize is true, the filter zeros are placed at z = 1, z = -1, and the coefficients are then normalized to produce a constant unity peak gain. The resulting filter frequency response has a resonance at the given frequency. The closer the poles are to the unit-circle (radius close to one), the narrower the resulting resonance width. More... | |
class | csl::Notch |
Notch Filter with poles at +-z and complex conjugate zeros at +-omega. More... | |
class | csl::Allpass |
Allpass Filter with a pole and a zero at equal frequency and straddling the unit circle. Allows all freqs to pass through but messes with phases. More... | |
class | csl::Moog |
Moog-style resonant VCF class. More... | |
Namespaces | |
csl | |
AdditiveInstrument.h – Sum-of-sines synthesis instrument class. | |
Macros | |
#define | FILTER_MAX_COEFFICIENTS (16) |
Filters.h – CSL filter classes. More... | |
#define | BW_LOW_PASS 0 |
#define | BW_HIGH_PASS 1 |
#define | BW_BAND_PASS 2 |
#define | BW_BAND_STOP 3 |
#define | BW_LOW_SHELF 4 |
#define | BW_HIGH_SHELF 5 |
#define | PEAKING 6 |
#define | ALL_PASS 7 |
#define | DECLARE_FILTER_CONTROLS |
Declare the pointer to freq/bw buffers (if used) and current scale/offset values. More... | |
#define | LOAD_FILTER_CONTROLS |
Load the freq/bw-related values at the start. More... | |
Typedefs | |
typedef int | csl::FilterType |
#define FILTER_MAX_COEFFICIENTS (16) |
Filters.h – CSL filter classes.
The base Filter class can perform the generic filter equation based upon a set of feedback and feedforward coefficients. Subclasses of Filter implement the setupCoeffs method to build these coefficients according to different algorithms. The subclasses here mostly inherit from the FrequencyAmount controllable, which specifies a center frequency and an 'amount' which may variously be resonance, radius, bandwidth etc according to the algorithm.
OK so for example Butter class has a CenterFrequency port and a Bandwidth port, but pull_controls must be calling Controllables to do the pullInput()
Or, a generic filter that can take a multichannel UGen for each of aCoeffs and bCoeffs (i.e. multichannel ports), and other filter classes that wrap this and have Frequency and Bandwidth ports etc. This reduces the calls to setupCoeffs, because they'd actually be part of the nextBuffer instead
The reason is that the Scalable type approach & macros can't be extended to filter otherwise. ALSO, there are no similar macros for Effect; how should this work?
OK, the way he had it working here is filtering in place, i.e. no internal buffer, but if I inherit from Effect, I do have an internal buffer; this means the first thing to do is memcopy the input to the output, then pounce on that; or do the in-place stuff in the Effect port and finally copy to output, say with scale & offset performed there.
See the copyright notice and acknowledgment of authors in the file COPYRIGHT
#define BW_LOW_PASS 0 |
Definition at line 51 of file Filters.h.
Referenced by csl::Butter::setupCoeffs(), csl::Biquad::setupCoeffs(), testBiquads(), testFilters(), testSplitJoin1(), and testSplitJoin2().
#define BW_HIGH_PASS 1 |
Definition at line 52 of file Filters.h.
Referenced by csl::Butter::setupCoeffs(), csl::Biquad::setupCoeffs(), testBiquads(), testFilters(), testSplitJoin1(), and testSplitJoin2().
#define BW_BAND_PASS 2 |
Definition at line 53 of file Filters.h.
Referenced by filt_test(), csl::Butter::setupCoeffs(), csl::Biquad::setupCoeffs(), testBiquads(), testDynamicFilters(), testDynamicVoice(), testFancy_FM(), testFilters(), testMultiTap(), testNDynamicFilters(), testReverb(), testStereoverb(), and csl::VSTIO::VSTIO().
#define BW_BAND_STOP 3 |
Definition at line 54 of file Filters.h.
Referenced by csl::Butter::setupCoeffs(), csl::Biquad::setupCoeffs(), testBiquads(), and testFilters().
#define BW_LOW_SHELF 4 |
Definition at line 55 of file Filters.h.
Referenced by csl::Biquad::setupCoeffs(), and testBiquads().
#define BW_HIGH_SHELF 5 |
Definition at line 56 of file Filters.h.
Referenced by csl::Biquad::setupCoeffs(), and testBiquads().
#define PEAKING 6 |
Definition at line 57 of file Filters.h.
Referenced by csl::Biquad::setupCoeffs(), and testBiquads().
#define DECLARE_FILTER_CONTROLS |
Declare the pointer to freq/bw buffers (if used) and current scale/offset values.
Definition at line 64 of file Filters.h.
Referenced by csl::Filter::nextBuffer(), and csl::Moog::nextBuffer().
#define LOAD_FILTER_CONTROLS |
Load the freq/bw-related values at the start.
Definition at line 70 of file Filters.h.
Referenced by csl::Filter::nextBuffer(), and csl::Moog::nextBuffer().