integrated new version of CAPS and fixed miscompilation with GCC 4.3
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms-mv@726 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
/*
|
||||
Amp.cc
|
||||
|
||||
Copyright 2003-6 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2003-7
|
||||
Tim Goetze <tim@quitte.de>
|
||||
David Yeh <dtyeh@ccrma.stanford.edu> (Tone Stack in TS models)
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
tube amplifier models
|
||||
Tube amplifier models
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
@@ -31,9 +34,8 @@
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
AmpStub::init (double _fs, bool adjust_downsampler)
|
||||
AmpStub::init (bool adjust_downsampler)
|
||||
{
|
||||
fs = _fs;
|
||||
dc_blocker.set_f (10. / fs);
|
||||
|
||||
/* going a bit lower than nominal with fc */
|
||||
@@ -62,22 +64,20 @@ AmpStub::init (double _fs, bool adjust_downsampler)
|
||||
s *= OVERSAMPLE;
|
||||
for (int i = 0; i < up.n; ++i)
|
||||
up.c[i] *= s;
|
||||
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
AmpIII::init (double _fs)
|
||||
AmpIII::init()
|
||||
{
|
||||
this->AmpStub::init (_fs, false);
|
||||
this->AmpStub::init (false);
|
||||
|
||||
/* need to filter out dc before the power amp stage, which is running at
|
||||
* the oversampled rate */
|
||||
dc_blocker.set_f (10. / (fs * OVERSAMPLE));
|
||||
|
||||
DSP::RBJ::LoShelve (200 / (_fs), .2, -3, filter.a, filter.b);
|
||||
DSP::RBJ::LoShelve (200 / fs, .2, -3, filter.a, filter.b);
|
||||
}
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
@@ -86,10 +86,10 @@ AmpIII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
d_sample gain = *ports[1];
|
||||
d_sample temp = *ports[2] * tube.scale;
|
||||
d_sample gain = getport(1);
|
||||
d_sample temp = getport(2) * tube.scale;
|
||||
|
||||
drive = *ports[3] * .5;
|
||||
drive = getport(3) * .5;
|
||||
i_drive = 1 / (1 - drive);
|
||||
|
||||
d_sample * d = ports[4];
|
||||
@@ -104,7 +104,7 @@ AmpIII::one_cycle (int frames)
|
||||
/* recursive fade to prevent zipper noise from the 'gain' knob */
|
||||
if (g == 0) g = current.g;
|
||||
|
||||
double one_over_n = 1. / frames;
|
||||
double one_over_n = frames > 0 ? 1. / frames : 1;
|
||||
double gf = pow (current.g / g, one_over_n);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
@@ -123,14 +123,13 @@ AmpIII::one_cycle (int frames)
|
||||
down.store (
|
||||
power_transfer (
|
||||
dc_blocker.process (
|
||||
tube.transfer_clip (up.pad (o)))));
|
||||
normal + tube.transfer_clip (up.pad (o)))));
|
||||
|
||||
F (d, i, a, adding_gain);
|
||||
|
||||
g *= gf;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
current.g = g;
|
||||
}
|
||||
|
||||
@@ -173,9 +172,9 @@ Descriptor<AmpIII>::setup()
|
||||
Label = "AmpIII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: AmpIII - Tube amp emulation";
|
||||
Name = CAPS "AmpIII - Tube amp";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -184,31 +183,31 @@ Descriptor<AmpIII>::setup()
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
AmpIV::init (double _fs)
|
||||
AmpIV::init()
|
||||
{
|
||||
this->AmpStub::init (_fs, false);
|
||||
this->AmpStub::init (false);
|
||||
|
||||
/* need to filter out dc before the power amp stage, which is running at
|
||||
* the oversampled rate */
|
||||
dc_blocker.set_f (10. / (fs * OVERSAMPLE));
|
||||
|
||||
tone.init (_fs);
|
||||
tone.init (fs);
|
||||
}
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void
|
||||
AmpIV::one_cycle (int frames)
|
||||
{
|
||||
double one_over_n = 1. / frames;
|
||||
double one_over_n = frames > 0 ? 1. / frames : 1;
|
||||
|
||||
d_sample * s = ports[0];
|
||||
|
||||
d_sample gain = *ports[1];
|
||||
d_sample temp = *ports[2] * tube.scale;
|
||||
|
||||
d_sample gain = getport(1);
|
||||
d_sample temp = getport(2) * tube.scale;
|
||||
|
||||
tone.start_cycle (ports + 3, one_over_n);
|
||||
|
||||
drive = *ports[7] * .5;
|
||||
drive = getport(7) * .5;
|
||||
i_drive = 1 / (1 - drive);
|
||||
|
||||
d_sample * d = ports[8];
|
||||
@@ -241,14 +240,13 @@ AmpIV::one_cycle (int frames)
|
||||
down.store (
|
||||
power_transfer (
|
||||
dc_blocker.process (
|
||||
tube.transfer_clip (up.pad (o)))));
|
||||
normal + tube.transfer_clip (up.pad (o)))));
|
||||
|
||||
F (d, i, a, adding_gain);
|
||||
|
||||
g *= gf;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
current.g = g;
|
||||
}
|
||||
|
||||
@@ -307,9 +305,9 @@ Descriptor<AmpIV>::setup()
|
||||
Label = "AmpIV";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: AmpIV - Tube amp emulation + tone controls";
|
||||
Name = CAPS "AmpIV - Tube amp + tone controls";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -318,52 +316,50 @@ Descriptor<AmpIV>::setup()
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
AmpV::init (double _fs)
|
||||
AmpV::init()
|
||||
{
|
||||
this->AmpStub::init (_fs, false);
|
||||
this->AmpStub::init (false);
|
||||
|
||||
/* need to filter out dc before the power amp stage, which is running at
|
||||
* the oversampled rate */
|
||||
dc_blocker.set_f (10. / (_fs * OVERSAMPLE));
|
||||
dc_blocker.set_f (10. / (fs * OVERSAMPLE));
|
||||
|
||||
DSP::RBJ::LoShelve (210. / _fs, .2, -1, filter[0].a, filter[0].b);
|
||||
DSP::RBJ::LoShelve (4200. / _fs, 1.2, +6, filter[1].a, filter[1].b);
|
||||
DSP::RBJ::LoShelve (420. / _fs, .2, +2, filter[2].a, filter[2].b);
|
||||
DSP::RBJ::LoShelve (210. / fs, .2, -1, filter[0].a, filter[0].b);
|
||||
DSP::RBJ::LoShelve (4200. / fs, 1.2, +6, filter[1].a, filter[1].b);
|
||||
DSP::RBJ::LoShelve (420. / fs, .2, +2, filter[2].a, filter[2].b);
|
||||
|
||||
/* power supply capacitor */
|
||||
/* power supply cap */
|
||||
for (int i = 0; i < 2; ++i)
|
||||
DSP::RBJ::LP (10. / _fs, .3, power_cap[i].a, power_cap[i].b);
|
||||
DSP::RBJ::LP (10. / fs, .3, power_cap[i].a, power_cap[i].b);
|
||||
}
|
||||
|
||||
static int _turn = 0;
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void
|
||||
AmpV::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
d_sample gain = *ports[1];
|
||||
d_sample gain = getport(1);
|
||||
|
||||
if (*ports[2] != cut)
|
||||
{
|
||||
cut = *ports[2];
|
||||
cut = getport(2);
|
||||
DSP::RBJ::LoShelve (210. / fs, .2, cut, filter[0].a, filter[0].b);
|
||||
}
|
||||
if (*ports[3] != tone)
|
||||
{
|
||||
tone = *ports[3];
|
||||
tone = getport(3);
|
||||
double f = tone * tone * 8400 + 420;
|
||||
double q = tone * .4 + .2;
|
||||
double db = tone * 2 + 2;
|
||||
DSP::RBJ::LoShelve (f / fs, q, db, filter[2].a, filter[2].b);
|
||||
}
|
||||
|
||||
drive = *ports[4] * .5;
|
||||
drive = getport(4) * .5;
|
||||
i_drive = 1 / (1 - drive);
|
||||
|
||||
#define MAX_WATTS port_info[5].range.UpperBound
|
||||
d_sample sag = (MAX_WATTS - *ports[5]) / MAX_WATTS;
|
||||
d_sample sag = (MAX_WATTS - getport(5)) / MAX_WATTS;
|
||||
sag = .6 * sag * sag;
|
||||
|
||||
d_sample * d = ports[6];
|
||||
@@ -373,13 +369,15 @@ AmpV::one_cycle (int frames)
|
||||
double g = current.g;
|
||||
|
||||
current.g = max (gain < 1 ? gain : pow (20, gain - 1), .000001);
|
||||
if (0 && (++_turn & 127) == 0)
|
||||
#if 0
|
||||
if (++_turn & 127) == 0)
|
||||
fprintf (stderr, "supply = %.3f sag = %.3f\n", supply, sag);
|
||||
#endif
|
||||
|
||||
if (g == 0) g = current.g;
|
||||
|
||||
/* recursive fade to prevent zipper noise from the 'gain' knob */
|
||||
double one_over_n = 1. / frames;
|
||||
double one_over_n = frames > 0 ? 1. / frames : 1;
|
||||
double gf = pow (current.g / g, one_over_n);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
@@ -409,7 +407,7 @@ AmpV::one_cycle (int frames)
|
||||
down.store (
|
||||
power_transfer (
|
||||
dc_blocker.process (
|
||||
tube.transfer_clip (
|
||||
normal + tube.transfer_clip (
|
||||
up.pad (o)))));
|
||||
}
|
||||
|
||||
@@ -418,8 +416,8 @@ AmpV::one_cycle (int frames)
|
||||
/* integrate for an approximation of cumulative output power */
|
||||
supply += sag * fabs (a) + normal;
|
||||
/* filter integrated power consumption */
|
||||
for (int i = 0; i < 2; ++i)
|
||||
supply = 0.9 * (power_cap[i].process (supply));
|
||||
for (int j = 0; j < 2; ++j)
|
||||
supply = 0.9 * (power_cap[j].process (supply));
|
||||
|
||||
g *= gf;
|
||||
normal = -normal;
|
||||
@@ -475,12 +473,165 @@ Descriptor<AmpV>::setup()
|
||||
Label = "AmpV";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: AmpV - Refined tube amp emulation";
|
||||
Name = CAPS "AmpV - Tube amp";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
AmpVTS::init()
|
||||
{
|
||||
this->AmpStub::init (false);
|
||||
|
||||
/* need to filter out dc before the power amp stage, which is running at
|
||||
* the oversampled rate */
|
||||
dc_blocker.set_f (10. / (fs * OVERSAMPLE));
|
||||
|
||||
/* power supply capacitance */
|
||||
for (int i = 0; i < 2; ++i)
|
||||
DSP::RBJ::LP (10. / fs, .3, power_cap[i].a, power_cap[i].b);
|
||||
|
||||
tonestack.init (fs);
|
||||
}
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void
|
||||
AmpVTS::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
tonestack.start_cycle (ports + 1, 2);
|
||||
d_sample gain = getport(2);
|
||||
|
||||
drive = getport(6) * .5;
|
||||
i_drive = 1 / (1 - drive);
|
||||
|
||||
d_sample sag = 1 - max (0.0001, min (1, getport(7)));
|
||||
sag = .6 * sag * sag; /* map to log space makes slider better */
|
||||
|
||||
d_sample * d = ports[8];
|
||||
|
||||
*ports[9] = OVERSAMPLE;
|
||||
|
||||
double g = current.g;
|
||||
|
||||
if (gain < 1)
|
||||
current.g = max (gain, .001);
|
||||
else
|
||||
{
|
||||
gain -= 1;
|
||||
gain *= gain;
|
||||
current.g = pow (10, gain);
|
||||
}
|
||||
|
||||
/* recursive fade to prevent zipper noise from the 'gain' knob */
|
||||
double one_over_n = frames > 0 ? 1. / frames : 1;
|
||||
double gf = pow (current.g / g, one_over_n);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register double a = s[i];
|
||||
register double v = 3 - supply;
|
||||
v = v * v * .06 + .46;
|
||||
|
||||
a = tube.transfer (a);
|
||||
a = tonestack.process (a + normal);
|
||||
|
||||
a = g * (a + supply * .001);
|
||||
|
||||
a = v * tube.transfer_clip (up.upsample (a));
|
||||
a = power_transfer (dc_blocker.process (a));
|
||||
|
||||
a = down.process (a);
|
||||
|
||||
{
|
||||
for (int o = 1; o < OVERSAMPLE; ++o)
|
||||
down.store (
|
||||
power_transfer (
|
||||
dc_blocker.process (
|
||||
normal + tube.transfer_clip (
|
||||
up.pad (o)))));
|
||||
}
|
||||
|
||||
F (d, i, a, adding_gain);
|
||||
|
||||
/* integrate for an approximation of cumulative output power */
|
||||
supply += sag * fabs (a) + normal;
|
||||
/* filter integrated power consumption */
|
||||
for (int j = 0; j < 2; ++j)
|
||||
supply = 0.9 * (power_cap[j].process (supply + normal));
|
||||
|
||||
g *= gf;
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
current.g = g;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
AmpVTS::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{BOUNDED, -1, 1}
|
||||
}, {
|
||||
"model",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0 | INTEGER, 0, 5} /* no way to set dyn at compile t */
|
||||
}, {
|
||||
"gain",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_HIGH, 0, 3}
|
||||
}, {
|
||||
"bass",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"mid",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_1, 0, 1}
|
||||
}, {
|
||||
"treble",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_HIGH, 0, 1}
|
||||
}, {
|
||||
"drive",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_LOW, 0.0001, 1}
|
||||
}, {
|
||||
"watts",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_HIGH, 0.0001, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"latency",
|
||||
OUTPUT | CONTROL,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<AmpVTS>::setup()
|
||||
{
|
||||
UniqueID = 2592;
|
||||
Label = "AmpVTS";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = CAPS "AmpVTS - Tube amp + Tone stack";
|
||||
Maker = "David Yeh <dtyeh@ccrma.stanford.edu> & Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
Amp.h
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
oversampled tube amplifier emulation.
|
||||
Oversampled tube amplifier emulation.
|
||||
|
||||
*/
|
||||
/*
|
||||
@@ -41,14 +41,12 @@
|
||||
#include "dsp/RBJ.h"
|
||||
#include "dsp/Eq.h"
|
||||
|
||||
#include "dsp/ToneStack.h"
|
||||
|
||||
class AmpStub
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
|
||||
/* oscillating NOISE_FLOOR, added to prevent denormals in signal */
|
||||
d_sample normal;
|
||||
|
||||
DSP::TwelveAX7_3 tube;
|
||||
|
||||
d_sample drive, i_drive;
|
||||
@@ -78,7 +76,7 @@ class AmpStub
|
||||
down (FIR_SIZE, up.c)
|
||||
{ }
|
||||
|
||||
void init (double _fs, bool adjust_downsampler = false);
|
||||
void init (bool adjust_downsampler = false);
|
||||
|
||||
inline d_sample power_transfer (d_sample a)
|
||||
{
|
||||
@@ -93,18 +91,16 @@ class PreampIII
|
||||
{
|
||||
public:
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
DSP::BiQuad filter;
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [5];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate()
|
||||
{
|
||||
current.g = 1;
|
||||
@@ -133,18 +129,16 @@ class AmpIII
|
||||
{
|
||||
public:
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
DSP::BiQuad filter;
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [6];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate()
|
||||
{
|
||||
current.g = 1;
|
||||
@@ -176,9 +170,8 @@ class ToneControls
|
||||
{
|
||||
public:
|
||||
d_sample eq_gain[4];
|
||||
DSP::Eq<4,4> eq;
|
||||
DSP::Eq<4> eq;
|
||||
static PreampBand bands[4];
|
||||
d_sample normal;
|
||||
|
||||
public:
|
||||
void init (double _fs);
|
||||
@@ -220,16 +213,14 @@ class PreampIV
|
||||
ToneControls tone;
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [9];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
@@ -252,16 +243,14 @@ class AmpIV
|
||||
ToneControls tone;
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [10];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate()
|
||||
{
|
||||
current.g = 1;
|
||||
@@ -291,7 +280,7 @@ class AmpV
|
||||
{
|
||||
public:
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
DSP::BiQuad filter[3];
|
||||
|
||||
@@ -303,12 +292,10 @@ class AmpV
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [7];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate()
|
||||
{
|
||||
current.g = 1;
|
||||
@@ -336,4 +323,53 @@ class AmpV
|
||||
}
|
||||
};
|
||||
|
||||
/* /////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
class AmpVTS
|
||||
: public AmpStub
|
||||
{
|
||||
public:
|
||||
DSP::ToneStack tonestack;
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void one_cycle (int frames);
|
||||
|
||||
d_sample cut, tone;
|
||||
|
||||
/* supply voltage sag */
|
||||
d_sample supply;
|
||||
DSP::BiQuad power_cap[2];
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init();
|
||||
void activate()
|
||||
{
|
||||
current.g = 1;
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
power_cap[i].reset();
|
||||
|
||||
up.reset();
|
||||
down.reset();
|
||||
dc_blocker.reset();
|
||||
|
||||
cut = 2;
|
||||
supply = 0.;
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func, OVERSAMPLE> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func, OVERSAMPLE> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _AMP_H_ */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Cabinet.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -73,11 +73,10 @@ CabinetI::models [] =
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
CabinetI::init (double fs)
|
||||
CabinetI::init()
|
||||
{
|
||||
h = 0;
|
||||
model = 0;
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -92,7 +91,7 @@ CabinetI::switch_model (int m)
|
||||
a = models[m].a;
|
||||
b = models[m].b;
|
||||
|
||||
gain = models[m].gain * DSP::db2lin (*ports[2]);
|
||||
gain = models[m].gain * DSP::db2lin (getport(2));
|
||||
|
||||
memset (x, 0, sizeof (x));
|
||||
memset (y, 0, sizeof (y));
|
||||
@@ -101,7 +100,7 @@ CabinetI::switch_model (int m)
|
||||
void
|
||||
CabinetI::activate()
|
||||
{
|
||||
switch_model ((int) *ports[1]);
|
||||
switch_model ((int) getport(1));
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
@@ -110,10 +109,10 @@ CabinetI::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
int m = (int) *ports[1];
|
||||
int m = (int) getport (1);
|
||||
if (m != model) switch_model (m);
|
||||
|
||||
d_sample g = models[model].gain * DSP::db2lin (*ports[2]);
|
||||
d_sample g = models[model].gain * DSP::db2lin (getport(2));
|
||||
double gf = pow (g / gain, 1 / (double) frames);
|
||||
|
||||
d_sample * d = ports[3];
|
||||
@@ -140,8 +139,6 @@ CabinetI::one_cycle (int frames)
|
||||
F (d, i, gain * out, adding_gain);
|
||||
gain *= gf;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -177,9 +174,9 @@ Descriptor<CabinetI>::setup()
|
||||
Label = "CabinetI";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: CabinetI - Loudspeaker cabinet emulation";
|
||||
Name = CAPS "CabinetI - Loudspeaker cabinet emulation";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -190,7 +187,7 @@ Descriptor<CabinetI>::setup()
|
||||
#include "Cabinet-Models32.h"
|
||||
|
||||
void
|
||||
CabinetII::init (double fs)
|
||||
CabinetII::init()
|
||||
{
|
||||
if (fs < 46000)
|
||||
models = models44100;
|
||||
@@ -203,7 +200,6 @@ CabinetII::init (double fs)
|
||||
|
||||
h = 0;
|
||||
model = 0;
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -218,7 +214,7 @@ CabinetII::switch_model (int m)
|
||||
a = models[m].a;
|
||||
b = models[m].b;
|
||||
|
||||
gain = models[m].gain * DSP::db2lin (*ports[2]);
|
||||
gain = models[m].gain * DSP::db2lin (getport(2));
|
||||
|
||||
memset (x, 0, sizeof (x));
|
||||
memset (y, 0, sizeof (y));
|
||||
@@ -227,8 +223,7 @@ CabinetII::switch_model (int m)
|
||||
void
|
||||
CabinetII::activate()
|
||||
{
|
||||
switch_model ((int) *ports[1]);
|
||||
gain = models[model].gain * DSP::db2lin (*ports[2]);
|
||||
switch_model ((int) getport(1));
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
@@ -237,10 +232,10 @@ CabinetII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
int m = (int) *ports[1];
|
||||
int m = (int) getport (1);
|
||||
if (m != model) switch_model (m);
|
||||
|
||||
d_sample g = models[model].gain * DSP::db2lin (*ports[2]);
|
||||
d_sample g = models[model].gain * DSP::db2lin (getport(2));
|
||||
double gf = pow (g / gain, 1 / (double) frames);
|
||||
|
||||
d_sample * d = ports[3];
|
||||
@@ -267,8 +262,6 @@ CabinetII::one_cycle (int frames)
|
||||
F (d, i, gain * out, adding_gain);
|
||||
gain *= gf;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -304,9 +297,9 @@ Descriptor<CabinetII>::setup()
|
||||
Label = "CabinetII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: CabinetII - Refined loudspeaker cabinet emulation";
|
||||
Name = CAPS "CabinetII - Refined loudspeaker cabinet emulation";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -54,6 +54,7 @@ typedef struct {
|
||||
} Model32;
|
||||
|
||||
class CabinetI
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
d_sample gain;
|
||||
@@ -66,18 +67,13 @@ class CabinetI
|
||||
cabinet_float * a, * b;
|
||||
cabinet_float x[16], y[16];
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
void init();
|
||||
|
||||
void activate();
|
||||
|
||||
@@ -96,6 +92,7 @@ class CabinetI
|
||||
* 44.1 / 48 / 88.2 / 96 kHz sample rates */
|
||||
|
||||
class CabinetII
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
d_sample gain;
|
||||
@@ -113,19 +110,15 @@ class CabinetII
|
||||
cabinet_float * a, * b;
|
||||
cabinet_float x[32], y[32];
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Chorus.cc
|
||||
|
||||
Copyright 2004, 2005 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2004-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -40,27 +40,24 @@ ChorusI::one_cycle (int frames)
|
||||
double ms = .001 * fs;
|
||||
|
||||
double t = time;
|
||||
time = *ports[1] * ms;
|
||||
time = getport(1) * ms;
|
||||
double dt = (time - t) * one_over_n;
|
||||
|
||||
double w = width;
|
||||
width = *ports[2] * ms;
|
||||
width = getport(2) * ms;
|
||||
/* clamp, or we need future samples from the delay line */
|
||||
if (width >= t - 3) width = t - 3;
|
||||
double dw = (width - w) * one_over_n;
|
||||
|
||||
if (rate != *ports[3])
|
||||
lfo.set_f (max (rate = *ports[3], .000001), fs, lfo.get_phase());
|
||||
lfo.set_f (max (rate = getport(3), .000001), fs, lfo.get_phase());
|
||||
|
||||
double blend = *ports[4];
|
||||
double ff = *ports[5];
|
||||
double fb = *ports[6];
|
||||
double blend = getport(4);
|
||||
double ff = getport(5);
|
||||
double fb = getport(6);
|
||||
|
||||
d_sample * d = ports[7];
|
||||
|
||||
/* flip 'renormal' addition constant */
|
||||
normal = -normal;
|
||||
|
||||
DSP::FPTruncateMode truncate;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
@@ -142,9 +139,9 @@ Descriptor<ChorusI>::setup()
|
||||
Label = "ChorusI";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: ChorusI - Mono chorus/flanger";
|
||||
Name = CAPS "ChorusI - Mono chorus/flanger";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -162,34 +159,31 @@ StereoChorusI::one_cycle (int frames)
|
||||
double ms = .001 * fs;
|
||||
|
||||
double t = time;
|
||||
time = *ports[1] * ms;
|
||||
time = getport(1) * ms;
|
||||
double dt = (time - t) * one_over_n;
|
||||
|
||||
double w = width;
|
||||
width = *ports[2] * ms;
|
||||
width = getport(2) * ms;
|
||||
/* clamp, or we need future samples from the delay line */
|
||||
if (width >= t - 1) width = t - 1;
|
||||
double dw = (width - w) * one_over_n;
|
||||
|
||||
if (rate != *ports[3] && phase != *ports[4])
|
||||
{
|
||||
rate = *ports[3];
|
||||
phase = *ports[4];
|
||||
rate = getport(3);
|
||||
phase = getport(4);
|
||||
double phi = left.lfo.get_phase();
|
||||
left.lfo.set_f (max (rate, .000001), fs, phi);
|
||||
right.lfo.set_f (max (rate, .000001), fs, phi + phase * M_PI);
|
||||
}
|
||||
|
||||
double blend = *ports[5];
|
||||
double ff = *ports[6];
|
||||
double fb = *ports[7];
|
||||
double blend = getport(5);
|
||||
double ff = getport(6);
|
||||
double fb = getport(7);
|
||||
|
||||
d_sample * dl = ports[8];
|
||||
d_sample * dr = ports[9];
|
||||
|
||||
/* flip 'renormal' addition constant */
|
||||
normal = -normal;
|
||||
|
||||
/* to go sure (on i386) that the fistp instruction does the right thing
|
||||
* when looking up fractional sample indices */
|
||||
DSP::FPTruncateMode truncate;
|
||||
@@ -273,9 +267,9 @@ Descriptor<StereoChorusI>::setup()
|
||||
Label = "StereoChorusI";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: StereoChorusI - Stereo chorus/flanger";
|
||||
Name = CAPS "StereoChorusI - Stereo chorus/flanger";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -293,11 +287,11 @@ ChorusII::one_cycle (int frames)
|
||||
double ms = .001 * fs;
|
||||
|
||||
double t = time;
|
||||
time = *ports[1] * ms;
|
||||
time = getport(1) * ms;
|
||||
double dt = (time - t) * one_over_n;
|
||||
|
||||
double w = width;
|
||||
width = *ports[2] * ms;
|
||||
width = getport(2) * ms;
|
||||
/* clamp, or we need future samples from the delay line */
|
||||
if (width >= t - 3) width = t - 3;
|
||||
double dw = (width - w) * one_over_n;
|
||||
@@ -305,15 +299,12 @@ ChorusII::one_cycle (int frames)
|
||||
if (rate != *ports[3])
|
||||
set_rate (*ports[3]);
|
||||
|
||||
double blend = *ports[4];
|
||||
double ff = *ports[5];
|
||||
double fb = *ports[6];
|
||||
double blend = getport(4);
|
||||
double ff = getport(5);
|
||||
double fb = getport(6);
|
||||
|
||||
d_sample * d = ports[7];
|
||||
|
||||
/* flip 'renormal' addition constant */
|
||||
normal = -normal;
|
||||
|
||||
DSP::FPTruncateMode truncate;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
@@ -384,9 +375,9 @@ Descriptor<ChorusII>::setup()
|
||||
Label = "ChorusII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: ChorusII - Mono chorus/flanger modulated by a fractal";
|
||||
Name = CAPS "ChorusII - Mono chorus/flanger modulated by a fractal";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -404,27 +395,24 @@ StereoChorusII::one_cycle (int frames)
|
||||
double ms = .001 * fs;
|
||||
|
||||
double t = time;
|
||||
time = *ports[1] * ms;
|
||||
time = getport(1) * ms;
|
||||
double dt = (time - t) * one_over_n;
|
||||
|
||||
double w = width;
|
||||
width = *ports[2] * ms;
|
||||
width = getport(2) * ms;
|
||||
/* clamp, or we need future samples from the delay line */
|
||||
if (width >= t - 1) width = t - 1;
|
||||
double dw = (width - w) * one_over_n;
|
||||
|
||||
set_rate (*ports[3]);
|
||||
|
||||
double blend = *ports[4];
|
||||
double ff = *ports[5];
|
||||
double fb = *ports[6];
|
||||
double blend = getport(4);
|
||||
double ff = getport(5);
|
||||
double fb = getport(6);
|
||||
|
||||
d_sample * dl = ports[7];
|
||||
d_sample * dr = ports[8];
|
||||
|
||||
/* flip 'renormal' addition constant */
|
||||
normal = -normal;
|
||||
|
||||
/* to go sure (on i386) that the fistp instruction does the right thing
|
||||
* when looking up fractional sample indices */
|
||||
DSP::FPTruncateMode truncate;
|
||||
@@ -507,9 +495,9 @@ Descriptor<StereoChorusII>::setup()
|
||||
Label = "StereoChorusII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: StereoChorusII - Stereo chorus/flanger modulated by a fractal";
|
||||
Name = CAPS "StereoChorusII - Stereo chorus/flanger modulated by a fractal";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -38,11 +38,10 @@
|
||||
#include "dsp/RBJ.h"
|
||||
|
||||
class ChorusStub
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample time, width, rate;
|
||||
d_sample normal; /* denormal protection */
|
||||
};
|
||||
|
||||
class ChorusI
|
||||
@@ -54,20 +53,15 @@ class ChorusI
|
||||
DSP::DelayTapA tap;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
d_sample * ports [8];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
void init()
|
||||
{
|
||||
fs = _fs;
|
||||
rate = .15;
|
||||
delay.init ((int) (.040 * fs));
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void activate()
|
||||
@@ -98,7 +92,6 @@ class StereoChorusI
|
||||
: public ChorusStub
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample rate;
|
||||
d_sample phase;
|
||||
|
||||
@@ -110,22 +103,17 @@ class StereoChorusI
|
||||
} left, right;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
d_sample * ports [10];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
void init()
|
||||
{
|
||||
fs = _fs;
|
||||
rate = .15;
|
||||
phase = .5; /* pi */
|
||||
|
||||
delay.init ((int) (.040 * fs));
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void activate()
|
||||
@@ -200,7 +188,7 @@ class ChorusII
|
||||
DSP::Delay delay;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
void set_rate (d_sample r)
|
||||
{
|
||||
@@ -213,15 +201,10 @@ class ChorusII
|
||||
}
|
||||
|
||||
public:
|
||||
d_sample * ports [8];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
void init()
|
||||
{
|
||||
fs = _fs;
|
||||
normal = NOISE_FLOOR;
|
||||
delay.init ((int) (.040 * fs));
|
||||
for (int i = 0; i < Taps; ++i)
|
||||
taps[i].init (fs);
|
||||
@@ -254,7 +237,6 @@ class StereoChorusII
|
||||
: public ChorusStub
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample rate;
|
||||
d_sample phase;
|
||||
|
||||
@@ -279,18 +261,14 @@ class StereoChorusII
|
||||
}
|
||||
|
||||
public:
|
||||
d_sample * ports [10];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
void init()
|
||||
{
|
||||
fs = _fs;
|
||||
phase = .5; /* pi */
|
||||
|
||||
delay.init ((int) (.040 * fs));
|
||||
normal = NOISE_FLOOR;
|
||||
|
||||
left.fractal.init (.001, frandom());
|
||||
right.fractal.init (.001, frandom());
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Click.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -27,28 +27,26 @@
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "click.h"
|
||||
#include "money.h"
|
||||
#include "waves/click.h"
|
||||
#include "waves/money.h"
|
||||
|
||||
#include "Click.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
ClickStub::init (double _fs, float * _wave, int _N)
|
||||
ClickStub::init (float * _wave, int _N)
|
||||
{
|
||||
fs = _fs;
|
||||
wave = _wave;
|
||||
N = _N;
|
||||
bpm = -1;
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
ClickStub::one_cycle (int frames)
|
||||
{
|
||||
bpm = *ports[0];
|
||||
d_sample gain = *ports[1] * *ports[1];
|
||||
bpm = getport(0);
|
||||
d_sample gain = getport(1) * *ports[1];
|
||||
lp.set (1 - *ports[2]);
|
||||
|
||||
d_sample * d = ports[3];
|
||||
@@ -120,9 +118,9 @@ ClickStub::port_info [] =
|
||||
#define LENGTH(W) ((int) (sizeof (W) / sizeof (float)))
|
||||
|
||||
void
|
||||
Click::init (double fs)
|
||||
Click::init()
|
||||
{
|
||||
this->ClickStub::init (fs, click, LENGTH (click));
|
||||
this->ClickStub::init (click, LENGTH (click));
|
||||
}
|
||||
|
||||
template <> void
|
||||
@@ -132,9 +130,9 @@ Descriptor<Click>::setup()
|
||||
Label = "Click";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Click - Metronome";
|
||||
Name = CAPS "Click - Metronome";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -165,9 +163,9 @@ CEO::port_info [] =
|
||||
};
|
||||
|
||||
void
|
||||
CEO::init (double fs)
|
||||
CEO::init()
|
||||
{
|
||||
this->ClickStub::init (fs, money, LENGTH (money));
|
||||
this->ClickStub::init (money, LENGTH (money));
|
||||
}
|
||||
|
||||
template <> void
|
||||
@@ -177,9 +175,9 @@ Descriptor<CEO>::setup()
|
||||
Label = "CEO";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: CEO - Chief Executive Oscillator";
|
||||
Name = CAPS "CEO - Chief Executive Oscillator";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -212,9 +210,9 @@ Dirac::port_info [] =
|
||||
};
|
||||
|
||||
void
|
||||
Dirac::init (double fs)
|
||||
Dirac::init()
|
||||
{
|
||||
this->ClickStub::init (fs, dirac, LENGTH (dirac));
|
||||
this->ClickStub::init (dirac, LENGTH (dirac));
|
||||
}
|
||||
|
||||
template <> void
|
||||
@@ -224,9 +222,9 @@ Descriptor<Dirac>::setup()
|
||||
Label = "Dirac";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Dirac - One-sample impulse generator";
|
||||
Name = CAPS "Dirac - One-sample impulse generator";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -32,10 +32,9 @@
|
||||
#include "dsp/util.h"
|
||||
|
||||
class ClickStub
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
|
||||
d_sample bpm;
|
||||
|
||||
float * wave;
|
||||
@@ -46,18 +45,13 @@ class ClickStub
|
||||
int period; /* frames remaining in period */
|
||||
int played; /* frames played from sample */
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs, float * _wave, int _N);
|
||||
void init (float * _wave, int _N);
|
||||
|
||||
void activate()
|
||||
{
|
||||
@@ -80,14 +74,14 @@ class Click
|
||||
: public ClickStub
|
||||
{
|
||||
public:
|
||||
void init (double fs);
|
||||
void init();
|
||||
};
|
||||
|
||||
class CEO
|
||||
: public ClickStub
|
||||
{
|
||||
public:
|
||||
void init (double fs);
|
||||
void init();
|
||||
|
||||
static PortInfo port_info [];
|
||||
};
|
||||
@@ -96,7 +90,7 @@ class Dirac
|
||||
: public ClickStub
|
||||
{
|
||||
public:
|
||||
void init (double fs);
|
||||
void init();
|
||||
|
||||
static PortInfo port_info [];
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Clip.cc
|
||||
|
||||
Copyright 2003-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2003-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -31,9 +31,8 @@
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Clip::init (double _fs)
|
||||
Clip::init()
|
||||
{
|
||||
fs = _fs;
|
||||
gain = 1;
|
||||
|
||||
threshold[0] = -.9;
|
||||
@@ -79,12 +78,13 @@ Clip::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
double g = getport (1);
|
||||
double gf;
|
||||
if (*ports[1] == gain_db)
|
||||
if (g == gain_db)
|
||||
gf = 1;
|
||||
else
|
||||
{
|
||||
gain_db = *ports[1];
|
||||
gain_db = g;
|
||||
d_sample g = DSP::db2lin (gain_db);
|
||||
gf = pow (g / gain, 1 / (double) frames);
|
||||
}
|
||||
@@ -138,9 +138,9 @@ Descriptor<Clip>::setup()
|
||||
Label = "Clip";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Clip - Hard clipper, 8x oversampled";
|
||||
Name = CAPS "Clip - Hard clipper, 8x oversampled";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2003-5";
|
||||
Copyright = "GPL, 2003-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
#include "dsp/windows.h"
|
||||
|
||||
class Clip
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample gain, gain_db;
|
||||
|
||||
d_sample threshold[2];
|
||||
@@ -51,22 +51,19 @@ class Clip
|
||||
DSP::FIR down;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
inline d_sample clip (d_sample x);
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
Clip()
|
||||
: up (FIR_SIZE, OVERSAMPLE),
|
||||
down (FIR_SIZE)
|
||||
{ }
|
||||
|
||||
void init (double fs);
|
||||
void init();
|
||||
|
||||
void activate()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Compress.cc
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2004-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -31,20 +31,14 @@
|
||||
#include "Compress.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Compress::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Compress::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
d_sample range = DSP::db2lin (*ports[1]);
|
||||
d_sample ratio = (*ports[2] - 1) / *ports[2];
|
||||
d_sample range = DSP::db2lin (getport(1));
|
||||
d_sample ratio = (*ports[2] - 1) / getport(2);
|
||||
|
||||
/* sc1 has lookup tables here, and they're only 40 % used (400 ms/1 s).
|
||||
* thus, sc1's attack/release controls are a bit coarse due to truncation
|
||||
@@ -57,11 +51,11 @@ Compress::one_cycle (int frames)
|
||||
*
|
||||
* TODO: check whether these parameters work like they should, try pow()
|
||||
*/
|
||||
double ga = exp (-1 / (fs * *ports[3]));
|
||||
double gr = exp (-1 / (fs * *ports[4]));
|
||||
double ga = exp (-1 / (fs * getport(3)));
|
||||
double gr = exp (-1 / (fs * getport(4)));
|
||||
|
||||
d_sample threshold = *ports[5];
|
||||
d_sample knee = *ports[6];
|
||||
d_sample threshold = getport(5);
|
||||
d_sample knee = getport(6);
|
||||
|
||||
d_sample * d = ports[7];
|
||||
|
||||
@@ -149,9 +143,9 @@ Descriptor<Compress>::setup()
|
||||
Label = "Compress";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Compress - Mono compressor";
|
||||
Name = CAPS "Compress - Mono compressor";
|
||||
Maker = "Tim Goetze <tim@quitte.de>, Steve Harris <steve@plugin.org.uk>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "dsp/util.h"
|
||||
|
||||
class Compress
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
@@ -43,16 +44,12 @@ class Compress
|
||||
int count;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [8];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init() {}
|
||||
void activate()
|
||||
{
|
||||
rms.reset();
|
||||
|
||||
@@ -1,24 +1,18 @@
|
||||
/*
|
||||
Descriptor.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2004-6 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
creating a LADSPA_Descriptor for a caps plugin via a C++ template,
|
||||
Creating a LADSPA_Descriptor for a CAPS plugin via a C++ template,
|
||||
saves us a virtual function call compared to the usual method used
|
||||
for C++ plugins in a C context.
|
||||
|
||||
Descriptor<P> expects P to declare some common methods, like init(),
|
||||
activate() etc, plus a static port_info[] and LADSPA_Data * ports[]
|
||||
and of course 'adding_gain'.
|
||||
|
||||
maintaining both port_info[] and ports[] is a bit of a bitch, but,
|
||||
hey, "you only do it once (tm)" .. and then you do it over and over
|
||||
again. particularly bothersome is also the necessary unrolling of our
|
||||
PortInfo array to fit into LADSPA_Descriptor's inconsequential way of
|
||||
port data structuring, which results in quite a bit of memory holding
|
||||
duplicated data. oh well.
|
||||
and adding_gain.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
@@ -40,6 +34,13 @@
|
||||
#ifndef _DESCRIPTOR_H_
|
||||
#define _DESCRIPTOR_H_
|
||||
|
||||
#ifdef __SSE__
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#ifdef __SSE3__
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
|
||||
/* common stub for Descriptor makes it possible to delete() without special-
|
||||
* casing for every plugin class.
|
||||
*/
|
||||
@@ -47,6 +48,8 @@ class DescriptorStub
|
||||
: public LADSPA_Descriptor
|
||||
{
|
||||
public:
|
||||
static int thishostsucks;
|
||||
|
||||
DescriptorStub()
|
||||
{
|
||||
PortCount = 0;
|
||||
@@ -62,23 +65,34 @@ class DescriptorStub
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
inline void
|
||||
processor_specific_denormal_measures()
|
||||
{
|
||||
#ifdef __SSE3__
|
||||
/* this one works reliably on a 6600 Core2 */
|
||||
_MM_SET_DENORMALS_ZERO_MODE (_MM_DENORMALS_ZERO_ON);
|
||||
#endif
|
||||
|
||||
#ifdef __SSE__
|
||||
/* this one doesn't ... */
|
||||
_MM_SET_FLUSH_ZERO_MODE (_MM_FLUSH_ZERO_ON);
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
class Descriptor
|
||||
: public DescriptorStub
|
||||
{
|
||||
public:
|
||||
/* tom szilyagi reports that hosts exist which call activate() before
|
||||
* connect_port(). since caps' plugins expect ports to be valid we
|
||||
/* Tom Szilyagi reports that hosts exist which call activate() before
|
||||
* connect_port(). Since CAPS' plugins expect ports to be valid we
|
||||
* need a safeguard: at instantiation, each port is connected to the
|
||||
* lower bound. When (If?) LADSPA default values are ever fixed, connecting
|
||||
* to the default will be preferred. */
|
||||
* lower bound. */
|
||||
LADSPA_PortRangeHint * ranges;
|
||||
|
||||
public:
|
||||
Descriptor()
|
||||
{ setup(); }
|
||||
|
||||
Descriptor() { setup(); }
|
||||
void setup();
|
||||
|
||||
void autogen()
|
||||
@@ -117,12 +131,20 @@ class Descriptor
|
||||
const struct _LADSPA_Descriptor * d, ulong fs)
|
||||
{
|
||||
T * plugin = new T();
|
||||
|
||||
/* see comment above at 'ranges' member */
|
||||
for (int i = 0; i < (int) d->PortCount; ++i)
|
||||
plugin->ports[i] = &((Descriptor *) d)->ranges[i].LowerBound;
|
||||
int n = (int) d->PortCount;
|
||||
|
||||
plugin->init (fs);
|
||||
LADSPA_PortRangeHint * ranges = ((Descriptor *) d)->ranges;
|
||||
plugin->ranges = ranges;
|
||||
|
||||
plugin->ports = new d_sample * [n];
|
||||
|
||||
/* connect to lower bound as a safety measure */
|
||||
for (int i = 0; i < n; ++i)
|
||||
plugin->ports[i] = &(ranges[i].LowerBound);
|
||||
|
||||
plugin->fs = fs;
|
||||
plugin->normal = NOISE_FLOOR;
|
||||
plugin->init();
|
||||
|
||||
return plugin;
|
||||
}
|
||||
@@ -134,29 +156,72 @@ class Descriptor
|
||||
|
||||
static void _activate (LADSPA_Handle h)
|
||||
{
|
||||
((T *) h)->activate();
|
||||
T * plugin = (T *) h;
|
||||
|
||||
plugin->first_run = 1;
|
||||
|
||||
/* since none of the plugins do any RT-critical work in
|
||||
* activate(), it's safe to defer the actual call to the
|
||||
* plugin's activate() method for the first run() after
|
||||
* the host called in here.
|
||||
*
|
||||
* It's simplest way to prevent a parameter smoothing sweep
|
||||
* in the first audio block after activation.
|
||||
plugin->activate();
|
||||
*/
|
||||
}
|
||||
|
||||
static void _run (LADSPA_Handle h, ulong n)
|
||||
{
|
||||
/* cannot call template here (g++ 2.95), sigh. */
|
||||
((T *) h)->run (n);
|
||||
T * plugin = (T *) h;
|
||||
|
||||
/* We don't reset the processor flags later, it's true. */
|
||||
processor_specific_denormal_measures();
|
||||
|
||||
/* If this is the first audio block after activation,
|
||||
* initialize the plugin from the current set of parameters. */
|
||||
if (plugin->first_run)
|
||||
{
|
||||
plugin->activate();
|
||||
plugin->first_run = 0;
|
||||
}
|
||||
|
||||
plugin->run (n);
|
||||
plugin->normal = -plugin->normal;
|
||||
}
|
||||
|
||||
static void _run_adding (LADSPA_Handle h, ulong n)
|
||||
{
|
||||
/* cannot call a template here (g++ 2.95), sigh. */
|
||||
((T *) h)->run_adding (n);
|
||||
T * plugin = (T *) h;
|
||||
|
||||
/* We don't reset the processor flags later, it's true. */
|
||||
processor_specific_denormal_measures();
|
||||
|
||||
/* If this is the first audio block after activation,
|
||||
* initialize the plugin from the current set of parameters. */
|
||||
if (plugin->first_run)
|
||||
{
|
||||
plugin->activate();
|
||||
plugin->first_run = 0;
|
||||
}
|
||||
|
||||
plugin->run_adding (n);
|
||||
plugin->normal = -plugin->normal;
|
||||
}
|
||||
|
||||
static void _set_run_adding_gain (LADSPA_Handle h, LADSPA_Data g)
|
||||
{
|
||||
((T *) h)->adding_gain = g;
|
||||
T * plugin = (T *) h;
|
||||
|
||||
plugin->adding_gain = g;
|
||||
}
|
||||
|
||||
static void _cleanup (LADSPA_Handle h)
|
||||
{
|
||||
delete (T *) h;
|
||||
T * plugin = (T *) h;
|
||||
|
||||
delete [] plugin->ports;
|
||||
delete plugin;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Eq.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -31,14 +31,8 @@
|
||||
#include "Eq.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Eq::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
eq.init (fs, 1.2);
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
/* slight adjustments to gain to keep response optimally flat at
|
||||
* 0 dB gain in all bands */
|
||||
inline static double
|
||||
adjust_gain (int i, double g)
|
||||
{
|
||||
@@ -53,13 +47,22 @@ adjust_gain (int i, double g)
|
||||
return g * adjust[i];
|
||||
}
|
||||
|
||||
#define Q 1.2
|
||||
|
||||
void
|
||||
Eq::init()
|
||||
{
|
||||
eq.init (fs, Q);
|
||||
}
|
||||
|
||||
void
|
||||
Eq::activate()
|
||||
{
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
gain[i] = *ports [1 + i];
|
||||
gain[i] = getport (1 + i);
|
||||
eq.gain[i] = adjust_gain (i, DSP::db2lin (gain[i]));
|
||||
eq.gf[i] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,29 +74,34 @@ Eq::one_cycle (int frames)
|
||||
|
||||
/* evaluate band gain changes and compute recursion factor to prevent
|
||||
* zipper noise */
|
||||
double one_over_n = 1. / frames;
|
||||
double one_over_n = frames > 0 ? 1. / frames : 1;
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
if (*ports [1 + i] == gain[i])
|
||||
d_sample g = getport (1 + i);
|
||||
if (g == gain[i])
|
||||
{
|
||||
/* no gain factoring */
|
||||
eq.gf[i] = 1;
|
||||
continue;
|
||||
}
|
||||
gain[i] = g;
|
||||
|
||||
gain[i] = *ports [1 + i];
|
||||
|
||||
double want = adjust_gain (i, DSP::db2lin (gain[i]));
|
||||
double want = adjust_gain (i, DSP::db2lin (g));
|
||||
eq.gf[i] = pow (want / eq.gain[i], one_over_n);
|
||||
}
|
||||
|
||||
d_sample * d = ports[11];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
F (d, i, eq.process (s[i] + normal), adding_gain);
|
||||
{
|
||||
d_sample x = s[i];
|
||||
x = eq.process (x);
|
||||
F (d, i, x, adding_gain);
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
eq.normal = -normal;
|
||||
eq.flush_0();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -108,43 +116,43 @@ Eq::port_info [] =
|
||||
}, {
|
||||
"31 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_LOW, -48, 24}
|
||||
}, {
|
||||
"63 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"125 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"250 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"500 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"1 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"2 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"4 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"8 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"16 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
@@ -159,11 +167,164 @@ Descriptor<Eq>::setup()
|
||||
Label = "Eq";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Eq - 10-band 'analogue' equalizer";
|
||||
Name = CAPS "Eq - 10-band equalizer";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
Eq2x2::init()
|
||||
{
|
||||
for (int c = 0; c < 2; ++c)
|
||||
eq[c].init (fs, Q);
|
||||
}
|
||||
|
||||
void
|
||||
Eq2x2::activate()
|
||||
{
|
||||
/* Fetch current parameter settings so we won't sweep band gains in the
|
||||
* first block to process.
|
||||
*/
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
gain[i] = getport (2 + i);
|
||||
double a = adjust_gain (i, DSP::db2lin (gain[i]));
|
||||
for (int c = 0; c < 2; ++c)
|
||||
eq[c].gf[i] = 1,
|
||||
eq[c].gain[i] = a;
|
||||
}
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Eq2x2::one_cycle (int frames)
|
||||
{
|
||||
/* evaluate band gain changes and compute recursion factor to prevent
|
||||
* zipper noise */
|
||||
double one_over_n = frames > 0 ? 1. / frames : 1;
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
double a;
|
||||
|
||||
if (*ports [2 + i] == gain[i])
|
||||
/* still same value, no gain fade */
|
||||
a = 1;
|
||||
else
|
||||
{
|
||||
gain[i] = getport (2 + i);
|
||||
|
||||
/* prepare factor for logarithmic gain fade */
|
||||
a = adjust_gain (i, DSP::db2lin (gain[i]));
|
||||
a = pow (a / eq[0].gain[i], one_over_n);
|
||||
}
|
||||
|
||||
for (int c = 0; c < 2; ++c)
|
||||
eq[c].gf[i] = a;
|
||||
}
|
||||
|
||||
for (int c = 0; c < 2; ++c)
|
||||
{
|
||||
d_sample
|
||||
* s = ports[c],
|
||||
* d = ports[12 + c];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
d_sample x = s[i];
|
||||
x = eq[c].process (x);
|
||||
F (d, i, x, adding_gain);
|
||||
}
|
||||
}
|
||||
|
||||
/* flip 'renormal' values */
|
||||
for (int c = 0; c < 2; ++c)
|
||||
{
|
||||
eq[c].normal = normal;
|
||||
eq[c].flush_0();
|
||||
}
|
||||
}
|
||||
|
||||
PortInfo
|
||||
Eq2x2::port_info [] =
|
||||
{
|
||||
{
|
||||
"in:l",
|
||||
INPUT | AUDIO,
|
||||
{0, -1, 1}
|
||||
}, {
|
||||
"in:r",
|
||||
INPUT | AUDIO,
|
||||
{0, -1, 1}
|
||||
}, {
|
||||
"31 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"63 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"125 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"250 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"500 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"1 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"2 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"4 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"8 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"16 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 24}
|
||||
}, {
|
||||
"out:l",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"out:r",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<Eq2x2>::setup()
|
||||
{
|
||||
UniqueID = 2594;
|
||||
Label = "Eq2x2";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = CAPS "Eq2x2 - stereo 10-band equalizer";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,29 +28,55 @@
|
||||
#ifndef _EQ_H_
|
||||
#define _EQ_H_
|
||||
|
||||
#include "dsp/Eq.h"
|
||||
#include "dsp/util.h"
|
||||
#include "dsp/Eq.h"
|
||||
#include "dsp/BiQuad.h"
|
||||
#include "dsp/RBJ.h"
|
||||
|
||||
class Eq
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample gain[10];
|
||||
d_sample normal;
|
||||
DSP::Eq<10> eq;
|
||||
|
||||
DSP::Eq<10,12> eq;
|
||||
int block;
|
||||
enum { BlockSize = 64 };
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [12];
|
||||
|
||||
d_sample adding_gain;
|
||||
void init();
|
||||
void activate();
|
||||
|
||||
void init (double _fs);
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
class Eq2x2
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
d_sample gain[10];
|
||||
DSP::Eq<10> eq[2];
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
|
||||
void init();
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
HRTF.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -35,9 +35,8 @@
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
HRTF::init (double fs)
|
||||
HRTF::init()
|
||||
{
|
||||
normal = NOISE_FLOOR;
|
||||
h = 0;
|
||||
}
|
||||
|
||||
@@ -74,7 +73,7 @@ HRTF::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
int p = (int) *ports[1];
|
||||
int p = (int) getport(1);
|
||||
if (p != pan) set_pan (p);
|
||||
|
||||
d_sample * dl = ports[2];
|
||||
@@ -106,8 +105,6 @@ HRTF::one_cycle (int frames)
|
||||
F (dl, i, l, adding_gain);
|
||||
F (dr, i, r, adding_gain);
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -141,9 +138,9 @@ Descriptor<HRTF>::setup()
|
||||
Label = "HRTF";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: HRTF - Head-related transfer function at elevation 0";
|
||||
Name = CAPS "HRTF - Head-related transfer function at elevation 0";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "dsp/util.h"
|
||||
|
||||
class HRTF
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
int pan;
|
||||
@@ -45,19 +46,13 @@ class HRTF
|
||||
|
||||
void set_pan (int p);
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate()
|
||||
{
|
||||
set_pan ((int) *ports[1]);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Lorenz.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -33,9 +33,8 @@
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Lorenz::init (double _fs)
|
||||
Lorenz::init()
|
||||
{
|
||||
fs = _fs;
|
||||
lorenz.init (h = .001, 0.1 * frandom());
|
||||
gain = 0;
|
||||
}
|
||||
@@ -47,11 +46,11 @@ Lorenz::one_cycle (int frames)
|
||||
lorenz.set_rate (*ports[0]);
|
||||
|
||||
double g = (gain == *ports[4]) ?
|
||||
1 : pow (*ports[4] / gain, 1. / (double) frames);
|
||||
1 : pow (getport(4) / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[5];
|
||||
|
||||
d_sample x, sx = *ports[1], sy = *ports[2], sz = *ports[3];
|
||||
d_sample x, sx = getport(1), sy = getport(2), sz = getport(3);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
@@ -63,7 +62,7 @@ Lorenz::one_cycle (int frames)
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[4];
|
||||
gain = getport(4);
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -105,9 +104,9 @@ Descriptor<Lorenz>::setup()
|
||||
Label = "Lorenz";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Lorenz - The sound of a Lorenz attractor";
|
||||
Name = CAPS "Lorenz - The sound of a Lorenz attractor";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -31,26 +31,21 @@
|
||||
#include "dsp/Lorenz.h"
|
||||
|
||||
class Lorenz
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample h, gain;
|
||||
|
||||
DSP::Lorenz lorenz;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [6];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{ }
|
||||
void init();
|
||||
void activate() {}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
|
||||
AM_CXXFLAGS := $(AM_CXXFLAGS) -O6 -ffast-math -funroll-loops -ftracer -I../../../include
|
||||
AM_CXXFLAGS := $(AM_CXXFLAGS) -O2 -I../../../include
|
||||
|
||||
DEST = $(DESTDIR)$(libdir)/$(PACKAGE)/ladspa
|
||||
SOURCES = $(wildcard *.cc)
|
||||
@@ -15,7 +15,7 @@ clean:
|
||||
rm -f *.o *.so *.s depend
|
||||
|
||||
install: all
|
||||
strip caps.so
|
||||
# strip caps.so
|
||||
install -d $(DEST)
|
||||
install -m 644 caps.so $(DEST)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Pan.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -31,11 +31,9 @@
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Pan::init (double _fs)
|
||||
Pan::init()
|
||||
{
|
||||
fs = _fs;
|
||||
delay.init ((int) (.040 * fs));
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -64,15 +62,16 @@ Pan::one_cycle (int frames)
|
||||
d_sample * s = ports[0];
|
||||
|
||||
if (pan != *ports[1])
|
||||
set_pan (*ports[1]);
|
||||
set_pan (getport(1));
|
||||
|
||||
d_sample g = getport(2);
|
||||
d_sample
|
||||
width_l = *ports[2] * gain_r,
|
||||
width_r = *ports[2] * gain_l;
|
||||
width_l = g * gain_r,
|
||||
width_r = g * gain_l;
|
||||
|
||||
tap.t = (int) (*ports[3] * fs * .001);
|
||||
tap.t = (int) (getport(3) * fs * .001);
|
||||
|
||||
bool mono = *ports[4];
|
||||
bool mono = getport(4);
|
||||
|
||||
d_sample * dl = ports[5];
|
||||
d_sample * dr = ports[6];
|
||||
@@ -152,9 +151,9 @@ Descriptor<Pan>::setup()
|
||||
Label = "Pan";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Pan - Pan and width";
|
||||
Name = CAPS "Pan - Pan and width";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -50,30 +50,25 @@ class PanTap
|
||||
};
|
||||
|
||||
class Pan
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample pan;
|
||||
|
||||
d_sample gain_l, gain_r;
|
||||
d_sample normal;
|
||||
|
||||
DSP::Delay delay;
|
||||
PanTap tap;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
inline void set_pan (d_sample);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [7];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Phaser.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -41,18 +41,16 @@ PhaserI::one_cycle (int frames)
|
||||
|
||||
if (rate != *ports[1])
|
||||
{
|
||||
rate = *ports[1];
|
||||
rate = getport(1);
|
||||
lfo.set_f (max (.001, rate * (double) blocksize), fs, lfo.get_phase());
|
||||
}
|
||||
|
||||
double depth = *ports[2];
|
||||
double spread = 1 + *ports[3];
|
||||
double fb = *ports[4];
|
||||
double depth = getport(2);
|
||||
double spread = 1 + getport(3);
|
||||
double fb = getport(4);
|
||||
|
||||
d_sample * dst = ports[5];
|
||||
|
||||
normal = -normal;
|
||||
|
||||
while (frames)
|
||||
{
|
||||
if (remain == 0) remain = 32;
|
||||
@@ -126,9 +124,9 @@ Descriptor<PhaserI>::setup()
|
||||
Label = "PhaserI";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: PhaserI - Mono phaser";
|
||||
Name = CAPS "PhaserI - Mono phaser";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -142,16 +140,14 @@ PhaserII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
lorenz.set_rate (*ports[1] * .08);
|
||||
lorenz.set_rate (getport(1) * .08);
|
||||
|
||||
double depth = *ports[2];
|
||||
double spread = 1 + *ports[3];
|
||||
double fb = *ports[4];
|
||||
double depth = getport(2);
|
||||
double spread = 1 + getport(3);
|
||||
double fb = getport(4);
|
||||
|
||||
d_sample * dst = ports[5];
|
||||
|
||||
normal = -normal;
|
||||
|
||||
while (frames)
|
||||
{
|
||||
if (remain == 0) remain = 32;
|
||||
@@ -225,9 +221,9 @@ Descriptor<PhaserII>::setup()
|
||||
Label = "PhaserII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: PhaserII - Mono phaser modulated by a Lorenz fractal";
|
||||
Name = CAPS "PhaserII - Mono phaser modulated by a Lorenz fractal";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -58,37 +58,30 @@ class PhaserAP
|
||||
};
|
||||
|
||||
class PhaserI
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
|
||||
PhaserAP ap[6];
|
||||
DSP::Sine lfo;
|
||||
|
||||
d_sample rate;
|
||||
d_sample y0;
|
||||
d_sample normal;
|
||||
|
||||
struct {
|
||||
double bottom, range;
|
||||
} delay;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
int blocksize, remain;
|
||||
|
||||
public:
|
||||
d_sample * ports [6];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
void init()
|
||||
{
|
||||
fs = _fs;
|
||||
blocksize = 32;
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void activate()
|
||||
@@ -116,6 +109,7 @@ class PhaserI
|
||||
/* same as above, but filter sweep is controlled by a Lorenz fractal */
|
||||
|
||||
class PhaserII
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
@@ -125,28 +119,22 @@ class PhaserII
|
||||
|
||||
d_sample rate;
|
||||
d_sample y0;
|
||||
d_sample normal;
|
||||
|
||||
struct {
|
||||
double bottom, range;
|
||||
} delay;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
int blocksize, remain;
|
||||
|
||||
public:
|
||||
d_sample * ports [6];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
void init()
|
||||
{
|
||||
fs = _fs;
|
||||
blocksize = 32;
|
||||
normal = NOISE_FLOOR;
|
||||
lorenz.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
Preamp.cc
|
||||
|
||||
Copyright 2003-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2003-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
loosely 12AX7-based tube preamp model, 8x oversampling.
|
||||
Loosely 12AX7-based tube preamp model with 8x oversampling.
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
@@ -31,11 +31,11 @@
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
PreampIII::init (double _fs)
|
||||
PreampIII::init()
|
||||
{
|
||||
this->AmpStub::init (_fs);
|
||||
this->AmpStub::init();
|
||||
|
||||
DSP::RBJ::LoShelve (200 / (_fs), .2, -6, filter.a, filter.b);
|
||||
DSP::RBJ::LoShelve (200 / fs, .2, -6, filter.a, filter.b);
|
||||
}
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
@@ -43,8 +43,8 @@ void
|
||||
PreampIII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
d_sample gain = *ports[1];
|
||||
d_sample temp = *ports[2] * tube.scale;
|
||||
d_sample gain = getport(1);
|
||||
d_sample temp = getport(2) * tube.scale;
|
||||
d_sample * d = ports[3];
|
||||
*ports[4] = OVERSAMPLE;
|
||||
|
||||
@@ -57,7 +57,7 @@ PreampIII::one_cycle (int frames)
|
||||
if (g == 0) g = current.g;
|
||||
|
||||
/* recursive fade to prevent zipper noise from the 'gain' knob */
|
||||
double one_over_n = 1. / frames;
|
||||
double one_over_n = frames > 0 ? 1. / frames : 1;
|
||||
double gf = pow (current.g / g, one_over_n);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
@@ -77,7 +77,6 @@ PreampIII::one_cycle (int frames)
|
||||
}
|
||||
|
||||
current.g = g;
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -115,9 +114,9 @@ Descriptor<PreampIII>::setup()
|
||||
Label = "PreampIII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: PreampIII - Tube preamp emulation";
|
||||
Name = CAPS "PreampIII - Tube preamp emulation";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -126,11 +125,10 @@ Descriptor<PreampIII>::setup()
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
PreampIV::init (double _fs)
|
||||
PreampIV::init()
|
||||
{
|
||||
this->AmpStub::init (_fs);
|
||||
|
||||
tone.init (_fs);
|
||||
this->AmpStub::init();
|
||||
tone.init (fs);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -145,11 +143,11 @@ template <sample_func_t F, int OVERSAMPLE>
|
||||
void
|
||||
PreampIV::one_cycle (int frames)
|
||||
{
|
||||
double one_over_n = 1. / frames;
|
||||
double one_over_n = frames > 0 ? 1. / frames : 1;
|
||||
|
||||
d_sample * s = ports[0];
|
||||
d_sample gain = *ports[1];
|
||||
d_sample temp = *ports[2] * tube.scale;
|
||||
d_sample gain = getport(1);
|
||||
d_sample temp = getport(2) * tube.scale;
|
||||
|
||||
tone.start_cycle (ports + 3, one_over_n);
|
||||
|
||||
@@ -183,7 +181,6 @@ PreampIV::one_cycle (int frames)
|
||||
}
|
||||
|
||||
current.g = g;
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -237,9 +234,9 @@ Descriptor<PreampIV>::setup()
|
||||
Label = "PreampIV";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: PreampIV - Tube preamp emulation + tone controls";
|
||||
Name = CAPS "PreampIV - Tube preamp emulation + tone controls";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
Copyright = "GPL, 2002-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -1,67 +1,7 @@
|
||||
This is caps, the C Audio Plugin Suite
|
||||
This is CAPS, the C Audio Plugin Suite
|
||||
======================================
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de> and others.
|
||||
|
||||
|
||||
License information
|
||||
-------------------
|
||||
|
||||
See the file "COPYING" for licensing terms & conditions for usage,
|
||||
and a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
|
||||
What is this caps thing?
|
||||
------------------------
|
||||
|
||||
caps is a collection of refined realtime-capable LADSPA audio DSP
|
||||
plugins. It helps your computer sound better.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Please point your browser to the file 'caps.html' in this directory.
|
||||
|
||||
|
||||
Web site and latest version
|
||||
---------------------------
|
||||
|
||||
The latest information and package release reside at
|
||||
For all questions, please be referred to the HTML documentation of
|
||||
this software package in the file 'caps.html', also available from
|
||||
|
||||
http://quitte.de/dsp/caps.html
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
At the shell prompt, enter (without the '$' denoting the prompt itself):
|
||||
|
||||
$ make
|
||||
|
||||
then, as the superuser, enter:
|
||||
|
||||
# make install
|
||||
|
||||
and you're done. You can now use the plugins in any LADSPA-aware audio
|
||||
application.
|
||||
|
||||
Please note that the default installation path is /usr/local/lib/ladspa;
|
||||
if you prefer another place, you need to edit the makefile, or install
|
||||
manually.
|
||||
|
||||
|
||||
Bug reports
|
||||
-----------
|
||||
|
||||
Bug reports should be sent to <tim@quitte.de>. Please include a detailed
|
||||
description of the misbehaviour and instructions on how to reproduce the
|
||||
bug.
|
||||
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
caps is known to compile well with gnu make, gcc 2.95, 3.3 and 4.0.
|
||||
If you have trouble compiling it, please send mail containing the
|
||||
output of the 'make' command to <tim@quitte.de>.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Reverb.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -57,11 +57,8 @@ JVRev::default_length[9] = {
|
||||
};
|
||||
|
||||
void
|
||||
JVRev::init (double _fs)
|
||||
JVRev::init()
|
||||
{
|
||||
fs = _fs;
|
||||
normal = NOISE_FLOOR;
|
||||
|
||||
memcpy (length, default_length, sizeof (length));
|
||||
|
||||
if (fs != 44100)
|
||||
@@ -114,7 +111,7 @@ JVRev::activate()
|
||||
left.reset();
|
||||
right.reset();
|
||||
|
||||
set_t60 (*ports[1]);
|
||||
set_t60 (getport(1));
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
@@ -124,15 +121,13 @@ JVRev::one_cycle (int frames)
|
||||
d_sample * s = ports[0];
|
||||
|
||||
if (t60 != *ports[1])
|
||||
set_t60 (*ports[1]);
|
||||
set_t60 (getport(1));
|
||||
|
||||
double wet = *ports[2], dry = 1 - wet;
|
||||
double wet = getport(2), dry = 1 - wet;
|
||||
|
||||
d_sample * dl = ports[3];
|
||||
d_sample * dr = ports[4];
|
||||
|
||||
normal = -normal;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
d_sample x = s[i], a = x + normal;
|
||||
@@ -191,9 +186,9 @@ Descriptor<JVRev>::setup()
|
||||
Label = "JVRev";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: JVRev - Stanford-style reverb from STK";
|
||||
Name = CAPS "JVRev - Stanford-style reverb from STK";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -202,9 +197,8 @@ Descriptor<JVRev>::setup()
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
PlateStub::init (double _fs)
|
||||
PlateStub::init()
|
||||
{
|
||||
fs = _fs;
|
||||
f_lfo = -1;
|
||||
|
||||
# define L(i) ((int) (l[i] * fs))
|
||||
@@ -257,8 +251,6 @@ PlateStub::init (double _fs)
|
||||
|
||||
dediff1 = .723;
|
||||
dediff2 = .729;
|
||||
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
inline void
|
||||
@@ -321,15 +313,15 @@ Plate::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
input.bandwidth.set (exp (-M_PI * (1. - *ports[1])));
|
||||
input.bandwidth.set (exp (-M_PI * (1. - getport(1))));
|
||||
|
||||
d_sample decay = *ports[2];
|
||||
d_sample decay = getport(2);
|
||||
|
||||
double damp = exp (-M_PI * *ports[3]);
|
||||
double damp = exp (-M_PI * getport(3));
|
||||
tank.damping[0].set (damp);
|
||||
tank.damping[1].set (damp);
|
||||
|
||||
d_sample blend = *ports[4], dry = 1 - blend;
|
||||
d_sample blend = getport(4), dry = 1 - blend;
|
||||
|
||||
d_sample * dl = ports[5];
|
||||
d_sample * dr = ports[6];
|
||||
@@ -339,8 +331,8 @@ Plate::one_cycle (int frames)
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
d_sample x = s[i] + normal;
|
||||
normal = -normal;
|
||||
d_sample x = s[i] + normal;
|
||||
|
||||
d_sample xl, xr;
|
||||
|
||||
@@ -396,9 +388,9 @@ Descriptor<Plate>::setup()
|
||||
Label = "Plate";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Plate - Versatile plate reverb";
|
||||
Name = CAPS "Plate - Versatile plate reverb";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -413,15 +405,15 @@ Plate2x2::one_cycle (int frames)
|
||||
d_sample * sl = ports[0];
|
||||
d_sample * sr = ports[1];
|
||||
|
||||
input.bandwidth.set (exp (-M_PI * (1. - *ports[2])));
|
||||
input.bandwidth.set (exp (-M_PI * (1. - getport(2))));
|
||||
|
||||
d_sample decay = *ports[3];
|
||||
d_sample decay = getport(3);
|
||||
|
||||
double damp = exp (-M_PI * *ports[4]);
|
||||
double damp = exp (-M_PI * getport(4));
|
||||
tank.damping[0].set (damp);
|
||||
tank.damping[1].set (damp);
|
||||
|
||||
d_sample blend = *ports[5], dry = 1 - blend;
|
||||
d_sample blend = getport(5), dry = 1 - blend;
|
||||
|
||||
d_sample * dl = ports[6];
|
||||
d_sample * dr = ports[7];
|
||||
@@ -432,7 +424,6 @@ Plate2x2::one_cycle (int frames)
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
normal = -normal;
|
||||
|
||||
d_sample x = (sl[i] + sr[i] + normal) * .5;
|
||||
|
||||
d_sample xl, xr;
|
||||
@@ -493,9 +484,9 @@ Descriptor<Plate2x2>::setup()
|
||||
Label = "Plate2x2";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Plate2x2 - Versatile plate reverb, stereo inputs";
|
||||
Name = CAPS "Plate2x2 - Versatile plate reverb, stereo inputs";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -86,10 +86,10 @@ class JVComb
|
||||
};
|
||||
|
||||
class JVRev
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
static int default_length[9];
|
||||
double fs;
|
||||
d_sample t60;
|
||||
|
||||
Lattice allpass [3];
|
||||
@@ -99,8 +99,6 @@ class JVRev
|
||||
|
||||
double apc;
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
@@ -110,12 +108,8 @@ class JVRev
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [5];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
@@ -165,9 +159,9 @@ class ModLattice
|
||||
};
|
||||
|
||||
class PlateStub
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample f_lfo;
|
||||
|
||||
d_sample indiff1, indiff2, dediff1, dediff2;
|
||||
@@ -185,13 +179,8 @@ class PlateStub
|
||||
int taps[12];
|
||||
} tank;
|
||||
|
||||
d_sample normal;
|
||||
|
||||
public:
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate()
|
||||
{
|
||||
input.bandwidth.reset();
|
||||
@@ -228,7 +217,6 @@ class Plate
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [7];
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
@@ -252,7 +240,6 @@ class Plate2x2
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [8];
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Roessler.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -33,9 +33,8 @@
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Roessler::init (double _fs)
|
||||
Roessler::init()
|
||||
{
|
||||
fs = _fs;
|
||||
roessler.init (h = .001, frandom());
|
||||
gain = 0;
|
||||
}
|
||||
@@ -44,17 +43,17 @@ template <sample_func_t F>
|
||||
void
|
||||
Roessler::one_cycle (int frames)
|
||||
{
|
||||
roessler.set_rate (*ports[0]);
|
||||
roessler.set_rate (getport(0));
|
||||
|
||||
double g = (gain == *ports[4]) ?
|
||||
1 : pow (*ports[4] / gain, 1. / (double) frames);
|
||||
double g = (gain == getport(4)) ?
|
||||
1 : pow (getport(4) / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[5];
|
||||
|
||||
d_sample x,
|
||||
sx = .043 * *ports[1],
|
||||
sy = .051 * *ports[2],
|
||||
sz = .018 * *ports[3];
|
||||
sx = .043 * getport(1),
|
||||
sy = .051 * getport(2),
|
||||
sz = .018 * getport(3);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
@@ -69,7 +68,7 @@ Roessler::one_cycle (int frames)
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[4];
|
||||
gain = getport(4);
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -111,9 +110,9 @@ Descriptor<Roessler>::setup()
|
||||
Label = "Roessler";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Roessler - The sound of a Roessler attractor";
|
||||
Name = CAPS "Roessler - The sound of a Roessler attractor";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
#include "dsp/Roessler.h"
|
||||
|
||||
class Roessler
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample h, gain;
|
||||
|
||||
DSP::Roessler roessler;
|
||||
@@ -43,14 +43,11 @@ class Roessler
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [6];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{ }
|
||||
void init();
|
||||
void activate() {}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Scape.cc
|
||||
|
||||
Copyright 2004-6 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2004-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -66,15 +66,15 @@ Scape::one_cycle (int frames)
|
||||
// double one_over_n = 1 / (double) frames;
|
||||
|
||||
/* delay times */
|
||||
double t1 = fs * 60. / *ports[1];
|
||||
int div = (int) *ports[2];
|
||||
double t1 = fs * 60. / getport(1);
|
||||
int div = (int) getport(2);
|
||||
double t2 = t1 * dividers[div];
|
||||
|
||||
fb = *ports[3];
|
||||
fb = getport(3);
|
||||
|
||||
double dry = *ports[4];
|
||||
double dry = getport(4);
|
||||
dry = dry * dry;
|
||||
double blend = *ports[5];
|
||||
double blend = getport(5);
|
||||
|
||||
d_sample * dl = ports[6];
|
||||
d_sample * dr = ports[7];
|
||||
@@ -92,7 +92,6 @@ Scape::one_cycle (int frames)
|
||||
period = t2 * .5;
|
||||
float f, q;
|
||||
|
||||
//fprintf (stderr, "%.3f: %d\n", period, (int) period);
|
||||
f = frandom2();
|
||||
svf[0].set_f_Q (300 + 300 * f / fs, .3);
|
||||
svf[3].set_f_Q (300 + 600 * 2 * f / fs, .6);
|
||||
@@ -107,10 +106,13 @@ Scape::one_cycle (int frames)
|
||||
int n = min ((int) period, frames);
|
||||
if (n < 1)
|
||||
{
|
||||
/* not reached */
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "Scape: %d - %d/%d frames, t2 = %.3f?!?\n", (int) period, n, frames, t2);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* sample loop */
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
@@ -193,9 +195,9 @@ Descriptor<Scape>::setup()
|
||||
Label = "Scape";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Scape - Stereo delay + Filters";
|
||||
Name = CAPS "Scape - Stereo delay + Filters";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-6";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -38,12 +38,11 @@
|
||||
typedef DSP::SVF<1> SVF;
|
||||
|
||||
class Scape
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample time, fb;
|
||||
double period;
|
||||
d_sample normal; /* denormal protection */
|
||||
|
||||
DSP::Lorenz lfo[2];
|
||||
DSP::Delay delay;
|
||||
@@ -51,28 +50,14 @@ class Scape
|
||||
DSP::OnePoleHP hipass[4];
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
d_sample * ports [8];
|
||||
/*
|
||||
* in
|
||||
* bpm
|
||||
* div
|
||||
* feedback
|
||||
* dry
|
||||
* blend
|
||||
* out:l
|
||||
* out:r
|
||||
*/
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
void init()
|
||||
{
|
||||
fs = _fs;
|
||||
delay.init ((int) (2.01 * fs)); /* two seconds = 30 bpm + */
|
||||
normal = NOISE_FLOOR;
|
||||
for (int i = 0; i < 2; ++i)
|
||||
lfo[i].init(),
|
||||
lfo[i].set_rate (.00000001 * fs);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Sin.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -31,9 +31,8 @@
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Sin::init (double _fs)
|
||||
Sin::init()
|
||||
{
|
||||
fs = _fs;
|
||||
sin.set_f (f = .005, fs, 0);
|
||||
gain = 0;
|
||||
}
|
||||
@@ -43,10 +42,10 @@ void
|
||||
Sin::one_cycle (int frames)
|
||||
{
|
||||
if (f != *ports[0])
|
||||
sin.set_f (f = *ports[0], fs, sin.get_phase());
|
||||
sin.set_f (f = getport(0), fs, sin.get_phase());
|
||||
|
||||
double g = (gain == *ports[1]) ?
|
||||
1 : pow (*ports[1] / gain, 1. / (double) frames);
|
||||
1 : pow (getport(1) / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[2];
|
||||
|
||||
@@ -56,7 +55,7 @@ Sin::one_cycle (int frames)
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[1];
|
||||
gain = getport(1);
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -67,7 +66,7 @@ Sin::port_info [] =
|
||||
{
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | LOG | DEFAULT_440, 0, .5}
|
||||
{BOUNDED | LOG | DEFAULT_100, 0.0001, 20000}
|
||||
}, {
|
||||
"volume",
|
||||
INPUT | CONTROL,
|
||||
@@ -86,9 +85,9 @@ Descriptor<Sin>::setup()
|
||||
Label = "Sin";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Sin - Sine wave generator";
|
||||
Name = CAPS "Sin - Sine wave generator";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -31,26 +31,21 @@
|
||||
#include "dsp/Sine.h"
|
||||
|
||||
class Sin
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample f, gain;
|
||||
|
||||
DSP::Sine sin;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [3];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{ }
|
||||
void init();
|
||||
void activate() {}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
SweepVF.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2002-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -33,21 +33,21 @@
|
||||
#include "SweepVF.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
#include "dsp/RBJ.h"
|
||||
|
||||
void
|
||||
SweepVFI::init (double _fs)
|
||||
SweepVFI::init()
|
||||
{
|
||||
fs = _fs;
|
||||
f = .1;
|
||||
Q = .1;
|
||||
lorenz.init();
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
SweepVFI::activate()
|
||||
{
|
||||
svf.reset();
|
||||
svf.set_f_Q (f = *ports[1] / fs, Q = *ports[2]);
|
||||
svf.set_f_Q (f = getport(1) / fs, Q = getport(2));
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
@@ -62,12 +62,12 @@ SweepVFI::one_cycle (int frames)
|
||||
|
||||
double one_over_blocks = 1 / (double) blocks;
|
||||
/* cheesy linear interpolation for f, works well though. */
|
||||
double df = (*ports[1] / fs - f) * one_over_blocks;
|
||||
double dQ = (*ports[2] - Q) * one_over_blocks;
|
||||
double df = (getport(1) / fs - f) * one_over_blocks;
|
||||
double dQ = (getport(2) - Q) * one_over_blocks;
|
||||
|
||||
svf.set_out ((int) *ports[3]);
|
||||
svf.set_out ((int) getport(3));
|
||||
|
||||
lorenz.set_rate (*ports[7]);
|
||||
lorenz.set_rate (getport(7));
|
||||
|
||||
d_sample * d = ports[8];
|
||||
|
||||
@@ -76,11 +76,11 @@ SweepVFI::one_cycle (int frames)
|
||||
lorenz.step();
|
||||
|
||||
double modulation =
|
||||
*ports[4] * lorenz.get_x() +
|
||||
*ports[5] * lorenz.get_y() +
|
||||
*ports[6] * lorenz.get_z();
|
||||
getport(4) * lorenz.get_x() +
|
||||
getport(5) * lorenz.get_y() +
|
||||
getport(6) * lorenz.get_z();
|
||||
|
||||
double scale = *ports[4] + *ports[5] + *ports[6];
|
||||
double scale = getport(4) + getport(5) + getport(6);
|
||||
|
||||
modulation *= scale * f;
|
||||
svf.set_f_Q (max (.001, f + modulation), Q);
|
||||
@@ -98,10 +98,8 @@ SweepVFI::one_cycle (int frames)
|
||||
Q += dQ;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
|
||||
f = *ports[1] / fs;
|
||||
Q = *ports[2];
|
||||
f = getport(1) / fs;
|
||||
Q = getport(2);
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -116,7 +114,7 @@ SweepVFI::port_info [] =
|
||||
}, {
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | DEFAULT_LOW, 0.002, 0.08}
|
||||
{BOUNDED | LOG | DEFAULT_LOW, 83, 3383}
|
||||
}, {
|
||||
"Q",
|
||||
INPUT | CONTROL,
|
||||
@@ -155,9 +153,9 @@ Descriptor<SweepVFI>::setup()
|
||||
Label = "SweepVFI";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: SweepVFI - Resonant filter, f swept by a Lorenz fractal";
|
||||
Name = CAPS "SweepVFI - Resonant filter swept by a Lorenz fractal";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -166,21 +164,19 @@ Descriptor<SweepVFI>::setup()
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
SweepVFII::init (double _fs)
|
||||
SweepVFII::init()
|
||||
{
|
||||
fs = _fs;
|
||||
f = .1;
|
||||
Q = .1;
|
||||
lorenz1.init();
|
||||
lorenz2.init();
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
SweepVFII::activate()
|
||||
{
|
||||
svf.reset();
|
||||
svf.set_f_Q (f = *ports[1] / fs, Q = *ports[2]);
|
||||
svf.set_f_Q (f = getport(1) / fs, Q = getport(2));
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
@@ -195,13 +191,13 @@ SweepVFII::one_cycle (int frames)
|
||||
|
||||
double one_over_blocks = 1 / (double) blocks;
|
||||
/* cheesy linear interpolation for f, works well though. */
|
||||
double df = (*ports[1] / fs - f) * one_over_blocks;
|
||||
double dQ = (*ports[2] - Q) * one_over_blocks;
|
||||
double df = (getport(1) / fs - f) * one_over_blocks;
|
||||
double dQ = (getport(2) - Q) * one_over_blocks;
|
||||
|
||||
svf.set_out ((int) *ports[3]);
|
||||
svf.set_out ((int) getport(3));
|
||||
|
||||
lorenz1.set_rate (*ports[7]);
|
||||
lorenz2.set_rate (*ports[11]);
|
||||
lorenz1.set_rate (getport(7));
|
||||
lorenz2.set_rate (getport(11));
|
||||
|
||||
d_sample * d = ports[12];
|
||||
|
||||
@@ -211,11 +207,11 @@ SweepVFII::one_cycle (int frames)
|
||||
lorenz1.step();
|
||||
|
||||
double modulation1 =
|
||||
*ports[4] * lorenz1.get_x() +
|
||||
*ports[5] * lorenz1.get_y() +
|
||||
*ports[6] * lorenz1.get_z();
|
||||
getport(4) * lorenz1.get_x() +
|
||||
getport(5) * lorenz1.get_y() +
|
||||
getport(6) * lorenz1.get_z();
|
||||
|
||||
double scale1 = *ports[4] + *ports[5] + *ports[6];
|
||||
double scale1 = getport(4) + getport(5) + getport(6);
|
||||
|
||||
modulation1 *= scale1 * f;
|
||||
|
||||
@@ -223,11 +219,11 @@ SweepVFII::one_cycle (int frames)
|
||||
lorenz2.step();
|
||||
|
||||
double modulation2 =
|
||||
*ports[8] * lorenz2.get_x() +
|
||||
*ports[9] * lorenz2.get_y() +
|
||||
*ports[10] * lorenz2.get_z();
|
||||
getport(8) * lorenz2.get_x() +
|
||||
getport(9) * lorenz2.get_y() +
|
||||
getport(10) * lorenz2.get_z();
|
||||
|
||||
double scale2 = *ports[8] + *ports[9] + *ports[10];
|
||||
double scale2 = getport(8) + getport(9) + getport(10);
|
||||
|
||||
/* enforce Q limit */
|
||||
double q = Q + (modulation2 * scale2 * Q);
|
||||
@@ -248,10 +244,8 @@ SweepVFII::one_cycle (int frames)
|
||||
Q += dQ;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
|
||||
f = *ports[1] / fs;
|
||||
Q = *ports[2];
|
||||
f = getport(1) / fs;
|
||||
Q = getport(2);
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -266,7 +260,7 @@ SweepVFII::port_info [] =
|
||||
}, {
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | DEFAULT_LOW, 0.002, 0.08}
|
||||
{BOUNDED | LOG | DEFAULT_LOW, 83, 3383}
|
||||
}, {
|
||||
"Q",
|
||||
INPUT | CONTROL,
|
||||
@@ -321,11 +315,144 @@ Descriptor<SweepVFII>::setup()
|
||||
Label = "SweepVFII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: SweepVFII - Resonant filter, f and Q swept by a Lorenz fractal";
|
||||
Name = CAPS "SweepVFII - Resonant filter, f and Q swept by a Lorenz fractal";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
AutoWah::init()
|
||||
{
|
||||
f = 800 / fs;
|
||||
Q = .5;
|
||||
}
|
||||
|
||||
void
|
||||
AutoWah::activate()
|
||||
{
|
||||
svf.reset();
|
||||
svf.set_f_Q (f = getport(1) / fs, Q = getport(2));
|
||||
svf.set_out (DSP::SVF<1>::Band);
|
||||
|
||||
/* hi-passing input for envelope RMS calculation */
|
||||
hp.set_f (250. / fs);
|
||||
|
||||
/* smoothing the envelope at 20 Hz */
|
||||
DSP::RBJ::LP (20. * BLOCK_SIZE / fs, .6, filter.a, filter.b);
|
||||
|
||||
rms.reset();
|
||||
hp.reset();
|
||||
filter.reset();
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
AutoWah::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
int blocks = frames / BLOCK_SIZE;
|
||||
if (frames & (BLOCK_SIZE - 1))
|
||||
++blocks;
|
||||
|
||||
double one_over_blocks = 1 / (double) blocks;
|
||||
/* cheesy linear interpolation for f, works well though. */
|
||||
double df = (getport(1) / fs - f) * one_over_blocks;
|
||||
double dQ = (getport(2) - Q) * one_over_blocks;
|
||||
|
||||
double scale = getport(3);
|
||||
|
||||
d_sample * d = ports[4];
|
||||
|
||||
while (frames)
|
||||
{
|
||||
double m = rms.rms();
|
||||
|
||||
m = filter.process (m + normal);
|
||||
|
||||
/* Leaving debug output in your code is cheesy! */
|
||||
/*
|
||||
static int _turn = 0;
|
||||
if (_turn++ % 100 == 0)
|
||||
fprintf (stderr, "%.4f\n", m);
|
||||
*/
|
||||
|
||||
m *= scale * .08;
|
||||
svf.set_f_Q (max (.001, f + m), Q);
|
||||
|
||||
int n = min (frames, BLOCK_SIZE);
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
d_sample x = s[i] + normal;
|
||||
/* A stacked SVF in bandpass mode is rather quiet, which is
|
||||
* compensated here */
|
||||
F (d, i, 2 * svf.process (x), adding_gain);
|
||||
/* for envelope calculation, prefer high f content */
|
||||
x = hp.process (x);
|
||||
rms.store (x * x);
|
||||
}
|
||||
|
||||
s += n;
|
||||
d += n;
|
||||
frames -= n;
|
||||
|
||||
f += df;
|
||||
Q += dQ;
|
||||
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
f = getport(1) / fs;
|
||||
Q = getport(2);
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
AutoWah::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{0, 0, 0}
|
||||
}, {
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | LOG | DEFAULT_LOW, 43, 933}
|
||||
}, {
|
||||
"Q",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_LOW, 0.001, .999}
|
||||
}, {
|
||||
"depth",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<AutoWah>::setup()
|
||||
{
|
||||
UniqueID = 2593;
|
||||
Label = "AutoWah";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = CAPS "AutoWah - Resonant envelope-following filter";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
SweepVF.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2004-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
SweepVFII, the same with Q being modulated by a second fractal.
|
||||
|
||||
AutoWah, SVF being modulated by 'instant' amplitude (envelope).
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
@@ -32,10 +34,16 @@
|
||||
#define _SWEEP_VF_H_
|
||||
|
||||
#include "dsp/SVF.h"
|
||||
|
||||
#include "dsp/Lorenz.h"
|
||||
#include "dsp/Roessler.h"
|
||||
|
||||
#include "dsp/RMS.h"
|
||||
#include "dsp/BiQuad.h"
|
||||
#include "dsp/OnePole.h"
|
||||
|
||||
class SweepVFI
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
@@ -51,19 +59,13 @@ class SweepVFI
|
||||
DSP::StackedSVF<1,2> svf;
|
||||
DSP::Lorenz lorenz;
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [9];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
@@ -78,6 +80,45 @@ class SweepVFI
|
||||
};
|
||||
|
||||
class SweepVFII
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
/* svf parameters */
|
||||
d_sample f, Q;
|
||||
|
||||
/* needs to be a power of two */
|
||||
enum {
|
||||
BLOCK_SIZE = 32
|
||||
};
|
||||
|
||||
DSP::StackedSVF<1,2> svf;
|
||||
DSP::Lorenz lorenz1;
|
||||
DSP::Lorenz lorenz2;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
|
||||
void init();
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
class AutoWah
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
@@ -91,22 +132,18 @@ class SweepVFII
|
||||
};
|
||||
|
||||
DSP::StackedSVF<1,2> svf;
|
||||
DSP::Lorenz lorenz1;
|
||||
DSP::Lorenz lorenz2;
|
||||
DSP::RMS rms;
|
||||
|
||||
d_sample normal;
|
||||
DSP::BiQuad filter;
|
||||
DSP::OnePoleHP hp;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [13];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
ToneControls.cc
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2004-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
|
||||
195
plugins/ladspa_effect/caps/ToneStack.cc
Normal file
195
plugins/ladspa_effect/caps/ToneStack.cc
Normal file
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
ToneStack.cc
|
||||
|
||||
Copyright 2006-7
|
||||
David Yeh <dtyeh@ccrma.stanford.edu>
|
||||
Tim Goetze <tim@quitte.de> (cosmetics)
|
||||
|
||||
Tone Stack emulation.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "ToneStack.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
#include "dsp/tonestack/ks_tab.h"
|
||||
#include "dsp/tonestack/vs_tab.h"
|
||||
|
||||
DSP::TSParameters
|
||||
DSP::ToneStack::presets[] = {
|
||||
/* for convenience, temporarily define k and MOhms as well as nF and pF */
|
||||
#define k * 1000
|
||||
#define M * 1000000
|
||||
#define nF * 1e-9
|
||||
#define pF * 1e-12
|
||||
/* parameter order is R1 - R4, C1 - C3 */
|
||||
/* { 250000, 1000000, 25000, 56000, 0.25e-9, 20e-9, 20e-9 }, DY */
|
||||
/* Fender */
|
||||
{250 k, 1 M, 25 k, 56 k, 250 pF, 20 nF, 20 nF}, /* 59 Bassman 5F6-A */
|
||||
{250 k, 250 k, 10 k, 100 k, 120 pF, 100 nF, 47 nF}, /* 69 Twin Reverb AA270 */
|
||||
{250 k, 250 k, 4.8 k, 100 k, 250 pF, 100 nF, 47 nF}, /* 64 Princeton AA1164 */
|
||||
/* Marshall */
|
||||
{220 k, 1 M, 22 k, 33 k, 470 pF, 22 nF, 22 nF}, /* 59/81 JCM-800 Lead 100 2203 */
|
||||
/* R4 is a 10 k fixed + 100 k pot in series actually */
|
||||
{250 k, 1 M, 25 k, 56 k, 500 pF, 22 nF, 22 nF}, /* 81 2000 Lead */
|
||||
|
||||
#if 0
|
||||
{220 k, 1 M, 22 k, 33 k, 470 pF, 22 nF, 22 nF}, /* 90 JCM-900 Master 2100 (same as JCM-800) */
|
||||
{250 k, 1 M, 25 k, 33 k, 500 pF, 22 nF, 22 nF}, /* 67 Major Lead 200 */
|
||||
{250 k, 250 k, 25 k, 56 k, 250 pF, 47 nF, 47 nF}, /* undated M2199 30W solid state */
|
||||
#endif
|
||||
/* Vox -- R3 is fixed (circuit differs anyway) */
|
||||
{1 M, 1 M, 10 k, 100 k, 50 pF, 22 nF, 22 nF}, /* 59/86 AC-30 */
|
||||
#undef k
|
||||
#undef M
|
||||
#undef nF
|
||||
#undef pF
|
||||
};
|
||||
|
||||
int DSP::ToneStack::n_presets = TS_N_PRESETS;
|
||||
|
||||
void
|
||||
ToneStack::activate()
|
||||
{
|
||||
tonestack.activate (ports + 2);
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
ToneStack::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
tonestack.start_cycle (ports + 1);
|
||||
d_sample * d = ports[5];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register d_sample a = s[i];
|
||||
a = tonestack.process (a + normal);
|
||||
F (d, i, a, adding_gain);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PortInfo
|
||||
ToneStack::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{BOUNDED, -1, 1}
|
||||
}, {
|
||||
"model",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0 | INTEGER, 0, TS_N_PRESETS - 1}
|
||||
}, {
|
||||
"bass",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"mid",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"treble",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<ToneStack>::setup()
|
||||
{
|
||||
UniqueID = 2589;
|
||||
Label = "ToneStack";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = CAPS "ToneStack - Tone stack emulation";
|
||||
Maker = "David Yeh <dtyeh@ccrma.stanford.edu>";
|
||||
Copyright = "GPL, 2006-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
ToneStackLT::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
tonestack.updatecoefs (ports + 1);
|
||||
d_sample * d = ports[4];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register d_sample a = s[i];
|
||||
a = tonestack.process (a + normal);
|
||||
F (d, i, a, adding_gain);
|
||||
}
|
||||
}
|
||||
|
||||
PortInfo
|
||||
ToneStackLT::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{BOUNDED, -1, 1}
|
||||
}, {
|
||||
"bass",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"mid",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"treble",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<ToneStackLT>::setup()
|
||||
{
|
||||
UniqueID = 2590;
|
||||
Label = "ToneStackLT";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = CAPS "ToneStackLT - Tone stack emulation, lattice filter 44.1";
|
||||
Maker = "David Yeh <dtyeh@ccrma.stanford.edu>";
|
||||
Copyright = "GPL, 2006-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
98
plugins/ladspa_effect/caps/ToneStack.h
Normal file
98
plugins/ladspa_effect/caps/ToneStack.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
ToneStack.h
|
||||
|
||||
Copyright 2006-7
|
||||
David Yeh <dtyeh@ccrma.stanford.edu>
|
||||
Tim Goetze <tim@quitte.de> (cosmetics)
|
||||
|
||||
Tone Stack emulation.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _TONESTACK_H_
|
||||
#define _TONESTACK_H_
|
||||
|
||||
#include "dsp/util.h"
|
||||
#include "dsp/windows.h"
|
||||
#include "dsp/ToneStack.h"
|
||||
|
||||
class ToneStack
|
||||
: public Plugin
|
||||
{
|
||||
private:
|
||||
DSP::ToneStack tonestack;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
|
||||
void init()
|
||||
{
|
||||
tonestack.init (fs);
|
||||
}
|
||||
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
/* /////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
class ToneStackLT
|
||||
: public Plugin
|
||||
{
|
||||
private:
|
||||
DSP::ToneStackLT tonestack;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
|
||||
void init()
|
||||
{
|
||||
tonestack.init (fs);
|
||||
}
|
||||
|
||||
void activate()
|
||||
{ tonestack.activate (ports + 1); }
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _TONESTACK_H_ */
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
VCO.cc
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2004-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -32,10 +32,8 @@
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
VCOs::init (double _fs)
|
||||
VCOs::init()
|
||||
{
|
||||
fs = _fs;
|
||||
|
||||
/* going a fair bit lower than nominal with fc because the filter
|
||||
* rolloff is not as steep as we might like it to be. */
|
||||
double f = .5 * M_PI / OVERSAMPLE;
|
||||
@@ -59,11 +57,11 @@ template <sample_func_t F>
|
||||
void
|
||||
VCOs::one_cycle (int frames)
|
||||
{
|
||||
vco.set_f (*ports[0], OVERSAMPLE * fs);
|
||||
vco.set_saw_square (*ports[1], *ports[2]);
|
||||
vco.set_f (getport(0), OVERSAMPLE * fs);
|
||||
vco.set_saw_square (getport(1), getport(2));
|
||||
|
||||
double g = (gain == *ports[3]) ?
|
||||
1 : pow (*ports[3] / gain, 1. / (double) frames);
|
||||
1 : pow (getport(3) / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[4];
|
||||
|
||||
@@ -77,7 +75,7 @@ VCOs::one_cycle (int frames)
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[3];
|
||||
gain = getport(3);
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -88,7 +86,7 @@ VCOs::port_info [] =
|
||||
{
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | DEFAULT_440, 0, .1}
|
||||
{BOUNDED | LOG | DEFAULT_100, 1, 5751}
|
||||
}, {
|
||||
"tri .. saw",
|
||||
INPUT | CONTROL,
|
||||
@@ -105,10 +103,6 @@ VCOs::port_info [] =
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"latency",
|
||||
OUTPUT | CONTROL,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -119,9 +113,9 @@ Descriptor<VCOs>::setup()
|
||||
Label = "VCOs";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: VCOs - Virtual 'analogue' oscillator";
|
||||
Name = CAPS "VCOs - Virtual 'analogue' oscillator";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
@@ -130,10 +124,8 @@ Descriptor<VCOs>::setup()
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
VCOd::init (double _fs)
|
||||
VCOd::init()
|
||||
{
|
||||
fs = _fs;
|
||||
|
||||
/* going a fair bit lower than nominal with fc because the filter
|
||||
* rolloff is not as steep as we might like it to be. */
|
||||
double f = .5 * M_PI / OVERSAMPLE;
|
||||
@@ -157,16 +149,16 @@ template <sample_func_t F>
|
||||
void
|
||||
VCOd::one_cycle (int frames)
|
||||
{
|
||||
vco.set_f (*ports[0], OVERSAMPLE * fs, *ports[5]);
|
||||
vco.set_f (getport(0), OVERSAMPLE * fs, getport(5));
|
||||
|
||||
vco.vco[0].set_saw_square (*ports[1], *ports[2]);
|
||||
vco.vco[1].set_saw_square (*ports[3], *ports[4]);
|
||||
vco.vco[0].set_saw_square (getport(1), getport(2));
|
||||
vco.vco[1].set_saw_square (getport(3), getport(4));
|
||||
|
||||
vco.set_sync (*ports[6]);
|
||||
vco.set_blend (*ports[7]);
|
||||
vco.set_sync (getport(6));
|
||||
vco.set_blend (getport(7));
|
||||
|
||||
double g = (gain == *ports[8]) ?
|
||||
1 : pow (*ports[8] / gain, 1. / (double) frames);
|
||||
1 : pow (getport(8) / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[9];
|
||||
|
||||
@@ -180,7 +172,7 @@ VCOd::one_cycle (int frames)
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[8];
|
||||
gain = getport(8);
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -191,7 +183,7 @@ VCOd::port_info [] =
|
||||
{
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | DEFAULT_440, 0, .1}
|
||||
{BOUNDED | LOG | DEFAULT_100, 1, 5751}
|
||||
}, {
|
||||
"1: tri .. saw",
|
||||
INPUT | CONTROL,
|
||||
@@ -228,10 +220,6 @@ VCOd::port_info [] =
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"latency",
|
||||
OUTPUT | CONTROL,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -242,9 +230,9 @@ Descriptor<VCOd>::setup()
|
||||
Label = "VCOd";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: VCOd - Double VCO with detune and hard sync options";
|
||||
Name = CAPS "VCOd - Double VCO with detune and hard sync options";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
#include "dsp/windows.h"
|
||||
|
||||
class VCOs
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample f, gain;
|
||||
|
||||
/* ok to just change these as you please, 4/32 works ok, sortof. */
|
||||
@@ -54,27 +54,21 @@ class VCOs
|
||||
DSP::FIR down;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [6];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
VCOs()
|
||||
: down (FIR_SIZE)
|
||||
{ }
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate()
|
||||
{
|
||||
gain = *ports[3];
|
||||
down.reset();
|
||||
vco.reset();
|
||||
/* latency */
|
||||
*ports[5] = OVERSAMPLE;
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
@@ -91,6 +85,7 @@ class VCOs
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
class VCOd
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
@@ -112,23 +107,17 @@ class VCOd
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [11];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
VCOd()
|
||||
: down (FIR_SIZE)
|
||||
{ }
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void init();
|
||||
void activate()
|
||||
{
|
||||
gain = *ports[8];
|
||||
down.reset();
|
||||
vco.reset();
|
||||
/* latency */
|
||||
*ports[10] = OVERSAMPLE;
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
White.cc
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2004-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
@@ -35,7 +35,7 @@ void
|
||||
White::one_cycle (int frames)
|
||||
{
|
||||
double g = (gain == *ports[0]) ?
|
||||
1 : pow (*ports[0] / gain, 1. / (double) frames);
|
||||
1 : pow (getport(0) / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[1];
|
||||
|
||||
@@ -45,7 +45,7 @@ White::one_cycle (int frames)
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[0];
|
||||
gain = getport(0);
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
@@ -71,9 +71,9 @@ Descriptor<White>::setup()
|
||||
Label = "White";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: White - White noise generator";
|
||||
Name = CAPS "White - White noise generator";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
Copyright = "GPL, 2004-7";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "dsp/White.h"
|
||||
|
||||
class White
|
||||
: public Plugin
|
||||
{
|
||||
public:
|
||||
d_sample gain;
|
||||
@@ -38,17 +39,12 @@ class White
|
||||
DSP::White white;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [2];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
{ }
|
||||
|
||||
void init() {}
|
||||
void activate()
|
||||
{
|
||||
gain = .5;
|
||||
|
||||
@@ -46,19 +46,11 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LADSPA_H
|
||||
#include <ladspa.h>
|
||||
#else
|
||||
#include "ladspa-1.1.h"
|
||||
#endif
|
||||
#include "ladspa.h"
|
||||
|
||||
#define BOUNDED (LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE)
|
||||
#define INTEGER LADSPA_HINT_INTEGER
|
||||
#define FS LADSPA_HINT_SAMPLE_RATE
|
||||
/* #define FS LADSPA_HINT_SAMPLE_RATE *//* deprecated */
|
||||
#define LOG LADSPA_HINT_LOGARITHMIC
|
||||
#define TOGGLE LADSPA_HINT_TOGGLED
|
||||
|
||||
@@ -84,16 +76,6 @@
|
||||
#define MIN_GAIN .000001 /* -120 dB */
|
||||
#define NOISE_FLOOR .00000000000005 /* -266 dB */
|
||||
|
||||
#ifdef BUILD_WIN32
|
||||
typedef int8_t int8;
|
||||
typedef uint8_t uint8;
|
||||
typedef int16_t int16;
|
||||
typedef uint16_t uint16;
|
||||
typedef int32_t int32;
|
||||
typedef uint32_t uint32;
|
||||
typedef int64_t int64;
|
||||
typedef uint64_t uint64;
|
||||
#else
|
||||
typedef __int8_t int8;
|
||||
typedef __uint8_t uint8;
|
||||
typedef __int16_t int16;
|
||||
@@ -102,7 +84,6 @@ typedef __int32_t int32;
|
||||
typedef __uint32_t uint32;
|
||||
typedef __int64_t int64;
|
||||
typedef __uint64_t uint64;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
char * name;
|
||||
@@ -144,11 +125,73 @@ X max (X x, Y y)
|
||||
}
|
||||
|
||||
#endif /* ! max */
|
||||
|
||||
|
||||
template <class T>
|
||||
T clamp (T value, T lower, T upper)
|
||||
{
|
||||
if (value < lower) return lower;
|
||||
if (value > upper) return upper;
|
||||
return value;
|
||||
}
|
||||
|
||||
static inline float
|
||||
frandom()
|
||||
{
|
||||
return (float) rand() / (float) RAND_MAX;
|
||||
return (float) random() / (float) RAND_MAX;
|
||||
}
|
||||
|
||||
/* for testing only. */
|
||||
inline bool
|
||||
is_denormal (float & f)
|
||||
{
|
||||
int32 i = *((int32 *) &f);
|
||||
return ((i & 0x7f800000) == 0);
|
||||
}
|
||||
|
||||
/* not sure if this double version is correct, actually ... */
|
||||
inline bool
|
||||
is_denormal (double & f)
|
||||
{
|
||||
int64 i = *((int64 *) &f);
|
||||
return ((i & 0x7fe0000000000000ll) == 0);
|
||||
}
|
||||
|
||||
#ifdef __i386__
|
||||
#define TRAP asm ("int $3;")
|
||||
#else
|
||||
#define TRAP
|
||||
#endif
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
#define CAPS "C* "
|
||||
|
||||
class Plugin {
|
||||
public:
|
||||
double fs; /* sample rate */
|
||||
double adding_gain; /* for run_adding() */
|
||||
|
||||
int first_run; /* 1st block after activate(), do no parameter smoothing */
|
||||
d_sample normal; /* renormal constant */
|
||||
|
||||
d_sample ** ports;
|
||||
LADSPA_PortRangeHint * ranges; /* for getport() below */
|
||||
|
||||
public:
|
||||
/* get port value, mapping inf or nan to 0 */
|
||||
inline d_sample getport_unclamped (int i)
|
||||
{
|
||||
d_sample v = *ports[i];
|
||||
return (isinf (v) || isnan(v)) ? 0 : v;
|
||||
}
|
||||
|
||||
/* get port value and clamp to port range */
|
||||
inline d_sample getport (int i)
|
||||
{
|
||||
LADSPA_PortRangeHint & r = ranges[i];
|
||||
d_sample v = getport_unclamped (i);
|
||||
return clamp (v, r.LowerBound, r.UpperBound);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _BASICS_H_ */
|
||||
|
||||
@@ -48,13 +48,11 @@ class BiQuad
|
||||
reset();
|
||||
}
|
||||
|
||||
BiQuad (d_sample * _a, d_sample * _b)
|
||||
void copy (BiQuad & bq)
|
||||
{
|
||||
for (int i = 0; i < 3; ++i)
|
||||
a[i] = _a[i],
|
||||
b[i] = _b[i];
|
||||
|
||||
reset();
|
||||
a[i] = bq.a[i],
|
||||
b[i] = bq.b[i];
|
||||
}
|
||||
|
||||
void reset()
|
||||
@@ -65,6 +63,14 @@ class BiQuad
|
||||
y[0] = y[1] = 0.;
|
||||
}
|
||||
|
||||
/* denormal zapping */
|
||||
void flush_0()
|
||||
{
|
||||
for (int i = 0; i < 2; ++i)
|
||||
if (is_denormal (y[i]))
|
||||
y[i] = 0;
|
||||
}
|
||||
|
||||
inline d_sample process (d_sample s)
|
||||
{
|
||||
register int z = h;
|
||||
@@ -86,7 +92,8 @@ class BiQuad
|
||||
return r;
|
||||
}
|
||||
|
||||
/* additional methods for using the biquad to upsample */
|
||||
/* additional methods for using the biquad to filter an
|
||||
* upsampled signal with 0 padding */
|
||||
inline d_sample process_0_1()
|
||||
{
|
||||
register int z = h;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
Eq.h
|
||||
|
||||
Copyright 2004 Tim Goetze <tim@quitte.de>
|
||||
Copyright 2004-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
equalizer circuit using recursive filtering.
|
||||
based on a motorola paper implementing a similar circuit on a DSP56001.
|
||||
Equalizer circuit using recursive filtering.
|
||||
Based on a motorola paper implementing a similar circuit on a DSP56001.
|
||||
|
||||
*/
|
||||
/*
|
||||
@@ -31,86 +31,64 @@
|
||||
|
||||
namespace DSP {
|
||||
|
||||
/* a single bandpass as used by the Eq, expressed as a biquad. like all
|
||||
* band-pass filters i know, the filter works with a FIR coefficient of 0
|
||||
/* A single bandpass as used by the Eq, expressed as a biquad. Like all
|
||||
* band-pass filters I know of, the filter works with a FIR coefficient of 0
|
||||
* for x[-1], so a generic biquad isn't the optimum implementation.
|
||||
*
|
||||
* This routine isn't used anywhere, just here for testing purposes.
|
||||
*/
|
||||
class BP
|
||||
template <class T>
|
||||
void
|
||||
_BP (double fc, double Q, T * ca, T * cb)
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
BP (double fc, double Q, T * ca, T * cb)
|
||||
{
|
||||
double theta = 2 * fc * M_PI;
|
||||
double theta = 2 * fc * M_PI;
|
||||
|
||||
double
|
||||
b = (Q - theta * .5) / (2 * Q + theta),
|
||||
a = (.5 - b) / 2,
|
||||
c = (.5 + b) * cos (theta);
|
||||
double
|
||||
b = (Q - theta * .5) / (2 * Q + theta),
|
||||
a = (.5 - b) / 2,
|
||||
c = (.5 + b) * cos (theta);
|
||||
|
||||
ca[0] = 2 * a;
|
||||
ca[1] = 0;
|
||||
ca[2] = -2 * a;
|
||||
ca[0] = 2 * a;
|
||||
ca[1] = 0;
|
||||
ca[2] = -2 * a;
|
||||
|
||||
cb[0] = 0;
|
||||
cb[1] = 2 * c;
|
||||
cb[2] = -2 * b;
|
||||
}
|
||||
};
|
||||
cb[0] = 0;
|
||||
cb[1] = 2 * c;
|
||||
cb[2] = -2 * b;
|
||||
}
|
||||
|
||||
/* BANDS must be a multiple of 4 to enable the use of SSE instructions.
|
||||
* however, the current SSE-enabled process() method fails to compile if
|
||||
* -funroll-loops is passed to gcc.
|
||||
*/
|
||||
template <int USE_BANDS, int BANDS>
|
||||
template <int Bands, class eq_sample = float>
|
||||
class Eq
|
||||
{
|
||||
public:
|
||||
/* over-size state buffer to allow alignment */
|
||||
float state [BANDS * 8 + 4 + 4];
|
||||
/* recursion coefficients, 3 per band */
|
||||
float * a, * b, * c;
|
||||
eq_sample __attribute__ ((aligned)) a[Bands], b[Bands], c[Bands];
|
||||
/* past outputs, 2 per band */
|
||||
float * y;
|
||||
eq_sample __attribute__ ((aligned)) y[2][Bands];
|
||||
/* current gain and recursion factor, each 1 per band = 2 */
|
||||
float * gain, * gf;
|
||||
/* aligned storage for output summation */
|
||||
float * temp;
|
||||
/* aligned storage for constants */
|
||||
float * two;
|
||||
eq_sample __attribute__ ((aligned)) gain[Bands], gf[Bands];
|
||||
/* input history */
|
||||
float x[2];
|
||||
eq_sample x[2];
|
||||
/* history index */
|
||||
int h;
|
||||
|
||||
eq_sample normal;
|
||||
|
||||
Eq()
|
||||
{
|
||||
/* take care of 128-bit alignment */
|
||||
long s = (long) (char *) state;
|
||||
s &= 0xF;
|
||||
if (s)
|
||||
s = 16 - s;
|
||||
|
||||
/* assign coefficients */
|
||||
a = (float *) (((char *) state) + s);
|
||||
b = a + BANDS;
|
||||
c = a + 2 * BANDS;
|
||||
|
||||
/* output history (input is common to all bands) */
|
||||
y = a + 3 * BANDS;
|
||||
gain = a + 5 * BANDS;
|
||||
gf = a + 6 * BANDS;
|
||||
temp = a + 7 * BANDS;
|
||||
two = temp + 4;
|
||||
two[0] = two[1] = two[2] = two[3] = 2;
|
||||
|
||||
h = 0;
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
for (int i = 0; i < 2 * BANDS; ++i)
|
||||
y[i] = 0;
|
||||
{
|
||||
for (int z = 0; z < 2; ++z)
|
||||
{
|
||||
// work-around for buggy optimizer in GCC 4.3
|
||||
for (int i = 0; i < Bands-1; ++i)
|
||||
y[z][i] = 0;
|
||||
y[z][Bands-1] = 0;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
x[i] = 0;
|
||||
@@ -121,9 +99,10 @@ class Eq
|
||||
double f = 31.25;
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; i < USE_BANDS && f < fs / 2; ++i, f *= 2)
|
||||
for (i = 0; i < Bands && f < fs / 2; ++i, f *= 2)
|
||||
init_band (i, 2 * f * M_PI / fs, Q);
|
||||
for ( ; i < BANDS; ++i)
|
||||
/* just in case, zero the remaining coefficients */
|
||||
for ( ; i < Bands; ++i)
|
||||
zero_band (i);
|
||||
|
||||
reset();
|
||||
@@ -134,6 +113,7 @@ class Eq
|
||||
b[i] = (Q - theta * .5) / (2 * Q + theta);
|
||||
a[i] = (.5 - b[i]) / 2;
|
||||
c[i] = (.5 + b[i]) * cos (theta);
|
||||
/* fprintf (stderr, "%02d %f %f %f\n", i, a[i], b[i], c[i]); */
|
||||
gain[i] = 1;
|
||||
gf[i] = 1;
|
||||
}
|
||||
@@ -146,28 +126,36 @@ class Eq
|
||||
/* per-band recursion:
|
||||
* y = 2 * (a * (x - x[-2]) + c * y[-1] - b * y[-2])
|
||||
*/
|
||||
d_sample process (d_sample s)
|
||||
eq_sample process (eq_sample s)
|
||||
{
|
||||
int z1 = h, z2 = h ^ 1;
|
||||
|
||||
float * y1 = y + z1 * BANDS;
|
||||
float * y2 = y + z2 * BANDS;
|
||||
eq_sample * y1 = y[z1];
|
||||
eq_sample * y2 = y[z2];
|
||||
|
||||
d_sample x_x2 = s - x[z2];
|
||||
d_sample r = 0;
|
||||
eq_sample x_x2 = s - x[z2];
|
||||
eq_sample r = 0;
|
||||
|
||||
for (int i = 0; i < USE_BANDS; ++i)
|
||||
for (int i = 0; i < Bands; ++i)
|
||||
{
|
||||
y2[i] = 2 * (a[i] * x_x2 + c[i] * y1[i] - b[i] * y2[i]);
|
||||
y2[i] = normal + 2 * (a[i] * x_x2 + c[i] * y1[i] - b[i] * y2[i]);
|
||||
r += gain[i] * y2[i];
|
||||
gain[i] *= gf[i];
|
||||
}
|
||||
|
||||
|
||||
x[z2] = s;
|
||||
h = z2;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/* zap denormals in history */
|
||||
void flush_0()
|
||||
{
|
||||
for (int i = 0; i < Bands; ++i)
|
||||
if (is_denormal (y[0][i]))
|
||||
y[0][i] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
/* Copyright 2001-4 tim goetze <tim@quitte.de> -- see 'COPYING'. */
|
||||
|
||||
/* class that sets the FP rounding mode to 'truncate' in the constructor
|
||||
/* Sets the FP rounding mode to 'truncate' in the constructor
|
||||
* and loads the previous FP conrol word in the destructor.
|
||||
*
|
||||
* i386 implementation only, on other architectures this is a no-op.
|
||||
* By directly using the machine instruction to convert float to int
|
||||
* we avoid the performance hit that loading the control word twice for
|
||||
* every (int) cast causes on i386.
|
||||
*
|
||||
* On other architectures this is a no-op.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_FP_TRUNCATE_MODE_H_
|
||||
#define _DSP_FP_TRUNCATE_MODE_H_
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
#define fstcw(i) \
|
||||
__asm__ __volatile__ ("fstcw %0" : "=m" (i))
|
||||
|
||||
@@ -20,15 +23,12 @@
|
||||
/* gcc chokes on __volatile__ sometimes. */
|
||||
#define fistp(f,i) \
|
||||
__asm__ ("fistpl %0" : "=m" (i) : "t" (f) : "st")
|
||||
|
||||
#else /* ! __i386__ */
|
||||
|
||||
#define fstcw(i)
|
||||
#define fldcw(i)
|
||||
|
||||
#define fistp(f,i) \
|
||||
i = (int) f
|
||||
|
||||
#endif
|
||||
|
||||
namespace DSP {
|
||||
|
||||
102
plugins/ladspa_effect/caps/dsp/LatFilt.h
Normal file
102
plugins/ladspa_effect/caps/dsp/LatFilt.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
LatFilt.h
|
||||
|
||||
Copyright 2006 David Yeh <dtyeh@ccrma.stanford.edu>
|
||||
|
||||
Lattice digital filter.
|
||||
Assumes order of b = order of a.
|
||||
Assumes a0 = 1.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_LatFilt_H_
|
||||
#define _DSP_LatFilt_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
// ORDER is the highest power of s in the transfer function
|
||||
template <int ORDER>
|
||||
class LatFilt
|
||||
{
|
||||
public:
|
||||
double vcoef[ORDER+1];
|
||||
double kcoef[ORDER];
|
||||
double state[ORDER];
|
||||
double y;
|
||||
|
||||
// fade factors
|
||||
double vf[ORDER+1];
|
||||
double kf[ORDER];
|
||||
|
||||
|
||||
void reset()
|
||||
{
|
||||
for (int i = 0; i < ORDER; i++) {
|
||||
state[i] = 0; // zero state
|
||||
vf[i] = 1; // reset fade factor
|
||||
kf[i] = 1;
|
||||
}
|
||||
vf[ORDER] = 1;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
void init (double fs)
|
||||
{
|
||||
reset();
|
||||
clearcoefs();
|
||||
}
|
||||
|
||||
void clearcoefs() {
|
||||
for (int i=0; i< ORDER; i++) {
|
||||
vcoef[i] = 0;
|
||||
kcoef[i] = 0;
|
||||
}
|
||||
vcoef[ORDER] = 0;
|
||||
}
|
||||
|
||||
d_sample process (d_sample s) {
|
||||
double tmp;
|
||||
|
||||
int i = ORDER-1;
|
||||
tmp = -kcoef[i]*state[i] + s;
|
||||
y = vcoef[i+1]*(state[i] + kcoef[i]*tmp);
|
||||
|
||||
for (i = ORDER-2; i >= 0; i--) {
|
||||
tmp = -kcoef[i]*state[i] + tmp;
|
||||
state[i+1] = kcoef[i]*tmp + state[i];
|
||||
y = y + vcoef[i+1]*state[i+1];
|
||||
}
|
||||
state[0] = tmp;
|
||||
y = y + vcoef[0]*tmp;
|
||||
|
||||
return (d_sample) y;
|
||||
}
|
||||
|
||||
inline void set_vi(double coef, int i) {
|
||||
vcoef[i] = coef;
|
||||
}
|
||||
|
||||
inline void set_ki(double coef, int i) {
|
||||
kcoef[i] = coef;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_LatFilt_H_ */
|
||||
@@ -67,25 +67,29 @@ class OnePoleLP
|
||||
a0 *= d;
|
||||
b1 = 1. - a0;
|
||||
}
|
||||
|
||||
/* clear denormal numbers in history */
|
||||
void flush_0()
|
||||
{
|
||||
if (is_denormal (y1))
|
||||
y1 = 0;
|
||||
}
|
||||
};
|
||||
|
||||
class OnePoleHP
|
||||
{
|
||||
public:
|
||||
d_sample a0, a1, b1, x1, y1;
|
||||
double fc;
|
||||
|
||||
OnePoleHP (double d = 1.)
|
||||
{
|
||||
fc = 0;
|
||||
set (d);
|
||||
x1 = y1 = 0.;
|
||||
}
|
||||
|
||||
void set_f (double f)
|
||||
{
|
||||
fc = f;
|
||||
set (exp (-2 * M_PI * fc));
|
||||
set (exp (-2 * M_PI * f));
|
||||
}
|
||||
|
||||
inline void set (double d)
|
||||
@@ -106,6 +110,13 @@ class OnePoleHP
|
||||
{
|
||||
x1 = y1 = 0;
|
||||
}
|
||||
|
||||
/* clear denormal numbers in history */
|
||||
void flush_0()
|
||||
{
|
||||
if (is_denormal (y1))
|
||||
y1 = 0;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
@@ -49,14 +49,24 @@ class RMS
|
||||
memset (buffer, 0, sizeof (buffer));
|
||||
}
|
||||
|
||||
/* needs the squared sample value to be passed in */
|
||||
d_sample process (d_sample x)
|
||||
/* caution: pass in the *squared* sample value */
|
||||
void store (d_sample x)
|
||||
{
|
||||
sum -= buffer[write];
|
||||
sum += x;
|
||||
sum += (buffer[write] = x);
|
||||
write = (write + 1) & 63;
|
||||
}
|
||||
|
||||
return sqrt (sum / 64);
|
||||
d_sample process (d_sample x)
|
||||
{
|
||||
store (x);
|
||||
return rms();
|
||||
}
|
||||
|
||||
d_sample rms()
|
||||
{
|
||||
/* fabs it before sqrt, just in case ... */
|
||||
return sqrt (fabs (sum) / 64);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
80
plugins/ladspa_effect/caps/dsp/TDFII.h
Normal file
80
plugins/ladspa_effect/caps/dsp/TDFII.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
TDFII.h
|
||||
|
||||
Copyright 2006-7
|
||||
David Yeh <dtyeh@ccrma.stanford.edu> (implementation)
|
||||
Tim Goetze <tim@quitte.de> (cosmetics)
|
||||
|
||||
transposed Direct Form II digital filter.
|
||||
Assumes order of b = order of a.
|
||||
Assumes a0 = 1.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_TDFII_H_
|
||||
#define _DSP_TDFII_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
// ORDER is the highest power of s in the transfer function
|
||||
template <int Order>
|
||||
class TDFII
|
||||
{
|
||||
public:
|
||||
double a[Order + 1];
|
||||
double b[Order + 1];
|
||||
double h[Order + 1];
|
||||
|
||||
void reset()
|
||||
{
|
||||
for (int i = 0; i <= Order; ++i)
|
||||
h[i] = 0; // zero state
|
||||
}
|
||||
|
||||
void init (double fs)
|
||||
{
|
||||
reset();
|
||||
clear();
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
for (int i=0; i<= Order; i++)
|
||||
a[i] = b[i] = 1;
|
||||
}
|
||||
|
||||
/* per-band recursion:
|
||||
* y = 2 * (a * (x - x[-2]) + c * y[-1] - b * y[-2])
|
||||
*/
|
||||
d_sample process (d_sample s)
|
||||
{
|
||||
double y = h[0] + b[0] * s;
|
||||
|
||||
for (int i = 1; i < Order; ++i)
|
||||
h[i - 1] = h[i] + b[i] * s - a[i] * y;
|
||||
|
||||
h[Order - 1] = b[Order] * s - a[Order] * y;
|
||||
|
||||
return (d_sample) y;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_TDFII_H_ */
|
||||
268
plugins/ladspa_effect/caps/dsp/ToneStack.h
Normal file
268
plugins/ladspa_effect/caps/dsp/ToneStack.h
Normal file
@@ -0,0 +1,268 @@
|
||||
/*
|
||||
ToneStack.h
|
||||
|
||||
Copyright 2006-7
|
||||
David Yeh <dtyeh@ccrma.stanford.edu> (implementation)
|
||||
Tim Goetze <tim@quitte.de> (cosmetics)
|
||||
|
||||
Tone Stack emulation.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_TONESTACK_H_
|
||||
#define _DSP_TONESTACK_H_
|
||||
|
||||
#include "util.h"
|
||||
#include "windows.h"
|
||||
#include "TDFII.h"
|
||||
#include "LatFilt.h"
|
||||
#include "tonestack/tables.h"
|
||||
|
||||
namespace DSP {
|
||||
|
||||
typedef struct {
|
||||
double R1, R2, R3, R4;
|
||||
double C1, C2, C3;
|
||||
} TSParameters;
|
||||
|
||||
#define TS_N_PRESETS (sizeof (DSP::ToneStack::presets) / \
|
||||
sizeof (DSP::TSParameters))
|
||||
|
||||
class ToneStack
|
||||
{
|
||||
private:
|
||||
enum { Order = 3 };
|
||||
|
||||
double c; // BT coef
|
||||
|
||||
double b1t, b1m, b1l, b1d,
|
||||
b2t, b2m2, b2m, b2l, b2lm, b2d,
|
||||
b3lm, b3m2, b3m, b3t, b3tm, b3tl,
|
||||
a0, a1d, a1m, a1l, a2m, a2lm, a2m2, a2l, a2d,
|
||||
a3lm, a3m2, a3m, a3l, a3d; // intermediate calculations
|
||||
|
||||
struct {
|
||||
double b1;
|
||||
double b2;
|
||||
double b3;
|
||||
double a1;
|
||||
double a2;
|
||||
double a3;
|
||||
} acoef; // analog coefficients
|
||||
|
||||
// digital coefficients
|
||||
double dcoef_a[Order + 1];
|
||||
double dcoef_b[Order + 1];
|
||||
double af[Order + 1];
|
||||
double bf[Order + 1];
|
||||
|
||||
double fs;
|
||||
TDFII<Order> filter;
|
||||
|
||||
public:
|
||||
int model;
|
||||
|
||||
static TSParameters presets[]; /* in ../ToneStack.cc */
|
||||
static int n_presets;
|
||||
|
||||
ToneStack()
|
||||
{
|
||||
setparams (presets[0]);
|
||||
}
|
||||
|
||||
void init (double _fs)
|
||||
{
|
||||
c = 2 * _fs;
|
||||
}
|
||||
|
||||
void activate (d_sample ** ports)
|
||||
{
|
||||
filter.reset();
|
||||
}
|
||||
|
||||
/* pass in pointer to ports and relative index of first eq band control */
|
||||
void start_cycle (d_sample ** ports, int bassindex = 1)
|
||||
{
|
||||
int m = clamp<int> ((int) *ports[0], 0, n_presets - 1);
|
||||
if (m != model)
|
||||
{
|
||||
model = m;
|
||||
setparams (presets[model]);
|
||||
filter.reset();
|
||||
}
|
||||
updatecoefs (ports + bassindex);
|
||||
}
|
||||
|
||||
|
||||
void setparams (TSParameters & p)
|
||||
{
|
||||
double R1 = p.R1, R2 = p.R2, R3 = p.R3, R4 = p.R4;
|
||||
double C1 = p.C1, C2 = p.C2, C3 = p.C3;
|
||||
|
||||
b1t = C1*R1;
|
||||
b1m = C3*R3;
|
||||
b1l = C1*R2 + C2*R2;
|
||||
b1d = C1*R3 + C2*R3;
|
||||
b2t = C1*C2*R1*R4 + C1*C3*R1*R4;
|
||||
b2m2 = -(C1*C3*R3*R3 + C2*C3*R3*R3);
|
||||
b2m = C1*C3*R1*R3 + C1*C3*R3*R3 + C2*C3*R3*R3;
|
||||
b2l = C1*C2*R1*R2 + C1*C2*R2*R4 + C1*C3*R2*R4;
|
||||
b2lm = C1*C3*R2*R3 + C2*C3*R2*R3;
|
||||
b2d = C1*C2*R1*R3 + C1*C2*R3*R4 + C1*C3*R3*R4;
|
||||
b3lm = C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4;
|
||||
b3m2 = -(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4);
|
||||
b3m = C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4;
|
||||
b3t = C1*C2*C3*R1*R3*R4;
|
||||
b3tm = -b3t;
|
||||
b3tl = C1*C2*C3*R1*R2*R4;
|
||||
a0 = 1;
|
||||
a1d = C1*R1 + C1*R3 + C2*R3 + C2*R4 + C3*R4;
|
||||
a1m = C3*R3;
|
||||
a1l = C1*R2 + C2*R2;
|
||||
a2m = C1*C3*R1*R3 - C2*C3*R3*R4 + C1*C3*R3*R3 + C2*C3*R3*R3;
|
||||
a2lm = C1*C3*R2*R3 + C2*C3*R2*R3;
|
||||
a2m2 = -(C1*C3*R3*R3 + C2*C3*R3*R3);
|
||||
a2l = C1*C2*R2*R4 + C1*C2*R1*R2 + C1*C3*R2*R4 + C2*C3*R2*R4;
|
||||
a2d = C1*C2*R1*R4 + C1*C3*R1*R4 + C1*C2*R3*R4
|
||||
+ C1*C2*R1*R3 + C1*C3*R3*R4 + C2*C3*R3*R4;
|
||||
a3lm = C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4;
|
||||
a3m2 = -(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4);
|
||||
a3m = C1*C2*C3*R3*R3*R4 + C1*C2*C3*R1*R3*R3 - C1*C2*C3*R1*R3*R4;
|
||||
a3l = C1*C2*C3*R1*R2*R4;
|
||||
a3d = C1*C2*C3*R1*R3*R4;
|
||||
|
||||
filter.reset();
|
||||
}
|
||||
|
||||
inline void updatecoefs (d_sample ** ports)
|
||||
{
|
||||
/* range checks on input */
|
||||
double b = clamp<double> (*ports[0], 0, 1);
|
||||
double m = clamp<double> (*ports[1], 0, 1);
|
||||
double t = clamp<double> (*ports[2], 0, 1);
|
||||
|
||||
m = (m - 1) * 3.5;
|
||||
m = pow (10, m);
|
||||
|
||||
acoef.a1 = a1d + m*a1m + b*a1l;
|
||||
acoef.a2 = m*a2m + b*m*a2lm + m*m*a2m2 + b*a2l + a2d;
|
||||
acoef.a3 = b*m*a3lm + m*m*a3m2 + m*a3m + b*a3l + a3d;
|
||||
dcoef_a[0] = -1 - acoef.a1*c - acoef.a2*c*c - acoef.a3*c*c*c; // sets scale
|
||||
dcoef_a[1] = -3 - acoef.a1*c + acoef.a2*c*c + 3*acoef.a3*c*c*c;
|
||||
dcoef_a[2] = -3 + acoef.a1*c + acoef.a2*c*c - 3*acoef.a3*c*c*c;
|
||||
dcoef_a[3] = -1 + acoef.a1*c - acoef.a2*c*c + acoef.a3*c*c*c;
|
||||
|
||||
acoef.b1 = t*b1t + m*b1m + b*b1l + b1d;
|
||||
acoef.b2 = t*b2t + m*m*b2m2 + m*b2m + b*b2l + b*m*b2lm + b2d;
|
||||
acoef.b3 = b*m*b3lm + m*m*b3m2 + m*b3m + t*b3t + t*m*b3tm + t*b*b3tl;
|
||||
dcoef_b[0] = - acoef.b1*c - acoef.b2*c*c - acoef.b3*c*c*c;
|
||||
dcoef_b[1] = - acoef.b1*c + acoef.b2*c*c + 3*acoef.b3*c*c*c;
|
||||
dcoef_b[2] = acoef.b1*c + acoef.b2*c*c - 3*acoef.b3*c*c*c;
|
||||
dcoef_b[3] = acoef.b1*c - acoef.b2*c*c + acoef.b3*c*c*c;
|
||||
|
||||
for (int i=1; i<=3; ++i)
|
||||
filter.a[i] = dcoef_a[i] / dcoef_a[0];
|
||||
|
||||
for (int i=0; i<=3; ++i)
|
||||
filter.b[i] = dcoef_b[i] / dcoef_a[0];
|
||||
}
|
||||
|
||||
// actualy do the DFII filtering, one sample at a time
|
||||
inline d_sample process (d_sample x)
|
||||
{
|
||||
return filter.process (x);
|
||||
}
|
||||
};
|
||||
|
||||
/* /////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
/*
|
||||
hardcode this, known size memory blocks
|
||||
extern double* KS; // 25 x 25 x 3
|
||||
extern double* VS; // 25 x 25 x 25 x 4
|
||||
extern double KS[NSTEPS][NSTEPS][TSORDER]; //[bass][mid][coefs]
|
||||
extern double VS[NSTEPS][NSTEPS][NSTEPS][TSORDER+1]; //[bass][mid][treb][coefs]
|
||||
*/
|
||||
|
||||
class ToneStackLT
|
||||
{
|
||||
private:
|
||||
enum { Order = 3, Steps = 25 };
|
||||
|
||||
// digital coefficients
|
||||
double *kcoef;
|
||||
double *vcoef;
|
||||
double af [Order + 1];
|
||||
double bf [Order + 1];
|
||||
|
||||
double fs;
|
||||
LatFilt<Order> filter;
|
||||
|
||||
public:
|
||||
ToneStackLT()
|
||||
{
|
||||
setparams (250000, 1000000, 25000, 56000, 0.25e-9, 20e-9, 20e-9);
|
||||
}
|
||||
|
||||
void init (double _fs)
|
||||
{ }
|
||||
|
||||
void activate (d_sample ** ports)
|
||||
{
|
||||
filter.reset();
|
||||
}
|
||||
|
||||
void setparams
|
||||
(double R1, double R2, double R3, double R4,
|
||||
double C1, double C2, double C3) {
|
||||
int blah[4];
|
||||
int *bp;
|
||||
bp = blah;
|
||||
}
|
||||
|
||||
void updatecoefs (d_sample ** ports)
|
||||
{
|
||||
double b = min (Steps - 1, max (*ports[0] * (Steps - 1), 0));
|
||||
double m = min (Steps - 1, max (*ports[1] * (Steps - 1), 0));
|
||||
double t = min (Steps - 1, max (*ports[2] * (Steps - 1), 0));
|
||||
|
||||
int bi = (int) b;
|
||||
int mi = (int) m;
|
||||
int ti = (int) t;
|
||||
|
||||
kcoef = DSP::ToneStackKS + (mi * Steps + bi) * Order;
|
||||
vcoef = DSP::ToneStackVS + ((mi * Steps + bi) * Steps + ti) * (Order + 1);
|
||||
|
||||
for (int i = 0; i < Order; ++i)
|
||||
filter.set_ki (kcoef[i], i);
|
||||
|
||||
for (int i = 0; i < Order + 1; ++i)
|
||||
filter.set_vi (vcoef[i], i);
|
||||
}
|
||||
|
||||
// actualy do the DFII filtering, one sample at a time
|
||||
inline d_sample process (d_sample x)
|
||||
{
|
||||
return filter.process (x);
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_TONESTACK_H_ */
|
||||
@@ -31,6 +31,8 @@ namespace DSP {
|
||||
|
||||
#include "r12ax7.h"
|
||||
|
||||
typedef d_sample tube_sample;
|
||||
|
||||
/* this is the original tube model from caps < 0.1.9 or preamp.so, put
|
||||
* back into use in 0.1.11; the replacement (below) is too strong in
|
||||
* odd-order harmonics at the expense of even-order. it has to sound
|
||||
@@ -39,14 +41,14 @@ namespace DSP {
|
||||
class TwelveAX7
|
||||
{
|
||||
public:
|
||||
d_sample b, c, d;
|
||||
tube_sample b, c, d;
|
||||
|
||||
struct {
|
||||
d_sample threshold, value;
|
||||
tube_sample threshold, value;
|
||||
} clip[2];
|
||||
|
||||
/* amplitude at which clipping starts */
|
||||
d_sample scale;
|
||||
tube_sample scale;
|
||||
|
||||
public:
|
||||
TwelveAX7()
|
||||
@@ -61,12 +63,12 @@ class TwelveAX7
|
||||
scale = min (fabs (clip[0].threshold), fabs (clip[1].threshold));
|
||||
}
|
||||
|
||||
inline d_sample transfer (d_sample a)
|
||||
inline tube_sample transfer (tube_sample a)
|
||||
{
|
||||
return a * (b + a * (c + a * d));
|
||||
}
|
||||
|
||||
inline d_sample transfer_clip (d_sample a)
|
||||
inline tube_sample transfer_clip (tube_sample a)
|
||||
{
|
||||
if (a <= clip[0].threshold)
|
||||
return clip[0].value;
|
||||
@@ -103,13 +105,13 @@ class TwelveAX7
|
||||
class TwelveAX7_2
|
||||
{
|
||||
public:
|
||||
d_sample b, c, d;
|
||||
tube_sample b, c, d;
|
||||
|
||||
struct {
|
||||
d_sample threshold, value;
|
||||
tube_sample threshold, value;
|
||||
} clip[2];
|
||||
|
||||
d_sample scale;
|
||||
tube_sample scale;
|
||||
|
||||
public:
|
||||
TwelveAX7_2()
|
||||
@@ -128,12 +130,12 @@ class TwelveAX7_2
|
||||
scale = min (fabs (clip[0].threshold), fabs (clip[1].threshold));
|
||||
}
|
||||
|
||||
inline d_sample transfer (d_sample a)
|
||||
inline tube_sample transfer (tube_sample a)
|
||||
{
|
||||
return a * (b + a * (c + a * d));
|
||||
}
|
||||
|
||||
inline d_sample transfer_clip (d_sample a)
|
||||
inline tube_sample transfer_clip (tube_sample a)
|
||||
{
|
||||
if (a <= clip[0].threshold)
|
||||
return clip[0].value;
|
||||
@@ -149,22 +151,20 @@ class TwelveAX7_2
|
||||
class TwelveAX7_3
|
||||
{
|
||||
public:
|
||||
d_sample b, c, d;
|
||||
tube_sample b, c, d;
|
||||
|
||||
struct {
|
||||
d_sample threshold, value;
|
||||
tube_sample threshold, value;
|
||||
} clip[2];
|
||||
|
||||
d_sample scale;
|
||||
tube_sample scale;
|
||||
|
||||
public:
|
||||
TwelveAX7_3()
|
||||
{
|
||||
static double x[2] =
|
||||
{
|
||||
/* adjust for a slightly earlier clipping threshold in the
|
||||
* lower lobe */
|
||||
-0.96 * (double) r12AX7::Zero /
|
||||
(double) r12AX7::Zero /
|
||||
((double) r12AX7::Samples - (double) r12AX7::Zero),
|
||||
1
|
||||
};
|
||||
@@ -176,7 +176,7 @@ class TwelveAX7_3
|
||||
scale = min (fabs (clip[0].threshold), fabs (clip[1].threshold));
|
||||
}
|
||||
|
||||
inline d_sample transfer (d_sample a)
|
||||
inline tube_sample transfer (tube_sample a)
|
||||
{
|
||||
a = r12AX7::Zero + a * (r12AX7::Samples - r12AX7::Zero);
|
||||
if (a <= 0)
|
||||
@@ -191,7 +191,7 @@ class TwelveAX7_3
|
||||
return (r12AX7::v2v [i] * (1.f - a) + r12AX7::v2v [i + 1] * a);
|
||||
}
|
||||
|
||||
inline d_sample transfer_clip (d_sample a)
|
||||
inline tube_sample transfer_clip (tube_sample a)
|
||||
{
|
||||
return transfer (a);
|
||||
}
|
||||
@@ -202,11 +202,11 @@ class NoTwelveAX7
|
||||
{
|
||||
public:
|
||||
struct {
|
||||
d_sample threshold, value;
|
||||
tube_sample threshold, value;
|
||||
} clip[2];
|
||||
|
||||
/* amplitude at which clipping starts */
|
||||
d_sample scale;
|
||||
tube_sample scale;
|
||||
|
||||
public:
|
||||
NoTwelveAX7()
|
||||
@@ -220,12 +220,12 @@ class NoTwelveAX7
|
||||
scale = min (fabs (clip[0].threshold), fabs (clip[1].threshold));
|
||||
}
|
||||
|
||||
inline d_sample transfer (d_sample a)
|
||||
inline tube_sample transfer (tube_sample a)
|
||||
{
|
||||
return 0.5469181606780 * (pow (1 - a, 1.5) - 1);
|
||||
}
|
||||
|
||||
inline d_sample transfer_clip (d_sample a)
|
||||
inline tube_sample transfer_clip (tube_sample a)
|
||||
{
|
||||
if (a <= clip[0].threshold)
|
||||
return clip[0].value;
|
||||
|
||||
663
plugins/ladspa_effect/caps/dsp/tonestack/ks_tab.h
Normal file
663
plugins/ladspa_effect/caps/dsp/tonestack/ks_tab.h
Normal file
@@ -0,0 +1,663 @@
|
||||
/*
|
||||
ks_tab.h
|
||||
|
||||
Copyright 2006 David Yeh <dtyeh@ccrma.stanford.edu>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
Tone Stack emulation coefficient table for lattice filter.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _KS_TAB_H_
|
||||
#define _KS_TAB_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
double ToneStackKS[] = {
|
||||
-0.999655160907038,0.980127109825519,-0.614914419461634,
|
||||
-0.999656568120978,0.980206907765841,-0.615188716843305,
|
||||
-0.999658517676675,0.980317236486758,-0.615568128036899,
|
||||
-0.999661208271173,0.98046907704722,-0.616090612857295,
|
||||
-0.999664902023365,0.980676730894581,-0.616805748794314,
|
||||
-0.999669936365576,0.980958270564762,-0.617776442867139,
|
||||
-0.999676730565233,0.981335546377295,-0.619079214371838,
|
||||
-0.999685778922586,0.981833264634174,-0.620801399623313,
|
||||
-0.999697618702198,0.982476493745153,-0.623033027158334,
|
||||
-0.999712758774516,0.983286007325851,-0.625851163451736,
|
||||
-0.99973155988367,0.984271440446054,-0.629296281256582,
|
||||
-0.999754076003002,0.98542354941219,-0.633344581005633,
|
||||
-0.999779899796788,0.986708608367483,-0.637886397587646,
|
||||
-0.999808088604521,0.988068846787513,-0.642724617436751,
|
||||
-0.999837246275279,0.989431147988487,-0.647602282731862,
|
||||
-0.999865773984939,0.990721953717012,-0.652254061004993,
|
||||
-0.999892205612632,0.991882358316473,-0.656461274207081,
|
||||
-0.999915487257858,0.992877246278541,-0.660087773487817,
|
||||
-0.999935097854328,0.993696153431228,-0.663086394317218,
|
||||
-0.999951003603908,0.994347891380557,-0.665481748921572,
|
||||
-0.999963513493909,0.994852827640871,-0.667343004256292,
|
||||
-0.999973116451418,0.995235942818388,-0.668758405977034,
|
||||
-0.999980351396071,0.995522046602486,-0.669817209794174,
|
||||
-0.99998572581668,0.995733179766024,-0.670599558951996,
|
||||
-0.999989676414453,0.995887625130919,-0.671172389008809,
|
||||
-0.99964958032362,0.979587583563023,-0.613841200571614,
|
||||
-0.99965105886229,0.979673968717358,-0.614139015327499,
|
||||
-0.99965310654599,0.979793345129979,-0.614550764884576,
|
||||
-0.999655931261197,0.979957524247093,-0.615117419836355,
|
||||
-0.999659806674729,0.980181839664558,-0.615892331666542,
|
||||
-0.99966508402413,0.980485578112938,-0.616942906326338,
|
||||
-0.999672197810492,0.980891896855617,-0.618350616306868,
|
||||
-0.999681656900824,0.981426699112155,-0.620207543319113,
|
||||
-0.999694008538874,0.982115787972737,-0.622607053883059,
|
||||
-0.999709761087518,0.982979722321469,-0.625626413960214,
|
||||
-0.999729257452251,0.984026477862534,-0.629301273863883,
|
||||
-0.999752511640623,0.985243474991385,-0.633596859040439,
|
||||
-0.999779056061162,0.98659232792421,-0.638387182556479,
|
||||
-0.999807879344237,0.988010325656004,-0.643456796374595,
|
||||
-0.999837527771197,0.989420506822037,-0.648533280922821,
|
||||
-0.999866374253003,0.990747568499188,-0.653342756744767,
|
||||
-0.999892960043297,0.991933070692341,-0.657666017256545,
|
||||
-0.999916265897791,0.992943874252478,-0.661372461014463,
|
||||
-0.999935816364322,0.993772030018927,-0.66442324414345,
|
||||
-0.999951619581897,0.994428658432513,-0.666851256235163,
|
||||
-0.999964015160231,0.994935885870011,-0.668732389522373,
|
||||
-0.99997351033002,0.995319870362579,-0.67015970170105,
|
||||
-0.999980652603298,0.995606135693424,-0.671225609758467,
|
||||
-0.999985951820482,0.995817121286393,-0.672012217707519,
|
||||
-0.999989843684551,0.995971315456801,-0.672587633075114,
|
||||
-0.999643378423064,0.978985881492609,-0.612500740824184,
|
||||
-0.999644936096075,0.979079752094198,-0.612825144699971,
|
||||
-0.99964709260153,0.979209402031235,-0.613273429777593,
|
||||
-0.999650065958286,0.979387576553966,-0.613889937311562,
|
||||
-0.999654142524417,0.97963076347191,-0.614732221861648,
|
||||
-0.99965968863373,0.97995959552602,-0.615872659651328,
|
||||
-0.999667155309705,0.980398657679706,-0.617398123146777,
|
||||
-0.999677066975389,0.980975122632538,-0.619405738241327,
|
||||
-0.999689981074653,0.98171549955349,-0.621992177692255,
|
||||
-0.999706404340016,0.982639946893981,-0.625234340260081,
|
||||
-0.999726658923252,0.983754410258249,-0.629161826247319,
|
||||
-0.999750714237359,0.985042459195097,-0.633727095084122,
|
||||
-0.999778037042399,0.986460516399503,-0.638785891235472,
|
||||
-0.999807542776699,0.9879405525597,-0.644102932677235,
|
||||
-0.999837718122031,0.989401653230246,-0.649389757433484,
|
||||
-0.999866908526907,0.990766919256306,-0.654364321488812,
|
||||
-0.999893665267437,0.991978663173791,-0.658807867477182,
|
||||
-0.999917006727609,0.993006014704747,-0.662596430819353,
|
||||
-0.999936505324055,0.993843761495685,-0.665700368324747,
|
||||
-0.999952212433419,0.994505470936323,-0.668161425658953,
|
||||
-0.999964498892951,0.995015103003389,-0.670062547781078,
|
||||
-0.999973890491138,0.995400030001749,-0.671501769244335,
|
||||
-0.99998094346516,0.995686507256172,-0.672574743431766,
|
||||
-0.9999861701193,0.995897381317078,-0.673365566060677,
|
||||
-0.999990005274817,0.996051350521398,-0.673943527635947,
|
||||
-0.999636497864097,0.978314250888013,-0.610868507178806,
|
||||
-0.999638143609638,0.978416674858248,-0.611223133119698,
|
||||
-0.999640421166529,0.978558054130414,-0.611712912678915,
|
||||
-0.999643559753541,0.97875218877719,-0.612385977311627,
|
||||
-0.999647859706568,0.979016862349941,-0.61330458074876,
|
||||
-0.999653703893894,0.97937420403329,-0.614546606917925,
|
||||
-0.999661561270341,0.979850359871836,-0.616204823882976,
|
||||
-0.999671972845482,0.980473843383251,-0.618381706324296,
|
||||
-0.99968550637702,0.981271816955761,-0.621177132648703,
|
||||
-0.999702665524369,0.982263799418809,-0.624666899863223,
|
||||
-0.999723748225852,0.983453256531511,-0.628873069633944,
|
||||
-0.999748673996069,0.984819306197574,-0.63373324602853,
|
||||
-0.99977683795445,0.98631258435924,-0.639082719486578,
|
||||
-0.999807077565093,0.987859347100283,-0.644664781960943,
|
||||
-0.999837817970182,0.989374645543676,-0.650174417628097,
|
||||
-0.999867378328761,0.990780183969698,-0.655321967566108,
|
||||
-0.999894323021703,0.992019364405147,-0.659890277895962,
|
||||
-0.999917711372098,0.993063913192047,-0.663763240841613,
|
||||
-0.999937166122597,0.993911596229206,-0.66692136936033,
|
||||
-0.999952783288071,0.994578575143569,-0.669415879976423,
|
||||
-0.999964965581412,0.995090721972347,-0.671337112690936,
|
||||
-0.999974257618683,0.995476661471914,-0.672788249221993,
|
||||
-0.999981224498276,0.995763398345879,-0.673868256393632,
|
||||
-0.999986381097967,0.995974194795217,-0.674663253284672,
|
||||
-0.999990161468935,0.996127963642263,-0.675243724730679,
|
||||
-0.999628871599216,0.977563340625174,-0.608914428430414,
|
||||
-0.999630615705312,0.977675597836713,-0.609303604497054,
|
||||
-0.999633028378567,0.977830449102962,-0.609840779838346,
|
||||
-0.999636351252157,0.978042891841267,-0.610578368059795,
|
||||
-0.999640900093703,0.978332170312435,-0.611583898461033,
|
||||
-0.999647075913584,0.978722082369623,-0.612941377384029,
|
||||
-0.999655367140044,0.979240482054698,-0.614750017497272,
|
||||
-0.999666332434044,0.979917290534043,-0.617117944354921,
|
||||
-0.999680549835182,0.98078023709284,-0.62014804531906,
|
||||
-0.999698518090521,0.981847892980184,-0.623914065384914,
|
||||
-0.999720506814374,0.98312069692929,-0.628428717414309,
|
||||
-0.999746379537056,0.9845726129935,-0.633612307993453,
|
||||
-0.999775453078932,0.986147824972144,-0.639277222192053,
|
||||
-0.999806481847782,0.987766463858197,-0.64514365014005,
|
||||
-0.999837827653051,0.989339503078404,-0.650889614066351,
|
||||
-0.999867784981983,0.990787512735525,-0.656218595909368,
|
||||
-0.999894934895781,0.992055379434954,-0.660916404977201,
|
||||
-0.999918381339343,0.993117793337578,-0.664876156724425,
|
||||
-0.999937800054862,0.993975761434163,-0.668089558173762,
|
||||
-0.999953333200393,0.99464819664376,-0.670617950121693,
|
||||
-0.999965416056239,0.995162965417149,-0.672559425593145,
|
||||
-0.999974612351636,0.995549984512892,-0.674022489490217,
|
||||
-0.999981496185304,0.995837026254415,-0.675109501099312,
|
||||
-0.999986585116092,0.996047777075045,-0.675908635241351,
|
||||
-0.999990312531913,0.996201368691033,-0.676491582768135,
|
||||
-0.999620420975775,0.976721799513297,-0.606601635017253,
|
||||
-0.999622275355999,0.97684543733367,-0.607030558569431,
|
||||
-0.999624839418341,0.977015864707194,-0.6076222077637,
|
||||
-0.999628368599035,0.97724944539608,-0.608433858852205,
|
||||
-0.999633195747874,0.977567077732237,-0.609538989890021,
|
||||
-0.999639741820149,0.977994425988304,-0.611028434870471,
|
||||
-0.999648516406429,0.978561213224713,-0.61300845746645,
|
||||
-0.999660096906448,0.979298825518745,-0.615593120493524,
|
||||
-0.999675071412884,0.980235426548642,-0.618887989909175,
|
||||
-0.999693931427662,0.981388243122174,-0.622963529987665,
|
||||
-0.999716913349402,0.982754019087567,-0.627820896963069,
|
||||
-0.999743817730573,0.984300742606826,-0.633360240188853,
|
||||
-0.999773875694897,0.985965403475005,-0.639368293929638,
|
||||
-0.999805753219434,0.987661589920051,-0.64554040334027,
|
||||
-0.999837747205987,0.989296206939276,-0.651537368871066,
|
||||
-0.999868129620919,0.990789029644207,-0.657056822841524,
|
||||
-0.999895502342668,0.992086891864035,-0.661889136757108,
|
||||
-0.999919018029778,0.993167859006729,-0.66593818034046,
|
||||
-0.999938408329249,0.994036465317501,-0.669207982776834,
|
||||
-0.999953863156006,0.994714542470667,-0.671770703919781,
|
||||
-0.999965851094207,0.995232037757674,-0.673732564308737,
|
||||
-0.999974955287586,0.995620200909204,-0.675207573989099,
|
||||
-0.999981758977838,0.995907590527414,-0.676301565758894,
|
||||
-0.999986782510092,0.996118325926393,-0.677104803288624,
|
||||
-0.999990458711745,0.996271762077857,-0.677690195455546,
|
||||
-0.999611053343317,0.975775743039613,-0.603884796825947,
|
||||
-0.999613031883562,0.975912650295233,-0.604359763835632,
|
||||
-0.999615766283421,0.976101218495051,-0.6050144497913,
|
||||
-0.999619527378512,0.976359379624739,-0.6059116832352,
|
||||
-0.999624666982958,0.976709914051601,-0.607131681527055,
|
||||
-0.999631628025413,0.977180580098539,-0.60877291769307,
|
||||
-0.999640943108211,0.977803144860867,-0.610949372866091,
|
||||
-0.999653209460591,0.978610499278102,-0.613781297332705,
|
||||
-0.999669024734094,0.979631045031147,-0.617376419553776,
|
||||
-0.99968887023538,0.980880152002991,-0.621800333065081,
|
||||
-0.999712943314506,0.982350051181377,-0.627039935806544,
|
||||
-0.999740973496636,0.984001791228723,-0.632971865481303,
|
||||
-0.999772097994155,0.985764344142541,-0.639354138465182,
|
||||
-0.999804888706456,0.987544341427899,-0.645855471952423,
|
||||
-0.999837576362628,0.989244700363806,-0.652119392113297,
|
||||
-0.999868413198854,0.990784834346404,-0.657839003408275,
|
||||
-0.99989602668777,0.992114065717222,-0.662811117640661,
|
||||
-0.99991962274449,0.993214296218098,-0.666952074995355,
|
||||
-0.999938992074364,0.994093898965587,-0.670279453607488,
|
||||
-0.999954374077029,0.994777802955718,-0.672876971494188,
|
||||
-0.999966271422507,0.995298127015559,-0.674859368596826,
|
||||
-0.999975286986133,0.995687496286005,-0.676346348241333,
|
||||
-0.999982013298656,0.99597527473925,-0.677447299868145,
|
||||
-0.99998697359497,0.996186023293375,-0.67825460983632,
|
||||
-0.999990600240577,0.99633932449768,-0.678842417373446,
|
||||
-0.999600659011736,0.974708035989579,-0.600707907614531,
|
||||
-0.999602778010854,0.974860542895886,-0.601236618584895,
|
||||
-0.999605704965998,0.975070410914491,-0.601964799208377,
|
||||
-0.999609727957629,0.975357383329951,-0.602961655657006,
|
||||
-0.999615219921094,0.975746392931787,-0.604315078325081,
|
||||
-0.999622648047905,0.976267554594276,-0.606132115041143,
|
||||
-0.999632569975118,0.976954867084367,-0.608535190817401,
|
||||
-0.999645603825713,0.977842737024011,-0.61165092590881,
|
||||
-0.999662355958282,0.978959518964467,-0.615588436744899,
|
||||
-0.999683293758011,0.980318062023894,-0.6204063845804,
|
||||
-0.999708568554593,0.981905078819314,-0.626074091503736,
|
||||
-0.999737829566184,0.983673547947443,-0.63244074347204,
|
||||
-0.99977011098019,0.985543514350578,-0.639232225924571,
|
||||
-0.99980388473604,0.987414259071501,-0.646088848833459,
|
||||
-0.999837314552659,0.989184888620582,-0.652637096558166,
|
||||
-0.999868636494754,0.990775003339118,-0.658567251678203,
|
||||
-0.999896509137097,0.992137047075131,-0.663684770297548,
|
||||
-0.999920196692532,0.993257274825996,-0.667920387749179,
|
||||
-0.999939552345391,0.99414823800866,-0.671306565983005,
|
||||
-0.999954866827104,0.994838153363176,-0.673939367784046,
|
||||
-0.999966677722521,0.995361406421881,-0.675942462717049,
|
||||
-0.999975607971746,0.995752041693706,-0.677441441950547,
|
||||
-0.99998225954412,0.996040248059161,-0.678549336835372,
|
||||
-0.99998715866607,0.996251036846146,-0.679360690995204,
|
||||
-0.9999907373361,0.996404222471088,-0.679950886641583,
|
||||
-0.999589107344937,0.973497312875968,-0.597001294754147,
|
||||
-0.999591386080871,0.973668328230434,-0.597593268842574,
|
||||
-0.99959453183983,0.973903432400324,-0.598407851047308,
|
||||
-0.999598852093593,0.974224475166901,-0.599521620766309,
|
||||
-0.999604743382784,0.974658864441676,-0.601031250906323,
|
||||
-0.999612699753767,0.97523937456658,-0.603053445209834,
|
||||
-0.99962330608542,0.97600243259764,-0.605719853677987,
|
||||
-0.999637202386439,0.976983924442916,-0.609163532904264,
|
||||
-0.999655002388357,0.978211748419904,-0.613493851909141,
|
||||
-0.999677154847819,0.979695369509032,-0.61875985885503,
|
||||
-0.99970375671817,0.981414741216281,-0.624909211111447,
|
||||
-0.999734366195928,0.983313445338257,-0.631759010565249,
|
||||
-0.999767904348015,0.985301605206536,-0.638999236073545,
|
||||
-0.99980273709838,0.987270802414969,-0.646240081512932,
|
||||
-0.999836960897071,0.989116638466047,-0.653091609034812,
|
||||
-0.999868800118624,0.990759590999243,-0.659243458364673,
|
||||
-0.999896950784494,0.992155965496688,-0.664512315028276,
|
||||
-0.999920740997713,0.993296950004936,-0.668845469230266,
|
||||
-0.999940090129518,0.994199644092504,-0.672291720044044,
|
||||
-0.99995534221587,0.994895755336471,-0.674960312547262,
|
||||
-0.999967070633483,0.995422035839287,-0.676984275473309,
|
||||
-0.999975918736602,0.9958139950097,-0.678495289077025,
|
||||
-0.99998249808615,0.996102666636638,-0.679610114082481,
|
||||
-0.999987338000502,0.996313521353591,-0.680425486697752,
|
||||
-0.999990870202646,0.996466609707338,-0.681018045054702,
|
||||
-0.999576241686749,0.972116617749095,-0.592677524712023,
|
||||
-0.99957870315305,0.97230982067096,-0.593344669475996,
|
||||
-0.999582098983777,0.972575129825707,-0.594261769514429,
|
||||
-0.999586758554847,0.972936863320769,-0.595513988772127,
|
||||
-0.999593104888038,0.97342529174051,-0.597208109144451,
|
||||
-0.999601661826924,0.974076198024372,-0.599471740073253,
|
||||
-0.999613043888958,0.974928635484012,-0.602446577711838,
|
||||
-0.999627913819039,0.97601985787081,-0.606271990784749,
|
||||
-0.999646890735495,0.977376723720224,-0.611055959085039,
|
||||
-0.999670398812179,0.979004185472482,-0.616834417946938,
|
||||
-0.999698470581005,0.980873900666029,-0.623528301373912,
|
||||
-0.999730560827483,0.982918498660264,-0.630917179784869,
|
||||
-0.999765466341961,0.985037108077224,-0.638650985611181,
|
||||
-0.999801440901162,0.987113342915257,-0.646308258106163,
|
||||
-0.999836514200741,0.989039777153926,-0.653483778621958,
|
||||
-0.99986890451577,0.990738630386345,-0.659869306066888,
|
||||
-0.999897352618159,0.992170935258235,-0.665295786916716,
|
||||
-0.999921256704574,0.993333463562061,-0.669729491261027,
|
||||
-0.999940606351128,0.994248266182805,-0.673237138510218,
|
||||
-0.999955801003116,0.994950758180636,-0.675942048171054,
|
||||
-0.999967450755683,0.99548016302305,-0.677987058060857,
|
||||
-0.999976219742873,0.995873502181361,-0.679510145713319,
|
||||
-0.999982729274098,0.99616267482996,-0.680631890943183,
|
||||
-0.999987511858705,0.996373619900609,-0.681451258613912,
|
||||
-0.999990999032129,0.996526628313089,-0.682046156011673,
|
||||
-0.99956187268433,0.970531479526377,-0.587625703122706,
|
||||
-0.999564544561613,0.970751592835626,-0.588383112630484,
|
||||
-0.999568228052843,0.971053471010611,-0.589423118267952,
|
||||
-0.99957327740021,0.971464348435104,-0.590840956059624,
|
||||
-0.999580145454236,0.972017826647422,-0.592755112731153,
|
||||
-0.999589389203159,0.972753097820726,-0.595305546336125,
|
||||
-0.999601655385005,0.973712026201297,-0.59864482915026,
|
||||
-0.999617630085655,0.97493300368958,-0.602918212146777,
|
||||
-0.99963793493872,0.976441017872316,-0.608229928386846,
|
||||
-0.999662961985651,0.978235025410733,-0.614598209635963,
|
||||
-0.999692667221772,0.980276477231159,-0.621910984287905,
|
||||
-0.999726387678802,0.982485230710179,-0.62990389083695,
|
||||
-0.999762783587337,0.984748286160729,-0.638182336737736,
|
||||
-0.999799990515491,0.986941155449722,-0.646291986463415,
|
||||
-0.9998359729422,0.988954090981809,-0.653814181774226,
|
||||
-0.999868949969855,0.990712133831788,-0.660446282379072,
|
||||
-0.999897715526312,0.992182056431122,-0.666037051039227,
|
||||
-0.999921744783971,0.99336694509957,-0.670574462569404,
|
||||
-0.999941101876438,0.994294241723863,-0.674144882521851,
|
||||
-0.999956243902449,0.995003300002107,-0.676886655565201,
|
||||
-0.999967818653287,0.99553592474197,-0.678952899992532,
|
||||
-0.999976511425167,0.995930698330922,-0.680488106036015,
|
||||
-0.999982953436508,0.996220406298199,-0.681616764634929,
|
||||
-0.999987680485395,0.996431464970127,-0.682440106138711,
|
||||
-0.999991124005049,0.996584409866817,-0.683037320515038,
|
||||
-0.999545769372832,0.968697129881683,-0.581703389413761,
|
||||
-0.999548685330482,0.968950318756053,-0.582570485078089,
|
||||
-0.999552702131166,0.969297052285561,-0.583759569216554,
|
||||
-0.999558202401447,0.969768041680857,-0.585377795072816,
|
||||
-0.999565672738884,0.970400788413801,-0.587557285815401,
|
||||
-0.99957570708997,0.971238349112145,-0.590452006519345,
|
||||
-0.999588987158165,0.972325543365669,-0.594226183799786,
|
||||
-0.999606222572019,0.973701485409508,-0.59903003585127,
|
||||
-0.999628033400377,0.97538810561202,-0.604960671497707,
|
||||
-0.999654769948043,0.977376402599708,-0.612012563238519,
|
||||
-0.999686297011813,0.979615237602125,-0.620032803668798,
|
||||
-0.999721817252862,0.982009578441646,-0.62870559790186,
|
||||
-0.999759840891314,0.984433140013485,-0.637587083446276,
|
||||
-0.999798379512054,0.986753408121981,-0.646189365889778,
|
||||
-0.999835335260595,0.988859323349258,-0.654083124451187,
|
||||
-0.999868936604779,0.990680093327157,-0.660975691075208,
|
||||
-0.999898040302297,0.992189415816235,-0.666737815961683,
|
||||
-0.99992220613798,0.99339751304594,-0.671382242820988,
|
||||
-0.999941577517616,0.994337697670144,-0.675016865803864,
|
||||
-0.999956671584689,0.995053508724011,-0.677796068374459,
|
||||
-0.999968174857054,0.995589447776921,-0.679883743341079,
|
||||
-0.999976794192393,0.995985708739766,-0.681431116570944,
|
||||
-0.999983170882486,0.996275984974083,-0.682566684542184,
|
||||
-0.999987844111017,0.996487179407059,-0.683393980689551,
|
||||
-0.999991245291239,0.996640076376014,-0.683993491478984,
|
||||
-0.999527647068028,0.966554383008803,-0.574724879596308,
|
||||
-0.999530848539975,0.966848851405444,-0.575727078537408,
|
||||
-0.99953525472567,0.967251434416085,-0.57709940504731,
|
||||
-0.999541280848263,0.967797029601554,-0.578963243130562,
|
||||
-0.999549451864263,0.968527732682652,-0.581466703366014,
|
||||
-0.999560403023074,0.969490971729293,-0.584779644783603,
|
||||
-0.999574853846751,0.970734576829317,-0.589078562311174,
|
||||
-0.999593537066634,0.972297674431688,-0.59451695807115,
|
||||
-0.999617065445341,0.974197436159595,-0.601179970724196,
|
||||
-0.999645735282156,0.97641428827226,-0.609030274548682,
|
||||
-0.999679302369117,0.978881522835187,-0.617864335613826,
|
||||
-0.99971681574429,0.981486776171256,-0.62730617857504,
|
||||
-0.999756621007015,0.98408936563692,-0.636857810951617,
|
||||
-0.999796600586004,0.986549150056454,-0.645997950543695,
|
||||
-0.99983459893934,0.988755172290888,-0.654290641249287,
|
||||
-0.999868864385614,0.990642480721143,-0.661458661540686,
|
||||
-0.999898327649026,0.992193087751127,-0.66739964572281,
|
||||
-0.999922641604418,0.9934252755721,-0.672154555174154,
|
||||
-0.999942034036786,0.994378751406568,-0.675854867355025,
|
||||
-0.999957084680973,0.995101502992542,-0.678672085713889,
|
||||
-0.999968519866798,0.995640849812384,-0.68078139550167,
|
||||
-0.999977068429707,0.996038649727251,-0.682340988976285,
|
||||
-0.999983381903268,0.996329525932602,-0.683483465015717,
|
||||
-0.999988002952587,0.996540877278988,-0.684314698518073,
|
||||
-0.99999136305069,0.996693741131828,-0.684916486550783,
|
||||
-0.999507150598248,0.964023361778569,-0.566443805631269,
|
||||
-0.999510689256673,0.964370271326711,-0.567615024684631,
|
||||
-0.999515554615236,0.964843610477965,-0.569216045936927,
|
||||
-0.999522199580942,0.965483372059577,-0.571385418568372,
|
||||
-0.999531192926903,0.966337094760156,-0.574290114034592,
|
||||
-0.999543216143162,0.967457120290353,-0.578117988726243,
|
||||
-0.999559029420708,0.968894166267862,-0.583058050119345,
|
||||
-0.999579387147137,0.970686191408446,-0.589264179491485,
|
||||
-0.999604886734295,0.972843149467847,-0.596802560696606,
|
||||
-0.999635754725745,0.975331385211999,-0.605593323611265,
|
||||
-0.999671616210287,0.978064893520965,-0.615370037541993,
|
||||
-0.999711344319248,0.980911208410932,-0.625686441819605,
|
||||
-0.999753104353326,0.983714303325128,-0.635985722329208,
|
||||
-0.999794645469085,0.986327296819486,-0.645714703351608,
|
||||
-0.999833761386482,0.988641287435787,-0.654436491473955,
|
||||
-0.999868733118323,0.990599247730616,-0.661896156590664,
|
||||
-0.999898578182872,0.992193134802953,-0.66802397047431,
|
||||
-0.99992305196103,0.993450331406395,-0.672892997532942,
|
||||
-0.999942472149362,0.994417511571143,-0.676660542838115,
|
||||
-0.999957483785679,0.995147392987777,-0.679516383603064,
|
||||
-0.999968854153534,0.995690240234068,-0.681647540650936,
|
||||
-0.999977334500213,0.99608962943699,-0.683219411520137,
|
||||
-0.999983586773378,0.99638113616817,-0.684368796864731,
|
||||
-0.999988157214811,0.996592664646218,-0.685203952213579,
|
||||
-0.999991477434319,0.996745509473735,-0.685807999622806,
|
||||
-0.999483830537178,0.96099363273767,-0.556526558132353,
|
||||
-0.999487771824971,0.961408567503047,-0.557913085833148,
|
||||
-0.99949318453032,0.961973392338345,-0.559804618374626,
|
||||
-0.999500565445448,0.962734373879405,-0.562360637123727,
|
||||
-0.99951053364941,0.963745527570854,-0.565770491848824,
|
||||
-0.999523822447645,0.965064639052157,-0.570242285359762,
|
||||
-0.999541235335364,0.96674484954275,-0.575977037252997,
|
||||
-0.999563545337433,0.968821009537295,-0.583124143295505,
|
||||
-0.999591323245939,0.971292265484483,-0.59172069161267,
|
||||
-0.999624705516342,0.974106135226471,-0.601629796724883,
|
||||
-0.999663160011883,0.977152661845667,-0.612506744011134,
|
||||
-0.999705358236516,0.980276222869867,-0.623823505106148,
|
||||
-0.999749268681416,0.983304874940093,-0.634960424679979,
|
||||
-0.999792504826671,0.98608661301415,-0.645335938947312,
|
||||
-0.999832819611289,0.988517266330941,-0.654520152023392,
|
||||
-0.999868542448472,0.990550325768389,-0.662288978786769,
|
||||
-0.999898792436992,0.992189608358322,-0.668612095924406,
|
||||
-0.999923437929053,0.993472770560181,-0.673599052648918,
|
||||
-0.999942892527405,0.994454078791728,-0.67743543482306,
|
||||
-0.999957869458855,0.995191281150468,-0.680330525251589,
|
||||
-0.999969178161553,0.995737720843995,-0.682483750055223,
|
||||
-0.999977592746505,0.996138748541774,-0.684067959405521,
|
||||
-0.999983785751949,0.996430915291374,-0.685224257694965,
|
||||
-0.999988307090768,0.996642640252181,-0.686063321051298,
|
||||
-0.999991588584531,0.996795479475092,-0.686669611188537,
|
||||
-0.999457108562801,0.957308100330452,-0.544510348254195,
|
||||
-0.999461536891738,0.957813496974774,-0.546177043093093,
|
||||
-0.999467610348739,0.958499509739162,-0.548445349392839,
|
||||
-0.99947587724496,0.959420224561283,-0.551500575623861,
|
||||
-0.999487014706649,0.96063737454455,-0.555558738396518,
|
||||
-0.999501814057202,0.962214593042568,-0.560850379360616,
|
||||
-0.999521124121701,0.964206335982036,-0.567586594383798,
|
||||
-0.999545731079106,0.966641151433838,-0.575904240780955,
|
||||
-0.99957616326672,0.969502075922418,-0.585796443590518,
|
||||
-0.999612440645105,0.97271133966764,-0.597049671898101,
|
||||
-0.999653841360903,0.97612926634827,-0.609221678375412,
|
||||
-0.999698805768044,0.979573890622481,-0.621690000135093,
|
||||
-0.999745088676003,0.98285750656369,-0.633769664809452,
|
||||
-0.999790168137297,0.985825691481262,-0.644857253738139,
|
||||
-0.999831770196654,0.988382650050448,-0.654540806884388,
|
||||
-0.999868291858835,0.990495625586984,-0.662637775338392,
|
||||
-0.999898970864313,0.99218254911945,-0.669165211711007,
|
||||
-0.999923800176717,0.993492674974405,-0.674274097203207,
|
||||
-0.999943295802393,0.99448854634705,-0.678180982015034,
|
||||
-0.999958242228691,0.995233262834796,-0.681115970328253,
|
||||
-0.999969492310313,0.995783386502816,-0.683291491360672,
|
||||
-0.9999778434921,0.996186100876788,-0.684888104075612,
|
||||
-0.999983979083579,0.996478956154855,-0.686051321225753,
|
||||
-0.999988452762854,0.996690896143604,-0.686894280318611,
|
||||
-0.999991696635762,0.996843742558989,-0.687502797675764,
|
||||
-0.99942622519677,0.95273551376525,-0.52973445342276,
|
||||
-0.999431251888513,0.953364890065364,-0.531775078248324,
|
||||
-0.999438135127102,0.954216205818819,-0.534544256478421,
|
||||
-0.999447484232229,0.955353409604379,-0.538259555819354,
|
||||
-0.999460043610956,0.956847382797287,-0.543168806764506,
|
||||
-0.999476669294355,0.958767617957035,-0.549526631433258,
|
||||
-0.999498256120107,0.961167548841825,-0.557549533893376,
|
||||
-0.999525594039106,0.96406411345337,-0.567348498477478,
|
||||
-0.99955914655047,0.967416296772765,-0.578850629984727,
|
||||
-0.999598782612736,0.971112205090269,-0.591738948908515,
|
||||
-0.999643550828683,0.974975424245401,-0.605449790438815,
|
||||
-0.999691626863873,0.978794695326964,-0.619253051210138,
|
||||
-0.999740535476891,0.982368032503499,-0.632399001290434,
|
||||
-0.999787623551576,0.985542928393217,-0.644273440690982,
|
||||
-0.999830609266859,0.988236917993668,-0.654497332961353,
|
||||
-0.999867980665878,0.990435036734623,-0.662943041651411,
|
||||
-0.999899113839826,0.992171987514358,-0.669684398813115,
|
||||
-0.99992413932228,0.993510119095966,-0.674919409982818,
|
||||
-0.999943682568059,0.994521000760791,-0.678898527582435,
|
||||
-0.999958602593663,0.995273426895692,-0.681874083329038,
|
||||
-0.999969796996008,0.995827325707849,-0.684072136980539,
|
||||
-0.999978087042701,0.996231774009489,-0.685681221614805,
|
||||
-0.999984166999591,0.996525345416597,-0.686851365701776,
|
||||
-0.999988594403447,0.996737518228668,-0.687698209735077,
|
||||
-0.99999180171517,0.996890384052486,-0.68830893987291,
|
||||
-0.999390157426463,0.946920942804295,-0.51122226313308,
|
||||
-0.999395933441802,0.947726692929812,-0.513777573628096,
|
||||
-0.999403827648663,0.948811777610072,-0.51723281658354,
|
||||
-0.999414522275239,0.950252708159809,-0.521846337183872,
|
||||
-0.999428839936587,0.952130988141452,-0.527903696028361,
|
||||
-0.999447708094207,0.954520972605718,-0.535683534220698,
|
||||
-0.999472065554197,0.957470350228495,-0.545397862094965,
|
||||
-0.999502690391198,0.960975483022857,-0.557109508368084,
|
||||
-0.999539949364454,0.964959236107952,-0.570646385943978,
|
||||
-0.999583515091451,0.969263514061787,-0.585551315111654,
|
||||
-0.999632157937203,0.973666963417248,-0.601110139814965,
|
||||
-0.999683751487941,0.977927125893571,-0.616472948214351,
|
||||
-0.999735576101922,0.981831575297115,-0.630831395552119,
|
||||
-0.999784857726637,0.985236493339534,-0.643578385785915,
|
||||
-0.999829332450153,0.988079481753197,-0.65438828186954,
|
||||
-0.999867608015024,0.990368426816476,-0.663205123565136,
|
||||
-0.999899221662683,0.992157944027575,-0.670170636093868,
|
||||
-0.999924455936773,0.99352517039157,-0.675536179250677,
|
||||
-0.999944053382784,0.994551522336392,-0.679589326684972,
|
||||
-0.999958951024577,0.995311856218264,-0.682606141144479,
|
||||
-0.999970092593324,0.995869621114249,-0.684826971680466,
|
||||
-0.999978323687495,0.996275849753412,-0.686448600346481,
|
||||
-0.999984349718736,0.996570164047781,-0.687625681500497,
|
||||
-0.99998873217569,0.996782586780245,-0.68847640106736,
|
||||
-0.999991903942978,0.996935483686355,-0.689089330549666,
|
||||
-0.999347481117801,0.939290459494334,-0.487467495756698,
|
||||
-0.999354218814845,0.940359291937983,-0.490758827061018,
|
||||
-0.999363405293717,0.94179042102576,-0.495189208987614,
|
||||
-0.99937581067759,0.943676400697521,-0.501069025782312,
|
||||
-0.999392348372638,0.946110332967342,-0.508727587294775,
|
||||
-0.999414022815505,0.949167962851339,-0.518463101634253,
|
||||
-0.999441809315305,0.952881721565543,-0.530462948663941,
|
||||
-0.999476448137069,0.957211904308363,-0.544703949914482,
|
||||
-0.999518163390315,0.962026671148328,-0.560864218500752,
|
||||
-0.999566371599233,0.9671054278198,-0.578296052160285,
|
||||
-0.999619505889223,0.972173183572955,-0.596100902764443,
|
||||
-0.999675097525905,0.976957135851488,-0.613301403710775,
|
||||
-0.999730172747202,0.981242394512128,-0.629046698844639,
|
||||
-0.999781855631441,0.984904293259831,-0.64276494225858,
|
||||
-0.999827934835346,0.987909677906738,-0.654211857218486,
|
||||
-0.999867172874756,0.990295640550794,-0.663424218297065,
|
||||
-0.999899294557703,0.992140429456527,-0.670624806055411,
|
||||
-0.999924750546524,0.99353788980571,-0.676125509396204,
|
||||
-0.999944408771816,0.994580185639227,-0.680254553289513,
|
||||
-0.999959287966352,0.99534862819584,-0.683313339914276,
|
||||
-0.999970379456712,0.995910350005688,-0.685557199449765,
|
||||
-0.999978553700145,0.996318404632234,-0.687191447715675,
|
||||
-0.99998452744805,0.996613487791505,-0.688375478023611,
|
||||
-0.999988866233908,0.996826176890439,-0.689230065027467,
|
||||
-0.999992003433048,0.996979116046436,-0.689845181360383,
|
||||
-0.99929612221311,0.92885164154965,-0.456019541351542,
|
||||
-0.999304136012349,0.930338079224207,-0.460415923605211,
|
||||
-0.999315027665755,0.932312945848239,-0.466298906238068,
|
||||
-0.99932967386815,0.934888870826995,-0.474045380275375,
|
||||
-0.999349092121395,0.938169262151671,-0.484032087617024,
|
||||
-0.999374365071002,0.942221624043521,-0.496561507953729,
|
||||
-0.999406486153652,0.947043569031187,-0.511755566566498,
|
||||
-0.999446114575041,0.952531828519665,-0.529439310857211,
|
||||
-0.999493265137843,0.95847104464828,-0.549062847224271,
|
||||
-0.999547019807701,0.964557081761264,-0.56972004770415,
|
||||
-0.999605404586501,0.970454509503382,-0.590292352063801,
|
||||
-0.999665568129688,0.975867415739172,-0.609679235305811,
|
||||
-0.999724281933513,0.980593694544417,-0.627021003888902,
|
||||
-0.999778600317221,0.984543928761683,-0.641824777683263,
|
||||
-0.999826410921627,0.987726759554179,-0.653965886787326,
|
||||
-0.999866674029357,0.990216498606079,-0.663600374094058,
|
||||
-0.999899332676593,0.992119445097779,-0.671047699874178,
|
||||
-0.999925023635529,0.99354833216856,-0.676688426942388,
|
||||
-0.99994474922943,0.994607059931934,-0.680895306350511,
|
||||
-0.999959613839686,0.995383815162353,-0.683996801246194,
|
||||
-0.999970657921832,0.99594958472018,-0.686263949735904,
|
||||
-0.999978777339898,0.996359510299634,-0.687910896533956,
|
||||
-0.999984700383703,0.996655387577793,-0.689101889949892,
|
||||
-0.999988996724424,0.996868358881836,-0.689960337531757,
|
||||
-0.999992100293264,0.997021350982018,-0.690577629107776,
|
||||
-0.999232852507766,0.913727519036899,-0.412606853125446,
|
||||
-0.999242645398387,0.915935956793934,-0.41877234970756,
|
||||
-0.999255893862801,0.918837586526089,-0.426956504255908,
|
||||
-0.999273602979233,0.922567693783475,-0.437619185024585,
|
||||
-0.999296904214589,0.927230536454782,-0.451177895602595,
|
||||
-0.999326946918226,0.932859625501621,-0.467896904643251,
|
||||
-0.999364701514127,0.939375916610792,-0.487748118687341,
|
||||
-0.999410673041913,0.946562446165056,-0.510287421562708,
|
||||
-0.999464570104078,0.95407637777001,-0.534615408125632,
|
||||
-0.999525039284739,0.961506490361475,-0.559480266158481,
|
||||
-0.999589621231223,0.968459052306018,-0.583516782465201,
|
||||
-0.999655048311424,0.97463639862061,-0.605533240844905,
|
||||
-0.999717853458056,0.979877377924312,-0.62472581872234,
|
||||
-0.999775072645767,0.984152640941173,-0.640748187551763,
|
||||
-0.999824754560624,0.987529886381108,-0.653647788844286,
|
||||
-0.999866110070261,0.990130796201362,-0.663733488567256,
|
||||
-0.999899336098702,0.992094982866248,-0.671440021774989,
|
||||
-0.999925275647391,0.993556546558814,-0.677225885975937,
|
||||
-0.999945075220809,0.994632209568016,-0.681512615422448,
|
||||
-0.999959929042703,0.99541748478404,-0.684657577866916,
|
||||
-0.999970928306749,0.995987393035966,-0.686948283109992,
|
||||
-0.99997899485255,0.996399233919776,-0.688608010654417,
|
||||
-0.999984868711673,0.996695929899694,-0.689805982917444,
|
||||
-0.999989123785848,0.996909198680171,-0.690668285388792,
|
||||
-0.99999219462584,0.997062253975925,-0.691287741435037,
|
||||
-0.999152077060728,0.889889548444139,-0.349061088286487,
|
||||
-0.999164564481812,0.893512362357241,-0.358321392850279,
|
||||
-0.999181328175061,0.89819090051193,-0.370471779013374,
|
||||
-0.999203519013022,0.904073370874581,-0.386063949868755,
|
||||
-0.999232372094478,0.911225741593758,-0.405512187944769,
|
||||
-0.999269054494269,0.919575847587998,-0.428928148710386,
|
||||
-0.999314422562479,0.928873757841218,-0.455951377537584,
|
||||
-0.999368702795487,0.938696629074492,-0.485653574382402,
|
||||
-0.999431161107827,0.948513477384418,-0.516600823762431,
|
||||
-0.999499889019962,0.957794017950755,-0.547100205403036,
|
||||
-0.999571867439423,0.966117436282565,-0.575553712340007,
|
||||
-0.999643400523047,0.973236877263828,-0.600771919790487,
|
||||
-0.999710829097846,0.979083725305741,-0.622127004150167,
|
||||
-0.999771250966691,0.983727246264749,-0.639523867161234,
|
||||
-0.999822958889432,0.987318112980124,-0.653254531680796,
|
||||
-0.999865479385908,0.990038301447359,-0.663823305665926,
|
||||
-0.999899304831475,0.992067025349649,-0.67180239279328,
|
||||
-0.999925506987289,0.993562576625782,-0.677738773058922,
|
||||
-0.999945387183711,0.994655694348136,-0.682107445763671,
|
||||
-0.999960233952359,0.995449700414856,-0.685296658764391,
|
||||
-0.999971190912995,0.996023838521735,-0.687611196422924,
|
||||
-0.999979206471127,0.996437638512654,-0.689283790136547,
|
||||
-0.999985032608414,0.996735177154657,-0.690488758695185,
|
||||
-0.999989247549769,0.996948758152623,-0.691354911475921,
|
||||
-0.999992286527841,0.997101886480435,-0.691976522006297,
|
||||
-0.999042007259475,0.846839476355646,-0.247562606935731,
|
||||
-0.999059310027056,0.853850930614133,-0.262993110426348,
|
||||
-0.99908215215834,0.862634865772264,-0.282874416523585,
|
||||
-0.999111791350179,0.873267701688246,-0.307799227855353,
|
||||
-0.999149460274721,0.885615899778428,-0.337997269244,
|
||||
-0.999196176211498,0.89928385557361,-0.373105577817442,
|
||||
-0.999252479946996,0.913630787322957,-0.412017325303364,
|
||||
-0.999318122840983,0.927874730147937,-0.452924609459096,
|
||||
-0.9993917698708,0.941254666200446,-0.493608708966554,
|
||||
-0.999470858355026,0.953184064404172,-0.531898307960971,
|
||||
-0.999551781187113,0.963334777927113,-0.566107560700536,
|
||||
-0.999630458843132,0.971634043939743,-0.595279512665676,
|
||||
-0.999703140993037,0.978200975484896,-0.619183392925497,
|
||||
-0.999767110732338,0.983264056319206,-0.638138631171118,
|
||||
-0.999821016253149,0.987090375099302,-0.652782585207141,
|
||||
-0.999864780149848,0.989938753401259,-0.663869411221801,
|
||||
-0.999899238810493,0.992035545799555,-0.672135353966679,
|
||||
-0.999925718023562,0.993566460874601,-0.678227911673286,
|
||||
-0.999945685530231,0.99467756984301,-0.682680702983936,
|
||||
-0.999960528925675,0.995480521419424,-0.685914973874208,
|
||||
-0.999971446026693,0.996058980854992,-0.688253627504821,
|
||||
-0.999979412416931,0.996474783268042,-0.689939175953683,
|
||||
-0.999985192241392,0.996773187954865,-0.69115115989633,
|
||||
-0.999989368141114,0.996987095415323,-0.692021159457422,
|
||||
-0.999992376091346,0.997140306222664,-0.692644915228308,
|
||||
-0.998865086928174,0.745924580066976,-0.0604141480564288,
|
||||
-0.998895487231205,0.764873649745473,-0.0910755754690588,
|
||||
-0.998933409668284,0.787060755596958,-0.129313938502959,
|
||||
-0.998979684019541,0.81184986561543,-0.175344827159791,
|
||||
-0.99903493644843,0.83813626350615,-0.228455101442363,
|
||||
-0.999099521125361,0.864509230253996,-0.286815983154912,
|
||||
-0.999173362695985,0.889538052977561,-0.347607059890004,
|
||||
-0.999255664139382,0.912066866492635,-0.407502232575221,
|
||||
-0.999344565973438,0.931397810612656,-0.463365245732482,
|
||||
-0.99943698944938,0.94731384445106,-0.512864721985471,
|
||||
-0.999528900858466,0.959977803907794,-0.554772924977228,
|
||||
-0.999616021217074,0.969782650772129,-0.588907534659359,
|
||||
-0.999694709613298,0.977214767105395,-0.615844974558559,
|
||||
-0.999762624036077,0.982758778214894,-0.636577066889482,
|
||||
-0.999818918115288,0.986845473409128,-0.652227863178924,
|
||||
-0.999864010307122,0.989831859802084,-0.663871226969659,
|
||||
-0.999899137899114,0.992000508059639,-0.672439368989748,
|
||||
-0.999925909089307,0.993568232917785,-0.6786940662434,
|
||||
-0.999945970648199,0.994697887686373,-0.68323323728191,
|
||||
-0.999960814301116,0.995510003466929,-0.686513398356392,
|
||||
-0.99997169391947,0.996092876111869,-0.688876459454257,
|
||||
-0.999979612900072,0.996510723831304,-0.690575054289614,
|
||||
-0.999985347769733,0.996810017409768,-0.69179407428053,
|
||||
-0.999989485678529,0.997024265113336,-0.69266791809088,
|
||||
-0.999992463403904,0.997177567482597,-0.693293810560046,
|
||||
-0.998168670041896,0.234202002930654,0.397757295018613,
|
||||
-0.998398779709349,0.385186319412462,0.309863134853804,
|
||||
-0.998576095338357,0.517988723723858,0.208214440973434,
|
||||
-0.998719357216826,0.629703569518859,0.096222948116353,
|
||||
-0.998842476527936,0.720203330951345,-0.0207601551784617,
|
||||
-0.998955556213729,0.791300079843907,-0.136348134920346,
|
||||
-0.999065378019792,0.845813571958666,-0.24445016793907,
|
||||
-0.999175567184225,0.88683389735994,-0.340477179725281,
|
||||
-0.999286737933873,0.917262868364474,-0.421953754912466,
|
||||
-0.999396947303236,0.939594279052761,-0.488436998558289,
|
||||
-0.999502626750312,0.955853286353504,-0.540978607500742,
|
||||
-0.999599838919708,0.967622793392235,-0.581462483326913,
|
||||
-0.999685441175006,0.976107385917766,-0.612050478470221,
|
||||
-0.999757759055763,0.982206390023536,-0.634821102862626,
|
||||
-0.999816654953809,0.986582054280449,-0.651585654275972,
|
||||
-0.999863167558551,0.989717294446952,-0.663828002921204,
|
||||
-0.999899001887773,0.991961866430869,-0.672714826358979,
|
||||
-0.999926080483689,0.993567921696033,-0.679137945776486,
|
||||
-0.999946242902525,0.994716695840987,-0.683765847313538,
|
||||
-0.999961090399614,0.995538198798929,-0.687092756503707,
|
||||
-0.999971934849436,0.996125577031366,-0.689480524558436,
|
||||
-0.999979808120392,0.996545512563991,-0.691192260465585,
|
||||
-0.999985499344625,0.996845717383694,-0.692418338685915,
|
||||
-0.999989600274749,0.997060318675938,-0.693296025163123,
|
||||
-0.999992548548667,0.997213721346586,-0.693924046451602
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _KS_TAB_H_ */
|
||||
38
plugins/ladspa_effect/caps/dsp/tonestack/tables.h
Normal file
38
plugins/ladspa_effect/caps/dsp/tonestack/tables.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
ks_tab.h
|
||||
|
||||
Copyright 2006 David Yeh <dtyeh@ccrma.stanford.edu>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
Tone Stack emulation coefficient table for lattice filter.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _TS_TABLES_H_
|
||||
#define _TS_TABLES_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
extern double ToneStackKS[];
|
||||
extern double ToneStackVS[];
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _TS_TABLES_H_ */
|
||||
15664
plugins/ladspa_effect/caps/dsp/tonestack/vs_tab.h
Normal file
15664
plugins/ladspa_effect/caps/dsp/tonestack/vs_tab.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
common math utility functions.
|
||||
Common math utility functions.
|
||||
|
||||
*/
|
||||
/*
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/*
|
||||
interface.cc
|
||||
|
||||
Copyright 2004-7 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
LADSPA descriptor factory, host interface.
|
||||
|
||||
*/
|
||||
@@ -43,10 +47,11 @@
|
||||
#include "HRTF.h"
|
||||
#include "Pan.h"
|
||||
#include "Scape.h"
|
||||
#include "ToneStack.h"
|
||||
|
||||
#include "Descriptor.h"
|
||||
|
||||
#define N 33
|
||||
#define N 38
|
||||
static DescriptorStub * descriptors [N];
|
||||
|
||||
static inline void
|
||||
@@ -55,24 +60,29 @@ seed()
|
||||
static struct timeval tv;
|
||||
gettimeofday (&tv, 0);
|
||||
|
||||
srand (tv.tv_sec ^ tv.tv_usec);
|
||||
srandom (tv.tv_sec ^ tv.tv_usec);
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
__attribute__ ((constructor))
|
||||
void _init()
|
||||
{
|
||||
DescriptorStub ** d = descriptors;
|
||||
|
||||
*d++ = new Descriptor<Eq>();
|
||||
*d++ = new Descriptor<Eq2x2>();
|
||||
*d++ = new Descriptor<Compress>();
|
||||
*d++ = new Descriptor<Pan>();
|
||||
|
||||
*d++ = new Descriptor<PreampIII>();
|
||||
*d++ = new Descriptor<PreampIV>();
|
||||
*d++ = new Descriptor<ToneStack>();
|
||||
*d++ = new Descriptor<ToneStackLT>();
|
||||
*d++ = new Descriptor<AmpIII>();
|
||||
*d++ = new Descriptor<AmpIV>();
|
||||
*d++ = new Descriptor<AmpV>();
|
||||
*d++ = new Descriptor<AmpVTS>();
|
||||
*d++ = new Descriptor<CabinetI>();
|
||||
*d++ = new Descriptor<CabinetII>();
|
||||
*d++ = new Descriptor<Clip>();
|
||||
@@ -85,6 +95,7 @@ void _init()
|
||||
*d++ = new Descriptor<PhaserII>();
|
||||
*d++ = new Descriptor<SweepVFI>();
|
||||
*d++ = new Descriptor<SweepVFII>();
|
||||
*d++ = new Descriptor<AutoWah>();
|
||||
*d++ = new Descriptor<Scape>();
|
||||
|
||||
*d++ = new Descriptor<VCOs>();
|
||||
@@ -103,9 +114,13 @@ void _init()
|
||||
*d++ = new Descriptor<Dirac>();
|
||||
*d++ = new Descriptor<HRTF>();
|
||||
|
||||
seed();
|
||||
/* make sure N is correct */
|
||||
assert (d - descriptors == N);
|
||||
|
||||
//seed();
|
||||
}
|
||||
|
||||
__attribute__ ((destructor))
|
||||
void _fini()
|
||||
{
|
||||
for (ulong i = 0; i < N; ++i)
|
||||
@@ -119,7 +134,6 @@ ladspa_descriptor (unsigned long i)
|
||||
{
|
||||
if (i < N)
|
||||
return descriptors[i];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
520
plugins/ladspa_effect/caps/waves/click.h
Normal file
520
plugins/ladspa_effect/caps/waves/click.h
Normal file
@@ -0,0 +1,520 @@
|
||||
float click [] = {
|
||||
-0.013062, -0.013062, -0.012817, -0.011078, -0.031097, -0.266479,
|
||||
-0.610718, -0.255005, 0.698975, 0.999969, 0.505188, -0.724579,
|
||||
-1.000000, -0.493225, 0.532135, 0.789459, 0.131744, -0.270599,
|
||||
-0.080780, -0.065796, 0.584381, 0.718567, -0.355316, -0.760559,
|
||||
-0.649994, -0.039032, 0.442017, 0.700043, 0.434845, -0.556427,
|
||||
-1.000000, -0.400391, 0.590729, 0.999969, 0.999969, 0.592896,
|
||||
-0.248932, -0.662750, -0.074615, 0.424774, 0.274933, -0.416504,
|
||||
-0.772736, -0.359833, -0.218140, -0.254456, -0.379547, -0.768280,
|
||||
-0.707428, 0.108124, 0.755127, 0.680847, 0.429352, 0.126129,
|
||||
-0.424316, -0.451813, 0.197510, 0.862762, 0.964508, 0.263824,
|
||||
-0.383057, -0.753571, -0.848297, -0.491425, -0.042114, -0.222504,
|
||||
-0.664490, -0.690155, -0.227905, 0.286682, 0.742981, 0.812225,
|
||||
0.326691, 0.182770, 0.381195, 0.536194, 0.446930, 0.085754,
|
||||
-0.650604, -1.000000, -1.000000, -0.774658, -0.152191, -0.112122,
|
||||
-0.416290, -0.491547, -0.253235, 0.241760, 0.749847, 0.618042,
|
||||
0.338440, 0.431335, 0.773712, 0.936890, 0.752563, 0.291595,
|
||||
-0.206970, -0.552460, -0.447449, -0.152069, -0.315735, -0.891846,
|
||||
-1.000000, -1.000000, -0.682281, 0.066925, 0.477264, 0.447144,
|
||||
0.209167, 0.149994, 0.374176, 0.621185, 0.597046, 0.315826,
|
||||
0.034210, -0.004089, 0.084534, 0.127075, 0.060608, -0.134949,
|
||||
-0.275421, -0.347870, -0.505371, -0.618835, -0.443878, -0.217682,
|
||||
-0.157898, -0.241058, -0.424103, -0.494690, -0.286438, 0.111542,
|
||||
0.487793, 0.654907, 0.571869, 0.484650, 0.413208, 0.254089,
|
||||
0.136414, 0.021118, -0.223724, -0.366364, -0.290771, -0.126251,
|
||||
-0.080048, -0.175262, -0.290100, -0.281403, -0.071808, 0.078613,
|
||||
0.216339, 0.275787, 0.223938, 0.178131, 0.162659, 0.110779,
|
||||
0.104553, 0.158661, 0.208252, 0.271484, 0.256531, 0.153046,
|
||||
0.068054, -0.009003, -0.116119, -0.155304, -0.099213, 0.066589,
|
||||
0.293732, 0.392303, 0.313416, 0.196320, 0.123932, 0.145874,
|
||||
0.279053, 0.291016, 0.081818, -0.092133, -0.090363, 0.030029,
|
||||
0.099762, -0.021912, -0.133942, -0.025299, 0.257782, 0.466980,
|
||||
0.406006, 0.150085, -0.007385, -0.027588, 0.048920, 0.128998,
|
||||
0.058868, -0.066589, -0.146759, -0.168427, -0.119751, -0.087677,
|
||||
-0.082581, -0.029694, -0.041138, -0.139984, -0.156036, -0.033325,
|
||||
0.164612, 0.331726, 0.320435, 0.205811, 0.209717, 0.275909,
|
||||
0.240479, 0.081238, -0.104828, -0.239624, -0.286652, -0.254120,
|
||||
-0.304688, -0.428223, -0.479248, -0.534729, -0.453003, -0.144928,
|
||||
-0.001709, 0.059448, 0.016937, -0.127991, -0.186432, -0.122986,
|
||||
0.086090, 0.278351, 0.258026, 0.172882, -0.032043, -0.267242,
|
||||
-0.289276, -0.293365, -0.288971, -0.256073, -0.212250, -0.214783,
|
||||
-0.182709, -0.149170, -0.132599, -0.221649, -0.233063, 0.002472,
|
||||
0.208008, 0.119659, -0.018250, -0.182861, -0.267731, -0.164001,
|
||||
-0.052063, 0.009979, 0.058472, 0.147156, 0.111298, 0.017426,
|
||||
-0.067780, -0.049835, 0.002167, -0.028259, 0.003418, 0.023743,
|
||||
-0.056702, -0.074066, -0.070984, -0.075439, -0.056915, -0.189575,
|
||||
-0.324524, -0.241882, -0.051514, 0.075623, 0.160095, 0.094238,
|
||||
0.004425, 0.010193, 0.032898, 0.040222, 0.163605, 0.273682,
|
||||
0.192261, -0.019989, -0.217682, -0.327728, -0.337372, -0.227386,
|
||||
-0.043945, 0.107788, 0.244690, 0.226227, -0.034332, -0.252106,
|
||||
-0.364136, -0.377136, -0.246277, -0.021973, 0.194763, 0.300110,
|
||||
0.295532, 0.246246, 0.198425, 0.209991, 0.272064, 0.249451,
|
||||
0.078094, -0.143616, -0.276459, -0.257782, -0.228638, -0.161224,
|
||||
-0.006012, 0.169342, 0.267456, 0.246094, 0.232147, 0.290436,
|
||||
0.280670, 0.220886, 0.162811, 0.187286, 0.178223, 0.036804,
|
||||
-0.043304, -0.098694, -0.101990, 0.008698, 0.102844, 0.132050,
|
||||
0.142578, 0.152924, 0.058960, -0.074615, -0.079041, 0.026123,
|
||||
0.136322, 0.253510, 0.382782, 0.447357, 0.419800, 0.294952,
|
||||
0.129059, 0.004028, -0.119781, -0.257538, -0.320526, -0.211609,
|
||||
-0.054565, 0.012085, -0.016663, 0.006592, 0.144958, 0.193237,
|
||||
0.072174, -0.018951, 0.038483, 0.085175, -0.023407, -0.089661,
|
||||
-0.029999, -0.023956, -0.079498, -0.135223, -0.154205, -0.095276,
|
||||
-0.031830, -0.105988, -0.252563, -0.284424, -0.153198, 0.017273,
|
||||
0.073456, 0.072571, 0.175751, 0.222260, 0.105316, -0.053345,
|
||||
-0.180115, -0.192932, -0.185211, -0.167511, -0.079529, -0.070007,
|
||||
-0.151276, -0.215210, -0.206390, -0.133820, -0.099060, -0.082855,
|
||||
0.047852, 0.108429, 0.014099, -0.049377, -0.050751, -0.081207,
|
||||
-0.060944, -0.028564, -0.124420, -0.139526, -0.033508, 0.054108,
|
||||
0.042664, -0.004669, -0.069611, -0.105774, -0.090881, -0.128601,
|
||||
-0.090027, -0.012634, 0.004578, 0.046387, 0.085144, 0.055511,
|
||||
0.036469, 0.001770, -0.019867, 0.016998, 0.031891, 0.089935,
|
||||
0.066254, -0.069183, -0.020081, 0.046356, 0.005554, -0.023224,
|
||||
-0.042847, -0.133057, -0.104004, 0.065674, 0.146484, 0.145782,
|
||||
0.006897, -0.059509, 0.070923, 0.058319, -0.002655, 0.000641,
|
||||
-0.036011, 0.049988, 0.076752, 0.016998, 0.063049, 0.105835,
|
||||
0.041870, -0.092072, -0.154358, -0.081879, 0.089905, 0.090820,
|
||||
0.054047, -0.110565, -0.285980, -0.219116, -0.103058, 0.083405,
|
||||
0.192200, 0.124146, 0.080994, 0.118896, 0.231659, 0.259644,
|
||||
0.175018, 0.110840, 0.005096, -0.156128, -0.202209, -0.167572,
|
||||
-0.145050, -0.126068, -0.139221, -0.039856, 0.078674, 0.062866,
|
||||
-0.069672, -0.143311, -0.049530, 0.082611, 0.142487, 0.039612,
|
||||
-0.035736, -0.006287, 0.017181, 0.013580, -0.019043, -0.017303,
|
||||
0.007904, -0.073944, -0.121704, -0.065369, -0.098083, -0.063568,
|
||||
0.056885, 0.083984, 0.148987, 0.298431, 0.253815, 0.052643,
|
||||
-0.139740, -0.217743, -0.073181, 0.097351, 0.124786, 0.091156,
|
||||
0.056152, -0.007446, 0.048553, 0.129333, 0.021118, -0.003235,
|
||||
0.093872, 0.080658, 0.025482, -0.037598, -0.055481, -0.078796,
|
||||
-0.130676, -0.140930, -0.126770, -0.048004, 0.026093, 0.035767,
|
||||
0.049957, 0.009247, -0.076599, -0.066101, 0.002747, 0.076813,
|
||||
0.173492, 0.091949, -0.071960, -0.080902, -0.061157, -0.061066,
|
||||
-0.073029, -0.070251, -0.008545, 0.035187, -0.036194, -0.086456,
|
||||
-0.158691, -0.199036, -0.150177, -0.099030, -0.027802, -0.001465,
|
||||
0.003662, 0.089020, 0.056122, -0.108551, -0.125610, -0.056610,
|
||||
-0.053284, -0.128998, -0.166504, -0.124725, -0.095459, -0.088531,
|
||||
-0.087433, -0.065399, -0.084045, -0.053284, -0.006317, -0.008698,
|
||||
0.025879, -0.019714, -0.055511, -0.076874, -0.084442, -0.111450,
|
||||
-0.097198, -0.040924, -0.047729, 0.025604, 0.077301, 0.027100,
|
||||
-0.052612, -0.046265, 0.021271, 0.022186, -0.060669, -0.109283,
|
||||
-0.022858, 0.126740, 0.199036, 0.255798, 0.210114, 0.167450,
|
||||
0.034515, -0.140167, -0.106354, -0.056549, -0.016449, 0.092529,
|
||||
0.082977, 0.035645, 0.066132, 0.113098, 0.123657, 0.150513,
|
||||
0.123840, 0.125702, 0.146637, 0.131683, 0.114014, 0.019806,
|
||||
0.017670, 0.017914, -0.029480, 0.074280, 0.118622, 0.049805,
|
||||
0.057922, 0.033569, 0.028870, 0.095551, 0.030121, -0.080963,
|
||||
-0.042938, 0.091400, 0.075287, 0.011597, -0.023834, -0.035278,
|
||||
-0.009552, -0.030884, -0.058044, -0.038818, 0.016785, 0.037354,
|
||||
-0.004852, -0.048157, -0.051849, 0.014618, 0.067535, 0.060547,
|
||||
0.029022, -0.019257, -0.078705, -0.057495, 0.056549, -0.016022,
|
||||
-0.145416, -0.142548, -0.124207, -0.015961, 0.118011, 0.059906,
|
||||
-0.050842, -0.037537, -0.042084, -0.060059, -0.034454, -0.011414,
|
||||
0.040009, 0.084778, 0.039246, -0.029663, -0.059631, -0.023285,
|
||||
0.033173, 0.044617, -0.023254, -0.044983, -0.039337, -0.037506,
|
||||
0.024750, 0.034637, -0.024902, -0.007019, -0.006195, 0.021271,
|
||||
0.067657, 0.043182, 0.004089, -0.043091, -0.077576, -0.118225,
|
||||
-0.100006, -0.084015, -0.117065, -0.140533, -0.091675, 0.001709,
|
||||
0.019196, -0.053619, -0.090454, -0.007599, 0.064209, 0.048920,
|
||||
-0.077576, -0.158813, 0.000214, 0.086823, 0.027100, 0.065979,
|
||||
0.028351, -0.032745, -0.089844, -0.026672, 0.033234, -0.002045,
|
||||
-0.068665, -0.114441, -0.152344, -0.166840, -0.129181, -0.077667,
|
||||
-0.001678, 0.082428, 0.123138, 0.048737, -0.080750, -0.094452,
|
||||
-0.066895, -0.061401, -0.009613, -0.021729, 0.015442, 0.051270,
|
||||
-0.017273, -0.013519, 0.007172, -0.065338, -0.133209, -0.104095,
|
||||
-0.069153, -0.047638, -0.011871, -0.043182, -0.056427, 0.028900,
|
||||
0.031128, -0.004974, -0.057983, -0.129303, -0.086914, -0.039917,
|
||||
-0.016266, 0.033936, 0.017426, 0.021576, 0.037964, -0.003693,
|
||||
-0.009979, 0.064392, 0.022491, -0.075836, -0.030457, 0.040741,
|
||||
0.075745, 0.076447, 0.034851, -0.042816, -0.058960, -0.049591,
|
||||
-0.033905, -0.005127, -0.015778, -0.011963, 0.043091, 0.093231,
|
||||
0.070007, 0.060211, 0.045074, 0.039642, 0.041260, 0.015594,
|
||||
0.016663, 0.032867, 0.031250, 0.009583, -0.011230, 0.009247,
|
||||
0.050415, 0.087524, 0.040375, -0.017792, -0.023621, -0.033478,
|
||||
0.012543, 0.010864, 0.016724, 0.047638, 0.089905, 0.132141,
|
||||
0.089111, 0.045471, -0.019409, -0.041229, 0.011597, -0.053101,
|
||||
-0.105194, -0.104187, -0.087799, -0.061951, -0.055634, 0.003082,
|
||||
0.064270, 0.062744, 0.022552, 0.045837, 0.096985, 0.080139,
|
||||
0.028015, -0.003204, -0.035553, -0.006714, 0.071960, 0.052155,
|
||||
-0.085815, -0.133209, -0.086212, -0.063507, -0.040466, -0.048065,
|
||||
-0.071106, -0.006256, 0.013641, 0.026611, 0.101166, 0.072357,
|
||||
0.070557, 0.060333, -0.004028, -0.012787, -0.003387, 0.000793,
|
||||
-0.042328, -0.083740, -0.114532, -0.106598, 0.000183, 0.052155,
|
||||
-0.011536, -0.042480, 0.040649, 0.096161, 0.074463, 0.033417,
|
||||
-0.013824, 0.006500, 0.001068, 0.052094, 0.065125, 0.027496,
|
||||
-0.009613, -0.042542, -0.053436, -0.047607, -0.063080, -0.003693,
|
||||
0.001129, -0.113068, -0.136444, -0.046387, 0.056641, 0.095581,
|
||||
0.071533, 0.006836, 0.015869, 0.094147, 0.035950, -0.057190,
|
||||
0.013245, 0.040802, 0.020050, -0.008636, -0.041199, -0.051025,
|
||||
-0.049683, -0.065826, -0.073303, -0.081909, -0.105347, -0.019348,
|
||||
0.024902, 0.007904, 0.010712, -0.030792, -0.059875, -0.052521,
|
||||
-0.065125, -0.029419, 0.076965, 0.043243, 0.022247, 0.019684,
|
||||
-0.016968, 0.026611, 0.010071, -0.047852, -0.037903, -0.015839,
|
||||
-0.032013, -0.055054, -0.145294, -0.203003, -0.141785, -0.069946,
|
||||
-0.011261, 0.027435, -0.020538, -0.047455, -0.046051, -0.035400,
|
||||
-0.006287, 0.014496, 0.004425, 0.001251, 0.003479, 0.023132,
|
||||
0.102905, 0.105377, 0.013947, -0.088074, -0.138519, -0.089172,
|
||||
0.021210, 0.031830, -0.057739, -0.066895, -0.024292, 0.001801,
|
||||
-0.027924, -0.053284, -0.022003, 0.012726, 0.011047, -0.005920,
|
||||
-0.033295, -0.049042, -0.025055, 0.031738, 0.031097, 0.004059,
|
||||
0.008698, 0.054688, 0.046570, -0.022980, -0.080597, -0.092163,
|
||||
-0.052277, -0.003967, -0.026337, -0.039886, 0.025238, 0.037323,
|
||||
0.005829, -0.014282, 0.028442, 0.057098, 0.003662, -0.038483,
|
||||
-0.050537, -0.017151, 0.031555, -0.025391, -0.038452, -0.011871,
|
||||
-0.042664, 0.015411, 0.065277, 0.015594, -0.015778, -0.036652,
|
||||
-0.097076, -0.057983, 0.001434, 0.002991, -0.016724, -0.071564,
|
||||
-0.036926, 0.038452, 0.049683, 0.071075, 0.066925, 0.007935,
|
||||
-0.028351, -0.003754, 0.020569, -0.008881, -0.016998, -0.024841,
|
||||
-0.031677, 0.005615, 0.019470, -0.028290, -0.035645, -0.012756,
|
||||
-0.014191, -0.027496, -0.002411, -0.018066, 0.012177, 0.103668,
|
||||
0.134277, 0.056885, 0.027893, -0.002533, -0.008148, 0.018707,
|
||||
-0.005615, 0.004822, 0.055634, 0.054718, 0.003296, -0.046875,
|
||||
-0.058838, -0.034149, 0.031616, 0.020233, -0.014771, -0.005981,
|
||||
0.025391, 0.043091, 0.010376, 0.006866, 0.037842, 0.053589,
|
||||
0.037567, 0.042938, 0.063629, -0.000092, -0.056000, -0.045074,
|
||||
-0.034454, -0.006531, 0.004303, -0.034882, -0.026886, 0.056580,
|
||||
0.066437, 0.025757, 0.036255, 0.066376, 0.017395, -0.030701,
|
||||
-0.042419, -0.049744, -0.013733, 0.006653, -0.036713, -0.045166,
|
||||
-0.008270, 0.011841, 0.049622, 0.086792, 0.052460, 0.037872,
|
||||
-0.009338, -0.074890, -0.007385, 0.029053, 0.002991, -0.001862,
|
||||
-0.055817, -0.109833, -0.082581, -0.018097, -0.005829, -0.006561,
|
||||
-0.038422, -0.026855, 0.067139, 0.051575, -0.023956, 0.005768,
|
||||
0.032318, -0.009094, -0.031799, -0.019714, -0.075714, -0.137512,
|
||||
-0.110962, -0.081360, -0.014679, -0.015259, -0.067322, -0.077271,
|
||||
-0.073303, -0.035583, 0.033325, 0.059540, 0.034912, 0.015411,
|
||||
-0.013214, -0.019135, -0.013306, -0.024170, -0.043640, -0.067596,
|
||||
-0.077026, -0.050446, -0.039398, -0.074158, -0.079590, -0.077148,
|
||||
-0.119843, -0.070496, 0.023834, 0.030396, -0.002869, -0.011810,
|
||||
-0.001465, 0.025299, 0.031250, 0.045990, 0.034027, -0.058624,
|
||||
-0.070892, -0.031067, -0.025360, -0.042572, -0.063507, -0.054352,
|
||||
-0.028412, -0.001923, -0.037018, -0.048157, -0.007141, -0.003357,
|
||||
0.013916, 0.035767, 0.035034, 0.038391, 0.011749, -0.011780,
|
||||
-0.033905, -0.065521, -0.075470, -0.065491, -0.065125, -0.079376,
|
||||
-0.044281, -0.014130, -0.000458, 0.024017, 0.021973, -0.004120,
|
||||
0.026245, 0.043976, -0.009155, -0.035187, -0.030853, -0.042633,
|
||||
0.002563, 0.055603, 0.021820, -0.057800, -0.074646, -0.015411,
|
||||
0.045898, 0.007233, -0.055756, -0.016113, 0.035370, 0.023315,
|
||||
-0.017120, -0.024292, 0.004974, 0.041718, 0.045227, -0.000793,
|
||||
0.025970, 0.086670, 0.042450, -0.023834, -0.054077, -0.036926,
|
||||
0.028320, 0.006622, 0.005341, 0.059265, 0.049164, 0.011841,
|
||||
0.019470, 0.004242, -0.035248, -0.009949, 0.027069, 0.029419,
|
||||
0.042816, 0.043671, 0.012878, 0.023865, 0.027802, -0.000854,
|
||||
0.006348, 0.039337, 0.040802, -0.013275, -0.055634, -0.029480,
|
||||
-0.013092, -0.033936, -0.040649, -0.001404, 0.038910, 0.046722,
|
||||
0.033447, -0.020294, -0.040283, -0.014923, -0.003143, -0.001312,
|
||||
0.005493, 0.002899, 0.037140, 0.062469, 0.038696, 0.002747,
|
||||
-0.012482, -0.009827, -0.004486, -0.011780, -0.018097, -0.014862,
|
||||
-0.008057, -0.056702, -0.049561, 0.025269, 0.046844, 0.003296,
|
||||
0.014130, 0.043182, 0.018280, 0.007294, 0.008270, -0.004517,
|
||||
-0.014679, -0.026764, -0.019745, -0.041779, -0.027863, 0.028412,
|
||||
0.033722, 0.020264, 0.004913, -0.004578, -0.007935, -0.006226,
|
||||
-0.005737, -0.032074, -0.040955, -0.010468, -0.040863, -0.031433,
|
||||
-0.004547, -0.032654, -0.038239, 0.027496, 0.010681, -0.000702,
|
||||
0.020782, -0.010376, -0.005768, 0.013733, -0.007324, -0.027466,
|
||||
-0.018005, -0.033600, -0.028778, -0.036316, -0.073090, -0.050781,
|
||||
-0.029938, -0.037567, -0.035828, -0.036163, -0.035828, -0.005249,
|
||||
-0.005646, -0.002289, 0.011078, -0.014038, -0.035309, 0.000061,
|
||||
0.010101, -0.028961, -0.035950, -0.053802, -0.066620, -0.048981,
|
||||
-0.030823, -0.034515, 0.008972, 0.030731, -0.021942, -0.069214,
|
||||
-0.046722, -0.000854, 0.028656, -0.000580, -0.027313, -0.026886,
|
||||
-0.060364, -0.051880, -0.022766, -0.019531, -0.016418, -0.047089,
|
||||
-0.072510, -0.054871, -0.046570, -0.053772, -0.021820, 0.003204,
|
||||
0.010406, 0.000793, -0.037170, -0.023926, 0.025269, 0.054657,
|
||||
0.057159, 0.007996, -0.063232, -0.097137, -0.066803, -0.021606,
|
||||
-0.015015, -0.037842, -0.045776, -0.054840, -0.068481, -0.033081,
|
||||
0.026459, 0.048157, 0.017700, -0.011230, -0.020599, -0.040405,
|
||||
0.001526, 0.048492, 0.023407, -0.011658, 0.004059, 0.006165,
|
||||
-0.013245, 0.008118, 0.049591, 0.050262, 0.008606, -0.029175,
|
||||
-0.039368, 0.003937, 0.027863, -0.005646, -0.046082, -0.043152,
|
||||
-0.002838, 0.018341, 0.006012, -0.001282, 0.015137, 0.004425,
|
||||
-0.018524, -0.001343, 0.009308, 0.002350, -0.013306, -0.014832,
|
||||
-0.008759, 0.000671, 0.023254, 0.035645, 0.005646, -0.028717,
|
||||
-0.028931, -0.008484, -0.019043, -0.019928, 0.006042, 0.016083,
|
||||
0.023682, 0.034363, 0.020844, 0.016235, 0.008636, 0.003601,
|
||||
0.018646, 0.029480, 0.034088, 0.016327, 0.004761, -0.029022,
|
||||
-0.027893, -0.006836, -0.015350, -0.021820, -0.018250, -0.008026,
|
||||
-0.001343, 0.004669, -0.015900, -0.004303, 0.032898, 0.041046,
|
||||
0.023132, 0.020844, 0.032196, 0.020355, -0.002716, 0.003662,
|
||||
0.031433, 0.043213, 0.043304, -0.007507, -0.015747, 0.000916,
|
||||
-0.009094, 0.004852, 0.004272, 0.007507, 0.021088, 0.024017,
|
||||
0.010254, 0.023987, 0.035431, 0.006561, -0.015869, -0.004791,
|
||||
0.013885, 0.019440, -0.015106, -0.038666, -0.028625, -0.036438,
|
||||
-0.051361, -0.020905, -0.019531, -0.038666, -0.015747, -0.001587,
|
||||
0.006317, 0.024994, 0.022797, 0.012726, -0.004822, 0.001404,
|
||||
-0.006042, 0.000732, 0.008118, -0.024506, -0.045654, -0.037537,
|
||||
-0.024933, -0.026733, -0.038605, -0.051971, -0.050171, -0.031372,
|
||||
-0.041199, -0.012268, -0.006500, -0.038208, -0.053650, -0.021118,
|
||||
0.007324, 0.006561, -0.026459, -0.052338, -0.015717, -0.015106,
|
||||
-0.037018, -0.037720, -0.047852, -0.032562, -0.014557, -0.059265,
|
||||
-0.101318, -0.091644, -0.050659, -0.037628, -0.000763, 0.016144,
|
||||
-0.018799, -0.022827, -0.005707, -0.010712, -0.012054, -0.007019,
|
||||
-0.008881, -0.000702, -0.000427, -0.015594, -0.030426, -0.015778,
|
||||
-0.019501, -0.064423, -0.072540, -0.041229, -0.012177, -0.007294,
|
||||
-0.034027, -0.059723, -0.034729, -0.007629, 0.003418, -0.007751,
|
||||
-0.032043, -0.034149, -0.024170, 0.007233, 0.023834, 0.008575,
|
||||
0.004669, -0.008148, -0.037811, -0.033783, 0.007996, 0.016602,
|
||||
0.014038, 0.012238, -0.009979, -0.028748, -0.014862, 0.013000,
|
||||
0.000977, -0.049530, -0.061859, -0.022247, 0.006226, 0.009369,
|
||||
-0.029236, -0.031128, 0.006226, 0.009399, -0.006653, 0.001190,
|
||||
-0.011993, -0.000916, 0.011322, -0.002350, 0.004333, 0.004517,
|
||||
-0.014191, -0.012177, 0.010986, 0.011566, -0.000092, -0.010651,
|
||||
-0.014038, -0.005280, -0.000732, -0.007935, -0.017303, -0.019073,
|
||||
-0.009399, 0.007935, 0.015778, 0.019073, 0.004272, -0.012726,
|
||||
0.001434, 0.011963, 0.010162, 0.018555, 0.018036, 0.008789,
|
||||
0.000946, 0.009552, 0.014923, 0.033722, 0.048553, 0.019989,
|
||||
-0.010803, -0.026733, -0.012207, 0.012512, -0.003967, -0.018097,
|
||||
0.002289, 0.032410, 0.036804, 0.025970, 0.013550, 0.008301,
|
||||
0.011108, 0.012421, 0.010101, 0.001404, -0.010956, 0.010498,
|
||||
0.029999, 0.014221, 0.003937, 0.002563, -0.001709, -0.013428,
|
||||
-0.023102, -0.005188, 0.011780, 0.002655, -0.002045, 0.006348,
|
||||
0.005981, -0.011841, -0.016327, -0.004486, -0.004944, -0.030151,
|
||||
-0.029114, -0.023376, -0.024261, -0.009857, 0.008423, 0.016235,
|
||||
0.021606, 0.012054, -0.005432, -0.006744, -0.003937, -0.004974,
|
||||
-0.024506, -0.029541, -0.015839, -0.028381, -0.030823, -0.018036,
|
||||
-0.006104, -0.003998, -0.022858, -0.030975, -0.005798, -0.001709,
|
||||
-0.008850, -0.011780, -0.013031, -0.018921, -0.029480, -0.024689,
|
||||
-0.012909, -0.006104, -0.006042, -0.013763, -0.018188, -0.034576,
|
||||
-0.036713, -0.004517, 0.009583, -0.002106, -0.026093, -0.033875,
|
||||
-0.008575, 0.006226, -0.008148, -0.032654, -0.037842, -0.024811,
|
||||
-0.019714, -0.013062, -0.014771, -0.028992, -0.023376, -0.012695,
|
||||
-0.007690, -0.014343, -0.031708, -0.044586, -0.036865, -0.027985,
|
||||
-0.022552, -0.025208, -0.028168, -0.024933, -0.028717, -0.030212,
|
||||
-0.018066, -0.004547, 0.001282, -0.008148, -0.024200, -0.023834,
|
||||
-0.019623, -0.037048, -0.042877, -0.031952, -0.016998, -0.009338,
|
||||
-0.014893, -0.018280, -0.013550, -0.003418, 0.013306, 0.008606,
|
||||
-0.002991, -0.015350, -0.023102, -0.021118, -0.025269, -0.032654,
|
||||
-0.040375, -0.028992, -0.016357, -0.034027, -0.036011, -0.016022,
|
||||
-0.010284, -0.000793, 0.006805, 0.005096, 0.021973, 0.009796,
|
||||
-0.012207, -0.013489, -0.014648, -0.017120, -0.017578, -0.012329,
|
||||
-0.002472, 0.000397, -0.013031, -0.018890, -0.009338, -0.018280,
|
||||
-0.017670, -0.005920, -0.004944, -0.006073, -0.003479, 0.000610,
|
||||
0.009003, 0.010559, 0.011475, -0.003693, -0.016357, -0.006378,
|
||||
-0.007507, 0.000366, 0.011322, 0.012390, 0.004639, -0.002655,
|
||||
0.003754, 0.027283, 0.016052, -0.008575, -0.005615, 0.004303,
|
||||
0.013550, 0.018677, 0.003662, -0.022858, -0.028168, -0.017975,
|
||||
-0.002197, -0.012360, -0.022736, -0.016144, 0.003784, 0.018951,
|
||||
0.008270, -0.005707, -0.008514, 0.007446, 0.015717, 0.012177,
|
||||
0.011414, 0.010590, 0.013367, 0.008331, 0.002686, -0.003876,
|
||||
-0.009857, -0.024902, -0.021973, -0.014557, -0.012756, -0.001251,
|
||||
0.004303, 0.005402, 0.009460, 0.002960, -0.009003, -0.003784,
|
||||
0.009430, 0.008484, 0.006012, 0.014130, 0.008148, -0.002441,
|
||||
0.000397, 0.002686, -0.000214, -0.014557, -0.026489, -0.014587,
|
||||
-0.009918, -0.006805, -0.001221, -0.004089, -0.003601, -0.006226,
|
||||
-0.020142, -0.023315, -0.005341, 0.012421, 0.008545, -0.002472,
|
||||
-0.000366, 0.000580, -0.020508, -0.033752, -0.029205, 0.000031,
|
||||
0.017365, 0.012390, -0.008514, -0.017181, -0.018311, -0.016663,
|
||||
-0.008301, -0.013519, -0.010376, 0.011841, 0.002930, -0.016510,
|
||||
-0.025116, -0.029968, -0.015289, -0.003082, -0.007355, -0.010590,
|
||||
-0.012451, -0.021759, -0.028351, -0.040375, -0.041840, -0.027374,
|
||||
-0.014343, -0.018005, -0.024628, -0.018188, -0.009644, -0.003723,
|
||||
-0.009644, -0.005341, 0.003204, 0.002045, 0.007629, -0.003815,
|
||||
-0.013062, -0.010193, -0.003540, -0.012268, -0.019501, -0.025330,
|
||||
-0.040314, -0.039520, -0.035187, -0.034180, -0.032257, -0.036285,
|
||||
-0.029572, -0.008575, -0.002045, -0.012787, -0.010559, -0.006317,
|
||||
-0.005371, -0.003693, 0.000519, 0.000854, -0.010101, -0.017090,
|
||||
-0.023499, -0.034790, -0.033569, -0.025818, -0.007507, 0.004913,
|
||||
-0.004089, -0.011780, -0.008759, -0.004150, -0.002411, -0.004059,
|
||||
-0.002960, -0.007416, -0.012177, -0.015289, -0.024750, -0.033478,
|
||||
-0.035461, -0.029419, -0.022003, -0.013306, -0.006958, -0.007996,
|
||||
-0.011658, -0.013916, -0.017303, -0.011261, -0.000061, 0.009674,
|
||||
-0.001404, -0.013245, -0.006226, 0.010773, 0.012482, 0.002075,
|
||||
-0.006165, -0.007172, -0.014618, -0.021759, -0.029266, -0.024841,
|
||||
-0.018005, -0.015350, -0.010590, -0.002075, -0.000427, -0.009308,
|
||||
-0.007721, 0.007782, 0.010223, -0.001434, -0.007141, -0.005127,
|
||||
0.000458, 0.005920, -0.006500, -0.018921, -0.012726, -0.007416,
|
||||
-0.009033, -0.015900, -0.021088, -0.017761, -0.007172, 0.002289,
|
||||
0.004333, 0.003174, -0.000427, -0.001678, 0.002289, 0.004974,
|
||||
0.009552, 0.002380, -0.014374, -0.013824, -0.005890, 0.003998,
|
||||
-0.002014, -0.013367, -0.010315, -0.002380, 0.001129, -0.001160,
|
||||
-0.001404, -0.001190, -0.001526, 0.001007, 0.003082, 0.006836,
|
||||
0.008820, 0.000153, -0.008972, -0.013184, -0.014343, -0.009430,
|
||||
0.003571, 0.000214, -0.013214, -0.011261, -0.001312, 0.003754,
|
||||
0.002899, -0.000946, 0.000641, 0.006195, 0.011322, 0.013245,
|
||||
0.004120, -0.001862, 0.003448, -0.003998, -0.018250, -0.020447,
|
||||
-0.012054, -0.001129, 0.005615, 0.000366, -0.010773, -0.015564,
|
||||
-0.014343, -0.011566, -0.001862, 0.015198, 0.010162, -0.002991,
|
||||
-0.011261, -0.014008, -0.009399, -0.007416, -0.005219, -0.015411,
|
||||
-0.026123, -0.031647, -0.035095, -0.028290, -0.016052, -0.008423,
|
||||
0.005615, 0.007233, 0.001984, 0.000610, -0.002319, -0.006866,
|
||||
-0.002045, 0.008636, 0.003754, -0.008575, -0.016907, -0.011536,
|
||||
-0.000336, -0.003998, -0.022400, -0.038818, -0.039948, -0.029755,
|
||||
-0.016785, -0.009705, -0.006805, -0.004303, -0.004578, 0.000610,
|
||||
0.003265, 0.004669, 0.009857, 0.002899, -0.009552, -0.020294,
|
||||
-0.019928, -0.016083, -0.013214, -0.015503, -0.017700, -0.026581,
|
||||
-0.025879, -0.020721, -0.018066, -0.015503, -0.007690, -0.002258,
|
||||
-0.009827, -0.018951, -0.014099, 0.002808, -0.002075, -0.026947,
|
||||
-0.024506, -0.009277, -0.004822, -0.011108, -0.018372, -0.022125,
|
||||
-0.023804, -0.016144, -0.012726, -0.012939, -0.015900, -0.017456,
|
||||
-0.020294, -0.023834, -0.023499, -0.018311, -0.011108, -0.010162,
|
||||
-0.014404, -0.022705, -0.025330, -0.021057, -0.012543, -0.008575,
|
||||
-0.014557, -0.022614, -0.021637, -0.015259, -0.015778, -0.022156,
|
||||
-0.021210, -0.009552, -0.002014, -0.002991, -0.004242, -0.007141,
|
||||
-0.006256, 0.002106, 0.003235, -0.003021, -0.017426, -0.015259,
|
||||
-0.001312, -0.001801, -0.014191, -0.020935, -0.021057, -0.015533,
|
||||
-0.015717, -0.018311, -0.010223, -0.008209, -0.012451, -0.011780,
|
||||
-0.009735, -0.007355, -0.002075, -0.002441, -0.004578, -0.003204,
|
||||
-0.001556, 0.004944, 0.002563, -0.006073, -0.011993, -0.016632,
|
||||
-0.019226, -0.006805, -0.000183, -0.006500, -0.015717, -0.014038,
|
||||
-0.000397, 0.008484, 0.005920, -0.000946, -0.011963, -0.019440,
|
||||
-0.017731, -0.018921, -0.017548, -0.013885, -0.005188, -0.006653,
|
||||
-0.008759, -0.006958, -0.001801, 0.008545, 0.005371, -0.000854,
|
||||
0.009125, 0.016113, 0.010284, 0.000671, 0.000427, 0.001129,
|
||||
-0.002319, -0.002441, -0.004639, -0.016052, -0.027039, -0.020142,
|
||||
-0.014404, -0.010834, -0.014771, -0.016449, -0.005493, 0.006958,
|
||||
0.014160, 0.011536, 0.011383, 0.012939, 0.011261, 0.014923,
|
||||
0.015015, 0.006653, -0.001007, -0.004852, -0.007660, -0.005371,
|
||||
-0.011505, -0.018555, -0.018219, -0.016571, -0.016296, -0.012878,
|
||||
-0.010834, -0.004333, 0.006073, 0.015350, 0.016510, 0.006653,
|
||||
0.004761, 0.005463, 0.004578, 0.005615, -0.005066, -0.016602,
|
||||
-0.022308, -0.018890, -0.014191, -0.016937, -0.015198, -0.017548,
|
||||
-0.023987, -0.020905, -0.009735, 0.002838, 0.008484, 0.005280,
|
||||
0.002258, -0.002075, -0.007416, -0.008423, 0.001434, 0.002167,
|
||||
-0.007843, -0.008911, -0.010223, -0.019226, -0.026428, -0.023224,
|
||||
-0.016083, -0.008850, -0.007965, -0.013062, -0.014496, -0.011932,
|
||||
-0.012146, -0.006561, -0.003876, -0.009155, -0.013916, -0.009735,
|
||||
-0.004211, -0.001007, -0.003510, -0.014709, -0.022949, -0.021484,
|
||||
-0.018311, -0.014404, -0.010406, -0.010162, -0.011993, -0.018890,
|
||||
-0.022430, -0.016144, -0.008514, -0.009796, -0.012207, -0.007843,
|
||||
-0.007629, -0.009552, -0.012970, -0.012115, -0.012360, -0.016022,
|
||||
-0.018768, -0.015167, -0.009979, -0.018616, -0.029205, -0.025421,
|
||||
-0.019531, -0.024902, -0.026733, -0.019989, -0.008331, -0.004913,
|
||||
-0.007202, -0.002045, -0.007599, -0.011841, -0.006897, -0.009277,
|
||||
-0.016449, -0.015991, -0.009674, -0.008331, -0.008636, -0.023621,
|
||||
-0.036377, -0.031158, -0.025909, -0.023895, -0.022827, -0.025177,
|
||||
-0.027008, -0.023590, -0.016907, -0.007324, -0.000671, -0.000610,
|
||||
-0.002167, -0.003876, -0.002350, 0.000061, -0.001801, -0.008392,
|
||||
-0.008636, -0.007385, -0.014893, -0.015808, -0.013458, -0.015198,
|
||||
-0.015320, -0.011108, -0.010956, -0.016937, -0.018463, -0.015839,
|
||||
-0.013367, -0.010223, -0.006500, -0.000977, -0.001221, -0.005981,
|
||||
-0.010162, -0.005768, 0.003784, 0.003204, -0.008118, -0.015747,
|
||||
-0.014709, -0.012238, -0.012604, -0.008453, 0.000916, 0.003510,
|
||||
0.000305, -0.000305, 0.003998, 0.001526, 0.003571, 0.006500,
|
||||
0.003937, -0.001678, -0.004547, -0.003815, -0.001740, -0.007568,
|
||||
-0.011597, -0.011841, -0.015015, -0.013550, -0.012543, -0.006470,
|
||||
-0.002197, -0.006775, -0.002075, 0.008118, 0.005157, -0.002197,
|
||||
-0.004211, -0.000397, 0.005280, 0.001587, -0.003357, 0.001526,
|
||||
0.003876, 0.008209, 0.004669, -0.004700, -0.007050, -0.007294,
|
||||
-0.005280, -0.003357, -0.007416, -0.008423, -0.002808, -0.000336,
|
||||
-0.005280, -0.012787, -0.008026, 0.002869, 0.000336, -0.000580,
|
||||
-0.000488, -0.002960, 0.002380, 0.002991, -0.001526, -0.002197,
|
||||
-0.006226, -0.009552, -0.007568, -0.001160, 0.000153, 0.001923,
|
||||
-0.005798, -0.014557, -0.013367, -0.006805, -0.000610, 0.006104,
|
||||
0.003143, -0.001343, -0.000610, 0.001526, 0.005249, 0.000244,
|
||||
-0.009064, -0.010223, -0.010651, -0.012787, -0.010101, -0.012970,
|
||||
-0.016266, -0.014404, -0.009064, -0.006287, -0.005219, -0.004089,
|
||||
-0.007629, -0.009796, -0.011566, -0.007294, -0.001251, -0.005035,
|
||||
-0.015533, -0.016998, -0.011566, -0.005981, -0.007782, -0.008026,
|
||||
-0.007599, -0.011230, -0.014740, -0.016907, -0.019073, -0.020477,
|
||||
-0.016113, -0.012146, -0.009918, -0.009186, -0.020874, -0.031067,
|
||||
-0.026611, -0.017303, -0.009125, -0.004517, -0.008972, -0.015198,
|
||||
-0.019714, -0.022827, -0.020172, -0.020660, -0.021454, -0.022186,
|
||||
-0.023254, -0.018036, -0.010864, -0.016266, -0.027252, -0.028656,
|
||||
-0.022003, -0.016174, -0.017212, -0.020203, -0.025421, -0.025757,
|
||||
-0.021362, -0.015717, -0.008392, -0.006927, -0.019958, -0.031830,
|
||||
-0.027588, -0.021820, -0.019470, -0.021454, -0.024261, -0.020508,
|
||||
-0.019043, -0.015411, -0.010132, -0.007294, -0.004272, -0.002014,
|
||||
-0.003448, -0.009735, -0.011780, -0.013611, -0.019714, -0.020172,
|
||||
-0.016846, -0.018127, -0.017578, -0.018402, -0.018860, -0.013245,
|
||||
-0.007629, -0.010132, -0.009064, -0.005676, -0.004395, -0.006256,
|
||||
-0.011292, -0.013367, -0.003784, 0.003387, 0.001434, 0.000336,
|
||||
-0.004059, -0.006592, -0.003845, -0.003815, -0.002472, -0.004150,
|
||||
-0.012390, -0.016998, -0.015350, -0.013214, -0.012360, -0.016418,
|
||||
-0.014496, 0.000580, 0.008881, 0.005951, -0.000122, -0.006378,
|
||||
-0.008850, -0.005432, 0.001007, 0.002441, -0.002869, -0.007690,
|
||||
-0.006866, -0.001434, 0.000641, -0.004303, -0.006592, -0.005096,
|
||||
-0.005280, -0.002838, 0.000946, 0.001160, -0.001465, -0.004822,
|
||||
-0.006439, 0.003113, 0.008392, 0.001556, -0.005768, -0.010437,
|
||||
-0.009705, -0.006042, -0.000183, 0.002869, -0.003876, -0.012512,
|
||||
-0.007843, 0.003845, 0.009796, 0.009583, 0.005035, 0.005737,
|
||||
0.006104, 0.001007, 0.003143, 0.004791, 0.003143, 0.001068,
|
||||
-0.005798, -0.008423, -0.002563, 0.001678, -0.002747, -0.008911,
|
||||
-0.010468, -0.002808, 0.005646, 0.002075, -0.003235, -0.006866,
|
||||
-0.007019, -0.001160, 0.002167, 0.001343, -0.000519, -0.005615,
|
||||
-0.009399, -0.009613, -0.013336, -0.015533, -0.016418, -0.012970,
|
||||
-0.011078, -0.015320, -0.020721, -0.014709, -0.002625, -0.004547,
|
||||
-0.011932, -0.007599, -0.000671, 0.000336, -0.002747, -0.008148,
|
||||
-0.012939, -0.017944, -0.020538, -0.018494, -0.014221, -0.013824,
|
||||
-0.019470, -0.023163, -0.020203, -0.016968, -0.017578, -0.018372,
|
||||
-0.015533, -0.012726, -0.010101, -0.011017, -0.015533, -0.014130,
|
||||
-0.005890, -0.002625, -0.003693, -0.005676, -0.009369, -0.013184,
|
||||
-0.013855, -0.010925, -0.013184, -0.020294, -0.029968, -0.031219,
|
||||
-0.023285, -0.019897, -0.019623, -0.016327, -0.013855, -0.016724,
|
||||
-0.020813, -0.016602, -0.010651, -0.011505, -0.016449, -0.019623,
|
||||
-0.019440, -0.016449, -0.014465, -0.010742, -0.011658, -0.013184,
|
||||
-0.011017, -0.009277, -0.010284, -0.015991, -0.017731, -0.017487,
|
||||
-0.021362, -0.018799, -0.017151, -0.020599, -0.023529, -0.024567,
|
||||
-0.026733, -0.024414, -0.019440, -0.019257, -0.022400, -0.019501,
|
||||
-0.015320, -0.016235, -0.016815, -0.011505, -0.003601, -0.002014,
|
||||
-0.007141, -0.013214, -0.009186, -0.001862, -0.000214, -0.003784,
|
||||
-0.008972, -0.011871, -0.012512, -0.010986, -0.008789, -0.010010,
|
||||
-0.014496, -0.018829, -0.018005, -0.018677, -0.015625, -0.011108,
|
||||
-0.011902, -0.012970, -0.009338, -0.003265, -0.002136, -0.004608,
|
||||
-0.001556, 0.001312, -0.000580, -0.000793, -0.001526, -0.003998,
|
||||
-0.006653, -0.008698, -0.007599, -0.002319, -0.002045, -0.005280,
|
||||
-0.009521, -0.008911, -0.003693, -0.002594, -0.002319, 0.003296,
|
||||
0.004761, -0.001495, -0.008972, -0.011627, -0.002655, 0.006042,
|
||||
0.002441, -0.002960, -0.006226, -0.012512, -0.013763, -0.004333,
|
||||
0.002838, 0.004913, 0.000854, -0.008057, -0.007050, 0.005707,
|
||||
0.013733, 0.010284, 0.002319, 0.001495, 0.007111, 0.002594,
|
||||
-0.005615, -0.010315, -0.011383, -0.011566, -0.004608, 0.003754,
|
||||
0.001587, -0.008179, -0.013885, -0.005798, 0.004761, 0.004547,
|
||||
-0.000122, -0.002960, -0.001862, 0.002350, 0.002075, -0.000458,
|
||||
-0.002045, 0.000488, 0.003113, -0.000061, -0.005127, -0.008575,
|
||||
-0.013306, -0.017914, -0.019897, -0.016449, -0.010254, -0.004974,
|
||||
-0.003845, -0.003754, -0.007477, -0.011780, -0.007965, 0.001221,
|
||||
0.006195, 0.001282, -0.008453, -0.015778, -0.012177, -0.005676,
|
||||
-0.002319, -0.003021, -0.009064, -0.014832, -0.016693, -0.014740,
|
||||
-0.011658, -0.009583, -0.010559, -0.012421, -0.005920, -0.002563,
|
||||
-0.007324, -0.013000, -0.013031, -0.008057, -0.007965, -0.011230,
|
||||
-0.015594, -0.017822, -0.019257, -0.018280, -0.014008, -0.012604,
|
||||
-0.016388, -0.018280, -0.014099, -0.008820, -0.009674, -0.010742,
|
||||
-0.008087, -0.006287, -0.008667, -0.010742, -0.011505, -0.013489,
|
||||
-0.010864, -0.007874, -0.013336, -0.020386, -0.019928, -0.016479,
|
||||
-0.014038, -0.014313, -0.017303, -0.017822, -0.017761, -0.018524,
|
||||
-0.015137, -0.011749, -0.012238, -0.014832, -0.018097, -0.018616,
|
||||
-0.015564, -0.014252, -0.014923, -0.013306, -0.012817, -0.014618,
|
||||
-0.017059, -0.019623, -0.019012, -0.016052, -0.011261, -0.007538,
|
||||
-0.005249, -0.005554, -0.007416, -0.005096, -0.004547, -0.011108,
|
||||
-0.017639, -0.018829, -0.017639, -0.018921, -0.019073, -0.016968,
|
||||
-0.013031, -0.008179, -0.004395, -0.005066, -0.005341, -0.004059,
|
||||
-0.004120, -0.005463, -0.008698, -0.007538, -0.003723, -0.001068,
|
||||
-0.003448, -0.007507, -0.007477, -0.005096, -0.005493, -0.009277,
|
||||
-0.014526, -0.014587, -0.009613, -0.004333, -0.003082, -0.003845,
|
||||
-0.004089, -0.004730, -0.003082, 0.002167, 0.002960, -0.001587,
|
||||
-0.004944, -0.004333, 0.000336, 0.002686, -0.000610, -0.007721,
|
||||
-0.010895, -0.006561, -0.003143, 0.000214, 0.004242, 0.003082,
|
||||
-0.001221, -0.002747, -0.000305, 0.004822, 0.005341, 0.000702,
|
||||
-0.001343, -0.000519, -0.001678, -0.004944, -0.006104, -0.004913,
|
||||
-0.003998, -0.005066, -0.005188, -0.002289, -0.000214, -0.000061,
|
||||
-0.000031, 0.000732, 0.002563, 0.005432, 0.004272, 0.001160,
|
||||
0.000244, -0.000580, -0.001251, -0.002228, -0.003143, -0.001953,
|
||||
-0.001740, -0.004669, -0.006592, -0.006805, -0.005981, -0.004425,
|
||||
-0.005737, -0.005920, -0.004120, -0.001984, -0.000092, 0.000702,
|
||||
0.001282, 0.001068, 0.001862, 0.001923, 0.000763, -0.001038,
|
||||
-0.004578, -0.007111, -0.007355, -0.005035, -0.003113, -0.004395,
|
||||
-0.006500, -0.006958, -0.005951, -0.004181, -0.005341, -0.006348,
|
||||
-0.004761, -0.003723, -0.003235, -0.003510, -0.002869, -0.002136,
|
||||
-0.003784, -0.005585, -0.005463, -0.004761, -0.003998, -0.003876,
|
||||
-0.004700, -0.004578, -0.005066, -0.006714, -0.007812, -0.007568,
|
||||
-0.005737, -0.004028, -0.004517, -0.005341, -0.005981, -0.006317,
|
||||
-0.005310, -0.005066, -0.006348, -0.006989, -0.005737, -0.005005,
|
||||
-0.006042, -0.005920, -0.004150, -0.003784, -0.005127, -0.006653,
|
||||
-0.006500, -0.003906, -0.002594, -0.003967, -0.005798, -0.006927,
|
||||
-0.006927, -0.006836, -0.006378, -0.005188, -0.004059, -0.003906,
|
||||
-0.004944, -0.005371, -0.005066, -0.004639, -0.004578, -0.004608,
|
||||
-0.004150, -0.003815, -0.003326, -0.002777, -0.002686, -0.002991,
|
||||
-0.003082, -0.003540, -0.003998, -0.003906, -0.004517, -0.005280,
|
||||
-0.005371, -0.004730, -0.003723, -0.003693, -0.004028, -0.003845,
|
||||
-0.003082, -0.002655, -0.002991, -0.003754, -0.003479, -0.002808,
|
||||
-0.003174, -0.002991, -0.002563, -0.002136, -0.001678, -0.001526,
|
||||
-0.002350, -0.003021, -0.003540, -0.003845, -0.003052, -0.002106,
|
||||
-0.002258, -0.002869, -0.002838, -0.002777, -0.002319, -0.001434,
|
||||
-0.000977, -0.000793, -0.001007, -0.001129, -0.001343, -0.001526,
|
||||
-0.001892, -0.002441, -0.002960, -0.003021, -0.002197, -0.001587,
|
||||
-0.001526, -0.001373, -0.001282, -0.001007, -0.000549, 0.000366,
|
||||
0.000763, 0.000336, -0.000244, -0.000854, -0.001190, -0.000946,
|
||||
-0.000610, -0.000854, -0.001465, -0.001923, -0.001892, -0.001648,
|
||||
-0.001068, -0.000366, -0.000061, -0.000244, -0.000580, -0.000671,
|
||||
-0.000549, -0.000183, 0.000000, -0.000031, 0.000000, -0.000031,
|
||||
-0.000336, -0.000519, -0.000610, -0.000671, -0.000519, -0.000671,
|
||||
-0.000824, -0.000519, -0.000244, -0.000183, -0.000092, -0.000092,
|
||||
-0.000244, -0.000366, -0.000366, -0.000305, -0.000153, -0.000092
|
||||
};
|
||||
2715
plugins/ladspa_effect/caps/waves/money.h
Normal file
2715
plugins/ladspa_effect/caps/waves/money.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user