Commit b82298f3 authored by Felipe Sateler's avatar Felipe Sateler

New upstream version 0.9.26

parent f78d0b9c
/*
Amp.cc
Copyright 2003-14 Tim Goetze <tim@quitte.de>
Copyright 2003-18 Tim Goetze <tim@quitte.de>
http://quitte.de/dsp/
......@@ -48,7 +48,7 @@ AmpVTS::activate()
lp.reset();
remain = 0;
compress.init (fs);
compress.init(fs,16);
compress.set_threshold(0);
compress.set_release(.0);
......@@ -188,18 +188,18 @@ AmpVTS::port_info [] =
{ "power", CTRL_IN, {DEFAULT_MID, 0, 1} },
/* 4 */
{ "tonestack", CTRL_IN | GROUP, {DEFAULT_1 | INTEGER, 0, 8}, DSP::ToneStack::presetdict},
{ "tonestack", CTRL_IN | GROUP, {DEFAULT_0 | INTEGER, 0, 8}, DSP::ToneStack::presetdict},
{ "bass", CTRL_IN | GROUP, {DEFAULT_LOW, 0, 1} },
{ "mid", CTRL_IN, {DEFAULT_1, 0, 1} },
{ "treble", CTRL_IN, {DEFAULT_HIGH, 0, 1} },
{ "mid", CTRL_IN, {DEFAULT_HIGH, 0, 1} },
{ "treble", CTRL_IN, {DEFAULT_1, 0, 1} },
/* 8 */
{ "attack", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} },
{ "squash", CTRL_IN, {DEFAULT_LOW, 0, 1} },
{ "attack", CTRL_IN | GROUP, {DEFAULT_LOW, 0, 1} },
{ "squash", CTRL_IN, {DEFAULT_HIGH, 0, 1} },
/* 10 */
{ "lowcut", CTRL_IN | GROUP, {DEFAULT_MID, 0, 1} },
{ "lowcut", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} },
{ "in", INPUT | AUDIO },
{ "out", OUTPUT | AUDIO },
......@@ -209,12 +209,9 @@ template <> void
Descriptor<AmpVTS>::setup()
{
Label = "AmpVTS";
Name = CAPS "AmpVTS - Idealised guitar amplification";
Maker = "Tim Goetze <tim@quitte.de>, David Yeh <dtyeh@ccrma.stanford.edu>";
Copyright = "2002-14";
/* fill port info and vtable */
autogen();
Maker = "Tim Goetze <tim@quitte.de>, David Yeh <dtyeh@ccrma.stanford.edu>";
}
......@@ -51,7 +51,7 @@ class AmpVTS
DSP::Oversampler<8,64> over8;
DSP::IIR2<sample_t> lp, biaslp;
DSP::HP1<sample_t> hp1, dc1, dc2; /* dc blockers */
DSP::HP1b<sample_t> hp1, dc1, dc2; /* dc blockers */
int model;
DSP::ToneStack tonestack;
......
/*
AutoFilter.cc
Copyright 2002-12 Tim Goetze <tim@quitte.de>
Copyright 2002-18 Tim Goetze <tim@quitte.de>
http://quitte.de/dsp/
......@@ -69,7 +69,7 @@ AutoFilter::activate()
void
AutoFilter::cycle (uint frames)
{
div_t qr = div (frames, blocksize);
div_t qr = div((int) frames, (int) blocksize);
int blocks = qr.quot;
if (qr.rem) ++blocks;
double over_blocks = 1./blocks;
......@@ -86,10 +86,9 @@ AutoFilter::cycle (uint frames)
float range = getport(4);
float env = getport(5);
lorenz.set_rate (2.268e-05*fs * .6*sq (getport(6)));
lorenz.set_rate (2.268e-05*fs*.3*sq(getport(6)));
float x = getport(7), z = 1-x;
sample_t * s = ports[8];
sample_t * d = ports[9];
......@@ -122,14 +121,14 @@ AutoFilter::cycle (uint frames)
/* filter it */
if (svf == 1)
{
svf1.set_f_Q (fmod, Q);
svf1.set_f_Q(fmod, Q);
double g = 1.8;
for (uint i = 0; i < n; ++i)
d[i] = svf1.process<DSP::Polynomial::tanh>(s[i]+normal,g);
}
else if (svf == 2)
{
svf2.set_f_Q (fmod, Q);
svf2.set_f_Q(fmod, Q);
double g = .84*(1-Q) + .21;
for (uint i = 0; i < n; ++i)
d[i] = svf2.process<DSP::Polynomial::tanh>(s[i]+normal,g);
......@@ -154,13 +153,13 @@ AutoFilter::port_info [] =
{ "filter", CTRL_IN | GROUP, {DEFAULT_1 | INTEGER, 0, 1},
"{0:'breathy',1:'fat'}", },
/* 2 */
{ "f (Hz)", CTRL_IN | GROUP, {LOG | DEFAULT_HIGH, 20, 3400} },
{ "f (Hz)", CTRL_IN | GROUP, {LOG | DEFAULT_HIGH, 20, 3800} },
{ "Q", CTRL_IN, {DEFAULT_LOW, 0, 1} },
/* 4 */
{ "depth", CTRL_IN | GROUP, {DEFAULT_1, 0, 1} },
{ "lfo/env", CTRL_IN, {DEFAULT_LOW, 0, 1} },
{ "rate", CTRL_IN | GROUP, {DEFAULT_LOW, 0, 1} },
{ "x/z", CTRL_IN, {DEFAULT_1, 0, 1} },
{ "shape", CTRL_IN, {DEFAULT_1, 0, 1} },
/* 8 */
{ "in", AUDIO_IN},
......@@ -171,12 +170,7 @@ template <> void
Descriptor<AutoFilter>::setup()
{
Label = "AutoFilter";
Name = CAPS "AutoFilter - Self-modulating resonant filter";
Maker = "Tim Goetze <tim@quitte.de>";
Copyright = "2004-14";
/* fill port info and vtable */
autogen();
}
0.9.26
* documentation updates
* DDDelay removed, needs more work
0.9.25
* potential gcc overoptimisation resulting in NaN in Kaiser window setup eliminated
(fix contributed by Jean Pierre Cimalando)
* updated to reflect changes to the div() and pow10f() functions in libc
* tonestack coefficient update reverted to original Yeh implementation
* Compress default measurement mode switched to RMS, attack range doubled
* Compress power and gain filter cutoff lowered to lessen intermodulation distortion
* Plate defaults changed
* volume control added to Spice hi and lo circuits, max gain reduced on both
* Wider output channels swapped
* AutoFilter rate lowered
* Scape parameters cleaned up and remapped, tune control removed
* Noisegate hysteresis increased to 180 ms
* dc-30 tonestack R3 20k -> 10k
* Eq10 Q changed to render optimally flat response at all zero band gain settings
* div port added to Click
* new plugin DDDelay
0.9.24
* documentation updates including switch to 48k for all spectra
* "twin" and "stanford" tonestack models swap places
......
/*
CabIII.cc
Copyright 2002-14 Tim Goetze <tim@quitte.de>
Copyright 2002-18 Tim Goetze <tim@quitte.de>
http://quitte.de/dsp/
......@@ -115,12 +115,7 @@ template <> void
Descriptor<CabinetIII>::setup()
{
Label = "CabinetIII";
Name = CAPS "CabinetIII - Simplistic loudspeaker cabinet emulation";
Maker = "Tim Goetze <tim@quitte.de>";
Copyright = "2002-14";
/* fill port info and vtable */
autogen();
}
/*
CabIV.cc
Copyright 2002-14 Tim Goetze <tim@quitte.de>
Copyright 2002-18 Tim Goetze <tim@quitte.de>
http://quitte.de/dsp/
......@@ -196,12 +196,7 @@ template <> void
Descriptor<CabinetIV>::setup()
{
Label = "CabinetIV";
Name = CAPS "CabinetIV - Idealised loudspeaker cabinet";
Maker = "Tim Goetze <tim@quitte.de>";
Copyright = "2012";
/* fill port info and vtable */
autogen();
}
......@@ -117,12 +117,7 @@ template <> void
Descriptor<ChorusI>::setup()
{
Label = "ChorusI";
Name = CAPS "ChorusI - Mono chorus/flanger";
Maker = "Tim Goetze <tim@quitte.de>";
Copyright = "GPL, 2004-13";
/* fill port info and vtable */
autogen();
}
......
/*
Click.cc
Copyright 2002-14 Tim Goetze <tim@quitte.de>
Copyright 2002-18 Tim Goetze <tim@quitte.de>
http://quitte.de/dsp/
......@@ -34,7 +34,7 @@
template <int Waves>
void
ClickStub<Waves>::initwave (int i, int16 * _wave, uint _N)
ClickStub<Waves>::initwave(int i, int16 * _wave, uint _N)
{
wave[i].data = _wave;
wave[i].N = _N;
......@@ -42,36 +42,38 @@ ClickStub<Waves>::initwave (int i, int16 * _wave, uint _N)
template <int Waves>
void
ClickStub<Waves>::cycle (uint frames)
ClickStub<Waves>::cycle(uint frames)
{
static double scale16 = 1./32768;
int p = Waves > 1 ? 1 : 0; /* port */
int p = Waves>1 ? 1 : 0; /* port */
int w = p ? getport(0) : 0; /* wave */
bpm = getport(p);
sample_t gain = getport(p+1);
int div = Waves>1 ? (int) getport(p+1) : 1;
div = div>0 ? div : 1;
sample_t gain = getport(p+p+1);
gain *= scale16 * gain;
lp.set (1 - getport (p+2));
lp.set(1 - getport(p+p+2));
sample_t * d = ports[p+3];
sample_t * d = ports[p+p+3];
while (frames)
while(frames)
{
if (period == 0)
if(period == 0)
{
period = (int) (fs * 60 / bpm);
period = (int) (fs * 60 / (div*bpm));
played = 0;
}
uint n = min (frames, period);
uint n = min(frames, period);
if (played < wave[w].N)
if(played < wave[w].N)
{
n = min (n, wave[w].N - played);
n = min(n, wave[w].N - played);
for (uint i = 0; i < n; ++i)
for(uint i = 0; i < n; ++i)
{
double x = gain * wave[w].data[played+i];
x = lp.process (x);
x = lp.process(x);
d[i] = x;
}
......@@ -79,7 +81,7 @@ ClickStub<Waves>::cycle (uint frames)
}
else
{
for (uint i = 0; i < n; ++i)
for(uint i = 0; i < n; ++i)
d[i] = lp.process(normal);
}
......@@ -108,48 +110,48 @@ Click::initsimple()
};
DSP::LP1<sample_t> lp1;
lp1.set_f (800*over_fs);
lp1.set_f(800*over_fs);
DSP::IIR2<sample_t> lp;
DSP::RBJ::LP (8000*over_fs, .2, lp);
DSP::RBJ::LP(8000*over_fs, .2, lp);
DSP::IIR2<sample_t> peaks[Peaks];
for (int i = 0; i < Peaks; ++i)
for(int i = 0; i < Peaks; ++i)
{
/* tune to g' = 784 Hz */
float f = .8740245*_peaks[i][0]*over_fs;
float g = _peaks[i][1];
DSP::RBJ::BP (f, 22*g, peaks[i]);
DSP::RBJ::BP(f, 22*g, peaks[i]);
}
DSP::IIR2<sample_t> bp;
DSP::RBJ::BP (150*over_fs, 3.8, bp);
DSP::RBJ::BP(150*over_fs, 3.8, bp);
DSP::IIR2<sample_t> post;
DSP::RBJ::PeakingEQ (1000*over_fs, 1.8, 24, post);
DSP::RBJ::PeakingEQ(1000*over_fs, 1.8, 24, post);
int n = (int) (fs * 2800. / 44100.);
int16 * click = new int16 [n];
int16 * click = new int16[n];
DSP::White white;
int m = 8;
sample_t mi = 1./m;
sample_t x;
for (int i = 0; i < n; ++i)
for(int i = 0; i < n; ++i)
{
if (i < m) /* simplistic noise excitation signal */
if(i < m) /* simplistic noise excitation signal */
x = .5 * white.get() * (m-i)*mi;
x = lp.process (x);
x = lp.process(x);
double a = x;
for (int j = 0; j < Peaks; ++j)
a += peaks[j].process_bp (x);
a = post.process (a);
for(int j = 0; j < Peaks; ++j)
a += peaks[j].process_bp(x);
a = post.process(a);
/* add some ring-modulated noisz */
a += a*bp.process(white.get());
click[i] = (int16) (a * 32767.);
x = 0;
}
initwave (0, click, n);
initwave(0, click, n);
}
/* using parfilt models to generate the click */
......@@ -162,66 +164,66 @@ Click::initparfilt()
DSP::IIR2v4Bank<128> bank;
ParModel<128,1> * model;
if (fs > 120000) model = &waves_click_wav_176000;
else if (fs > 60000) model = &waves_click_wav_88200;
if(fs > 120000) model = &waves_click_wav_176000;
else if(fs > 60000) model = &waves_click_wav_88200;
else model = &waves_click_wav_44100;
bank.set_a (1, model->a1);
bank.set_a (2, model->a2);
bank.set_b (1, model->b1);
bank.set_b (2, model->b2);
bank.set_a(1, model->a1);
bank.set_a(2, model->a2);
bank.set_b(1, model->b1);
bank.set_b(2, model->b2);
bank.reset();
int n = (int) (fs*2800/44100);
int16 * click = new int16 [n];
int16 * click = new int16[n];
DSP::IIR2<sample_t> hp;
DSP::RBJ::HP (1520*over_fs, .7, hp);
DSP::RBJ::HP(1520*over_fs, .7, hp);
DSP::White white;
int m = 3;
sample_t mi = 1./m;
sample_t x;
for (int i = 0; i < n; ++i)
for(int i = 0; i < n; ++i)
{
if (i < m) /* simplistic noise excitation signal */
if(i < m) /* simplistic noise excitation signal */
x = .5 * white.get() * (m-i)*mi;
x = v4f_sum (bank.process_bp(v4f(x)));
x = v4f_sum(bank.process_bp(v4f(x)));
x = hp.process(x);
click[i] = (int16) (x * 32767.);
x = 0;
}
initwave (1, click, n);
initwave(1, click, n);
}
void
Click::initsine()
{
float f = 2*784;
DSP::Sine sin (2*M_PI*f*over_fs);
DSP::Sine sin(2*M_PI*f*over_fs);
int n = (int) (12*fs/f);
int m = 6*n/4;
int16 * click = new int16 [m];
int16 * click = new int16[m];
DSP::IIR2<sample_t> lp;
DSP::RBJ::BP (f*over_fs,2.5,lp);
DSP::RBJ::BP(f*over_fs,2.5,lp);
float a = .4 * 32767;
for (int i = 0; i < n; ++i)
for(int i = 0; i < n; ++i)
{
sample_t x = a*sin.get();
x = lp.process(x);
click[i] = (int16) (x);
}
for (int i = n; i < m; ++i)
for(int i = n; i < m; ++i)
{
sample_t x = lp.process(NOISE_FLOOR);
click[i] = (int16) (x);
}
initwave (2, click, m);
initwave(2, click, m);
}
void
......@@ -229,32 +231,29 @@ Click::initdirac()
{
int16 * dirac = new int16[1];
*dirac = 32767;
initwave (3, dirac, 1);
initwave(3, dirac, 1);
}
template <> void
Descriptor<Click>::setup()
{
Label = "Click";
Name = CAPS "Click - Metronome";
Maker = "Tim Goetze <tim@quitte.de>";
Copyright = "2004-14";
/* fill port info and vtable */
autogen();
}
/* //////////////////////////////////////////////////////////////////////// */
PortInfo
Click::port_info [] =
Click::port_info[] =
{
{ "model", CTRL_IN, {INTEGER | DEFAULT_1, 0, 3},
"{0:'box',1:'stick',2:'beep',3:'dirac'}" },
{ "bpm", CTRL_IN | GROUP, {DEFAULT_LOW, 4, 240} },
{ "volume", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} },
{ "damping", CTRL_IN, {DEFAULT_HIGH, 0, 1} },
{ "bpm", CTRL_IN | GROUP, {DEFAULT_LOW, 4, 240}, },
{ "div", CTRL_IN | GROUP, {INTEGER | DEFAULT_MIN, 1, 4},
"{1:'♩',2:'♪♪',3:'♪♪♪',4:'♬♬'}" },
{ "vol", CTRL_IN | GROUP, {DEFAULT_LOW, 0, 1} },
{ "tone", CTRL_IN, {DEFAULT_HIGH, 0, 1} },
{ "out", OUTPUT | AUDIO}
};
......@@ -262,7 +261,7 @@ Click::port_info [] =
/* //////////////////////////////////////////////////////////////////////// */
PortInfo
CEO::port_info [] =
CEO::port_info[] =
{
{ "ppm", CTRL_IN, {DEFAULT_LOW, 30, 232} },
{ "volume", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1}},
......@@ -281,14 +280,14 @@ CEO::init()
float s = fs/8000., dx = 1/s;
int n = (int) (s*m);
int16 * wave = new int16 [n];
int16 * wave = new int16[n];
DSP::IIR2<sample_t> lp;
/* suppress aliasing with an additional lowpass; also slight gain at 3 kHz */
DSP::RBJ::LP (3000*over_fs,1.5,lp);
DSP::RBJ::LP(3000*over_fs,1.5,lp);
#if 1 /* linear */
float x = 0;
for (int i = 0; i < n-1; ++i)
for(int i = 0; i < n-1; ++i)
{
int j = (int) x;
float a = x-j;
......@@ -299,7 +298,7 @@ CEO::init()
}
#else /* cubic, unneeded */
float x = 0;
for (int i=0; i < n; ++i, x+=dx)
for(int i=0; i < n; ++i, x+=dx)
{
int j = (int) x;
float f = x-j;
......@@ -320,19 +319,14 @@ CEO::init()
}
#endif
initwave (0, wave, n-1);
initwave(0, wave, n-1);
}
template <> void
Descriptor<CEO>::setup()
{
Label = "CEO";
Name = CAPS "CEO - Chief Executive Oscillator";
Maker = "Tim Goetze <tim@quitte.de>";
Copyright = "2004-12";
/* fill port info and vtable */
autogen();
}
......
/*
Compress.cc
Copyright 2011-14 Tim Goetze <tim@quitte.de>
Copyright 2011-18 Tim Goetze <tim@quitte.de>
http://quitte.de/dsp/
......@@ -32,17 +32,17 @@ template <int Channels>
void
CompressStub<Channels>::activate()
{
compress.peak.init (fs);
compress.rms.init (fs);
compress.peak.init(fs,4);
compress.rms.init(fs,4);
remain = 0;
}
template <int Channels>
void
CompressStub<Channels>::cycle (uint frames)
CompressStub<Channels>::cycle(uint frames)
{
int c = getport(0);
if (c == 0) subcycle<DSP::CompressPeak> (frames, compress.peak);
if(c == 0) subcycle<DSP::CompressPeak> (frames, compress.peak);
else subcycle<DSP::CompressRMS> (frames, compress.rms);
}
......@@ -52,17 +52,17 @@ struct NoSat { sample_t process(sample_t x) { return x; } };
template <int Channels>
template <class Comp>
void
CompressStub<Channels>::subcycle (uint frames, Comp & comp)
CompressStub<Channels>::subcycle(uint frames, Comp & comp)
{
static NoSat none;
int s = getport(1);
if (s == 1) subsubcycle<Comp,CompSat2>
if(s == 1) subsubcycle<Comp,CompSat2>
(frames, comp, saturate[0].two, saturate[1].two);
else if (s == 2) subsubcycle<Comp,CompSat4>
else if(s == 2) subsubcycle<Comp,CompSat4>
(frames, comp, saturate[0].four, saturate[1].four);
#if 0
else if (s == 3) subsubcycle<Comp,CompSat8>
else if(s == 3) subsubcycle<Comp,CompSat8>
(frames, comp, saturate[0].eight, saturate[1].eight);
#endif
else subsubcycle<Comp, NoSat>
......@@ -72,13 +72,13 @@ CompressStub<Channels>::subcycle (uint frames, Comp & comp)
template <int Channels>
template <class Comp, class Sat>
void
CompressStub<Channels>::subsubcycle (uint frames, Comp & comp, Sat & satl, Sat & satr)
CompressStub<Channels>::subsubcycle(uint frames, Comp & comp, Sat & satl, Sat & satr)
{
comp.set_threshold (pow(getport(2), 1.6));
comp.set_threshold(pow(getport(2), 1.6));
sample_t strength = pow(getport(3), 1.4); /* more resolution in lower range */
comp.set_attack (getport(4));
comp.set_release (getport(5));
sample_t gain_out = db2lin (getport (6));
comp.set_attack(getport(4));
comp.set_release(getport(5));
sample_t gain_out = db2lin(getport(6));
sample_t * sl = ports[Stereo ? 8 : 8]; /* ;) */
sample_t * sr = ports[Stereo ? 9 : 8];
......@@ -88,22 +88,22 @@ CompressStub<Channels>::subsubcycle (uint frames, Comp & comp, Sat & satl, Sat &
sample_t state = 1;
while (frames)
while(frames)
{
if (remain == 0)
if(remain == 0)
{
remain = comp.blocksize;
comp.start_block(strength);
state = min(state,comp.gain.state);
}
uint n = min (frames, remain);
uint n = min(frames, remain);
for (uint i=0; i<n; ++i)
for(uint i=0; i<n; ++i)
{
sample_t xl = sl[i], xr = sr[i];
if (Stereo)
if(Stereo)
comp.store(xl, xr);
else
comp.store(xl);
......@@ -111,11 +111,11 @@ CompressStub<Channels>::subsubcycle (uint frames, Comp & comp, Sat & satl, Sat &
sample_t gain = gain_out*comp.get();
xl = satl.process(xl*gain);
if (Stereo)
if(Stereo)
xr = satr.process(xr*gain);
dl[i] = xl;
if (Stereo)
if(Stereo)
dr[i] = xr;
}
......@@ -134,7 +134,7 @@ CompressStub<Channels>::subsubcycle (uint frames, Comp & comp, Sat & satl, Sat &
PortInfo
Compress::port_info [] =
{
{ "measure", CTRL_IN, {INTEGER | DEFAULT_0, 0, 1}, "{0:'peak',1:'rms'}" },
{ "measure", CTRL_IN, {INTEGER | DEFAULT_1, 0, 1}, "{0:'peak',1:'rms'}" },
{ "mode", CTRL_IN | GROUP, {INTEGER | DEFAULT_1, 0, 2},
"{0:'no limiting',1:'saturating 2x',2:'saturating 4x',3:'saturating 4x128'}" },
/* 2 */
......@@ -143,7 +143,7 @@ Compress::port_info [] =
{ "attack", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} },
{ "release", CTRL_IN, {DEFAULT_MID, 0, 1} },
/* 6 */
{ "gain (dB)", CTRL_IN | GROUP, {DEFAULT_MID, -12, 18} },
{ "gain (dB)", CTRL_IN | GROUP, {DEFAULT_MID, -12, 36} },
{ "state (dB)", CONTROL|OUTPUT| GROUP, {DEFAULT_0,-144,0} },
{ "in", INPUT | AUDIO, {BOUNDED, -1, 1} },
......@@ -154,12 +154,7 @@ template <> void
Descriptor<Compress>::setup()
{
Label = "Compress";
Name = CAPS "Compress - Compressor and saturating limiter";
Maker = "Tim Goetze <tim@quitte.de>";
Copyright = "2011-14";
/* fill port info and vtable */
autogen();
}
......@@ -168,7 +163,7 @@ Descriptor<Compress>::setup()
PortInfo
CompressX2::port_info [] =
{
{ "measure", CTRL_IN, {INTEGER | DEFAULT_0, 0, 1},
{ "measure", CTRL_IN, {INTEGER | DEFAULT_1, 0, 1},
"{0:'peak',1:'rms'}" },
{ "mode", CTRL_IN | GROUP, {INTEGER | DEFAULT_1, 0, 2},
"{0:'linear',1:'saturating 2x',2:'saturating 4x',3:'saturating 4x128'}" },
......@@ -176,7 +171,7 @@ CompressX2::port_info [] =
{ "strength", CTRL_IN, {DEFAULT_LOW, 0, 1} },
{ "attack", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} },
{ "release", CTRL_IN, {DEFAULT_MID, 0, 1} },
{ "gain (dB)", CTRL_IN | GROUP, {DEFAULT_MID, -12, 18} },
{ "gain (dB)", CTRL_IN | GROUP, {DEFAULT_MID, -12, 36} },
{ "state (dB)", CONTROL|OUTPUT| GROUP, {DEFAULT_0,-144,0} },
{ "in.l", INPUT | AUDIO },
{ "in.r", INPUT | AUDIO },
......@@ -188,12 +183,7 @@ template <> void
Descriptor<CompressX2>::setup()
{
Label = "CompressX2";
Name = CAPS "CompressX2 - Stereo compressor and saturating limiter";
Maker = "Tim Goetze <tim@quitte.de>";
Copyright = "2011-14";
/* fill port info and vtable */
autogen();
}
/*
Compress.h
Copyright 2013 Tim Goetze <tim@quitte.de>
Copyright 2013-18 Tim Goetze <tim@quitte.de>
http://quitte.de/dsp/
......@@ -42,42 +42,46 @@ class CompSaturate
/* antialias filters */
DSP::FIRUpsampler<FIRSize, Over> up;
DSP::FIRn<FIRSize> down;
/* take off some edge */
DSP::LP1<sample_t> lp;
public:
void init (double fs)
void init(double fs)
{
/* going a bit lower than nominal with fc */
double f = .7 * M_PI/Over;
/* going a bit lower than half fs with fc */