Last active
November 16, 2017 19:54
-
-
Save tresf/5f6cbd86f6156d144e4772f1382b35a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugins/LadspaEffect/caps/Amp.cc b/plugins/LadspaEffect/caps/Amp.cc | |
index 10a5f1389..44037479a 100644 | |
--- a/plugins/LadspaEffect/caps/Amp.cc | |
+++ b/plugins/LadspaEffect/caps/Amp.cc | |
@@ -1,19 +1,17 @@ | |
/* | |
Amp.cc | |
- Copyright 2003-7 | |
- Tim Goetze <tim@quitte.de> | |
- David Yeh <dtyeh@ccrma.stanford.edu> (Tone Stack in TS models) | |
+ Copyright 2003-14 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- Tube amplifier models | |
+ Idealised guitar amplification. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -28,610 +26,195 @@ | |
*/ | |
#include "basics.h" | |
-#include <stdio.h> | |
#include "Amp.h" | |
#include "Descriptor.h" | |
+#include "dsp/polynomials.h" | |
void | |
-AmpStub::init (bool adjust_downsampler) | |
-{ | |
- dc_blocker.set_f (10. / fs); | |
- | |
- /* going a bit lower than nominal with fc */ | |
- double f = .7 * M_PI / OVERSAMPLE; | |
- | |
- /* construct the upsampler filter kernel */ | |
- DSP::sinc (f, up.c, FIR_SIZE); | |
- DSP::kaiser<DSP::apply_window> (up.c, FIR_SIZE, 6.4); | |
- | |
- /* copy upsampler filter kernel for downsampler, make sum */ | |
- double s = 0; | |
- for (int i = 0; i < up.n; ++i) | |
- down.c[i] = up.c[i], | |
- s += up.c[i]; | |
- | |
- s = 1 / s; | |
- | |
- /* scale downsampler kernel for unity gain + correction for transfer */ | |
- double t = adjust_downsampler ? | |
- s / max (fabs (tube.clip[0].value), fabs (tube.clip[1].value)) : s; | |
- | |
- for (int i = 0; i < down.n; ++i) | |
- down.c[i] *= t; | |
- | |
- /* scale upsampler kernel for unity gain */ | |
- s *= OVERSAMPLE; | |
- for (int i = 0; i < up.n; ++i) | |
- up.c[i] *= s; | |
-} | |
- | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-void | |
-AmpIII::init() | |
+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)); | |
+ tonestack.init (fs); | |
- DSP::RBJ::LoShelve (200 / fs, .2, -3, filter.a, filter.b); | |
+ dc2.set_f (25*over_fs); | |
+ DSP::RBJ::LP (1*over_fs, .7, biaslp); | |
+ /* compress is initialised in activate() */ | |
} | |
-template <sample_func_t F, int OVERSAMPLE> | |
void | |
-AmpIII::one_cycle (int frames) | |
+AmpVTS::activate() | |
{ | |
- sample_t * s = ports[0]; | |
- | |
- sample_t gain = getport(1); | |
- sample_t temp = getport(2) * tube.scale; | |
- | |
- drive = getport(3) * .5; | |
- i_drive = 1 / (1 - drive); | |
- | |
- sample_t * d = ports[4]; | |
- | |
- *ports[5] = OVERSAMPLE; | |
+ hp1.reset(); | |
+ lp.reset(); | |
- double g = current.g; | |
+ remain = 0; | |
+ compress.init (fs); | |
+ compress.set_threshold(0); | |
+ compress.set_release(.0); | |
- current.g = max (gain < 1 ? gain : exp2 (gain - 1), .000001); | |
- current.g *= tube.scale / fabs (tube.transfer (temp)); | |
+ /* dc1 is reset in setratio() */ | |
+ dc2.reset(); | |
- /* recursive fade to prevent zipper noise from the 'gain' knob */ | |
- if (g == 0) g = current.g; | |
- | |
- 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 sample_t a = s[i]; | |
- | |
- a = g * tube.transfer (a * temp); | |
- a = filter.process (a + normal); | |
- | |
- a = 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); | |
- | |
- g *= gf; | |
- } | |
- | |
- current.g = g; | |
+ model = -1; | |
+ ratio = -1; | |
} | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-PortInfo | |
-AmpIII::port_info [] = | |
-{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "gain", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, 0, 10} | |
- }, { | |
- "temperature", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0.005, 1} | |
- }, { | |
- "drive", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MAX, 0.0001, 1} /* ^2 gives the nice drive */ | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "latency", | |
- OUTPUT | CONTROL, | |
- {0} | |
- } | |
-}; | |
- | |
-template <> void | |
-Descriptor<AmpIII>::setup() | |
+/* set oversampling ratio */ | |
+void | |
+AmpVTS::setratio (int r) | |
{ | |
- UniqueID = 1786; | |
- Label = "AmpIII"; | |
- Properties = HARD_RT; | |
+ if (r == ratio) | |
+ return; | |
- Name = CAPS "AmpIII - Tube amp"; | |
- Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2002-7"; | |
+ ratio = r; | |
+ dc1.set_f (72./(ratio*fs)); | |
+ dc1.reset(); | |
- /* fill port info and vtable */ | |
- autogen(); | |
+ over2.reset(); | |
+ over4.reset(); | |
+ over8.reset(); | |
} | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
void | |
-AmpIV::init() | |
+AmpVTS::cycle (uint frames) | |
{ | |
- 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); | |
+ int r = 2 << (int) getport(0); | |
+ setratio(r); | |
+ if (r == 8) subcycle (frames, over8); | |
+ else if (r == 4) subcycle (frames, over4); | |
+ else subcycle (frames, over2); | |
} | |
-template <sample_func_t F, int OVERSAMPLE> | |
-void | |
-AmpIV::one_cycle (int frames) | |
-{ | |
- double one_over_n = frames > 0 ? 1. / frames : 1; | |
- | |
- sample_t * s = ports[0]; | |
- | |
- sample_t gain = getport(1); | |
- sample_t temp = getport(2) * tube.scale; | |
- | |
- tone.start_cycle (ports + 3, one_over_n); | |
- | |
- drive = getport(7) * .5; | |
- i_drive = 1 / (1 - drive); | |
- | |
- sample_t * d = ports[8]; | |
- | |
- *ports[9] = OVERSAMPLE; | |
- | |
- double g = current.g; | |
- | |
- current.g = max (gain < 1 ? gain : exp2 (gain - 1), .000001); | |
- current.g *= tube.scale / fabs (tube.transfer (temp)); | |
- | |
- /* recursive fade to prevent zipper noise from the 'gain' knob */ | |
- if (g == 0) g = current.g; | |
- | |
- double gf = pow (current.g / g, one_over_n); | |
- | |
- for (int i = 0; i < frames; ++i) | |
- { | |
- register sample_t a = s[i] + normal; | |
- | |
- a = g * tube.transfer (a * temp); | |
- a = tone.process (a); | |
- | |
- a = 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); | |
- | |
- g *= gf; | |
- } | |
- | |
- current.g = g; | |
-} | |
- | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-PortInfo | |
-AmpIV::port_info [] = | |
-{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "gain", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, 0, 10} | |
- }, { | |
- "temperature", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0.005, 1} | |
- }, { | |
- "bass", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, -20, 20} | |
- }, { | |
- "mid", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, -20, 20} | |
- }, { | |
- "treble", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, -20, 20} | |
- }, { | |
- "hi", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, -20, 20} | |
- }, { | |
- "drive", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MAX, 0.0001, 1} /* ^2 gives the nice drive */ | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "latency", | |
- OUTPUT | CONTROL, | |
- {0} | |
- } | |
-}; | |
- | |
-template <> void | |
-Descriptor<AmpIV>::setup() | |
-{ | |
- UniqueID = 1794; | |
- Label = "AmpIV"; | |
- Properties = HARD_RT; | |
- | |
- Name = CAPS "AmpIV - Tube amp + tone controls"; | |
- Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2002-7"; | |
- | |
- /* fill port info and vtable */ | |
- autogen(); | |
-} | |
+/* saturating function selection */ | |
+#define preamp DSP::Polynomial::one5 | |
+#define poweramp DSP::Polynomial::atan | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
+/* rough correction for tonestack model gain differences */ | |
+static float tsgain[] = {.639, 1.290, .534, 1.008, .542, .936, .605, 1.146, .211}; | |
+template <class Over> | |
void | |
-AmpV::init() | |
+AmpVTS::subcycle (uint frames, Over & over) | |
{ | |
- 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 (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); | |
+ int m = getport(4); | |
+ if (m != model) tonestack.setmodel (model = m); | |
+ tonestack.updatecoefs (getport(5),getport(6),getport(7)); | |
- /* power supply cap */ | |
- for (int i = 0; i < 2; ++i) | |
- DSP::RBJ::LP (10. / fs, .3, power_cap[i].a, power_cap[i].b); | |
-} | |
+ float x=getport(1), y=getport(3); /* = gain,powa :: shorthand for gain calc */ | |
+ float bright = getport(2)*(1-x*.5); | |
+ DSP::RBJ::LP ((500+6500*bright*bright)/(over.Ratio*fs), .7, lp); | |
-template <sample_func_t F, int OVERSAMPLE> | |
-void | |
-AmpV::one_cycle (int frames) | |
-{ | |
- sample_t * s = ports[0]; | |
- | |
- sample_t gain = getport(1); | |
+ float gain = x*x; | |
+ float powa = .2*gain + (1-.2*gain)*y; /* ramp up powa with gain */ | |
- if (*ports[2] != cut) | |
- { | |
- cut = getport(2); | |
- DSP::RBJ::LoShelve (210. / fs, .2, cut, filter[0].a, filter[0].b); | |
- } | |
- if (*ports[3] != tone) | |
- { | |
- 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); | |
- } | |
+ compress.set_attack (.6*(1-.5*x)*getport(8)); | |
+ float squash = .0 + .8*getport(9)*(1 - .2*powa*gain); | |
- drive = getport(4) * .5; | |
- i_drive = 1 / (1 - drive); | |
- | |
- #define MAX_WATTS port_info[5].range.UpperBound | |
- sample_t sag = (MAX_WATTS - getport(5)) / MAX_WATTS; | |
- sag = .6 * sag * sag; | |
- | |
- sample_t * d = ports[6]; | |
- | |
- *ports[7] = OVERSAMPLE; | |
+ float bias = .62*powa; | |
- double g = current.g; | |
+ /* roughly correcting for loudness increase TODO: revise */ | |
+ float makeup = (.086-.06*y)/(11.6+exp((12.1-5*y)*(.81-.08*y-x)))+0.00032+.0026*y; | |
+ makeup = 0 ? 1 : .0006/makeup; /* debug switch for makeup */ | |
- current.g = max (gain < 1 ? gain : pow (20, gain - 1), .000001); | |
- #if 0 | |
- if ( (++_turn & 127) == 0) | |
- fprintf (stderr, "supply = %.3f sag = %.3f\n", supply, sag); | |
- #endif | |
+ float lowcut = .1 + 392*getport(10); | |
+ hp1.set_f (1.5*lowcut*over_fs); | |
- if (g == 0) g = current.g; | |
+ gain = pow (200, x) * -tsgain[model]; | |
+ powa = pow (125, powa); | |
- /* 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); | |
+ sample_t * s = ports[11]; | |
+ sample_t * d = ports[12]; | |
- for (int i = 0; i < frames; ++i) | |
+ while (frames) | |
{ | |
- register sample_t a = s[i]; | |
- register sample_t v = 3 - supply; | |
- /* alternative curve: v = v * v * .1 + .1; */ | |
- v = v * v * .06 + .46; | |
- | |
- a = filter[0].process (a + normal); | |
- if (0) | |
- a = filter[2].process (a); | |
- | |
- a = g * (a + supply * .001); | |
- | |
- a = v * tube.transfer_clip (up.upsample (a)); | |
- a = power_transfer (dc_blocker.process (a)); | |
- | |
- a = down.process (a); | |
- | |
- a = filter[1].process (a - normal); | |
- if (1) | |
- a = filter[2].process (a + normal); | |
- | |
+ if (remain == 0) | |
{ | |
- for (int o = 1; o < OVERSAMPLE; ++o) | |
- down.store ( | |
- power_transfer ( | |
- dc_blocker.process ( | |
- normal + tube.transfer_clip ( | |
- up.pad (o))))); | |
+ remain = compress.blocksize; | |
+ compress.start_block (squash); | |
} | |
- 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)); | |
+ uint n = min (frames, remain); | |
+ for (uint i = 0; i < n; ++i) | |
+ { | |
+ sample_t a = s[i]; | |
+ sample_t b = biaslp.process (bias*compress.power.current - .00002); | |
+ | |
+ a = hp1.process(a); | |
+ a *= gain*compress.get(); | |
+ a = tonestack.process(a + normal); | |
+ a += .5*b; | |
+ | |
+ a = over.upsample(a); | |
+ a = preamp(a); | |
+ a = dc1.process(a); | |
+ a = lp.process(a); | |
+ a = poweramp(powa*a - b); | |
+ a = over.downsample(a); | |
+ | |
+ for (int o=1; o < over.Ratio; ++o) | |
+ { | |
+ sample_t a = over.uppad(o); | |
+ a = preamp(a); | |
+ a = dc1.process(a); | |
+ a = lp.process(a); | |
+ a = poweramp(powa*a - b); | |
+ over.downstore(a); | |
+ } | |
+ | |
+ a = dc2.process(a+normal); | |
+ compress.store(a); | |
+ | |
+ a *= makeup; | |
+ | |
+ d[i] = a; | |
+ } | |
- g *= gf; | |
- normal = -normal; | |
+ s+=n;d+=n; | |
+ frames-=n; | |
+ remain-=n; | |
} | |
- | |
- current.g = g; | |
} | |
/* //////////////////////////////////////////////////////////////////////// */ | |
PortInfo | |
-AmpV::port_info [] = | |
-{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "gain", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, 0, 3} | |
- }, { | |
- "bass", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, -9, 9} | |
- }, { | |
- "tone", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MIN, 0, 1} | |
- }, { | |
- "drive", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_HIGH, 0.0001, 1} /* ^2 gives the nice drive */ | |
- }, { | |
- "watts", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 5, 150} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "latency", | |
- OUTPUT | CONTROL, | |
- {0} | |
- } | |
-}; | |
- | |
-template <> void | |
-Descriptor<AmpV>::setup() | |
-{ | |
- UniqueID = 2587; | |
- Label = "AmpV"; | |
- Properties = HARD_RT; | |
- | |
- Name = CAPS "AmpV - Tube amp"; | |
- Maker = "Tim Goetze <tim@quitte.de>"; | |
- 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) | |
+AmpVTS::port_info [] = | |
{ | |
- sample_t * s = ports[0]; | |
+ { "over", CTRL_IN, {DEFAULT_1 | INTEGER, 0, 2}, "{0:'2x',1:'4x',2:'8x'}"}, | |
- tonestack.start_cycle (ports + 1, 2); | |
- sample_t gain = getport(2); | |
- | |
- drive = getport(6) * .5; | |
- i_drive = 1 / (1 - drive); | |
- | |
- sample_t sag = 1 - max (0.0001, min (1, getport(7))); | |
- sag = .6 * sag * sag; /* map to log space makes slider better */ | |
- | |
- sample_t * d = ports[8]; | |
+ /* 1 */ | |
+ { "gain", CTRL_IN | GROUP, {DEFAULT_LOW, 0, 1} }, | |
+ { "bright", CTRL_IN, {DEFAULT_HIGH, 0, 1} }, | |
+ { "power", CTRL_IN, {DEFAULT_MID, 0, 1} }, | |
- *ports[9] = OVERSAMPLE; | |
+ /* 4 */ | |
+ { "tonestack", CTRL_IN | GROUP, {DEFAULT_1 | INTEGER, 0, 8}, DSP::ToneStack::presetdict}, | |
- double g = current.g; | |
+ { "bass", CTRL_IN | GROUP, {DEFAULT_LOW, 0, 1} }, | |
+ { "mid", CTRL_IN, {DEFAULT_1, 0, 1} }, | |
+ { "treble", CTRL_IN, {DEFAULT_HIGH, 0, 1} }, | |
- if (gain < 1) | |
- current.g = max (gain, .001); | |
- else | |
- { | |
- gain -= 1; | |
- gain *= gain; | |
- current.g = pow (10, gain); | |
- } | |
+ /* 8 */ | |
+ { "attack", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} }, | |
+ { "squash", CTRL_IN, {DEFAULT_LOW, 0, 1} }, | |
- /* 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; | |
+ /* 10 */ | |
+ { "lowcut", CTRL_IN | GROUP, {DEFAULT_MID, 0, 1} }, | |
- 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} | |
- } | |
+ { "in", INPUT | AUDIO }, | |
+ { "out", OUTPUT | AUDIO }, | |
}; | |
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"; | |
+ Name = CAPS "AmpVTS - Idealised guitar amplification"; | |
+ Maker = "Tim Goetze <tim@quitte.de>, David Yeh <dtyeh@ccrma.stanford.edu>"; | |
+ Copyright = "2002-14"; | |
/* fill port info and vtable */ | |
autogen(); | |
} | |
+ | |
diff --git a/plugins/LadspaEffect/caps/Amp.h b/plugins/LadspaEffect/caps/Amp.h | |
index e06f7128f..5d2a9f3d2 100644 | |
--- a/plugins/LadspaEffect/caps/Amp.h | |
+++ b/plugins/LadspaEffect/caps/Amp.h | |
@@ -1,17 +1,17 @@ | |
/* | |
Amp.h | |
- Copyright 2002-9 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-14 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- Oversampled tube amplifier emulation. | |
+ Guitar amplification. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,353 +25,50 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _AMP_H_ | |
-#define _AMP_H_ | |
+#ifndef AMP_H | |
+#define AMP_H | |
#include "dsp/util.h" | |
-#include "dsp/OnePole.h" | |
-#include "dsp/BiQuad.h" | |
-#include "dsp/TwelveAX7.h" | |
-#include "dsp/Roessler.h" | |
+#include "dsp/IIR1.h" | |
+#include "dsp/IIR2.h" | |
-#include "dsp/FIR.h" | |
-#include "dsp/sinc.h" | |
-#include "dsp/windows.h" | |
+#include "dsp/Oversampler.h" | |
#include "dsp/RBJ.h" | |
-#include "dsp/Eq.h" | |
#include "dsp/ToneStack.h" | |
+#include "dsp/Compress.h" | |
-class AmpStub | |
-: public Plugin | |
-{ | |
- public: | |
- DSP::TwelveAX7_3 tube; | |
- | |
- sample_t drive, i_drive; | |
- | |
- struct { | |
- /* gain (remember current setting and fade to port setting in run) */ | |
- double g; | |
- /* should also do this for temperature to remove another potential | |
- * source of zippering, but that would be overkill, at the cost of | |
- * at least one pow() per block. */ | |
- } current; | |
- | |
- /* input is hipass-filtered first */ | |
- DSP::OnePoleHP dc_blocker; | |
- | |
- enum { | |
- OVERSAMPLE = 8, | |
- FIR_SIZE = 64, | |
- }; | |
- | |
- /* antialias filters */ | |
- DSP::FIRUpsampler up; | |
- DSP::FIR down; | |
- | |
- AmpStub() | |
- : up (FIR_SIZE, OVERSAMPLE), | |
- down (FIR_SIZE, up.c) | |
- { } | |
- | |
- void init (bool adjust_downsampler = false); | |
- | |
- inline sample_t power_transfer (sample_t a) | |
- { | |
- return i_drive * (a - drive * fabs (a) * a); | |
- } | |
-}; | |
- | |
-/* /////////////////////////////////////////////////////////////////////// */ | |
- | |
-class PreampIII | |
-: public AmpStub | |
-{ | |
- public: | |
- template <sample_func_t F, int OVERSAMPLE> | |
- void one_cycle (int frames); | |
- | |
- DSP::BiQuad filter; | |
- | |
- public: | |
- static PortInfo port_info[]; | |
- | |
- sample_t adding_gain; | |
- | |
- void init(); | |
- void activate() | |
- { | |
- current.g = 1; | |
- | |
- filter.reset(); | |
- up.reset(); | |
- down.reset(); | |
- dc_blocker.reset(); | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func, OVERSAMPLE> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func, OVERSAMPLE> (n); | |
- } | |
-}; | |
- | |
-/* /////////////////////////////////////////////////////////////////////// */ | |
- | |
-class AmpIII | |
-: public AmpStub | |
-{ | |
- public: | |
- template <sample_func_t F, int OVERSAMPLE> | |
- void one_cycle (int frames); | |
- | |
- DSP::BiQuad filter; | |
- | |
- public: | |
- static PortInfo port_info[]; | |
- | |
- sample_t adding_gain; | |
- | |
- void init(); | |
- void activate() | |
- { | |
- current.g = 1; | |
- | |
- up.reset(); | |
- down.reset(); | |
- dc_blocker.reset(); | |
- filter.reset(); | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func, OVERSAMPLE> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func, OVERSAMPLE> (n); | |
- } | |
-}; | |
- | |
-/* /////////////////////////////////////////////////////////////////////// */ | |
+/* TODO: mega wookie bands 80 240 750 2200 6600 */ | |
-typedef struct | |
- {float center, Q, adjust;} | |
-PreampBand; | |
- | |
-class ToneControls | |
+class AmpVTS | |
+: public Plugin | |
{ | |
public: | |
- sample_t eq_gain[4]; | |
- DSP::Eq<4> eq; | |
- static PreampBand bands[4]; | |
- | |
- public: | |
- void init (double _fs); | |
- void activate (sample_t **); | |
- | |
- inline void | |
- start_cycle (sample_t ** ports, double one_over_n) | |
- { | |
- for (int i = 0; i < 4; ++i) | |
- { | |
- if (*ports[i] == eq_gain[i]) | |
- { | |
- eq.gf[i] = 1; | |
- continue; | |
- } | |
- | |
- eq_gain[i] = *ports [i]; | |
- | |
- double want = get_band_gain (i, eq_gain[i]); | |
- eq.gf[i] = pow (want / eq.gain[i], one_over_n); | |
- } | |
- } | |
+ int ratio; | |
+ DSP::Oversampler<2,32> over2; | |
+ DSP::Oversampler<4,32> over4; | |
+ DSP::Oversampler<8,64> over8; | |
- double get_band_gain (int i, double g); | |
- void set_band_gain (int i, float g); | |
+ DSP::IIR2<sample_t> lp, biaslp; | |
+ DSP::HP1<sample_t> hp1, dc1, dc2; /* dc blockers */ | |
- inline sample_t process (sample_t x) | |
- { | |
- return eq.process (x); | |
- } | |
-}; | |
+ int model; | |
+ DSP::ToneStack tonestack; | |
-/* /////////////////////////////////////////////////////////////////////// */ | |
+ uint remain; | |
+ DSP::CompressRMS compress; | |
-class PreampIV | |
-: public PreampIII | |
-{ | |
- public: | |
- ToneControls tone; | |
+ void setratio (int r); | |
- template <sample_func_t F, int OVERSAMPLE> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
+ template <class Over> void subcycle (uint frames, Over & over); | |
public: | |
static PortInfo port_info[]; | |
- sample_t adding_gain; | |
- | |
void init(); | |
void activate(); | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func, OVERSAMPLE> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func, OVERSAMPLE> (n); | |
- } | |
-}; | |
- | |
-/* /////////////////////////////////////////////////////////////////////// */ | |
- | |
-class AmpIV | |
-: public AmpStub | |
-{ | |
- public: | |
- ToneControls tone; | |
- | |
- template <sample_func_t F, int OVERSAMPLE> | |
- void one_cycle (int frames); | |
- | |
- public: | |
- static PortInfo port_info[]; | |
- | |
- sample_t adding_gain; | |
- | |
- void init(); | |
- void activate() | |
- { | |
- current.g = 1; | |
- | |
- tone.activate (ports + 3); | |
- | |
- up.reset(); | |
- down.reset(); | |
- dc_blocker.reset(); | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func, OVERSAMPLE> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func, OVERSAMPLE> (n); | |
- } | |
-}; | |
- | |
-/* /////////////////////////////////////////////////////////////////////// */ | |
- | |
-class AmpV | |
-: public AmpStub | |
-{ | |
- public: | |
- template <sample_func_t F, int OVERSAMPLE> | |
- void one_cycle (int frames); | |
- | |
- DSP::BiQuad filter[3]; | |
- | |
- sample_t cut, tone; | |
- | |
- /* supply voltage sag */ | |
- sample_t supply; | |
- DSP::BiQuad power_cap[2]; | |
- | |
- public: | |
- static PortInfo port_info[]; | |
- | |
- sample_t adding_gain; | |
- | |
- void init(); | |
- void activate() | |
- { | |
- current.g = 1; | |
- | |
- for (int i = 0; i < 2; ++i) | |
- filter[i].reset(), | |
- power_cap[i].reset(); | |
- | |
- up.reset(); | |
- down.reset(); | |
- dc_blocker.reset(); | |
- | |
- cut = 2; | |
- supply = 0.; | |
- | |
- tone = -1; /* causes initialisation of the filter at first cycle */ | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func, OVERSAMPLE> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func, OVERSAMPLE> (n); | |
- } | |
-}; | |
- | |
-/* /////////////////////////////////////////////////////////////////////// */ | |
- | |
-class AmpVTS | |
-: public AmpStub | |
-{ | |
- public: | |
- DSP::ToneStack tonestack; | |
- | |
- template <sample_func_t F, int OVERSAMPLE> | |
- void one_cycle (int frames); | |
- | |
- sample_t cut, tone; | |
- | |
- /* supply voltage sag */ | |
- sample_t supply; | |
- DSP::BiQuad power_cap[2]; | |
- | |
- public: | |
- static PortInfo port_info[]; | |
- | |
- sample_t 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_ */ | |
+#endif /* AMP_H */ | |
diff --git a/plugins/LadspaEffect/caps/CHANGES b/plugins/LadspaEffect/caps/CHANGES | |
index 19c915d70..6948990ec 100644 | |
--- a/plugins/LadspaEffect/caps/CHANGES | |
+++ b/plugins/LadspaEffect/caps/CHANGES | |
@@ -1,10 +1,299 @@ | |
+0.9.24 | |
+ * documentation updates including switch to 48k for all spectra | |
+ * "twin" and "stanford" tonestack models swap places | |
+ * ChorusI feedback changed to interpolation, softens zipper noise on t changes | |
+ * use vestigial FPTruncateMode only on pre-SSE2 hardware | |
+ * 4x128 oversampling option removed from Compress plugins | |
+ * state port displaying current gain reduction on Compress plugins | |
+ * _latency port for parallel Eq | |
+ * Saturate fade-in bug eliminated | |
+ * Noisegate hysteresis interval lengthened | |
+ * Click sounds "stick" brightened and "beep" shortened | |
+ * run_adding() removed, reducing binary size by 30 % and compile time similarly | |
+ * JVRev tail modified, low-passed | |
+ * all ports reordered to consistent ctrl i/o audio i/o order | |
+ * Eq4p crossfade reimplemented as equal-power squared cosine, smoother now | |
+ * EqFA4p added | |
+ * non-SSE v4f_shuffle surrogate fixed | |
+ (fixes Eq4p on ARM, reported by Jens Dreske) | |
+ * dropped 44.1 kHz ToneStackLT | |
+ * OnePole header renamed IIR1, filters renamed LP1 and HP1 | |
+ * BiQuad header and filter renamed IIR2, SIMD *4f filters renamed *v4 | |
+ * CabinetIII (less demanding loudspeaker emulation resurrected again) | |
+ * ChorusI port ranges and defaults adjusted | |
+ * Compress parameter mappings and defaults adjusted | |
+ | |
+0.9.23 | |
+ * ChorusI hp filter denormal protection added | |
+ | |
+0.9.22 | |
+ * ChorusI blend behaviour changed | |
+ * ChorusI parameters adjusted | |
+ * ChorusI hp filter before delay added | |
+ * AutoFilter parameters adjusted | |
+ * AutoFilter 'range' port becomes 'depth' | |
+ | |
+0.9.21 | |
+ * Eq10 Q increased | |
+ * AmpVTS bright/compression/gain mappings adjusted | |
+ * AutoFilter reverted to 0.9.1 version with adjusted parameters | |
+ | |
+0.9.20 | |
+ * ToneStack ports rearranged (following "control before audio" convention) | |
+ * ToneStack LT model selection fixed | |
+ | |
+0.9.19 | |
+ * Noisegate partially rewritten, defaults adjusted | |
+ * Noisegate bug causing spurious gain fluctuations in closed state eliminated | |
+ * AmpVTS compression controls adjusted | |
+ * influence of total gain on compression in AmpVTS reduced | |
+ * documentation polish | |
+ | |
+0.9.18 | |
+ * restored ToneStack presets to present the full list | |
+ * AmpVTS 'bright' filter given slight resonance | |
+ * AmpVTS compression control range widened | |
+ | |
+0.9.17 | |
+ * multiple inclusion header guards changed to comply with ISO/IEC 9899:2011 | |
+ (at the insistence of Markus Elfring) | |
+ * PlateX2 fixed to read correct port for damping parameter | |
+ (reported by James Morris) | |
+ * uninstall removes rdf | |
+ * DSP::FIR4f::set_kernel size overflow in default parameter fixed | |
+ (reported and isolated by Ricardo Crudo) | |
+ * AmpVTS "lowcut" filter changed from 2- to 1-pole | |
+ * "HK 20" tonestack renamed to "AK 20" | |
+ * AmpVTS lowcut mapping changed, default lowered | |
+ * AmpVTS highpass 1 cutoff raised | |
+ * lowpass filter added to Noisegate's opening peak detector | |
+ * Noisegate not NoiseGate | |
+ * Click normal addition limited to idle loop | |
+ * NoiseGate logic loop bug fixed, hysteresis added | |
+ * documentation polish | |
+ | |
+0.9.16 | |
+ * NoiseGate simplified, sped up, gain lowpassed, click bug eliminated | |
+ * Sin smoothened, defaults updated | |
+ * PhaserII defaults updated | |
+ * Fractal defaults updated | |
+ * documentation polish | |
+ | |
+0.9.15 | |
+ * no-vector-arithmetic compilation fixed | |
+ | |
+0.9.14 | |
+ * AutoFilter x/y parameter eliminated | |
+ * Fractal hp changed to be configurable, attractors recalibrated | |
+ * DSP::Lorenz instantly initialises to useful state | |
+ * documentation polish | |
+ | |
+0.9.13 | |
+ * Eq4p softens drastic parameter changes by crossfading static filters | |
+ * Eq4p employing single v4f filter, slightly quicker | |
+ * Eq4p 'off' filter mode | |
+ * documentation and interface polish | |
+ | |
+0.9.12 | |
+ * non-SSE compilation fixed | |
+ | |
+0.9.11 | |
+ * DSP::Roessler instantly initialises to useful state | |
+ * Logarithmic port bounds and values fixed to reflect actual intent, | |
+ affecting Spice, AutoFilter and ChorusI | |
+ * clicking automatic gain fade on activate() eliminated in Saturate | |
+ * Dirac merged into Click | |
+ * Lorenz and Roessler merged into Fractal | |
+ * JVRev removed | |
+ * running plugins for zero frames returns without touching state | |
+ * CabinetII and III removed | |
+ * PhaserII sine LFO and LFO choice port added | |
+ * PhaserII fractal modulation extensively revised | |
+ * ChorusI rate lower bound slightly increased | |
+ * ChorusI delay line length adjusted to accommodate full t+width range | |
+ * all Chorus and Phaser plugins removed save for ChorusI and PhaserII | |
+ * major documentation revision | |
+ * Eq4p parametric equaliser plugin | |
+ * RBJ shelving filter prototype implementation fixed | |
+ * "2x2" stereo plugin label postfix changed to "X2" | |
+ * Eq renamed Eq10 | |
+ * SIMD implementation updates | |
+ * DSP::RBJ coefficient calculation rearranged | |
+ * Click bpm range changed, default lowered substantially | |
+ | |
+0.9.10 | |
+ * DSP::RMS protected against negative sum of squares | |
+ * documentation updates | |
+ | |
+0.9.9 | |
+ * OSX compilation configuration refinements | |
+ | |
+0.9.8 | |
+ * Spice enabled by default, Spice2x2 added | |
+ * AmpVTS default oversampling ratio changed to 4x | |
+ * JVRev refinements | |
+ * Cabinet gain upper limit reinstated to 24 dB | |
+ * AutoFilter modulation slightly adjusted | |
+ * more *ChorusII modulation smoothness | |
+ * 1st-order IIR lp set_f fix part 2 | |
+ * 1st-order IIR lp set_f fix part 1 | |
+ * 1st order low-pass for AutoFilter modulation LFO | |
+ * DelayTapA removed | |
+ * README updated | |
+ * Click 'stick' sound brightened | |
+ * moved processor_specific_denormal_measures() to activate(), speedup | |
+ | |
+0.9.7 | |
+ * ChorusI is back | |
+ * AutoFilter modulation range and default parameter updates | |
+ | |
+0.9.6 | |
+ * Click fixed to compile by older g++ versions | |
+ | |
+0.9.5 | |
+ * AmpVTS model port moved, renamed to the more apt 'tonestack' | |
+ * documentation refinements | |
+ * appreciable AmpVTS speedup by going back to sample_t for accumulator | |
+ * NoiseRatio attack time control | |
+ * sample rate dependencies in NoiseGate removed, time constants revised | |
+ * Tonestacks reordered | |
+ * Plugin::over_fs | |
+ * AmpVTS model setting fixed to follow the correct input | |
+ * CabinetIII resurrected | |
+ * AmpVTS 'ratio' port renamed to 'over' | |
+ * more filters for AutoFilter, ladder stage gain control | |
+ * AutoFilter oversampling | |
+ * AmpVTS bias in poweramp, dcblock before output | |
+ * AutoFilter envelope calculation fixed for fs > 153.6 kHz | |
+ * peak/rms selection for Compress | |
+ * AmpVTS tuning | |
+ | |
+0.9.4 | |
+ * AmpVTS bright mapping revised | |
+ * Compress hi-pass removed | |
+ * Compress saturation changed from tanh to atan | |
+ * beep wave for Click | |
+ * selectable oversampling ratio for Compress in saturating mode | |
+ * fixed Compress to apply gain before saturation | |
+ * replaced sample_func_t with the more apt yield_func_t | |
+ * minor cosmetics | |
+ * caps-doc is a separate package | |
+ * selectable wave for Click, parfiltmodel added | |
+ * further smoothened ChorusII modulation | |
+ * selectable oversampling ratio for Amp | |
+ * moved some compress setup calls from Amp's run() to activate() | |
+ * rdf target prerequisite for dist | |
+ * Eq Q fixed, flat response at 0 gain | |
+ | |
+0.9.3 | |
+ * Smoother modulation for ChorusII | |
+ * AmpVTS filters retuned | |
+ * correction for ToneStack gain in AmpVTS | |
+ * ToneStack models reordered, 'wookie', 'porky', 'HK 20', 'nihon ace' models added | |
+ * Amp 'bias' now a filtered function of output power, control removed | |
+ * division operation in 1st-order hipass setup replaced by multiplication | |
+ * Saturate gain = 0 dB in 'bypass' mode | |
+ * Saturate 'rectify' mode | |
+ * AmpVTS, Plate control mapping adjusted | |
+ | |
+0.9.2 | |
+ * included dsp/polynomials.cc in the tarball | |
+ | |
+0.9.1 | |
+ * Lorenz/Roessler rate linked to fs | |
+ * AutoFilter replaces SweepVFI | |
+ * CabinetIV | |
+ * fixed erroneous float promotion of upsampler z padding parameter | |
+ * lots of parameter tuning | |
+ * many cleanuppies here and there | |
+ * SweepVFI/AutoFilter saturating SVFII ladder (instead of oversampled SVFI) | |
+ * UniqueIDs moved into interface.cc | |
+ * SweepVFI modulation comes as range + x/z now | |
+ * GPL v3 | |
+ * more Phaser notches | |
+ * LR filters for Spice | |
+ * Saturate inverse gain for approximately constant loudness | |
+ * Scape extensively reworked | |
+ * further refinements to Chorus and Phaser units for smoother modulation | |
+ * SweepVFII removed | |
+ * LADSPA_PORT_GROUP | |
+ * Compress* input gain removed | |
+ * ToneStackLT rolled into ToneStack and eliminated | |
+ * fixed w miscalculation in DSP::Sine::set_f with fs given | |
+ * AmpPlus/AmpVTS total rewrite | |
+ * TubeCompress merged into Compress, for great template goodness | |
+ * *Chorus* modulation rate decoupled from samplerate | |
+ * tanh approximation, available in the Saturate plugin | |
+ * *Chorus* units reworked for smoother modulation and sound | |
+ * StereoChorusII2x2 plugin | |
+ * JVRev bandwidth filter/control added | |
+ * VCO* removed | |
+ * HRTF removed | |
+ * ChorusI, StereoChorusI, PhaserI removed | |
+ * CabinetI removed | |
+ * No more AmpStub silliness | |
+ * All Amp and Preamp plugins removed, save for AmpVTS | |
+ * Incite rechristened Spice | |
+ * JVRev blend range normalised to [0..1] | |
+ * Plate input value ranges adjusted to uniform [0..1] | |
+ * Phaser* spread value range upper bound adjusted to 1 from pi multiples | |
+ | |
+0.9.0 | |
+ * White bleached (was slightly pinkish before) | |
+ * up+down oversampling functionality rolled into one class | |
+ * Incite plugin | |
+ * total redesign of the Clip plugin, renamed to Saturate | |
+ * NoiseGate plugin | |
+ * RBJ prototypes changed to accept biquad instead of coeff. arrays | |
+ * various default value changes | |
+ * all FIRs changed to use templated kernel size, appreciable | |
+ speedup for all oversampled plugins | |
+ * reduced the number of arithmetic operations in the tonestack | |
+ coefficient update function, speedup for ToneStack and AmpVTS | |
+ * TubeCompress2x2 plugin | |
+ * TubeCompress plugin | |
+ * no more borrowed kernels! | |
+ * CabinetII gain adjusted for Mesa and Pro Jr models (much lower now and | |
+ more in line with the other models) | |
+ * Amp final drive gain reduced slightly to prevent foldover distortion | |
+ * SweepVF fractal rate control mapping adjusted | |
+ * Pan completely redesigned with Orban-like stereo image synthesis | |
+ * Narrower mode switch and mid/side operation added | |
+ * Plate parameter ranges modified for a brighter and less reverberant | |
+ default sound | |
+ * VCOd sync option had to be dropped due to compiler incompatibility | |
+ * Lorenz, Roessler fitted with a dc-blocking filter | |
+ * all int sample loop variables changed to unsigned, slightest speedup | |
+ * Compress2x2 plugin | |
+ * Compress plugin replaced with a completely new design | |
+ * Phaser feedback port ranges sanitised | |
+ * StereoPhaser plugins | |
+ * PhaserII gain reduced by 6dB | |
+ * "latency" outputs of all plugins removed | |
+ * Descriptor array handling changed to disable individual plugins with | |
+ relative ease | |
+ * fixed instances of g++ -O3 and above compiled code segfaulting, | |
+ performance gained everywhere | |
+ * documentation reworked extensively | |
+ * CEO wave is resampled at runtime from fs = 8kHz source | |
+ * CEO mantra changed (now an flite recording) | |
+ * Click changed to use modal synthesis to generate the click wavetable, | |
+ for improved sound and independency of sample rate | |
+ * Plate changed to do delay summation using doubles | |
+ * 1st and 2nd order filters changed to use templated types for coefficient | |
+ and state storage | |
+ * 1st order input hipass added to AmpVTS plugin | |
+ * filter 'mode' port added to AutoWah, and renamed to AutoFilter | |
+ * fixed improper 'model' labels meant to be 'mode' in the rdf generator | |
+ | |
0.4.5 | |
* Narrower plugin added | |
* fixed 'configure.py' to work with python3 | |
* fixed Sin, Roessler and Lorenz gain smoothing on activation | |
0.4.4 | |
- | |
+ * had a good time | |
+ | |
0.4.3 | |
* basics.h cleanup / comments | |
* minor Makefile cleanup | |
diff --git a/plugins/LadspaEffect/caps/Cabinet.h b/plugins/LadspaEffect/caps/Cabinet.h | |
index 4b6f1957d..4a1775928 100644 | |
--- a/plugins/LadspaEffect/caps/Cabinet.h | |
+++ b/plugins/LadspaEffect/caps/Cabinet.h | |
@@ -1,21 +1,23 @@ | |
/* | |
Cabinet.h | |
- Copyright 2002-5 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-14 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- CabinetI - 16th order IIR filters modeled after various impulse responses | |
- from Steve Harris' 'imp' plugin. Limited to 44.1 kHz sample rate. | |
+ CabinetIV - IIR/FIR combination filters for cabinet emulation, following | |
+ Bank's parfilt approach (warped Prony), see | |
+ | |
+ Balázs Bank, | |
+ "Direct Design of Parallel Second-Order Filters for Instrument Body Modeling", | |
+ Proc. of the Int. Computer Music Conference (ICMC07) | |
+ Copenhagen, Denmark, Aug. 2007, vol. I., pp. 458-465. | |
- CabinetII - 32nd order IIR filters modeled after the same impulse responses | |
- using a different algorithm. Versions for 44.1 / 48 / 88.2 / 96 kHz sample | |
- rates, switched at runtime. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -29,107 +31,87 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _CABINET_H_ | |
-#define _CABINET_H_ | |
+#ifndef CABINET_H | |
+#define CABINET_H | |
#include "dsp/util.h" | |
+#include "dsp/Oversampler.h" | |
+#include "dsp/v4f.h" | |
+#include "dsp/v4f_FIR.h" | |
+#include "dsp/v4f_IIR2.h" | |
-/* cabinet_float sets the data type used for the IIR history and thus the | |
- * computing precision. doubles tend to make the sound more vivid and lively. | |
- * You can squeeze out a few extra cycles by making this 'float' if needed. | |
- * Be warned though that CabinetII has not been tested with 32-bit floats and | |
- * might become unstable due to the lower computing precision. */ | |
typedef double cabinet_float; | |
typedef struct { | |
- int n; | |
- cabinet_float a[16], b[16]; | |
- float gain; | |
-} Model16; | |
- | |
-typedef struct { | |
- int n; | |
+ sample_t gain; | |
cabinet_float a[32], b[32]; | |
- float gain; | |
} Model32; | |
-class CabinetI | |
+class CabinetIII | |
: public Plugin | |
{ | |
public: | |
sample_t gain; | |
- static Model16 models []; | |
+ static Model32 allmodels[]; | |
+ | |
+ Model32 * models; | |
int model; | |
void switch_model (int m); | |
- int n, h; | |
+ int h; | |
cabinet_float * a, * b; | |
- cabinet_float x[16], y[16]; | |
+ cabinet_float x[32], y[32]; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint 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); | |
- } | |
}; | |
-/* Second version with 32nd order filters precalculated for | |
- * 44.1 / 48 / 88.2 / 96 kHz sample rates */ | |
+/* /////////////////////////////////////////////////////////////////////// */ | |
+ | |
+template <uint N, uint FIR> | |
+class ParModel { | |
+ public: | |
+ float gain; | |
+ float a1[4*N], a2[4*N], b1[4*N], b2[4*N]; | |
+ float fir[FIR]; | |
+}; | |
-class CabinetII | |
+class CabinetIV | |
: public Plugin | |
{ | |
public: | |
- sample_t gain; | |
+ uint remain; /* when oversampling, an oversampling cycle may be incomplete */ | |
- static Model32 models44100 []; | |
- static Model32 models48000 []; | |
- static Model32 models88200 []; | |
- static Model32 models96000 []; | |
+ int over; /* oversampling ratio */ | |
+ DSP::Oversampler<2,32> over2; | |
+ DSP::Oversampler<4,64> over4; | |
- Model32 * models; | |
int model; | |
void switch_model (int m); | |
- int n, h; | |
- cabinet_float * a, * b; | |
- cabinet_float x[32], y[32]; | |
- | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ enum { | |
+ N = 64/4, /* number of bands/4 */ | |
+ FIR = 128 /* FIR filter taps */ | |
+ }; | |
+ DSP::IIR2v4Bank<N> bank; | |
+ DSP::FIRv4<FIR> fir; | |
+ | |
+ double gain; | |
+ | |
+ void cycle (uint frames); | |
+ template <class O, int Ratio> void subcycle (uint frames, O & Over); | |
public: | |
static PortInfo port_info []; | |
- sample_t adding_gain; | |
- | |
void init(); | |
void activate(); | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
}; | |
-#endif /* _CABINET_H_ */ | |
+#endif /* CABINET_H */ | |
diff --git a/plugins/LadspaEffect/caps/Chorus.cc b/plugins/LadspaEffect/caps/Chorus.cc | |
index cf3afe4a8..d096827af 100644 | |
--- a/plugins/LadspaEffect/caps/Chorus.cc | |
+++ b/plugins/LadspaEffect/caps/Chorus.cc | |
@@ -1,17 +1,17 @@ | |
/* | |
Chorus.cc | |
- Copyright 2004-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- mono and mono-to-stereo chorus units. | |
+ Chorus units. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -30,298 +30,65 @@ | |
#include "Chorus.h" | |
#include "Descriptor.h" | |
-template <sample_func_t F> | |
void | |
-ChorusI::one_cycle (int frames) | |
+ChorusI::activate() | |
{ | |
- sample_t * s = ports[0]; | |
- | |
- double one_over_n = 1 / (double) frames; | |
- double ms = .001 * fs; | |
- | |
- double t = time; | |
- time = getport(1) * ms; | |
- double dt = (time - t) * one_over_n; | |
- | |
- double w = width; | |
- 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 = getport(3), .000001), fs, lfo.get_phase()); | |
- | |
- double blend = getport(4); | |
- double ff = getport(5); | |
- double fb = getport(6); | |
- | |
- sample_t * d = ports[7]; | |
- | |
- DSP::FPTruncateMode truncate; | |
- | |
- for (int i = 0; i < frames; ++i) | |
- { | |
- sample_t x = s[i]; | |
- | |
- /* truncate the feedback tap to integer, better quality for less | |
- * cycles (just a bit of zipper when changing 't', but it does sound | |
- * interesting) */ | |
- int ti; | |
- fistp (t, ti); | |
- x -= fb * delay[ti]; | |
- | |
- delay.put (x + normal); | |
- | |
-# if 0 | |
- /* allpass delay sounds a little cleaner for a chorus | |
- * but sucks big time when flanging. */ | |
- x = blend * x + ff * tap.get (delay, t + w * lfo.get()); | |
-# elif 0 | |
- /* linear interpolation */ | |
- x = blend * x + ff * delay.get_at (t + w * lfo.get()); | |
-# else | |
- /* cubic interpolation */ | |
- x = blend * x + ff * delay.get_cubic (t + w * lfo.get()); | |
-# endif | |
- | |
- F (d, i, x, adding_gain); | |
- | |
- t += dt; | |
- w += dw; | |
- } | |
+ setrate (getport(0)); | |
+ time = 0; | |
+ width = 0; | |
+ delay.reset(); | |
+ hp.reset(); | |
+ hp.set_f(250*over_fs); | |
} | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-PortInfo | |
-ChorusI::port_info [] = | |
-{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "t (ms)", | |
- INPUT | CONTROL, | |
- {BOUNDED | LOG | DEFAULT_LOW, 2.5, 40} | |
- }, { | |
- "width (ms)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, .5, 10} | |
- }, { | |
- "rate (Hz)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 5} | |
- }, { | |
- "blend", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, 0, 1} | |
- }, { | |
- "feedforward", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "feedback", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, 0, 1} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
-}; | |
- | |
-template <> void | |
-Descriptor<ChorusI>::setup() | |
-{ | |
- UniqueID = 1767; | |
- Label = "ChorusI"; | |
- Properties = HARD_RT; | |
- | |
- Name = CAPS "ChorusI - Mono chorus/flanger"; | |
- Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
- | |
- /* fill port info and vtable */ | |
- autogen(); | |
-} | |
- | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-template <sample_func_t F> | |
void | |
-StereoChorusI::one_cycle (int frames) | |
-{ | |
- sample_t * s = ports[0]; | |
- | |
- double one_over_n = 1 / (double) frames; | |
- double ms = .001 * fs; | |
- | |
- double t = time; | |
- time = getport(1) * ms; | |
- double dt = (time - t) * one_over_n; | |
- | |
- double w = width; | |
- 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 = 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 = getport(5); | |
- double ff = getport(6); | |
- double fb = getport(7); | |
- | |
- sample_t * dl = ports[8]; | |
- sample_t * dr = ports[9]; | |
- | |
- /* to go sure (on i386) that the fistp instruction does the right thing | |
- * when looking up fractional sample indices */ | |
- DSP::FPTruncateMode truncate; | |
- | |
- for (int i = 0; i < frames; ++i) | |
- { | |
- sample_t x = s[i]; | |
- | |
- /* truncate the feedback tap to integer, better quality for less | |
- * cycles (just a bit of zipper when changing 't', but it does sound | |
- * interesting) */ | |
- int ti; | |
- fistp (t, ti); | |
- x -= fb * delay[ti]; | |
- | |
- delay.put (x + normal); | |
- | |
- sample_t l = blend * x + ff * delay.get_cubic (t + w * left.lfo.get()); | |
- sample_t r = blend * x + ff * delay.get_cubic (t + w * right.lfo.get()); | |
- | |
- F (dl, i, l, adding_gain); | |
- F (dr, i, r, adding_gain); | |
- | |
- t += dt; | |
- w += dw; | |
- } | |
-} | |
- | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-PortInfo | |
-StereoChorusI::port_info [] = | |
+ChorusI::setrate (float r) | |
{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "t (ms)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MIN, 2.5, 40} | |
- }, { | |
- "width (ms)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, .5, 10} | |
- }, { | |
- "rate (Hz)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 5} | |
- }, { | |
- "phase", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MAX, 0, 1} | |
- }, { | |
- "blend", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, 0, 1} | |
- }, { | |
- "feedforward", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "feedback", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, 0, 1} | |
- }, { | |
- "out:l", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "out:r", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
-}; | |
- | |
-template <> void | |
-Descriptor<StereoChorusI>::setup() | |
-{ | |
- UniqueID = 1768; | |
- Label = "StereoChorusI"; | |
- Properties = HARD_RT; | |
- | |
- Name = CAPS "StereoChorusI - Stereo chorus/flanger"; | |
- Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
- | |
- /* fill port info and vtable */ | |
- autogen(); | |
+ if (r == rate) return; | |
+ rate = r; | |
+ lfo.sine.set_f (rate, fs, lfo.sine.get_phase()); | |
} | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-template <sample_func_t F> | |
void | |
-ChorusII::one_cycle (int frames) | |
+ChorusI::cycle (uint frames) | |
{ | |
- sample_t * s = ports[0]; | |
- | |
- double one_over_n = 1 / (double) frames; | |
- double ms = .001 * fs; | |
+ float one_over_n = 1/(float)frames; | |
+ float ms = fs*.001; | |
- double t = time; | |
- time = getport(1) * ms; | |
- double dt = (time - t) * one_over_n; | |
+ float t = time; | |
+ time = getport(0)*ms; | |
+ float dt = (time - t)*one_over_n; | |
- double w = width; | |
- width = getport(2) * ms; | |
+ float w = width; | |
+ width = getport(1)*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; | |
+ float dw = (width - w) * one_over_n; | |
- if (rate != *ports[3]) | |
- set_rate (*ports[3]); | |
- | |
- double blend = getport(4); | |
- double ff = getport(5); | |
- double fb = getport(6); | |
+ setrate (getport(2)); | |
+ | |
+ float blend = getport(3); | |
+ float ff = getport(4); | |
+ float fb = getport(5); | |
+ sample_t * s = ports[6]; | |
sample_t * d = ports[7]; | |
DSP::FPTruncateMode truncate; | |
- for (int i = 0; i < frames; ++i) | |
+ for (uint i = 0; i < frames; ++i) | |
{ | |
- sample_t x = s[i]; | |
+ sample_t x=s[i], y=x; | |
- x -= fb * delay.get_cubic (t); | |
+ x = hp.process(x+normal); | |
- delay.put (filter.process (x + normal)); | |
+ y -= fb*delay.get_linear(t); | |
- double a = 0; | |
- for (int j = 0; j < Taps; ++j) | |
- a += taps[j].get (delay, t, w); | |
+ delay.put (y + normal); | |
- x = blend * x + ff * a; | |
+ y += blend*x + ff*delay.get_cubic (t + w*lfo.sine.get()); | |
- F (d, i, x, adding_gain); | |
+ d[i] = y; | |
t += dt; | |
w += dw; | |
@@ -331,173 +98,29 @@ ChorusII::one_cycle (int frames) | |
/* //////////////////////////////////////////////////////////////////////// */ | |
PortInfo | |
-ChorusII::port_info [] = | |
-{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "t (ms)", | |
- INPUT | CONTROL, | |
- {BOUNDED | LOG | DEFAULT_LOW, 2.5, 40} | |
- }, { | |
- "width (ms)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, .5, 10} | |
- }, { | |
- "rate", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "blend", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, 0, 1} | |
- }, { | |
- "feedforward", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "feedback", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, 0, 1} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
-}; | |
- | |
-template <> void | |
-Descriptor<ChorusII>::setup() | |
-{ | |
- UniqueID = 2583; | |
- Label = "ChorusII"; | |
- Properties = HARD_RT; | |
- | |
- Name = CAPS "ChorusII - Mono chorus/flanger modulated by a fractal"; | |
- Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
- | |
- /* fill port info and vtable */ | |
- autogen(); | |
-} | |
- | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-template <sample_func_t F> | |
-void | |
-StereoChorusII::one_cycle (int frames) | |
+ChorusI::port_info [] = | |
{ | |
- sample_t * s = ports[0]; | |
- | |
- double one_over_n = 1 / (double) frames; | |
- double ms = .001 * fs; | |
- | |
- double t = time; | |
- time = getport(1) * ms; | |
- double dt = (time - t) * one_over_n; | |
- | |
- double w = width; | |
- 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 = getport(4); | |
- double ff = getport(5); | |
- double fb = getport(6); | |
- | |
- sample_t * dl = ports[7]; | |
- sample_t * dr = ports[8]; | |
- | |
- /* to go sure (on i386) that the fistp instruction does the right thing | |
- * when looking up fractional sample indices */ | |
- DSP::FPTruncateMode truncate; | |
- | |
- for (int i = 0; i < frames; ++i) | |
- { | |
- sample_t x = s[i]; | |
+ { "t (ms)", CTRL_IN, {LOG | DEFAULT_MID, 2.5, 40} }, | |
+ { "width (ms)", CTRL_IN, {DEFAULT_LOW, .5, 10} }, | |
- /* truncate the feedback tap to integer, better quality for less | |
- * cycles (just a bit of zipper when changing 't', but it does sound | |
- * interesting) */ | |
- int ti; | |
- fistp (t, ti); | |
- x -= fb * delay[ti]; | |
+ { "rate (Hz)", CTRL_IN | GROUP, {LOG | DEFAULT_LOW, 0.02, 5} }, | |
- delay.put (x + normal); | |
+ { "blend", CTRL_IN | GROUP, {DEFAULT_LOW, 0, 1} }, | |
+ { "feedforward", CTRL_IN, {DEFAULT_LOW, 0, 1} }, | |
+ { "feedback", CTRL_IN, {DEFAULT_LOW, 0, 1} }, | |
- double m; | |
- m = left.lfo_lp.process (left.fractal.get()); | |
- sample_t l = blend * x + ff * delay.get_cubic (t + w * m); | |
- m = right.lfo_lp.process (right.fractal.get()); | |
- sample_t r = blend * x + ff * delay.get_cubic (t + w * m); | |
- | |
- F (dl, i, l, adding_gain); | |
- F (dr, i, r, adding_gain); | |
- | |
- t += dt; | |
- w += dw; | |
- } | |
-} | |
- | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-PortInfo | |
-StereoChorusII::port_info [] = | |
-{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "t (ms)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 2.5, 40} | |
- }, { | |
- "width (ms)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, .5, 10} | |
- }, { | |
- "rate", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "blend", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, 0, 1} | |
- }, { | |
- "feedforward", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0, 1} | |
- }, { | |
- "feedback", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, 0, 1} | |
- }, { | |
- "out:l", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "out:r", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "in", INPUT | AUDIO }, | |
+ { "out", OUTPUT | AUDIO } | |
}; | |
template <> void | |
-Descriptor<StereoChorusII>::setup() | |
+Descriptor<ChorusI>::setup() | |
{ | |
- UniqueID = 2584; | |
- Label = "StereoChorusII"; | |
- Properties = HARD_RT; | |
+ Label = "ChorusI"; | |
- Name = CAPS "StereoChorusII - Stereo chorus/flanger modulated by a fractal"; | |
+ Name = CAPS "ChorusI - Mono chorus/flanger"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "GPL, 2004-13"; | |
/* fill port info and vtable */ | |
autogen(); | |
diff --git a/plugins/LadspaEffect/caps/Chorus.h b/plugins/LadspaEffect/caps/Chorus.h | |
index 03ed256ec..83db371ee 100644 | |
--- a/plugins/LadspaEffect/caps/Chorus.h | |
+++ b/plugins/LadspaEffect/caps/Chorus.h | |
@@ -1,18 +1,15 @@ | |
/* | |
Chorus.h | |
- Copyright 2004-5 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- mono and stereo chorus/flanger units, traditional designs and some | |
- differentiated a bit further. | |
- | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -26,276 +23,44 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _CHORUS_H_ | |
-#define _CHORUS_H_ | |
+#ifndef CHORUS_H | |
+#define CHORUS_H | |
#include "dsp/Sine.h" | |
#include "dsp/Roessler.h" | |
#include "dsp/Lorenz.h" | |
#include "dsp/Delay.h" | |
-#include "dsp/OnePole.h" | |
-#include "dsp/BiQuad.h" | |
+#include "dsp/IIR1.h" | |
+#include "dsp/IIR2.h" | |
#include "dsp/RBJ.h" | |
-class ChorusStub | |
-: public Plugin | |
-{ | |
- public: | |
- sample_t time, width, rate; | |
-}; | |
- | |
class ChorusI | |
-: public ChorusStub | |
-{ | |
- public: | |
- DSP::Sine lfo; | |
- DSP::Delay delay; | |
- DSP::DelayTapA tap; | |
- | |
- template <sample_func_t> | |
- void one_cycle (int frames); | |
- | |
- public: | |
- static PortInfo port_info []; | |
- | |
- void init() | |
- { | |
- rate = .15; | |
- delay.init ((int) (.040 * fs)); | |
- } | |
- | |
- void activate() | |
- { | |
- time = 0; | |
- width = 0; | |
- | |
- rate = *ports[3]; | |
- | |
- delay.reset(); | |
- tap.reset(); | |
- | |
- lfo.set_f (rate, fs, 0); | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
-}; | |
- | |
-class StereoChorusI | |
-: public ChorusStub | |
-{ | |
- public: | |
- sample_t rate; | |
- sample_t phase; | |
- | |
- DSP::Delay delay; | |
- | |
- struct { | |
- DSP::Sine lfo; | |
- DSP::DelayTapA tap; | |
- } left, right; | |
- | |
- template <sample_func_t> | |
- void one_cycle (int frames); | |
- | |
- public: | |
- static PortInfo port_info []; | |
- | |
- void init() | |
- { | |
- rate = .15; | |
- phase = .5; /* pi */ | |
- | |
- delay.init ((int) (.040 * fs)); | |
- } | |
- | |
- void activate() | |
- { | |
- time = 0; | |
- width = 0; | |
- | |
- delay.reset(); | |
- | |
- left.tap.reset(); | |
- right.tap.reset(); | |
- | |
- left.lfo.set_f (rate, fs, 0); | |
- right.lfo.set_f (rate, fs, phase * M_PI); | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
-}; | |
- | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-#define FRACTAL_RATE 0.02 | |
- | |
-/* fractally modulated Chorus units */ | |
- | |
-class FracTap | |
-{ | |
- public: | |
- DSP::Lorenz f1; | |
- DSP::Roessler f2; | |
- DSP::OnePoleLP lp; | |
- | |
- void init (double fs) | |
- { | |
- lp.set_f (30. / fs); | |
- f1.init (.001, frandom()); | |
- f2.init (.001, frandom()); | |
- } | |
- | |
- void set_rate (sample_t r) | |
- { | |
- f1.set_rate (r * FRACTAL_RATE); | |
- f2.set_rate (3.3 * r * FRACTAL_RATE); | |
- } | |
- | |
- /* t = time, w = width, should inline nicely */ | |
- sample_t get (DSP::Delay & d, double t, double w) | |
- { | |
- double m = lp.process (f1.get() + .3 * f2.get()); | |
- return d.get_cubic (t + w * m); | |
- } | |
-}; | |
- | |
-class ChorusII | |
-: public ChorusStub | |
+: public Plugin | |
{ | |
public: | |
- enum { | |
- Taps = 1 | |
- }; | |
- | |
- FracTap taps[Taps]; | |
- DSP::BiQuad filter; | |
- DSP::Delay delay; | |
- | |
- template <sample_func_t> | |
- void one_cycle (int frames); | |
- | |
- void set_rate (sample_t r) | |
- { | |
- rate = r; | |
- for (int i = 0; i < Taps; ++i) | |
- { | |
- taps[i].set_rate (rate * (i * FRACTAL_RATE) / Taps); | |
- // fprintf (stderr, "[%d] %.3f\n", i, (rate * (i * FRACTAL_RATE) / Taps)); | |
- } | |
- } | |
- | |
- public: | |
- static PortInfo port_info []; | |
- | |
- void init() | |
- { | |
- delay.init ((int) (.040 * fs)); | |
- for (int i = 0; i < Taps; ++i) | |
- taps[i].init (fs); | |
- DSP::RBJ::HiShelve (1000. / fs, 1., 6, filter.a, filter.b); | |
- } | |
+ DSP::HP1<sample_t> hp; | |
+ float time, width, rate; | |
- void activate() | |
- { | |
- time = 0; | |
- width = 0; | |
- | |
- set_rate (*ports[3]); | |
- | |
- delay.reset(); | |
- filter.reset(); | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
-}; | |
- | |
-class StereoChorusII | |
-: public ChorusStub | |
-{ | |
- public: | |
- sample_t rate; | |
- sample_t phase; | |
+ struct { DSP::Sine sine; } lfo; | |
DSP::Delay delay; | |
- struct { | |
- DSP::Roessler fractal; | |
- DSP::OnePoleLP lfo_lp; | |
- DSP::DelayTapA tap; | |
- } left, right; | |
- | |
- template <sample_func_t> | |
- void one_cycle (int frames); | |
+ void cycle(uint frames); | |
- void set_rate (sample_t r) | |
- { | |
- rate = r; | |
- left.fractal.set_rate (rate * FRACTAL_RATE); | |
- right.fractal.set_rate (rate * FRACTAL_RATE); | |
- left.lfo_lp.set_f (3. / fs); | |
- right.lfo_lp.set_f (3. / fs); | |
- } | |
+ void setrate(float r); | |
public: | |
static PortInfo port_info []; | |
- sample_t adding_gain; | |
void init() | |
{ | |
- phase = .5; /* pi */ | |
- | |
- delay.init ((int) (.040 * fs)); | |
- | |
- left.fractal.init (.001, frandom()); | |
- right.fractal.init (.001, frandom()); | |
- } | |
- | |
- void activate() | |
- { | |
- time = 0; | |
- width = 0; | |
- | |
- delay.reset(); | |
- | |
- left.tap.reset(); | |
- right.tap.reset(); | |
- | |
- set_rate (*ports[3]); | |
+ rate = .15; | |
+ lfo.sine.set_f (rate, fs, 0); | |
+ delay.init ((int) (.050 * fs)); | |
} | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
+ void activate(); | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
}; | |
-#endif /* _CHORUS_H_ */ | |
+#endif /* CHORUS_H */ | |
diff --git a/plugins/LadspaEffect/caps/Click.cc b/plugins/LadspaEffect/caps/Click.cc | |
index d862c55f4..2a159a28e 100644 | |
--- a/plugins/LadspaEffect/caps/Click.cc | |
+++ b/plugins/LadspaEffect/caps/Click.cc | |
@@ -1,7 +1,7 @@ | |
/* | |
Click.cc | |
- Copyright 2002-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-14 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -11,7 +11,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -26,30 +26,33 @@ | |
*/ | |
#include "basics.h" | |
- | |
-#include "waves/click.h" | |
-#include "waves/money.h" | |
+#include "dsp/RBJ.h" | |
+#include "dsp/White.h" | |
#include "Click.h" | |
#include "Descriptor.h" | |
+template <int Waves> | |
void | |
-ClickStub::init (float * _wave, int _N) | |
+ClickStub<Waves>::initwave (int i, int16 * _wave, uint _N) | |
{ | |
- wave = _wave; | |
- N = _N; | |
- bpm = -1; | |
+ wave[i].data = _wave; | |
+ wave[i].N = _N; | |
} | |
-template <sample_func_t F> | |
+template <int Waves> | |
void | |
-ClickStub::one_cycle (int frames) | |
+ClickStub<Waves>::cycle (uint frames) | |
{ | |
- bpm = getport(0); | |
- sample_t gain = getport(1) * *ports[1]; | |
- lp.set (1 - *ports[2]); | |
+ static double scale16 = 1./32768; | |
+ int p = Waves > 1 ? 1 : 0; /* port */ | |
+ int w = p ? getport(0) : 0; /* wave */ | |
+ bpm = getport(p); | |
+ sample_t gain = getport(p+1); | |
+ gain *= scale16 * gain; | |
+ lp.set (1 - getport (p+2)); | |
- sample_t * d = ports[3]; | |
+ sample_t * d = ports[p+3]; | |
while (frames) | |
{ | |
@@ -59,28 +62,25 @@ ClickStub::one_cycle (int frames) | |
played = 0; | |
} | |
- int n = min (frames, period); | |
+ uint n = min (frames, period); | |
- if (played < N) | |
+ if (played < wave[w].N) | |
{ | |
- n = min (n, N - played); | |
+ n = min (n, wave[w].N - played); | |
- for (int i = 0; i < n; ++i) | |
+ for (uint i = 0; i < n; ++i) | |
{ | |
- sample_t x = gain * wave [played + i] + normal; | |
- F (d, i, lp.process (x), adding_gain); | |
- normal = -normal; | |
+ double x = gain * wave[w].data[played+i]; | |
+ x = lp.process (x); | |
+ d[i] = x; | |
} | |
played += n; | |
} | |
else | |
{ | |
- for (int i = 0; i < n; ++i) | |
- { | |
- F (d, i, lp.process (normal), adding_gain); | |
- normal = -normal; | |
- } | |
+ for (uint i = 0; i < n; ++i) | |
+ d[i] = lp.process(normal); | |
} | |
period -= n; | |
@@ -91,93 +91,155 @@ ClickStub::one_cycle (int frames) | |
/* //////////////////////////////////////////////////////////////////////// */ | |
-PortInfo | |
-ClickStub::port_info [] = | |
+/* initialising the wavetable for the click sound from a few oscillation modes */ | |
+void | |
+Click::initsimple() | |
{ | |
+ enum { Peaks = 7 }; | |
+ /* {f, gain} pairs */ | |
+ static float _peaks[Peaks][2] = { | |
+ {897, 1.0}, | |
+ {1423, 0.20}, | |
+ {2054, 0.92}, | |
+ {2353, 0.244}, | |
+ {2843, 0.719}, | |
+ {3567, 0.191}, | |
+ {5117, 0.091}, | |
+ }; | |
+ | |
+ DSP::LP1<sample_t> lp1; | |
+ lp1.set_f (800*over_fs); | |
+ DSP::IIR2<sample_t> lp; | |
+ DSP::RBJ::LP (8000*over_fs, .2, lp); | |
+ | |
+ DSP::IIR2<sample_t> peaks[Peaks]; | |
+ for (int i = 0; i < Peaks; ++i) | |
{ | |
- "bpm", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 4, 244} | |
- }, { | |
- "volume", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0, 1} | |
- }, { | |
- "damping", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_HIGH, 0, 1} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
+ /* tune to g' = 784 Hz */ | |
+ float f = .8740245*_peaks[i][0]*over_fs; | |
+ float g = _peaks[i][1]; | |
+ DSP::RBJ::BP (f, 22*g, peaks[i]); | |
} | |
-}; | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
+ DSP::IIR2<sample_t> bp; | |
+ DSP::RBJ::BP (150*over_fs, 3.8, bp); | |
-#define LENGTH(W) ((int) (sizeof (W) / sizeof (float))) | |
+ DSP::IIR2<sample_t> post; | |
+ DSP::RBJ::PeakingEQ (1000*over_fs, 1.8, 24, post); | |
-void | |
-Click::init() | |
-{ | |
- this->ClickStub::init (click, LENGTH (click)); | |
+ int n = (int) (fs * 2800. / 44100.); | |
+ int16 * click = new int16 [n]; | |
+ | |
+ DSP::White white; | |
+ int m = 8; | |
+ sample_t mi = 1./m; | |
+ sample_t x; | |
+ for (int i = 0; i < n; ++i) | |
+ { | |
+ if (i < m) /* simplistic noise excitation signal */ | |
+ x = .5 * white.get() * (m-i)*mi; | |
+ x = lp.process (x); | |
+ double a = x; | |
+ for (int j = 0; j < Peaks; ++j) | |
+ a += peaks[j].process_bp (x); | |
+ a = post.process (a); | |
+ /* add some ring-modulated noisz */ | |
+ a += a*bp.process(white.get()); | |
+ click[i] = (int16) (a * 32767.); | |
+ x = 0; | |
+ } | |
+ | |
+ initwave (0, click, n); | |
} | |
-template <> void | |
-Descriptor<Click>::setup() | |
+/* using parfilt models to generate the click */ | |
+#include "Cabinet.h" | |
+#include "waves/click.h" | |
+ | |
+void | |
+Click::initparfilt() | |
{ | |
- UniqueID = 1769; | |
- Label = "Click"; | |
- Properties = HARD_RT; | |
+ DSP::IIR2v4Bank<128> bank; | |
+ | |
+ ParModel<128,1> * model; | |
+ if (fs > 120000) model = &waves_click_wav_176000; | |
+ else if (fs > 60000) model = &waves_click_wav_88200; | |
+ else model = &waves_click_wav_44100; | |
+ | |
+ bank.set_a (1, model->a1); | |
+ bank.set_a (2, model->a2); | |
+ bank.set_b (1, model->b1); | |
+ bank.set_b (2, model->b2); | |
+ bank.reset(); | |
+ | |
+ int n = (int) (fs*2800/44100); | |
+ int16 * click = new int16 [n]; | |
- Name = CAPS "Click - Metronome"; | |
- Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ DSP::IIR2<sample_t> hp; | |
+ DSP::RBJ::HP (1520*over_fs, .7, hp); | |
- /* fill port info and vtable */ | |
- autogen(); | |
-} | |
+ DSP::White white; | |
+ int m = 3; | |
+ sample_t mi = 1./m; | |
+ sample_t x; | |
+ for (int i = 0; i < n; ++i) | |
+ { | |
+ if (i < m) /* simplistic noise excitation signal */ | |
+ x = .5 * white.get() * (m-i)*mi; | |
+ x = v4f_sum (bank.process_bp(v4f(x))); | |
+ x = hp.process(x); | |
+ click[i] = (int16) (x * 32767.); | |
+ x = 0; | |
+ } | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
+ initwave (1, click, n); | |
+} | |
-PortInfo | |
-CEO::port_info [] = | |
+void | |
+Click::initsine() | |
{ | |
+ float f = 2*784; | |
+ DSP::Sine sin (2*M_PI*f*over_fs); | |
+ | |
+ int n = (int) (12*fs/f); | |
+ int m = 6*n/4; | |
+ int16 * click = new int16 [m]; | |
+ | |
+ DSP::IIR2<sample_t> lp; | |
+ DSP::RBJ::BP (f*over_fs,2.5,lp); | |
+ | |
+ float a = .4 * 32767; | |
+ for (int i = 0; i < n; ++i) | |
{ | |
- "mpm", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_HIGH, 4, 244} | |
- }, { | |
- "volume", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0, 1} | |
- }, { | |
- "damping", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MIN, 0, 1} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
+ sample_t x = a*sin.get(); | |
+ x = lp.process(x); | |
+ click[i] = (int16) (x); | |
} | |
-}; | |
+ for (int i = n; i < m; ++i) | |
+ { | |
+ sample_t x = lp.process(NOISE_FLOOR); | |
+ click[i] = (int16) (x); | |
+ } | |
+ | |
+ initwave (2, click, m); | |
+} | |
void | |
-CEO::init() | |
+Click::initdirac() | |
{ | |
- this->ClickStub::init (money, LENGTH (money)); | |
+ int16 * dirac = new int16[1]; | |
+ *dirac = 32767; | |
+ initwave (3, dirac, 1); | |
} | |
template <> void | |
-Descriptor<CEO>::setup() | |
+Descriptor<Click>::setup() | |
{ | |
- UniqueID = 1770; | |
- Label = "CEO"; | |
- Properties = HARD_RT; | |
+ Label = "Click"; | |
- Name = CAPS "CEO - Chief Executive Oscillator"; | |
+ Name = CAPS "Click - Metronome"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2004-14"; | |
/* fill port info and vtable */ | |
autogen(); | |
@@ -185,46 +247,90 @@ Descriptor<CEO>::setup() | |
/* //////////////////////////////////////////////////////////////////////// */ | |
-float dirac [] = { 1, }; | |
+PortInfo | |
+Click::port_info [] = | |
+{ | |
+ { "model", CTRL_IN, {INTEGER | DEFAULT_1, 0, 3}, | |
+ "{0:'box',1:'stick',2:'beep',3:'dirac'}" }, | |
+ { "bpm", CTRL_IN | GROUP, {DEFAULT_LOW, 4, 240} }, | |
+ { "volume", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} }, | |
+ { "damping", CTRL_IN, {DEFAULT_HIGH, 0, 1} }, | |
+ | |
+ { "out", OUTPUT | AUDIO} | |
+}; | |
+ | |
+/* //////////////////////////////////////////////////////////////////////// */ | |
PortInfo | |
-Dirac::port_info [] = | |
+CEO::port_info [] = | |
{ | |
- { | |
- "ppm", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MIN, 30, 60} | |
- }, { | |
- "volume", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, 0, 1} | |
- }, { | |
- "damping", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, 0, 1} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "ppm", CTRL_IN, {DEFAULT_LOW, 30, 232} }, | |
+ { "volume", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1}}, | |
+ { "damping", CTRL_IN, {DEFAULT_0, 0, 1} }, | |
+ | |
+ { "out", OUTPUT | AUDIO, {0} } | |
}; | |
+#include "waves/profit.h" | |
+ | |
void | |
-Dirac::init() | |
+CEO::init() | |
{ | |
- this->ClickStub::init (dirac, LENGTH (dirac)); | |
+ int m = sizeof(profit)/sizeof(*profit); | |
+ | |
+ float s = fs/8000., dx = 1/s; | |
+ | |
+ int n = (int) (s*m); | |
+ int16 * wave = new int16 [n]; | |
+ | |
+ DSP::IIR2<sample_t> lp; | |
+ /* suppress aliasing with an additional lowpass; also slight gain at 3 kHz */ | |
+ DSP::RBJ::LP (3000*over_fs,1.5,lp); | |
+ #if 1 /* linear */ | |
+ float x = 0; | |
+ for (int i = 0; i < n-1; ++i) | |
+ { | |
+ int j = (int) x; | |
+ float a = x-j; | |
+ a = (1-a)*profit[j] + a*profit[j+1]; | |
+ a = lp.process(a); | |
+ wave[i] = (int16) a; | |
+ x += dx; | |
+ } | |
+ #else /* cubic, unneeded */ | |
+ float x = 0; | |
+ for (int i=0; i < n; ++i, x+=dx) | |
+ { | |
+ int j = (int) x; | |
+ float f = x-j; | |
+ sample_t x_1 = profit[j-1]; | |
+ sample_t x0 = profit[j]; | |
+ sample_t x1 = profit[j+1]; | |
+ sample_t x2 = profit[j+2]; | |
+ | |
+ sample_t a = | |
+ .5*(3*(x0 - x1) - x_1 + x2); | |
+ sample_t b = | |
+ 2*x1 + x_1 - .5*(5*x0 + x2); | |
+ sample_t c = | |
+ .5*(x1 - x_1); | |
+ | |
+ a = x0 + (((a * f) + b) * f + c) * f; | |
+ wave[i] = (int16) a; | |
+ } | |
+ #endif | |
+ | |
+ initwave (0, wave, n-1); | |
} | |
template <> void | |
-Descriptor<Dirac>::setup() | |
+Descriptor<CEO>::setup() | |
{ | |
- UniqueID = 2585; | |
- Label = "Dirac"; | |
- Properties = HARD_RT; | |
+ Label = "CEO"; | |
- Name = CAPS "Dirac - One-sample impulse generator"; | |
+ Name = CAPS "CEO - Chief Executive Oscillator"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2004-12"; | |
/* fill port info and vtable */ | |
autogen(); | |
diff --git a/plugins/LadspaEffect/caps/Click.h b/plugins/LadspaEffect/caps/Click.h | |
index feb5bc7a5..7d6ced9a1 100644 | |
--- a/plugins/LadspaEffect/caps/Click.h | |
+++ b/plugins/LadspaEffect/caps/Click.h | |
@@ -1,17 +1,17 @@ | |
/* | |
Click.h | |
- Copyright 2004-5 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- units perpetually repeating a recorded sample. | |
+ Units repeatedly playing back a wavetable. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,69 +25,71 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _CLICK_H_ | |
-#define _CLICK_H_ | |
+#ifndef CLICK_H | |
+#define CLICK_H | |
-#include "dsp/OnePole.h" | |
+#include "dsp/IIR1.h" | |
+#include "dsp/IIR2.h" | |
#include "dsp/util.h" | |
+template <int Waves> | |
class ClickStub | |
: public Plugin | |
{ | |
public: | |
sample_t bpm; | |
- float * wave; | |
- int N; /* number of samples in wave */ | |
+ struct { | |
+ int16 * data; | |
+ uint N; /* number of samples in wave */ | |
+ } wave[Waves]; | |
- DSP::OnePoleLP lp; | |
+ DSP::LP1<sample_t> lp; | |
- int period; /* frames remaining in period */ | |
- int played; /* frames played from sample */ | |
+ uint period; /* frames remaining in period */ | |
+ uint played; /* frames played from sample */ | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
- public: | |
- static PortInfo port_info []; | |
+ ClickStub() | |
+ { | |
+ for (int i=0; i < Waves; ++i) | |
+ wave[i].data = 0; | |
+ } | |
+ ~ClickStub() | |
+ { | |
+ for (int i=0; i < Waves; ++i) | |
+ if (wave[i].data) delete [] wave[i].data; | |
+ } | |
- void init (float * _wave, int _N); | |
+ public: | |
+ void initwave (int i, int16 * wave, uint N); | |
void activate() | |
{ | |
played = 0; | |
period = 0; | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
+ bpm = -1; | |
} | |
}; | |
class Click | |
-: public ClickStub | |
+: public ClickStub<4> | |
{ | |
public: | |
- void init(); | |
-}; | |
+ void initsimple(); | |
+ void initparfilt(); | |
+ void initsine(); | |
+ void initdirac(); | |
-class CEO | |
-: public ClickStub | |
-{ | |
- public: | |
- void init(); | |
+ void init() | |
+ { initsimple(); initparfilt(); initsine(); initdirac(); } | |
static PortInfo port_info []; | |
}; | |
-class Dirac | |
-: public ClickStub | |
+class CEO | |
+: public ClickStub<1> | |
{ | |
public: | |
void init(); | |
@@ -95,4 +97,4 @@ class Dirac | |
static PortInfo port_info []; | |
}; | |
-#endif /* _CLICK_H_ */ | |
+#endif /* CLICK_H */ | |
diff --git a/plugins/LadspaEffect/caps/Compress.cc b/plugins/LadspaEffect/caps/Compress.cc | |
index 3d9725a64..582a05c08 100644 | |
--- a/plugins/LadspaEffect/caps/Compress.cc | |
+++ b/plugins/LadspaEffect/caps/Compress.cc | |
@@ -1,18 +1,15 @@ | |
/* | |
Compress.cc | |
- Copyright 2004-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2011-14 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- | |
- mono compressor suitable for solo instruments. adaptation of Steve | |
- Harris' 'sc1' unit, with minor tweaks: table lookup for attack and | |
- release time to frames mapping replaced with exp. port order changed. | |
+ | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -31,69 +28,105 @@ | |
#include "Compress.h" | |
#include "Descriptor.h" | |
-template <sample_func_t F> | |
+template <int Channels> | |
void | |
-Compress::one_cycle (int frames) | |
+CompressStub<Channels>::activate() | |
{ | |
- sample_t * s = ports[0]; | |
- | |
- sample_t range = DSP::db2lin (getport(1)); | |
- sample_t 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 | |
- * error. calling exp() once per cycle doesn't seem too expensive. | |
- * | |
- * besides, i have a suspicion that the attack and release parameters | |
- * don't work like they should. if they, as the code suggests, control | |
- * an exponential envelope fade, pow (.5, n_frames) or something like | |
- * that seems more appropriate. so ... | |
- * | |
- * TODO: check whether these parameters work like they should, try pow() | |
- */ | |
- double ga = exp (-1 / (fs * getport(3))); | |
- double gr = exp (-1 / (fs * getport(4))); | |
- | |
- sample_t threshold = getport(5); | |
- sample_t knee = getport(6); | |
- | |
- sample_t * d = ports[7]; | |
- | |
- sample_t knee0 = DSP::db2lin (threshold - knee); | |
- sample_t knee1 = DSP::db2lin (threshold + knee); | |
- | |
- sample_t ef_a = ga * .25; | |
- sample_t ef_ai = 1 - ef_a; | |
- | |
- for (int i = 0; i < frames; ++i) | |
- { | |
- sum += s[i] * s[i]; | |
+ compress.peak.init (fs); | |
+ compress.rms.init (fs); | |
+ remain = 0; | |
+} | |
+ | |
+template <int Channels> | |
+void | |
+CompressStub<Channels>::cycle (uint frames) | |
+{ | |
+ int c = getport(0); | |
+ if (c == 0) subcycle<DSP::CompressPeak> (frames, compress.peak); | |
+ else subcycle<DSP::CompressRMS> (frames, compress.rms); | |
+} | |
+ | |
+/* do-nothing 'saturator' as template for linear instead of saturating mode */ | |
+struct NoSat { sample_t process(sample_t x) { return x; } }; | |
+ | |
+template <int Channels> | |
+template <class Comp> | |
+void | |
+CompressStub<Channels>::subcycle (uint frames, Comp & comp) | |
+{ | |
+ static NoSat none; | |
+ | |
+ int s = getport(1); | |
+ if (s == 1) subsubcycle<Comp,CompSat2> | |
+ (frames, comp, saturate[0].two, saturate[1].two); | |
+ else if (s == 2) subsubcycle<Comp,CompSat4> | |
+ (frames, comp, saturate[0].four, saturate[1].four); | |
+ #if 0 | |
+ else if (s == 3) subsubcycle<Comp,CompSat8> | |
+ (frames, comp, saturate[0].eight, saturate[1].eight); | |
+ #endif | |
+ else subsubcycle<Comp, NoSat> | |
+ (frames, comp, none, none); | |
+} | |
+ | |
+template <int Channels> | |
+template <class Comp, class Sat> | |
+void | |
+CompressStub<Channels>::subsubcycle (uint frames, Comp & comp, Sat & satl, Sat & satr) | |
+{ | |
+ comp.set_threshold (pow(getport(2), 1.6)); | |
+ sample_t strength = pow(getport(3), 1.4); /* more resolution in lower range */ | |
+ comp.set_attack (getport(4)); | |
+ comp.set_release (getport(5)); | |
+ sample_t gain_out = db2lin (getport (6)); | |
- if (amp > env) | |
- env = env * ga + amp * (1 - ga); | |
- else | |
- env = env * gr + amp * (1 - gr); | |
+ sample_t * sl = ports[Stereo ? 8 : 8]; /* ;) */ | |
+ sample_t * sr = ports[Stereo ? 9 : 8]; | |
- if ((count++ & 3) == 3) | |
+ sample_t * dl = ports[Stereo ? 10 : 9]; | |
+ sample_t * dr = ports[Stereo ? 11 : 9]; | |
+ | |
+ sample_t state = 1; | |
+ | |
+ while (frames) | |
+ { | |
+ if (remain == 0) | |
{ | |
- amp = rms.process (sum * .25); | |
- sum = 0; | |
- | |
- if (env < knee0) | |
- gain_t = 1; | |
- else if (env < knee1) | |
- { | |
- float x = -(threshold - knee - DSP::lin2db (env)) / knee; | |
- gain_t = DSP::db2lin (-knee * ratio * x * x * 0.25f); | |
- } | |
- else | |
- gain_t = DSP::db2lin ((threshold - DSP::lin2db (env)) * ratio); | |
+ remain = comp.blocksize; | |
+ comp.start_block(strength); | |
+ state = min(state,comp.gain.state); | |
} | |
- gain = gain * ef_a + gain_t * ef_ai; | |
+ uint n = min (frames, remain); | |
+ | |
+ for (uint i=0; i<n; ++i) | |
+ { | |
+ sample_t xl = sl[i], xr = sr[i]; | |
+ | |
+ if (Stereo) | |
+ comp.store(xl, xr); | |
+ else | |
+ comp.store(xl); | |
+ | |
+ sample_t gain = gain_out*comp.get(); | |
+ | |
+ xl = satl.process(xl*gain); | |
+ if (Stereo) | |
+ xr = satr.process(xr*gain); | |
+ | |
+ dl[i] = xl; | |
+ if (Stereo) | |
+ dr[i] = xr; | |
+ } | |
- F (d, i, s[i] * gain * range, adding_gain); | |
+ sl += n; | |
+ sr += n; | |
+ dl += n; | |
+ dr += n; | |
+ frames -= n; | |
+ remain -= n; | |
} | |
+ *ports[7] = lin2db(state); | |
} | |
/* //////////////////////////////////////////////////////////////////////// */ | |
@@ -101,51 +134,64 @@ Compress::one_cycle (int frames) | |
PortInfo | |
Compress::port_info [] = | |
{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "gain (dB)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 24} | |
- }, { | |
- "ratio (1:n)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MIN, 1, 10} | |
- }, { | |
- "attack (s)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MIN, .001, 1} | |
- }, { | |
- "release (s)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, .001, 1} | |
- }, { | |
- "threshold (dB)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, -30, 400} | |
- }, { | |
- "knee radius (dB)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 1, 10} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "measure", CTRL_IN, {INTEGER | DEFAULT_0, 0, 1}, "{0:'peak',1:'rms'}" }, | |
+ { "mode", CTRL_IN | GROUP, {INTEGER | DEFAULT_1, 0, 2}, | |
+ "{0:'no limiting',1:'saturating 2x',2:'saturating 4x',3:'saturating 4x128'}" }, | |
+ /* 2 */ | |
+ { "threshold", CTRL_IN | GROUP, {DEFAULT_MID, 0, 1} }, | |
+ { "strength", CTRL_IN, {DEFAULT_LOW, 0, 1} }, | |
+ { "attack", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} }, | |
+ { "release", CTRL_IN, {DEFAULT_MID, 0, 1} }, | |
+ /* 6 */ | |
+ { "gain (dB)", CTRL_IN | GROUP, {DEFAULT_MID, -12, 18} }, | |
+ { "state (dB)", CONTROL|OUTPUT| GROUP, {DEFAULT_0,-144,0} }, | |
+ | |
+ { "in", INPUT | AUDIO, {BOUNDED, -1, 1} }, | |
+ { "out", OUTPUT | AUDIO, {0} } | |
}; | |
template <> void | |
Descriptor<Compress>::setup() | |
{ | |
- UniqueID = 1772; | |
Label = "Compress"; | |
- Properties = HARD_RT; | |
- Name = CAPS "Compress - Mono compressor"; | |
- Maker = "Tim Goetze <tim@quitte.de>, Steve Harris <steve@plugin.org.uk>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Name = CAPS "Compress - Compressor and saturating limiter"; | |
+ Maker = "Tim Goetze <tim@quitte.de>"; | |
+ Copyright = "2011-14"; | |
+ | |
+ /* fill port info and vtable */ | |
+ autogen(); | |
+} | |
+ | |
+/* //////////////////////////////////////////////////////////////////////// */ | |
+ | |
+PortInfo | |
+CompressX2::port_info [] = | |
+{ | |
+ { "measure", CTRL_IN, {INTEGER | DEFAULT_0, 0, 1}, | |
+ "{0:'peak',1:'rms'}" }, | |
+ { "mode", CTRL_IN | GROUP, {INTEGER | DEFAULT_1, 0, 2}, | |
+ "{0:'linear',1:'saturating 2x',2:'saturating 4x',3:'saturating 4x128'}" }, | |
+ { "threshold", CTRL_IN | GROUP, {DEFAULT_MID, 0, 1} }, | |
+ { "strength", CTRL_IN, {DEFAULT_LOW, 0, 1} }, | |
+ { "attack", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} }, | |
+ { "release", CTRL_IN, {DEFAULT_MID, 0, 1} }, | |
+ { "gain (dB)", CTRL_IN | GROUP, {DEFAULT_MID, -12, 18} }, | |
+ { "state (dB)", CONTROL|OUTPUT| GROUP, {DEFAULT_0,-144,0} }, | |
+ { "in.l", INPUT | AUDIO }, | |
+ { "in.r", INPUT | AUDIO }, | |
+ { "out.l", OUTPUT | AUDIO }, | |
+ { "out.r", OUTPUT | AUDIO }, | |
+}; | |
+ | |
+template <> void | |
+Descriptor<CompressX2>::setup() | |
+{ | |
+ Label = "CompressX2"; | |
+ | |
+ Name = CAPS "CompressX2 - Stereo compressor and saturating limiter"; | |
+ Maker = "Tim Goetze <tim@quitte.de>"; | |
+ Copyright = "2011-14"; | |
/* fill port info and vtable */ | |
autogen(); | |
diff --git a/plugins/LadspaEffect/caps/Compress.h b/plugins/LadspaEffect/caps/Compress.h | |
index 2bd722c7e..074dffb4b 100644 | |
--- a/plugins/LadspaEffect/caps/Compress.h | |
+++ b/plugins/LadspaEffect/caps/Compress.h | |
@@ -1,17 +1,17 @@ | |
/* | |
Compress.h | |
- Copyright 2004-5 Tim Goetze <tim@quitte.de>, Steve Harris | |
+ Copyright 2013 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- mono compressor. | |
+ Dynamic range processing. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,54 +25,118 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _COMPRESS_H_ | |
-#define _COMPRESS_H_ | |
+#ifndef COMPRESS_H | |
+#define COMPRESS_H | |
-#include "dsp/RMS.h" | |
#include "dsp/util.h" | |
- | |
-class Compress | |
-: public Plugin | |
+#include "dsp/Compress.h" | |
+#include "dsp/polynomials.h" | |
+#include "dsp/FIR.h" | |
+#include "dsp/sinc.h" | |
+#include "dsp/windows.h" | |
+ | |
+template <int Over, int FIRSize> | |
+class CompSaturate | |
{ | |
public: | |
- double fs; | |
- sample_t f; | |
+ /* antialias filters */ | |
+ DSP::FIRUpsampler<FIRSize, Over> up; | |
+ DSP::FIRn<FIRSize> down; | |
- DSP::RMS rms; | |
- sample_t sum, amp, env, gain, gain_t; | |
+ public: | |
+ void init (double fs) | |
+ { | |
+ /* going a bit lower than nominal with fc */ | |
+ double f = .7 * M_PI/Over; | |
+ | |
+ DSP::sinc (f, up.c, FIRSize); | |
+ DSP::kaiser<DSP::apply_window> (up.c, FIRSize, 6.4); | |
+ | |
+ /* copy upsampler filter kernel for downsampler, make sum */ | |
+ double s = 0; | |
+ for (uint i = 0; i < FIRSize; ++i) | |
+ down.c[i] = up.c[i], | |
+ s += up.c[i]; | |
+ | |
+ s = 1/s; | |
- int count; | |
+ /* scale kernels for unity gain */ | |
+ for (uint i=0; i<FIRSize; ++i) | |
+ down.c[i] *= s; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ s *= Over; | |
+ for (uint i=0; i<FIRSize; ++i) | |
+ up.c[i] *= s; | |
+ } | |
- public: | |
- static PortInfo port_info []; | |
- void init() {} | |
- void activate() | |
- { | |
- rms.reset(); | |
+ sample_t process (sample_t x) | |
+ { | |
+ x = up.upsample (x); | |
+ x = DSP::Polynomial::tanh(x); | |
+ x = down.process (x); | |
- sum = 0; | |
- count = 0; | |
- | |
- amp = 0; | |
- env = 0; | |
+ for (int o = 1; o < Over; ++o) | |
+ down.store (DSP::Polynomial::atan1 (up.pad (o))); | |
- gain = 0; | |
- gain_t = 0; | |
+ return x; | |
} | |
+}; | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
+typedef CompSaturate<2,32> CompSat2; | |
+typedef CompSaturate<4,64> CompSat4; | |
+typedef CompSaturate<4,128> CompSat8; | |
+ | |
+template <int Channels> | |
+class CompressStub | |
+: public Plugin | |
+{ | |
+ public: | |
+ uint remain; | |
+ struct { | |
+ DSP::CompressPeak peak; | |
+ DSP::CompressRMS rms; | |
+ } compress; | |
+ | |
+ enum { Stereo = (Channels == 2) }; | |
+ | |
+ struct { | |
+ CompSat2 two; | |
+ CompSat4 four; | |
+ } saturate [Channels]; | |
+ | |
+ void cycle (uint frames); | |
+ template <class Comp> | |
+ void subcycle (uint frames, Comp & comp); | |
+ template <class Comp, class Sat> | |
+ void subsubcycle (uint frames, Comp & comp, Sat & satl, Sat & satr); | |
+ | |
+ public: | |
+ static PortInfo port_info []; | |
+ | |
+ void init() | |
{ | |
- one_cycle<adding_func> (n); | |
+ for (int i=0; i < Channels; ++i) | |
+ { | |
+ saturate[i].two.init(fs); | |
+ saturate[i].four.init(fs); | |
+ } | |
} | |
+ void activate(); | |
+}; | |
+ | |
+class Compress | |
+: public CompressStub<1> | |
+{ | |
+ public: | |
+ static PortInfo port_info []; | |
+}; | |
+ | |
+class CompressX2 | |
+: public CompressStub<2> | |
+{ | |
+ public: | |
+ static PortInfo port_info []; | |
}; | |
-#endif /* _COMPRESS_H_ */ | |
+#endif /* COMPRESS_H */ | |
diff --git a/plugins/LadspaEffect/caps/Descriptor.h b/plugins/LadspaEffect/caps/Descriptor.h | |
index 12c5d1c88..fb803ab35 100644 | |
--- a/plugins/LadspaEffect/caps/Descriptor.h | |
+++ b/plugins/LadspaEffect/caps/Descriptor.h | |
@@ -1,7 +1,7 @@ | |
/* | |
Descriptor.h | |
- Copyright 2004-10 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -17,7 +17,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -31,8 +31,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DESCRIPTOR_H_ | |
-#define _DESCRIPTOR_H_ | |
+#ifndef DESCRIPTOR_H | |
+#define DESCRIPTOR_H | |
#ifdef __SSE__ | |
#include <xmmintrin.h> | |
@@ -41,6 +41,21 @@ | |
#include <pmmintrin.h> | |
#endif | |
+/* not used */ | |
+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 | |
+} | |
+ | |
/* common stub for Descriptor makes it possible to delete() without special- | |
* casing for every plugin class. | |
*/ | |
@@ -48,10 +63,7 @@ class DescriptorStub | |
: public LADSPA_Descriptor | |
{ | |
public: | |
- DescriptorStub() | |
- { | |
- PortCount = 0; | |
- } | |
+ DescriptorStub() { memset(this,0,sizeof(*this)); } | |
~DescriptorStub() | |
{ | |
@@ -64,20 +76,6 @@ 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 | |
@@ -86,38 +84,43 @@ class Descriptor | |
LADSPA_PortRangeHint * ranges; | |
public: | |
- Descriptor() { setup(); } | |
- void setup(); | |
+ Descriptor (uint id) { UniqueID = id; setup(); } | |
+ void setup(); | |
+ /* setup() is in the plugin's .cc implementation file because it needs | |
+ * access to the port_info implementation, instantiating the following | |
+ * function: */ | |
void autogen() | |
{ | |
+ Properties = HARD_RT; | |
PortCount = (sizeof (T::port_info) / sizeof (PortInfo)); | |
- /* unroll PortInfo members */ | |
+ ImplementationData = T::port_info; | |
+ | |
+ /* convert PortInfo members to Descriptor properties */ | |
const char ** names = new const char * [PortCount]; | |
- LADSPA_PortDescriptor * desc = new LADSPA_PortDescriptor [PortCount]; | |
+ PortNames = names; | |
+ | |
+ LADSPA_PortDescriptor * desc = new LADSPA_PortDescriptor[PortCount]; | |
+ PortDescriptors = desc; | |
+ | |
ranges = new LADSPA_PortRangeHint [PortCount]; | |
+ PortRangeHints = ranges; | |
- /* could also assign directly but const_cast is ugly. */ | |
for (int i = 0; i < (int) PortCount; ++i) | |
{ | |
names[i] = T::port_info[i].name; | |
desc[i] = T::port_info[i].descriptor; | |
ranges[i] = T::port_info[i].range; | |
+ if (desc[i] & INPUT) | |
+ ranges[i].HintDescriptor |= BOUNDED; | |
} | |
- | |
- PortNames = names; | |
- PortDescriptors = desc; | |
- PortRangeHints = ranges; | |
- /* LADSPA_Descriptor vtable entries */ | |
+ /* Descriptor vtable */ | |
instantiate = _instantiate; | |
connect_port = _connect_port; | |
activate = _activate; | |
run = _run; | |
- run_adding = _run_adding; | |
- set_run_adding_gain = _set_run_adding_gain; | |
- deactivate = 0; | |
cleanup = _cleanup; | |
} | |
@@ -125,18 +128,18 @@ class Descriptor | |
const struct _LADSPA_Descriptor * d, ulong fs) | |
{ | |
T * plugin = new T(); | |
- int n = (int) d->PortCount; | |
LADSPA_PortRangeHint * ranges = ((Descriptor *) d)->ranges; | |
plugin->ranges = ranges; | |
+ int n = (int) d->PortCount; | |
plugin->ports = new sample_t * [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->over_fs = 1./fs; | |
plugin->normal = NOISE_FLOOR; | |
plugin->init(); | |
@@ -150,47 +153,31 @@ class Descriptor | |
static void _activate (LADSPA_Handle h) | |
{ | |
- T * plugin = (T *) h; | |
+ Plugin * plugin = (Plugin *) 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. | |
+ * activate(), it's safe to defer the actual call into | |
+ * the first run() after the host called activate(). | |
* | |
* It's the simplest way to prevent a parameter smoothing sweep | |
* in the first audio block after activation. | |
+ * | |
+ * While it would be preferable to set up the plugin's internal | |
+ * state from the current set of parameters, ladspa.h allows hosts to | |
+ * call activate() without even having connected the inputs, so that | |
+ * is out of the question. | |
plugin->activate(); | |
*/ | |
} | |
static void _run (LADSPA_Handle h, ulong 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; | |
- } | |
+ if (!n) return; | |
- plugin->run (n); | |
- plugin->normal = -plugin->normal; | |
- } | |
- | |
- static void _run_adding (LADSPA_Handle h, ulong 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) | |
@@ -199,24 +186,17 @@ class Descriptor | |
plugin->first_run = 0; | |
} | |
- plugin->run_adding (n); | |
+ plugin->cycle (n); | |
plugin->normal = -plugin->normal; | |
} | |
- static void _set_run_adding_gain (LADSPA_Handle h, LADSPA_Data g) | |
- { | |
- T * plugin = (T *) h; | |
- | |
- plugin->adding_gain = g; | |
- } | |
- | |
static void _cleanup (LADSPA_Handle h) | |
{ | |
- T * plugin = (T *) h; | |
+ Plugin * plugin = (Plugin *) h; | |
delete [] plugin->ports; | |
delete plugin; | |
} | |
}; | |
-#endif /* _DESCRIPTOR_H_ */ | |
+#endif /* DESCRIPTOR_H */ | |
diff --git a/plugins/LadspaEffect/caps/Eq.cc b/plugins/LadspaEffect/caps/Eq.cc | |
index dabd1b183..8d9ec729d 100644 | |
--- a/plugins/LadspaEffect/caps/Eq.cc | |
+++ b/plugins/LadspaEffect/caps/Eq.cc | |
@@ -1,17 +1,17 @@ | |
/* | |
Eq.cc | |
- Copyright 2002-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-14 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- 10-band octave-spread equalizer. | |
+ Various equaliser plugins. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,8 +25,10 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
+/* todo: Eq5p -- 20-400, 60-1k, 150-2.5k, 500-8k, 1k-20k */ | |
+ | |
#include "basics.h" | |
-#include <stdio.h> | |
+#include "dsp/Sine.h" | |
#include "Eq.h" | |
#include "Descriptor.h" | |
@@ -47,38 +49,35 @@ adjust_gain (int i, double g) | |
return g * adjust[i]; | |
} | |
-#define Q 1.414 | |
+#define Eq10Q 1.2 | |
void | |
-Eq::init() | |
+Eq10::init() | |
{ | |
- eq.init (fs, Q); | |
+ eq.init (fs, Eq10Q); | |
} | |
void | |
-Eq::activate() | |
+Eq10::activate() | |
{ | |
for (int i = 0; i < 10; ++i) | |
{ | |
- gain[i] = getport (1 + i); | |
- eq.gain[i] = adjust_gain (i, DSP::db2lin (gain[i])); | |
+ gain[i] = getport(i); | |
+ eq.gain[i] = adjust_gain (i, db2lin (gain[i])); | |
eq.gf[i] = 1; | |
} | |
} | |
-template <sample_func_t F> | |
void | |
-Eq::one_cycle (int frames) | |
+Eq10::cycle (uint frames) | |
{ | |
- sample_t * s = ports[0]; | |
- | |
/* 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) | |
{ | |
- sample_t g = getport (1 + i); | |
+ sample_t g = getport(i); | |
if (g == gain[i]) | |
{ | |
/* no gain factoring */ | |
@@ -87,17 +86,18 @@ Eq::one_cycle (int frames) | |
} | |
gain[i] = g; | |
- double want = adjust_gain (i, DSP::db2lin (g)); | |
+ double want = adjust_gain (i, db2lin (g)); | |
eq.gf[i] = pow (want / eq.gain[i], one_over_n); | |
} | |
+ sample_t * s = ports[10]; | |
sample_t * d = ports[11]; | |
- for (int i = 0; i < frames; ++i) | |
+ for (uint i = 0; i < frames; ++i) | |
{ | |
sample_t x = s[i]; | |
x = eq.process (x); | |
- F (d, i, x, adding_gain); | |
+ d[i] = x; | |
} | |
eq.normal = -normal; | |
@@ -107,69 +107,31 @@ Eq::one_cycle (int frames) | |
/* //////////////////////////////////////////////////////////////////////// */ | |
PortInfo | |
-Eq::port_info [] = | |
+Eq10::port_info [] = | |
{ | |
- { | |
- "in", | |
- 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", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ {"31 Hz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"63 Hz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"125 Hz", CTRL_IN | GROUP, {DEFAULT_0, -48, 24}}, | |
+ {"250 Hz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"500 Hz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"1 kHz", CTRL_IN | GROUP, {DEFAULT_0, -48, 24}}, | |
+ {"2 kHz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"4 kHz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"8 kHz", CTRL_IN | GROUP, {DEFAULT_0, -48, 24}}, | |
+ {"16 kHz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ | |
+ {"in", INPUT | AUDIO}, | |
+ {"out", OUTPUT | AUDIO} | |
}; | |
template <> void | |
-Descriptor<Eq>::setup() | |
+Descriptor<Eq10>::setup() | |
{ | |
- UniqueID = 1773; | |
- Label = "Eq"; | |
- Properties = HARD_RT; | |
+ Label = "Eq10"; | |
- Name = CAPS "Eq - 10-band equalizer"; | |
+ Name = CAPS "Eq10 - 10-band equaliser"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2004-13"; | |
/* fill port info and vtable */ | |
autogen(); | |
@@ -178,31 +140,30 @@ Descriptor<Eq>::setup() | |
/* //////////////////////////////////////////////////////////////////////// */ | |
void | |
-Eq2x2::init() | |
+Eq10X2::init() | |
{ | |
for (int c = 0; c < 2; ++c) | |
- eq[c].init (fs, Q); | |
+ eq[c].init (fs, Eq10Q); | |
} | |
void | |
-Eq2x2::activate() | |
+Eq10X2::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])); | |
+ gain[i] = getport(i); | |
+ double a = adjust_gain (i, 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) | |
+Eq10X2::cycle (uint frames) | |
{ | |
/* evaluate band gain changes and compute recursion factor to prevent | |
* zipper noise */ | |
@@ -212,15 +173,15 @@ Eq2x2::one_cycle (int frames) | |
{ | |
double a; | |
- if (*ports [2 + i] == gain[i]) | |
+ if (*ports[i] == gain[i]) | |
/* still same value, no gain fade */ | |
a = 1; | |
else | |
{ | |
- gain[i] = getport (2 + i); | |
+ gain[i] = getport(i); | |
/* prepare factor for logarithmic gain fade */ | |
- a = adjust_gain (i, DSP::db2lin (gain[i])); | |
+ a = adjust_gain (i, db2lin (gain[i])); | |
a = pow (a / eq[0].gain[i], one_over_n); | |
} | |
@@ -231,14 +192,14 @@ Eq2x2::one_cycle (int frames) | |
for (int c = 0; c < 2; ++c) | |
{ | |
sample_t | |
- * s = ports[c], | |
+ * s = ports[10 + c], | |
* d = ports[12 + c]; | |
- for (int i = 0; i < frames; ++i) | |
+ for (uint i = 0; i < frames; ++i) | |
{ | |
sample_t x = s[i]; | |
x = eq[c].process (x); | |
- F (d, i, x, adding_gain); | |
+ d[i] = x; | |
} | |
} | |
@@ -251,77 +212,189 @@ Eq2x2::one_cycle (int frames) | |
} | |
PortInfo | |
-Eq2x2::port_info [] = | |
+Eq10X2::port_info [] = | |
+{ | |
+ {"31 Hz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"63 Hz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"125 Hz", CTRL_IN | GROUP, {DEFAULT_0, -48, 24}}, | |
+ {"250 Hz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"500 Hz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"1 kHz", CTRL_IN | GROUP, {DEFAULT_0, -48, 24}}, | |
+ {"2 kHz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"4 kHz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ {"8 kHz", CTRL_IN | GROUP, {DEFAULT_0, -48, 24}}, | |
+ {"16 kHz", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ | |
+ {"in.l", INPUT | AUDIO}, | |
+ {"in.r", INPUT | AUDIO}, | |
+ {"out.l", OUTPUT | AUDIO}, | |
+ {"out.r", OUTPUT | AUDIO} | |
+}; | |
+ | |
+template <> void | |
+Descriptor<Eq10X2>::setup() | |
+{ | |
+ Label = "Eq10X2"; | |
+ | |
+ Name = CAPS "Eq10X2 - Stereo 10-band equaliser"; | |
+ Maker = "Tim Goetze <tim@quitte.de>"; | |
+ Copyright = "2004-13"; | |
+ | |
+ /* fill port info and vtable */ | |
+ autogen(); | |
+} | |
+ | |
+/* //////////////////////////////////////////////////////////////////////// */ | |
+ | |
+void | |
+Eq4p::init() | |
+{ | |
+ /* limit filter frequency to slightly under Nyquist to be on the safe side */ | |
+ float limit = .48*fs; | |
+ for (int i = 0; i < 4; ++i) | |
+ { | |
+ state[i].f = -1; /* ensure all coefficients updated */ | |
+ ranges[4*i + 1].UpperBound = min(ranges[4*i + 1].UpperBound, limit); | |
+ } | |
+} | |
+ | |
+void | |
+Eq4p::activate() | |
+{ | |
+ filter[0].reset(); | |
+ filter[1].reset(); | |
+ | |
+ updatestate(); | |
+ filter[0] = filter[1]; | |
+ xfade = false; | |
+} | |
+ | |
+typedef struct {sample_t a[3], b[3];} IIR2_ab; | |
+ | |
+void | |
+Eq4p::updatestate() | |
{ | |
+ for (int i=0; i<4; ++i) | |
{ | |
- "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} | |
+ sample_t mode = getport(i*4); | |
+ sample_t f = getport(i*4 + 1); | |
+ sample_t Q = getport(i*4 + 2); | |
+ sample_t gain = getport(i*4 + 3); | |
+ | |
+ if (mode==state[i].mode && gain==state[i].gain && f==state[i].f && Q==state[i].Q) | |
+ continue; | |
+ | |
+ xfade = true; | |
+ | |
+ state[i].mode = mode; | |
+ state[i].Q = Q; | |
+ state[i].f = f; | |
+ state[i].gain = gain; | |
+ | |
+ IIR2_ab c; | |
+ | |
+ f *= over_fs; | |
+ /* Zoelzer shelve: H(s) = (A*s^2 + s*(sqrt(A)/Q) + 1) / (s^2 + s/Q + 1) */ | |
+ /* maxima: solve([a/(1-b*0)=.5,a/(1-b)=50,a/(1-b*x)=.707],[a,b,x]); */ | |
+ Q = .5/(1-.99*Q); | |
+ if (mode < 0) | |
+ c.a[0]=1,c.a[1]=0,c.a[2]=0,c.b[1]=0,c.b[2]=0; /* off = identity filter */ | |
+ else if (mode < 0.5) | |
+ DSP::RBJ::LoShelve (f,Q,gain,c); | |
+ else if (mode < 1.5) | |
+ DSP::RBJ::PeakingEQ (f,Q,gain,c); | |
+ else /* if (mode < 2.5) */ | |
+ DSP::RBJ::HiShelve (f,Q,gain,c); | |
+ | |
+ filter[1].set_ab (i, c.a, c.b); | |
} | |
+} | |
+ | |
+void | |
+Eq4p::cycle (uint frames) | |
+{ | |
+ *ports[16] = 3; /* _latency */ | |
+ | |
+ sample_t * s = ports[17]; | |
+ sample_t * d = ports[18]; | |
+ | |
+ updatestate(); | |
+ | |
+ if (!xfade) | |
+ { | |
+ for (uint i = 0; i < frames; ++i) | |
+ { | |
+ sample_t x = s[i] + normal; | |
+ x = filter[0].seriesprocess(x); | |
+ d[i] = x; | |
+ } | |
+ } | |
+ else | |
+ { | |
+ float over_n = frames ? 1./frames : 1; | |
+ DSP::Sine gf0 (.5*M_PI*over_n,.5*M_PI); | |
+ DSP::Sine gf1 (.5*M_PI*over_n,0); | |
+ for (uint i = 0; i < frames; ++i) | |
+ { | |
+ sample_t x = s[i]; | |
+ sample_t g0 = gf0.get(); | |
+ sample_t g1 = gf1.get(); | |
+ x = g0*g0*filter[0].seriesprocess(x) + g1*g1*filter[1].seriesprocess(x); | |
+ d[i] = x; | |
+ } | |
+ | |
+ filter[0] = filter[1]; | |
+ filter[1].reset(); | |
+ xfade = false; | |
+ } | |
+} | |
+ | |
+/* //////////////////////////////////////////////////////////////////////// */ | |
+ | |
+static const char * Eq4pBandModes = "{-1:'off',0:'lowshelve',1:'band',2:'hishelve'}"; | |
+ | |
+PortInfo | |
+Eq4p::port_info [] = | |
+{ | |
+ {"a.mode", CTRL_IN, {DEFAULT_0 | INTEGER, -1,2}, Eq4pBandModes}, | |
+ {"a.f (Hz)", CTRL_IN, {DEFAULT_LOW | LOG, 20, 14000}}, | |
+ {"a.Q", CTRL_IN, {DEFAULT_LOW, 0, 1}}, | |
+ {"a.gain (dB)", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ | |
+ /* 4 */ | |
+ {"b.mode", CTRL_IN | GROUP, {DEFAULT_1 | INTEGER, -1,2}, Eq4pBandModes}, | |
+ {"b.f (Hz)", CTRL_IN, {DEFAULT_MID | LOG, 20, 14000}}, | |
+ {"b.Q", CTRL_IN, {DEFAULT_MID, 0, 1}}, | |
+ {"b.gain (dB)", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ | |
+ /* 8 */ | |
+ {"c.mode", CTRL_IN | GROUP, {DEFAULT_1 | INTEGER, -1,2}, Eq4pBandModes}, | |
+ {"c.f (Hz)", CTRL_IN, {DEFAULT_MID | LOG, 20, 14000}}, | |
+ {"c.Q", CTRL_IN, {DEFAULT_LOW, 0, 1}}, | |
+ {"c.gain (dB)", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ | |
+ /* 12 */ | |
+ {"d.mode", CTRL_IN | GROUP, {DEFAULT_MAX | INTEGER, -1,2}, Eq4pBandModes}, | |
+ {"d.f (Hz)", CTRL_IN, {DEFAULT_HIGH | LOG, 20, 14000}}, | |
+ {"d.Q", CTRL_IN, {DEFAULT_LOW, 0, 1}}, | |
+ {"d.gain (dB)", CTRL_IN, {DEFAULT_0, -48, 24}}, | |
+ | |
+ /* 16 */ | |
+ {"_latency", OUTPUT|CONTROL|GROUP, {INTEGER|DEFAULT_MAX,3,3}, "{3:'3 samples'}"}, | |
+ | |
+ /* 17 */ | |
+ {"in", INPUT | AUDIO, {0, -1, 1}}, | |
+ {"out", OUTPUT | AUDIO, {0}} | |
}; | |
template <> void | |
-Descriptor<Eq2x2>::setup() | |
+Descriptor<Eq4p>::setup() | |
{ | |
- UniqueID = 2594; | |
- Label = "Eq2x2"; | |
- Properties = HARD_RT; | |
+ Label = "Eq4p"; | |
- Name = CAPS "Eq2x2 - stereo 10-band equalizer"; | |
+ Name = CAPS "Eq4p - 4-band parametric shelving equaliser"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2013-14"; | |
/* fill port info and vtable */ | |
autogen(); | |
@@ -329,7 +402,154 @@ Descriptor<Eq2x2>::setup() | |
/* //////////////////////////////////////////////////////////////////////// */ | |
-/* | |
- todo: parametric -- 20-400, 60-1k, 150-2.5k, 500-8k, 1k-20k | |
- bandwidth 0-2 octaves | |
- */ | |
+void | |
+EqFA4p::init() | |
+{ | |
+ /* limit filter frequency to slightly under Nyquist to be on the safe side */ | |
+ float limit = .48*fs; | |
+ for (int i = 0; i < 4; ++i) | |
+ { | |
+ state[i].f = -1; /* ensure all coefficients updated */ | |
+ ranges[4*i + 1].UpperBound = min(ranges[4*i + 1].UpperBound, limit); | |
+ } | |
+} | |
+ | |
+void | |
+EqFA4p::activate() | |
+{ | |
+ filter[0].reset(); | |
+ filter[1].reset(); | |
+ | |
+ updatestate(); | |
+ filter[0] = filter[1]; | |
+ xfade = false; | |
+ gain = db2lin(getport(16)); | |
+} | |
+ | |
+void | |
+EqFA4p::updatestate() | |
+{ | |
+ for (int i=0; i<4; ++i) | |
+ { | |
+ sample_t mode = getport(i*4 + 0); | |
+ sample_t f = getport(i*4 + 1); | |
+ sample_t bw = getport(i*4 + 2); | |
+ sample_t gain = getport(i*4 + 3); | |
+ | |
+ if (mode==state[i].mode && gain==state[i].gain && f==state[i].f && bw==state[i].bw) | |
+ continue; | |
+ | |
+ xfade = true; | |
+ | |
+ state[i].mode = mode; | |
+ state[i].bw = bw; | |
+ state[i].f = f; | |
+ state[i].gain = gain; | |
+ | |
+ if (!mode) | |
+ filter[1].unity(i); | |
+ else | |
+ filter[1].set(i, f*over_fs, bw, db2lin(gain)); | |
+ } | |
+} | |
+ | |
+void | |
+EqFA4p::cycle (uint frames) | |
+{ | |
+ updatestate(); | |
+ | |
+ sample_t g = db2lin(getport(16)); | |
+ sample_t over_n = frames ? 1./frames : 1; | |
+ sample_t gf = pow(g/gain, over_n); | |
+ | |
+ *ports[17] = 3; /* _latency */ | |
+ sample_t * s = ports[18]; | |
+ sample_t * d = ports[19]; | |
+ | |
+ if (!xfade) | |
+ { | |
+ for (uint i = 0; i < frames; ++i) | |
+ { | |
+ sample_t x = s[i]; | |
+ x = filter[0].seriesprocess(x); | |
+ x = gain*x; | |
+ gain *= gf; | |
+ d[i] = x; | |
+ } | |
+ } | |
+ else | |
+ { | |
+ DSP::Sine gf0 (.5*M_PI*over_n,.5*M_PI); | |
+ DSP::Sine gf1 (.5*M_PI*over_n,0); | |
+ for (uint i = 0; i < frames; ++i) | |
+ { | |
+ sample_t x = s[i]; | |
+ sample_t g0 = gf0.get(); | |
+ sample_t g1 = gf1.get(); | |
+ x = g0*g0*filter[0].seriesprocess(x) + g1*g1*filter[1].seriesprocess(x); | |
+ x = gain*x; | |
+ gain *= gf; | |
+ d[i] = x; | |
+ } | |
+ | |
+ filter[0] = filter[1]; | |
+ filter[1].reset(); | |
+ xfade = false; | |
+ } | |
+} | |
+ | |
+/* //////////////////////////////////////////////////////////////////////// */ | |
+ | |
+static const char * EqFA4pBandModes = "{0:'off',1:'on'}"; | |
+ | |
+PortInfo | |
+EqFA4p::port_info [] = | |
+{ | |
+ {"a.act", CTRL_IN | GROUP, {DEFAULT_0 | INTEGER, 0,1}, EqFA4pBandModes}, | |
+ {"a.f (Hz)", CTRL_IN, {DEFAULT_LOW | LOG, 20, 14000}}, | |
+ {"a.bw", CTRL_IN, {DEFAULT_1, .125, 8}}, | |
+ {"a.gain (dB)", CTRL_IN, {DEFAULT_0, -24, 24}}, | |
+ | |
+ /* 4 */ | |
+ {"b.act", CTRL_IN | GROUP, {DEFAULT_0 | INTEGER, 0,1}, EqFA4pBandModes}, | |
+ {"b.f (Hz)", CTRL_IN, {DEFAULT_MID | LOG, 20, 14000}}, | |
+ {"b.bw", CTRL_IN, {DEFAULT_1, .125, 8}}, | |
+ {"b.gain (dB)", CTRL_IN, {DEFAULT_0, -24, 24}}, | |
+ | |
+ /* 8 */ | |
+ {"c.act", CTRL_IN | GROUP, {DEFAULT_0 | INTEGER, 0,1}, EqFA4pBandModes}, | |
+ {"c.f (Hz)", CTRL_IN, {DEFAULT_MID | LOG, 20, 14000}}, | |
+ {"c.bw", CTRL_IN, {DEFAULT_1, .125, 8}}, | |
+ {"c.gain (dB)", CTRL_IN, {DEFAULT_0, -24, 24}}, | |
+ | |
+ /* 12 */ | |
+ {"d.act", CTRL_IN | GROUP, {DEFAULT_0 | INTEGER, 0,1}, EqFA4pBandModes}, | |
+ {"d.f (Hz)", CTRL_IN, {DEFAULT_HIGH | LOG, 20, 14000}}, | |
+ {"d.bw", CTRL_IN, {DEFAULT_1, .125, 8}}, | |
+ {"d.gain (dB)", CTRL_IN, {DEFAULT_0, -24, 24}}, | |
+ | |
+ /* 16 */ | |
+ {"gain", CTRL_IN|GROUP, {DEFAULT_0, -24, 24}}, | |
+ | |
+ /* 17 */ | |
+ {"_latency", OUTPUT|CONTROL|GROUP, {INTEGER|DEFAULT_MAX,3,3}, "{3:'3 samples'}"}, | |
+ | |
+ /* 18 */ | |
+ {"in", INPUT | AUDIO}, | |
+ {"out", OUTPUT | AUDIO} | |
+}; | |
+ | |
+template <> void | |
+Descriptor<EqFA4p>::setup() | |
+{ | |
+ Label = "EqFA4p"; | |
+ | |
+ Name = CAPS "EqFA4p - 4-band parametric eq"; | |
+ Maker = "Tim Goetze <tim@quitte.de>"; | |
+ Copyright = "2014"; | |
+ | |
+ /* fill port info and vtable */ | |
+ autogen(); | |
+} | |
+ | |
+ | |
diff --git a/plugins/LadspaEffect/caps/Eq.h b/plugins/LadspaEffect/caps/Eq.h | |
index 3532b958f..57666c548 100644 | |
--- a/plugins/LadspaEffect/caps/Eq.h | |
+++ b/plugins/LadspaEffect/caps/Eq.h | |
@@ -1,17 +1,17 @@ | |
/* | |
Eq.h | |
- Copyright 2004-5 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- equalizer circuit using recursive filtering. | |
+ IIR equalisation filters. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,15 +25,18 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _EQ_H_ | |
-#define _EQ_H_ | |
+#ifndef EQ_H | |
+#define EQ_H | |
#include "dsp/util.h" | |
#include "dsp/Eq.h" | |
-#include "dsp/BiQuad.h" | |
+#include "dsp/IIR2.h" | |
#include "dsp/RBJ.h" | |
+#include "dsp/v4f.h" | |
+#include "dsp/v4f_IIR2.h" | |
-class Eq | |
+/* octave-band variants, mono and stereo */ | |
+class Eq10 | |
: public Plugin | |
{ | |
public: | |
@@ -43,51 +46,72 @@ class Eq | |
int block; | |
enum { BlockSize = 64 }; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint 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 Eq2x2 | |
+class Eq10X2 | |
: public Plugin | |
{ | |
public: | |
sample_t gain[10]; | |
DSP::Eq<10> eq[2]; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
+ | |
+ public: | |
+ static PortInfo port_info []; | |
+ | |
+ void init(); | |
+ void activate(); | |
+}; | |
+ | |
+/* 4-way parametric, parallel implementation */ | |
+class Eq4p | |
+: public Plugin | |
+{ | |
+ public: | |
+ struct {sample_t mode,gain,f,Q;} state[4]; /* parameters */ | |
+ | |
+ DSP::IIR2v4 filter[2]; | |
+ | |
+ bool xfade; | |
+ void updatestate(); | |
+ | |
+ void cycle (uint frames); | |
public: | |
static PortInfo port_info []; | |
void init(); | |
void activate(); | |
+}; | |
+ | |
+/* 4-way parametric, parallel implementation */ | |
+class EqFA4p | |
+: public Plugin | |
+{ | |
+ public: | |
+ struct {sample_t mode,gain,f,bw;} state[4]; /* parameters */ | |
+ | |
+ DSP::MREqv4 filter[2]; | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
+ bool xfade; | |
+ void updatestate(); | |
+ sample_t gain; | |
+ | |
+ void cycle (uint frames); | |
+ | |
+ public: | |
+ static PortInfo port_info []; | |
+ | |
+ void init(); | |
+ void activate(); | |
}; | |
-#endif /* _EQ_H_ */ | |
+#endif /* EQ_H */ | |
diff --git a/plugins/LadspaEffect/caps/Pan.cc b/plugins/LadspaEffect/caps/Pan.cc | |
index 0449f616b..b83cf1372 100644 | |
--- a/plugins/LadspaEffect/caps/Pan.cc | |
+++ b/plugins/LadspaEffect/caps/Pan.cc | |
@@ -5,14 +5,14 @@ | |
http://quitte.de/dsp/ | |
- panorama with width control, | |
- stereo image width reduction | |
+ Stereo image synthesis (inspired by the Orban 245F unit) | |
+ and manipulation. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -27,134 +27,92 @@ | |
*/ | |
#include "basics.h" | |
+#include "dsp/RBJ.h" | |
#include "Pan.h" | |
#include "Descriptor.h" | |
void | |
-Pan::init() | |
+Wider::init() | |
{ | |
- delay.init ((int) (.040 * fs)); | |
+ pan = FLT_MAX; /* invalid setting to make sure gain is updated */ | |
} | |
void | |
-Pan::activate() | |
+Wider::activate() | |
{ | |
- delay.reset(); | |
- tap.reset (400 / fs); | |
- set_pan (getport (1)); | |
+ set_pan (getport(1)); | |
+ float fc[3] = { 150, 900, 5000 }; | |
+ for (int i = 0; i < 3; ++i) | |
+ DSP::RBJ::AllPass (fc[i]*over_fs, .707, ap[i]); | |
} | |
inline void | |
-Pan::set_pan (sample_t p) | |
+Wider::set_pan (sample_t p) | |
{ | |
- pan = p; | |
- | |
- double phi = (pan + 1) * M_PI * .25; | |
+ if (pan == p) return; | |
- gain_l = cos (phi); | |
- gain_r = sin (phi); | |
+ pan = p; | |
+ double phi = (pan + 1)*M_PI*.25; | |
+ gain_l = cos(phi); | |
+ gain_r = sin(phi); | |
} | |
-template <sample_func_t F> | |
void | |
-Pan::one_cycle (int frames) | |
+Wider::cycle (uint frames) | |
{ | |
- sample_t * s = ports[0]; | |
- | |
- if (pan != *ports[1]) | |
- set_pan (getport(1)); | |
- | |
- sample_t g = getport(2); | |
- sample_t | |
- width_l = g * gain_r, | |
- width_r = g * gain_l; | |
- | |
- tap.t = (int) (getport(3) * fs * .001); | |
- | |
- bool mono = getport(4); | |
- | |
- sample_t * dl = ports[5]; | |
- sample_t * dr = ports[6]; | |
- | |
- sample_t x, xt; | |
+ sample_t p = getport(0); | |
+ if (p != pan) set_pan (p); | |
- if (mono) for (int i = 0; i < frames; ++i) | |
- { | |
- x = s[i]; | |
- | |
- xt = tap.get (delay); | |
+ sample_t width = getport(1); | |
- delay.put (x + normal); | |
+ /* need to limit width as pan increases in order to prevent | |
+ * excessive phase cancellation */ | |
+ width *= 1 - fabs (p); | |
+ width *= width; | |
- x = (gain_l * x + gain_r * x + width_l * xt + width_r * xt) * .5; | |
+ sample_t * src = ports[2]; | |
+ sample_t * dl = ports[3]; | |
+ sample_t * dr = ports[4]; | |
- F (dl, i, x, adding_gain); | |
- F (dr, i, x, adding_gain); | |
- | |
- normal = -normal; | |
- } | |
- else /* stereo */ for (int i = 0; i < frames; ++i) | |
+ for (uint i = 0; i < frames; ++i) | |
{ | |
- x = s[i]; | |
- | |
- xt = tap.get (delay); | |
- | |
- delay.put (x + normal); | |
- | |
- F (dl, i, gain_l * x + width_l * xt, adding_gain); | |
- F (dr, i, gain_r * x + width_r * xt, adding_gain); | |
- | |
- normal = -normal; | |
+ sample_t m = .707*src[i] + normal; | |
+ sample_t s = m; | |
+ s = ap[0].process(s); | |
+ s = ap[1].process(s); | |
+ s = ap[2].process(s); | |
+ | |
+ s *= width; | |
+ | |
+ sample_t l = m - s; | |
+ sample_t r = m + s; | |
+ dl[i] = gain_l*l; | |
+ dr[i] = gain_r*r; | |
} | |
} | |
/* //////////////////////////////////////////////////////////////////////// */ | |
PortInfo | |
-Pan::port_info [] = | |
+Wider::port_info [] = | |
{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {0} | |
- }, { | |
- "pan", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, -1, 1} | |
- }, { | |
- "width", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0, 0, 1} | |
- }, { | |
- "t", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0.1, 40} | |
- }, { | |
- "mono", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_0 | INTEGER | TOGGLE, 0, 1} | |
- }, { | |
- "out:l", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "out:r", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "pan", INPUT | CONTROL, {DEFAULT_0, -1, 1} }, | |
+ { "width", INPUT | CONTROL, {DEFAULT_1, 0, 1} }, | |
+ | |
+ { "in", INPUT | AUDIO }, | |
+ { "out.l", OUTPUT | AUDIO }, | |
+ { "out.r", OUTPUT | AUDIO } | |
}; | |
template <> void | |
-Descriptor<Pan>::setup() | |
+Descriptor<Wider>::setup() | |
{ | |
- UniqueID = 1788; | |
- Label = "Pan"; | |
- Properties = HARD_RT; | |
+ Label = "Wider"; | |
- Name = CAPS "Pan - Pan and width"; | |
+ Name = CAPS "Wider - Stereo image synthesis"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2011-13"; | |
/* fill port info and vtable */ | |
autogen(); | |
@@ -163,46 +121,55 @@ Descriptor<Pan>::setup() | |
/* //////////////////////////////////////////////////////////////////////// */ | |
void | |
-Narrower::init() | |
-{ | |
-} | |
- | |
-void | |
-Narrower::activate() | |
-{ | |
-} | |
- | |
-template <sample_func_t F> | |
-void | |
-Narrower::one_cycle (int frames) | |
+Narrower::cycle (uint frames) | |
{ | |
- sample_t * sl = ports[0]; | |
- sample_t * sr = ports[1]; | |
- | |
- if (strength != *ports[2]) | |
- strength = *ports[2]; | |
- | |
- sample_t * dl = ports[3]; | |
- sample_t * dr = ports[4]; | |
+ float mode = getport(0); | |
+ strength = getport(1); | |
- double xl, xr, m; | |
- double dry = 1 - strength, wet = strength; | |
+ sample_t * sl = ports[2]; | |
+ sample_t * sr = ports[3]; | |
+ sample_t * dl = ports[4]; | |
+ sample_t * dr = ports[5]; | |
- for (int i = 0; i < frames; ++i) | |
+ if (mode) | |
{ | |
- xl = sl[i]; | |
- xr = sr[i]; | |
- | |
- m = wet * (xl + xr) * .5; | |
- | |
- xl *= dry; | |
- xr *= dry; | |
- | |
- xl += m; | |
- xr += m; | |
- | |
- F (dl, i, xl, adding_gain); | |
- F (dr, i, xr, adding_gain); | |
+ for (uint i = 0; i < frames; ++i) | |
+ { | |
+ sample_t xl = sl[i]; | |
+ sample_t xr = sr[i]; | |
+ | |
+ sample_t m = xl + xr, s = xl - xr; | |
+ | |
+ m += strength * s; | |
+ s *= (1 - strength); | |
+ | |
+ xl = .5 * (m + s); | |
+ xr = .5 * (m - s); | |
+ | |
+ dl[i] = xl; | |
+ dr[i] = xr; | |
+ } | |
+ } | |
+ else | |
+ { | |
+ sample_t dry = 1 - strength, wet = strength; | |
+ | |
+ for (uint i = 0; i < frames; ++i) | |
+ { | |
+ sample_t xl = sl[i]; | |
+ sample_t xr = sr[i]; | |
+ | |
+ sample_t m = wet * (xl + xr) * .5; | |
+ | |
+ xl *= dry; | |
+ xr *= dry; | |
+ | |
+ xl += m; | |
+ xr += m; | |
+ | |
+ dl[i] = xl; | |
+ dr[i] = xr; | |
+ } | |
} | |
} | |
@@ -211,39 +178,24 @@ Narrower::one_cycle (int frames) | |
PortInfo | |
Narrower::port_info [] = | |
{ | |
- { | |
- "in:l", | |
- INPUT | AUDIO, | |
- {0} | |
- }, { | |
- "in:r", | |
- INPUT | AUDIO, | |
- {0} | |
- }, { | |
- "strength", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "out:l", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "out:r", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "mode", INPUT | CONTROL, {INTEGER | DEFAULT_0, 0, 1}, | |
+ "{0:'crossfeed mixing',1:'mid/side processing',}" }, | |
+ { "strength", INPUT | CONTROL | GROUP, {DEFAULT_LOW, 0, 1} }, | |
+ | |
+ { "in.l", INPUT | AUDIO }, | |
+ { "in.r", INPUT | AUDIO }, | |
+ { "out.l", OUTPUT | AUDIO }, | |
+ { "out.r", OUTPUT | AUDIO } | |
}; | |
template <> void | |
Descriptor<Narrower>::setup() | |
{ | |
- UniqueID = 2595; | |
Label = "Narrower"; | |
- Properties = HARD_RT; | |
Name = CAPS "Narrower - Stereo image width reduction"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2011"; | |
+ Copyright = "2011-12"; | |
/* fill port info and vtable */ | |
autogen(); | |
diff --git a/plugins/LadspaEffect/caps/Pan.h b/plugins/LadspaEffect/caps/Pan.h | |
index 469ccb192..d2191b4f7 100644 | |
--- a/plugins/LadspaEffect/caps/Pan.h | |
+++ b/plugins/LadspaEffect/caps/Pan.h | |
@@ -5,14 +5,14 @@ | |
http://quitte.de/dsp/ | |
- panorama with width control, | |
+ Panorama with width synthesis, | |
stereo image width reduction | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -26,31 +26,13 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _PAN_H_ | |
-#define _PAN_H_ | |
+#ifndef PAN_H | |
+#define PAN_H | |
#include "dsp/Delay.h" | |
-#include "dsp/OnePole.h" | |
+#include "dsp/IIR2.h" | |
-class PanTap | |
-{ | |
- public: | |
- int t; | |
- DSP::OnePoleLP damper; | |
- | |
- sample_t get (DSP::Delay & delay) | |
- { | |
- return damper.process (delay[t]); | |
- } | |
- | |
- void reset (double c) | |
- { | |
- damper.set_f (c); | |
- damper.reset(); | |
- } | |
-}; | |
- | |
-class Pan | |
+class Wider | |
: public Plugin | |
{ | |
public: | |
@@ -58,11 +40,9 @@ class Pan | |
sample_t gain_l, gain_r; | |
- DSP::Delay delay; | |
- PanTap tap; | |
+ DSP::IIR2<sample_t> ap[3]; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
inline void set_pan (sample_t); | |
@@ -71,16 +51,6 @@ class Pan | |
void init(); | |
void activate(); | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
}; | |
/* stereo width reduction */ | |
@@ -90,25 +60,13 @@ class Narrower | |
public: | |
sample_t strength; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint 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); | |
- } | |
- | |
+ void init() {} | |
+ void activate() {} | |
}; | |
-#endif /* _PAN_H_ */ | |
+#endif /* PAN_H */ | |
diff --git a/plugins/LadspaEffect/caps/Phaser.cc b/plugins/LadspaEffect/caps/Phaser.cc | |
index b0116b448..d50c2b079 100644 | |
--- a/plugins/LadspaEffect/caps/Phaser.cc | |
+++ b/plugins/LadspaEffect/caps/Phaser.cc | |
@@ -1,20 +1,17 @@ | |
/* | |
Phaser.cc | |
- Copyright 2002-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- One simple mono phaser, 6 all-pass lines, the usual controls. | |
- | |
- Another unit in the same vein with the filter modulation controlled by | |
- a Lorenz fractal. | |
+ Phaser effect | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -33,146 +30,56 @@ | |
#include "Phaser.h" | |
#include "Descriptor.h" | |
-template <sample_func_t F> | |
-void | |
-PhaserI::one_cycle (int frames) | |
-{ | |
- sample_t * s = ports[0]; | |
- | |
- if (rate != *ports[1]) | |
- { | |
- rate = getport(1); | |
- lfo.set_f (max (.001, rate * (double) blocksize), fs, lfo.get_phase()); | |
- } | |
- | |
- double depth = getport(2); | |
- double spread = 1 + getport(3); | |
- double fb = getport(4); | |
- | |
- sample_t * dst = ports[5]; | |
- | |
- while (frames) | |
- { | |
- if (remain == 0) remain = 32; | |
- | |
- int n = min (remain, frames); | |
- | |
- double d = delay.bottom + delay.range * (1. - fabs (lfo.get())); | |
- | |
- for (int j = 5; j >= 0; --j) | |
- { | |
- ap[j].set (d); | |
- d *= spread; | |
- } | |
- | |
- for (int i = 0; i < n; ++i) | |
- { | |
- sample_t x = s[i]; | |
- sample_t y = x + y0 * fb + normal; | |
- | |
- for (int j = 5; j >= 0; --j) | |
- y = ap[j].process (y); | |
- | |
- y0 = y; | |
- | |
- F (dst, i, x + y * depth, adding_gain); | |
- } | |
- | |
- s += n; | |
- dst += n; | |
- frames -= n; | |
- remain -= n; | |
- } | |
-} | |
- | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
+#define FBSCALE .9 /* feedback scale from 0..1 parameter range */ | |
-PortInfo | |
-PhaserI::port_info [] = | |
-{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "rate (Hz)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_1, 0, 10} | |
- }, { | |
- "depth", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_HIGH, 0, 1} | |
- }, { | |
- "spread", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, M_PI} | |
- }, { | |
- "feedback", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_HIGH, 0, .999} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
-}; | |
- | |
-template <> void | |
-Descriptor<PhaserI>::setup() | |
-{ | |
- UniqueID = 1775; | |
- Label = "PhaserI"; | |
- Properties = HARD_RT; | |
- | |
- Name = CAPS "PhaserI - Mono phaser"; | |
- Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2002-7"; | |
- | |
- /* fill port info and vtable */ | |
- autogen(); | |
-} | |
- | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-template <sample_func_t F> | |
void | |
-PhaserII::one_cycle (int frames) | |
+PhaserII::cycle (uint frames) | |
{ | |
- sample_t * s = ports[0]; | |
+ sample_t * s = ports[5]; | |
+ sample_t * dst = ports[6]; | |
- lorenz.set_rate (getport(1) * .08); | |
+ rate = getport(0); | |
+ lfo.sine.set_f (max(.001,rate*blocksize), fs, lfo.sine.get_phase()); | |
+ lfo.lp.set_f (5*(1+rate)*over_fs); | |
+ lfo.roessler.set_rate(.05*rate); | |
- double depth = getport(2); | |
- double spread = 1 + getport(3); | |
- double fb = getport(4); | |
+ float mode = getport(1); | |
- sample_t * dst = ports[5]; | |
+ sample_t depth = getport(2); | |
+ sample_t spread = 1 + .5*M_PI*getport(3); | |
+ sample_t fb = FBSCALE * getport(4); | |
while (frames) | |
{ | |
- if (remain == 0) remain = 32; | |
+ if (remain == 0) remain = blocksize; | |
int n = min (remain, frames); | |
- double d = delay.bottom + delay.range * (.3 * lorenz.get()); | |
+ float d; | |
+ if (mode < .5) | |
+ d = fabs (lfo.sine.get()), | |
+ d *= d; | |
+ else | |
+ d = min (.99,fabs (lfo.lp.process(4.3*lfo.roessler.get()))); | |
+ d = delay.bottom + d*delay.range; | |
- for (int j = 5; j >= 0; --j) | |
+ for (int j = 0; j < Notches; ++j) | |
{ | |
- ap[j].set (d); | |
+ ap[j].set(d); | |
d *= spread; | |
} | |
for (int i = 0; i < n; ++i) | |
{ | |
- sample_t x = s[i]; | |
+ sample_t x = .5 * s[i]; | |
sample_t y = x + y0 * fb + normal; | |
- for (int j = 5; j >= 0; --j) | |
+ for (int j = 0; j < Notches; ++j) | |
y = ap[j].process (y); | |
y0 = y; | |
- F (dst, i, x + y * depth, adding_gain); | |
+ dst[i] = x + y*depth; | |
} | |
s += n; | |
@@ -187,43 +94,25 @@ PhaserII::one_cycle (int frames) | |
PortInfo | |
PhaserII::port_info [] = | |
{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "rate", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "depth", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_HIGH, 0, 1} | |
- }, { | |
- "spread", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, M_PI * .5} | |
- }, { | |
- "feedback", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_HIGH, 0, .999} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "rate", CTRL_IN, {DEFAULT_LOW, 0, 1} }, | |
+ { "lfo", CTRL_IN, {DEFAULT_0 | INTEGER, 0, 1}, "{0:'sine',1:'fractal'}"}, | |
+ | |
+ { "depth", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} }, | |
+ { "spread", CTRL_IN, {DEFAULT_HIGH, 0, 1} }, | |
+ { "resonance", CTRL_IN, {DEFAULT_LOW, 0, 1} }, | |
+ | |
+ { "in", INPUT | AUDIO }, | |
+ { "out", OUTPUT | AUDIO } | |
}; | |
template <> void | |
Descriptor<PhaserII>::setup() | |
{ | |
- UniqueID = 2586; | |
Label = "PhaserII"; | |
- Properties = HARD_RT; | |
- Name = CAPS "PhaserII - Mono phaser modulated by a Lorenz fractal"; | |
+ Name = CAPS "PhaserII - Mono phaser"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2002-7"; | |
+ Copyright = "2002-13"; | |
/* fill port info and vtable */ | |
autogen(); | |
diff --git a/plugins/LadspaEffect/caps/Phaser.h b/plugins/LadspaEffect/caps/Phaser.h | |
index c79b93053..52a2ec3a1 100644 | |
--- a/plugins/LadspaEffect/caps/Phaser.h | |
+++ b/plugins/LadspaEffect/caps/Phaser.h | |
@@ -1,17 +1,17 @@ | |
/* | |
Phaser.h | |
- Copyright 2002-5 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- Standard and fractal-modulated phaser units. | |
+ Phaser effect plugin. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,97 +25,43 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _PHASER_H_ | |
-#define _PHASER_H_ | |
+#ifndef PHASER_H | |
+#define PHASER_H | |
#include "dsp/Sine.h" | |
-#include "dsp/Lorenz.h" | |
+#include "dsp/Roessler.h" | |
#include "dsp/Delay.h" | |
+#include "dsp/IIR1.h" | |
-/* all-pass as used by the phaser. */ | |
class PhaserAP | |
{ | |
public: | |
sample_t a, m; | |
- PhaserAP() | |
- { | |
- a = m = 0.; | |
- } | |
+ PhaserAP() { a=m=0.; } | |
- void set (double delay) | |
- { | |
- a = (1 - delay) / (1 + delay); | |
- } | |
+ void set (sample_t delay) | |
+ { a = (1-delay) / (1+delay); } | |
sample_t process (sample_t x) | |
- { | |
- register sample_t y = -a * x + m; | |
- m = a * y + x; | |
- | |
- return y; | |
- } | |
-}; | |
- | |
-class PhaserI | |
-: public Plugin | |
-{ | |
- public: | |
- PhaserAP ap[6]; | |
- DSP::Sine lfo; | |
- | |
- sample_t rate; | |
- sample_t y0; | |
- | |
- struct { | |
- double bottom, range; | |
- } delay; | |
- | |
- template <sample_func_t> | |
- void one_cycle (int frames); | |
- | |
- int blocksize, remain; | |
- | |
- public: | |
- static PortInfo port_info []; | |
- | |
- void init() | |
- { | |
- blocksize = 32; | |
- } | |
- | |
- void activate() | |
- { | |
- y0 = 0.; | |
- remain = 0; | |
- | |
- delay.bottom = 400. / fs; | |
- delay.range = 2200. / fs; | |
- | |
- rate = -1; /* force lfo reset in one_cycle() */ | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
{ | |
- one_cycle<adding_func> (n); | |
+ sample_t y = -a*x + m; | |
+ m = a*y + x; | |
+ return y; | |
} | |
}; | |
-/* same as above, but filter sweep is controlled by a Lorenz fractal */ | |
- | |
class PhaserII | |
: public Plugin | |
{ | |
public: | |
- double fs; | |
- | |
- PhaserAP ap[6]; | |
- DSP::Lorenz lorenz; | |
+ enum {Notches = 12}; | |
+ PhaserAP ap[Notches]; | |
+ struct { | |
+ DSP::Sine sine; | |
+ DSP::Roessler roessler; | |
+ DSP::LP1<sample_t> lp; | |
+ } lfo; | |
sample_t rate; | |
sample_t y0; | |
@@ -124,18 +70,22 @@ class PhaserII | |
double bottom, range; | |
} delay; | |
- template <sample_func_t> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
- int blocksize, remain; | |
+ uint blocksize, remain; | |
public: | |
static PortInfo port_info []; | |
void init() | |
{ | |
- blocksize = 32; | |
- lorenz.init(); | |
+ blocksize = 16; | |
+ if (fs > 32000) blocksize *= 2; | |
+ if (fs > 64000) blocksize *= 2; | |
+ if (fs > 128000) blocksize *= 2; | |
+ | |
+ lfo.roessler.init(); | |
+ lfo.sine.set_f (300*over_fs,0); | |
} | |
void activate() | |
@@ -143,22 +93,9 @@ class PhaserII | |
y0 = 0.; | |
remain = 0; | |
- delay.bottom = 400. / fs; | |
- delay.range = 2200. / fs; | |
- | |
- rate = -1; /* force lfo reset in one_cycle() */ | |
- } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
+ delay.bottom = 400*over_fs; | |
+ delay.range = 2200*over_fs; | |
} | |
}; | |
- | |
-#endif /* _PHASER_H_ */ | |
+#endif /* PHASER_H */ | |
diff --git a/plugins/LadspaEffect/caps/README b/plugins/LadspaEffect/caps/README | |
index 58fc72ec8..78a2d6af0 100644 | |
--- a/plugins/LadspaEffect/caps/README | |
+++ b/plugins/LadspaEffect/caps/README | |
@@ -1,7 +1,10 @@ | |
-This is CAPS, the C Audio Plugin Suite | |
-====================================== | |
+This is CAPS, the C* Audio Plugin Suite | |
+======================================= | |
-For all questions, please be referred to the HTML documentation of | |
-this software package in the file 'caps.html', also available from | |
+For all questions, please be referred to the documentation at | |
-http://quitte.de/dsp/caps.html | |
+ http://quitte.de/dsp/caps.html | |
+ | |
+If that doesn't help, you can contact | |
+ | |
+ tim@quitte.de | |
diff --git a/plugins/LadspaEffect/caps/Reverb.cc b/plugins/LadspaEffect/caps/Reverb.cc | |
index 9061daaf5..2a57275d8 100644 | |
--- a/plugins/LadspaEffect/caps/Reverb.cc | |
+++ b/plugins/LadspaEffect/caps/Reverb.cc | |
@@ -1,15 +1,15 @@ | |
/* | |
Reverb.cc | |
- Copyright 2002-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-14 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- three reverb units: JVRev, Plate and Plate2x2. | |
+ Three reverb units: JVRev, Plate and PlateX2. | |
- the former is a rewrite of STK's JVRev, a traditional design. | |
+ The former is a rewrite of STK's JVRev, a traditional design. | |
- original comment: | |
+ Original comment: | |
This is based on some of the famous | |
Stanford CCRMA reverbs (NRev, KipRev) | |
@@ -18,17 +18,18 @@ | |
networks of simple allpass and comb | |
delay filters. | |
- the algorithm is mostly unchanged in this implementation; the delay | |
+ The algorithm is mostly unchanged in this implementation; the delay | |
line lengths have been fiddled with to make the stereo field more | |
- evenly weighted, and denormal protection has been added. | |
+ evenly weighted, denormal protection and a bandwidth control have been | |
+ added as well. | |
- the latter two are based on the circuit discussed in Jon Dattorro's | |
- september 1997 JAES paper on effect design (part 1: reverb & filters). | |
+ The latter two are based on the circuit discussed in Jon Dattorro's | |
+ September 1997 JAES paper on effect design (part 1: reverb & filters). | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -47,32 +48,20 @@ | |
#include "Reverb.h" | |
#include "Descriptor.h" | |
-int | |
-JVRev::default_length[9] = { | |
-#if 1 /* slightly modified, tg */ | |
- 1777, 1847, 1993, 2137, 389, 127, 43, 211, 209 | |
-#else | |
- 4799, 4999, 5399, 5801, 1051, 337, 113, 573, 487 | |
-#endif | |
-}; | |
+int JVRev_length[9] = { 4199, 4999, 5399, 5801, 1051, 337, 113, 573, 487 }; | |
void | |
JVRev::init() | |
{ | |
- memcpy (length, default_length, sizeof (length)); | |
+ double s = fs/44100.; | |
- if (fs != 44100) | |
+ for (int i = 0; i < 9; ++i) | |
{ | |
- double s = fs / 44100.; | |
- | |
- for (int i = 0; i < 9; ++i) | |
- { | |
- int v = (int) (s * length[i]); | |
- v |= 1; | |
- while (!DSP::isprime (v)) | |
- v += 2; | |
- length[i] = v; | |
- } | |
+ int v = (int) (s * JVRev_length[i]); | |
+ v |= 1; | |
+ while (!DSP::isprime(v)) | |
+ v += 2; | |
+ length[i] = v; | |
} | |
for (int i = 0; i < 4; ++i) | |
@@ -84,7 +73,7 @@ JVRev::init() | |
left.init (length[7]); | |
right.init (length[8]); | |
- /* such a simple number, but i couldn't find a better one. */ | |
+ /* such a simple number, yet I couldn't find a better one. */ | |
apc = .7; | |
} | |
@@ -93,61 +82,73 @@ JVRev::set_t60 (sample_t t) | |
{ | |
t60 = t; | |
- t = max (.00001, t); | |
+ t = max(.00001, t); | |
+ t = -3/(t*fs); | |
- for (int i = 0; i < 4; ++i) | |
- comb[i].c = pow (10, (-3 * length[i] / (t * fs))); | |
+ for (int i=0; i<4; ++i) | |
+ comb[i].c = pow (10, t*length[i]); | |
} | |
void | |
JVRev::activate() | |
{ | |
- for (int i = 0; i < 3; ++i) | |
+ bandwidth.reset(); | |
+ tone.reset(); | |
+ | |
+ for (int i=0; i<3; ++i) | |
allpass[i].reset(); | |
- for (int i = 0; i < 4; ++i) | |
+ for (int i=0; i<4; ++i) | |
comb[i].reset(); | |
left.reset(); | |
right.reset(); | |
- set_t60 (getport(1)); | |
+ set_t60(getport(1)); | |
+ tone.set_f(1800*over_fs); | |
} | |
-template <sample_func_t F> | |
void | |
-JVRev::one_cycle (int frames) | |
+JVRev::cycle (uint frames) | |
{ | |
- sample_t * s = ports[0]; | |
+ sample_t bw = .005 + .994*getport(0); | |
+ bandwidth.set(exp(-M_PI*(1. - bw))); | |
if (t60 != *ports[1]) | |
- set_t60 (getport(1)); | |
+ set_t60(getport(1)); | |
- double wet = getport(2), dry = 1 - wet; | |
+ double wet = getport(2); | |
+ wet = .38*wet*wet; | |
+ double dry = 1 - wet; | |
- sample_t * dl = ports[3]; | |
- sample_t * dr = ports[4]; | |
+ sample_t * s = ports[3]; | |
- for (int i = 0; i < frames; ++i) | |
+ sample_t * dl = ports[4]; | |
+ sample_t * dr = ports[5]; | |
+ | |
+ for (uint i = 0; i < frames; ++i) | |
{ | |
sample_t x = s[i], a = x + normal; | |
+ a = bandwidth.process(a); | |
x *= dry; | |
/* diffusors */ | |
- a = allpass[0].process (a, -apc); | |
- a = allpass[1].process (a, -apc); | |
- a = allpass[2].process (a, -apc); | |
+ a = allpass[0].process(a,-apc); | |
+ a = allpass[1].process(a,-apc); | |
+ a = allpass[2].process(a,-apc); | |
/* tank */ | |
sample_t t = 0; | |
a -= normal; | |
- for (int j = 0; j < 4; ++j) | |
- t += comb[j].process (a); | |
+ for (int j=0; j<4; ++j) | |
+ t += comb[j].process(a); | |
+ | |
+ t = tone.process(t); | |
- F (dl, i, x + wet * left.putget (t), adding_gain); | |
- F (dr, i, x + wet * right.putget (t), adding_gain); | |
+ dl[i] = x + wet*left.putget(t); | |
+ dr[i] = x + wet*right.putget(t); | |
} | |
} | |
@@ -156,39 +157,23 @@ JVRev::one_cycle (int frames) | |
PortInfo | |
JVRev::port_info [] = | |
{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "t60 (s)", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0, 4.6} | |
- }, { | |
- "blend", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, .28} | |
- }, { | |
- "out:l", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "out:r", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "bandwidth", INPUT | CONTROL, {DEFAULT_MID, 0, 1} }, | |
+ { "t60 (s)", INPUT | CONTROL | GROUP, {DEFAULT_MID, 0, 5.6} }, | |
+ { "blend", INPUT | CONTROL, {DEFAULT_LOW, 0, 1} }, | |
+ | |
+ { "in", INPUT | AUDIO }, | |
+ { "out.l", OUTPUT | AUDIO }, | |
+ { "out.r", OUTPUT | AUDIO } | |
}; | |
template <> void | |
Descriptor<JVRev>::setup() | |
{ | |
- UniqueID = 1778; | |
Label = "JVRev"; | |
- Properties = HARD_RT; | |
Name = CAPS "JVRev - Stanford-style reverb from STK"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2004-12"; | |
/* fill port info and vtable */ | |
autogen(); | |
@@ -219,8 +204,8 @@ PlateStub::init() | |
input.lattice[3].init (L(3)); | |
/* modulated, width about 12 samples @ 44.1 */ | |
- tank.mlattice[0].init (L(4), (int) (0.00040322707570310132 * fs)); | |
- tank.mlattice[1].init (L(5), (int) (0.00040322707570310132 * fs)); | |
+ tank.mlattice[0].init (L(4), (int) (0.000403221 * fs)); | |
+ tank.mlattice[1].init (L(5), (int) (0.000403221 * fs)); | |
/* lh */ | |
tank.delay[0].init (L(6)); | |
@@ -267,8 +252,8 @@ PlateStub::process (sample_t x, sample_t decay, sample_t * _xl, sample_t * _xr) | |
x = input.lattice[3].process (x, indiff2); | |
/* summation point */ | |
- register sample_t xl = x + decay * tank.delay[3].get(); | |
- register sample_t xr = x + decay * tank.delay[1].get(); | |
+ register double xl = x + decay * tank.delay[3].get(); | |
+ register double xr = x + decay * tank.delay[1].get(); | |
/* lh */ | |
xl = tank.mlattice[0].process (xl, dediff1); | |
@@ -307,29 +292,31 @@ PlateStub::process (sample_t x, sample_t decay, sample_t * _xl, sample_t * _xr) | |
/* //////////////////////////////////////////////////////////////////////// */ | |
-template <sample_func_t F> | |
void | |
-Plate::one_cycle (int frames) | |
+Plate::cycle (uint frames) | |
{ | |
- sample_t * s = ports[0]; | |
+ sample_t bw = .005 + .994*getport(0); | |
+ input.bandwidth.set (exp (-M_PI * (1. - bw))); | |
- input.bandwidth.set (exp (-M_PI * (1. - getport(1)))); | |
+ sample_t decay = .749*getport(1); | |
- sample_t decay = getport(2); | |
- | |
- double damp = exp (-M_PI * getport(3)); | |
+ double damp = exp (-M_PI * (.0005+.9995*getport(2))); | |
tank.damping[0].set (damp); | |
tank.damping[1].set (damp); | |
- sample_t blend = getport(4), dry = 1 - blend; | |
+ sample_t blend = getport(3); | |
+ blend = pow (blend, 1.6); /* linear is not a good choice for this pot */ | |
+ sample_t dry = 1 - blend; | |
+ | |
+ sample_t * s = ports[4]; | |
sample_t * dl = ports[5]; | |
sample_t * dr = ports[6]; | |
- /* the modulated lattices interpolate, which needs truncated float */ | |
+ /* modulated lattice interpolation needs float truncation */ | |
DSP::FPTruncateMode _truncate; | |
- for (int i = 0; i < frames; ++i) | |
+ for (uint i = 0; i < frames; ++i) | |
{ | |
normal = -normal; | |
sample_t x = s[i] + normal; | |
@@ -340,8 +327,8 @@ Plate::one_cycle (int frames) | |
x = dry * s[i]; | |
- F (dl, i, x + blend * xl, adding_gain); | |
- F (dr, i, x + blend * xr, adding_gain); | |
+ dl[i] = x + blend*xl; | |
+ dr[i] = x + blend*xr; | |
} | |
} | |
@@ -350,47 +337,24 @@ Plate::one_cycle (int frames) | |
PortInfo | |
Plate::port_info [] = | |
{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "bandwidth", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0.005, .999} /* .9995 */ | |
- }, { | |
- "tail", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0, .749} /* .5 */ | |
- }, { | |
- "damping", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, .0005, 1} /* .0005 */ | |
- }, { | |
- "blend", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "out:l", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "out:r", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ {"bandwidth", INPUT | CONTROL, {DEFAULT_HIGH, 0, 1} /* .9995 */ }, | |
+ {"tail", INPUT | CONTROL | GROUP, {DEFAULT_MID, 0, 1} /* .5 */ }, | |
+ {"damping", INPUT | CONTROL, {DEFAULT_LOW, 0, 1} /* .0005 */ }, | |
+ {"blend", INPUT | CONTROL | GROUP, {DEFAULT_LOW, 0, 1} }, | |
+ | |
+ {"in", INPUT | AUDIO}, | |
+ {"out.l", OUTPUT | AUDIO}, | |
+ {"out.r", OUTPUT | AUDIO} | |
}; | |
template <> void | |
Descriptor<Plate>::setup() | |
{ | |
- UniqueID = 1779; | |
Label = "Plate"; | |
- Properties = HARD_RT; | |
Name = CAPS "Plate - Versatile plate reverb"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2004-11"; | |
/* fill port info and vtable */ | |
autogen(); | |
@@ -398,30 +362,31 @@ Descriptor<Plate>::setup() | |
/* //////////////////////////////////////////////////////////////////////// */ | |
-template <sample_func_t F> | |
void | |
-Plate2x2::one_cycle (int frames) | |
+PlateX2::cycle (uint frames) | |
{ | |
- sample_t * sl = ports[0]; | |
- sample_t * sr = ports[1]; | |
+ sample_t bw = .005 + .994*getport(0); | |
+ input.bandwidth.set (exp (-M_PI * (1. - bw))); | |
- input.bandwidth.set (exp (-M_PI * (1. - getport(2)))); | |
+ sample_t decay = .749*getport(1); | |
- sample_t decay = getport(3); | |
- | |
- double damp = exp (-M_PI * getport(4)); | |
+ double damp = exp (-M_PI * (.0005+.9995*getport(2))); | |
tank.damping[0].set (damp); | |
tank.damping[1].set (damp); | |
- sample_t blend = getport(5), dry = 1 - blend; | |
+ sample_t blend = getport(3); | |
+ blend = pow (blend, 1.53); | |
+ sample_t dry = 1 - blend; | |
+ sample_t * sl = ports[4]; | |
+ sample_t * sr = ports[5]; | |
sample_t * dl = ports[6]; | |
sample_t * dr = ports[7]; | |
/* the modulated lattices interpolate, which needs truncated float */ | |
DSP::FPTruncateMode _truncate; | |
- for (int i = 0; i < frames; ++i) | |
+ for (uint i = 0; i < frames; ++i) | |
{ | |
normal = -normal; | |
sample_t x = (sl[i] + sr[i] + normal) * .5; | |
@@ -429,64 +394,35 @@ Plate2x2::one_cycle (int frames) | |
sample_t xl, xr; | |
PlateStub::process (x, decay, &xl, &xr); | |
- xl = blend * xl + dry * sl[i]; | |
- xr = blend * xr + dry * sr[i]; | |
- | |
- F (dl, i, xl, adding_gain); | |
- F (dr, i, xr, adding_gain); | |
+ dl[i] = blend*xl + dry*sl[i]; | |
+ dr[i] = blend*xr + dry*sr[i]; | |
} | |
} | |
/* //////////////////////////////////////////////////////////////////////// */ | |
PortInfo | |
-Plate2x2::port_info [] = | |
+PlateX2::port_info [] = | |
{ | |
- { | |
- "in:l", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "in:r", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "bandwidth", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0.005, .999} /* .9995 */ | |
- }, { | |
- "tail", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, 0, .749} /* .5 */ | |
- }, { | |
- "damping", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, .0005, 1} /* .0005 */ | |
- }, { | |
- "blend", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "out:l", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "out:r", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ {"bandwidth", INPUT | CONTROL, {DEFAULT_HIGH, 0, 1} /* .9995 */ }, | |
+ {"tail", INPUT | CONTROL | GROUP, {DEFAULT_MID, 0, 1} /* .5 */ }, | |
+ {"damping", INPUT | CONTROL, {DEFAULT_LOW, 0, 1} /* .0005 */ }, | |
+ {"blend", INPUT | CONTROL | GROUP, {DEFAULT_LOW, 0, 1} }, | |
+ | |
+ {"in.l", INPUT | AUDIO}, | |
+ {"in.r", INPUT | AUDIO}, | |
+ {"out.l", OUTPUT | AUDIO}, | |
+ {"out.r", OUTPUT | AUDIO} | |
}; | |
template <> void | |
-Descriptor<Plate2x2>::setup() | |
+Descriptor<PlateX2>::setup() | |
{ | |
- UniqueID = 1795; | |
- Label = "Plate2x2"; | |
- Properties = HARD_RT; | |
+ Label = "PlateX2"; | |
- Name = CAPS "Plate2x2 - Versatile plate reverb, stereo inputs"; | |
+ Name = CAPS "PlateX2 - Versatile plate reverb, stereo inputs"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2004-11"; | |
/* fill port info and vtable */ | |
autogen(); | |
diff --git a/plugins/LadspaEffect/caps/Reverb.h b/plugins/LadspaEffect/caps/Reverb.h | |
index 568f1c558..dbdfcdac8 100644 | |
--- a/plugins/LadspaEffect/caps/Reverb.h | |
+++ b/plugins/LadspaEffect/caps/Reverb.h | |
@@ -1,7 +1,7 @@ | |
/* | |
Reverb.h | |
- Copyright 2002-5 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -30,7 +30,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -44,13 +44,13 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _REVERB_H_ | |
-#define _REVERB_H_ | |
+#ifndef REVERB_H | |
+#define REVERB_H | |
#include <stdio.h> | |
#include "dsp/Delay.h" | |
-#include "dsp/OnePole.h" | |
+#include "dsp/IIR1.h" | |
#include "dsp/Sine.h" | |
#include "dsp/util.h" | |
@@ -59,13 +59,12 @@ class Lattice | |
: public DSP::Delay | |
{ | |
public: | |
- inline sample_t | |
- process (sample_t x, double d) | |
+ sample_t process (sample_t x, double d) | |
{ | |
sample_t y = get(); | |
- x -= d * y; | |
- put (x); | |
- return d * x + y; | |
+ x -= d*y; | |
+ put(x); | |
+ return d*x + y; | |
} | |
}; | |
@@ -76,11 +75,10 @@ class JVComb | |
public: | |
float c; | |
- inline sample_t | |
- process (sample_t x) | |
+ sample_t process (sample_t x) | |
{ | |
- x += c * get(); | |
- put (x); | |
+ x += c*get(); | |
+ put(x); | |
return x; | |
} | |
}; | |
@@ -89,20 +87,20 @@ class JVRev | |
: public Plugin | |
{ | |
public: | |
- static int default_length[9]; | |
+ DSP::LP1<sample_t> bandwidth, tone; | |
+ | |
sample_t t60; | |
- Lattice allpass [3]; | |
+ int length[9]; | |
+ | |
+ Lattice allpass[3]; | |
JVComb comb[4]; | |
DSP::Delay left, right; | |
double apc; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
- | |
- int length [9]; | |
+ void cycle (uint frames); | |
void set_t60 (sample_t t); | |
@@ -111,16 +109,6 @@ class JVRev | |
void init(); | |
void activate(); | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
}; | |
/* /////////////////////////////////////////////////////////////////////// */ | |
@@ -132,7 +120,6 @@ class ModLattice | |
DSP::Delay delay; | |
DSP::Sine lfo; | |
- DSP::DelayTapA tap; | |
void init (int n, int w) | |
{ | |
@@ -144,14 +131,12 @@ class ModLattice | |
void reset() | |
{ | |
delay.reset(); | |
- tap.reset(); | |
} | |
inline sample_t | |
process (sample_t x, double d) | |
{ | |
- /* TODO: try all-pass interpolation */ | |
- sample_t y = delay.get_at (n0 + width * lfo.get()); | |
+ sample_t y = delay.get_linear (n0 + width * lfo.get()); | |
x += d * y; | |
delay.put (x); | |
return y - d * x; /* note sign */ | |
@@ -167,7 +152,7 @@ class PlateStub | |
sample_t indiff1, indiff2, dediff1, dediff2; | |
struct { | |
- DSP::OnePoleLP bandwidth; | |
+ DSP::LP1<sample_t> bandwidth; | |
Lattice lattice[4]; | |
} input; | |
@@ -175,7 +160,7 @@ class PlateStub | |
ModLattice mlattice[2]; | |
Lattice lattice[2]; | |
DSP::Delay delay[4]; | |
- DSP::OnePoleLP damping[2]; | |
+ DSP::LP1<sample_t> damping[2]; | |
int taps[12]; | |
} tank; | |
@@ -212,44 +197,22 @@ class Plate | |
: public PlateStub | |
{ | |
public: | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
public: | |
static PortInfo port_info []; | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
}; | |
/* /////////////////////////////////////////////////////////////////////// */ | |
-class Plate2x2 | |
+class PlateX2 | |
: public PlateStub | |
{ | |
public: | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
public: | |
static PortInfo port_info []; | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
}; | |
-#endif /* _REVERB_H_ */ | |
+#endif /* REVERB_H */ | |
diff --git a/plugins/LadspaEffect/caps/Scape.cc b/plugins/LadspaEffect/caps/Scape.cc | |
index be9e5a879..952ae0d88 100644 | |
--- a/plugins/LadspaEffect/caps/Scape.cc | |
+++ b/plugins/LadspaEffect/caps/Scape.cc | |
@@ -1,7 +1,7 @@ | |
/* | |
Scape.cc | |
- Copyright 2004-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -9,7 +9,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -28,6 +28,31 @@ | |
#include "Scape.h" | |
#include "Descriptor.h" | |
+static double | |
+dividers [] = { | |
+ 1 /* not used, 0 sentinel */, | |
+ 1, 0.5, 0.66666666666666666667, 0.75 | |
+}; | |
+ | |
+static float | |
+frandom2() | |
+{ | |
+ float f = frandom(); | |
+ return f*f*f; | |
+} | |
+ | |
+void | |
+Scape::init() | |
+{ | |
+ delay.init ((int) (2.01 * fs)); /* two seconds = 30 bpm + */ | |
+ for (int i = 0; i < 2; ++i) | |
+ { | |
+ lfo[i].lorenz.init(), | |
+ lfo[i].lorenz.set_rate (.00000001*fs); | |
+ lfo[i].lp.set_f (3*over_fs); | |
+ } | |
+} | |
+ | |
void | |
Scape::activate() | |
{ | |
@@ -36,93 +61,71 @@ Scape::activate() | |
for (int i = 0; i < 4; ++i) | |
svf[i].reset(), | |
- svf[i].set_out (SVF::Band), | |
- hipass[i].set_f (250. / fs); | |
- svf[3].set_out (SVF::Low), | |
+ svf[i].set_out (1), /* band pass */ | |
+ hipass[i].set_f (250*over_fs); | |
+ svf[3].set_out (0); /* low pass */ | |
delay.reset(); | |
period = 0; | |
} | |
-static double | |
-dividers [] = { | |
- 1 /* 0 sentinel */, | |
- 1, 0.5, 0.66666666666666666667, 0.75 | |
-}; | |
- | |
-float | |
-frandom2() | |
+inline double | |
+pick_f (float range, float tune) | |
{ | |
- float f = frandom(); | |
- return f * f * f; | |
+ static double over_12 = 1./12; | |
+ int n = 48 + (int) (4*12*range*frandom()); | |
+ return tune * pow (2, (n - 69) * over_12); | |
} | |
-template <sample_func_t F> | |
+ | |
void | |
-Scape::one_cycle (int frames) | |
+Scape::cycle (uint frames) | |
{ | |
- sample_t * s = ports[0]; | |
- | |
- // double one_over_n = 1 / (double) frames; | |
- | |
/* delay times */ | |
- double t1 = fs * 60. / getport(1); | |
- int div = (int) getport(2); | |
+ double t1 = fs * 60. / getport(0); | |
+ int div = (int) getport(1); | |
double t2 = t1 * dividers[div]; | |
- fb = getport(3); | |
+ fb = .94*getport(2); | |
- double dry = getport(4); | |
+ double dry = getport(3); | |
dry = dry * dry; | |
- double blend = getport(5); | |
+ double blend = getport(4); | |
+ float tune = getport(5); | |
- sample_t * dl = ports[6]; | |
- sample_t * dr = ports[7]; | |
+ sample_t * s = ports[6]; | |
+ sample_t * dl = ports[7]; | |
+ sample_t * dr = ports[8]; | |
DSP::FPTruncateMode truncate; | |
while (frames) | |
{ | |
- /* flip 'renormal' addition constant */ | |
- normal = -normal; | |
- | |
/* retune filters */ | |
if (period <= 1) | |
{ | |
period = t2 * .5; | |
- float f, q; | |
+ float f; | |
f = frandom2(); | |
- svf[0].set_f_Q (300 + 300 * f / fs, .3); | |
- svf[3].set_f_Q (300 + 600 * 2 * f / fs, .6); | |
+ svf[0].set_f_Q (pick_f(.3,tune)*over_fs, .3); | |
+ svf[3].set_f_Q (pick_f(.5,tune)*over_fs, .6); /* LP */ | |
f = frandom2(); | |
- q = f; | |
- svf[1].set_f_Q (400 + 2400 * f / fs, q); | |
- q = 1 - f; | |
- svf[2].set_f_Q (400 + 2400 * f / fs, q); | |
+ svf[1].set_f_Q (pick_f(.8,tune)*over_fs, .9*f); | |
+ svf[2].set_f_Q (pick_f(.9,tune)*over_fs, .5*f); | |
} | |
- 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) | |
+ uint n = min((uint) period, frames); | |
+ for (uint i=0; i < n; ++i) | |
{ | |
sample_t x = s[i] + normal; | |
- sample_t x1 = delay.get_at (t1); | |
- sample_t x2 = delay.get_at (t2); | |
+ sample_t x1 = delay.get_linear (t1); | |
+ sample_t x2 = delay.get_linear (t2); | |
- delay.put (x + fb * x1 + normal); | |
- x = dry * x + .2 * svf[0].process (x) + .6 * svf[3].process(x); | |
+ delay.put (x + fb*x1); | |
+ x = dry*x + .2*svf[0].process (x) + .6*svf[3].process(x); | |
x1 = svf[1].process (x1 - normal); | |
x2 = svf[2].process (x2 - normal); | |
@@ -131,13 +134,13 @@ Scape::one_cycle (int frames) | |
x2 = hipass[2].process (x2); | |
sample_t x1l, x1r, x2l, x2r; | |
- x1l = fabs (lfo[0].get()); | |
+ x1l = fabs (lfo[0].lp.process(lfo[0].lorenz.get())); | |
x1r = 1 - x1l; | |
- x2r = fabs (lfo[1].get()); | |
+ x2r = fabs (lfo[1].lp.process(lfo[1].lorenz.get())); | |
x2l = 1 - x2r; | |
- F (dl, i, x + blend * (x1 * x1l + x2 * x2l), adding_gain); | |
- F (dr, i, x + blend * (x2 * x2r + x1 * x1r), adding_gain); | |
+ dl[i] = x + blend*(x1*x1l + x2*x2l); | |
+ dr[i] = x + blend*(x1*x1r + x2*x2r); | |
} | |
frames -= n; | |
@@ -153,51 +156,27 @@ Scape::one_cycle (int frames) | |
PortInfo | |
Scape::port_info [] = | |
{ | |
- { | |
- "in", | |
- INPUT | AUDIO, | |
- {BOUNDED, -1, 1} | |
- }, { | |
- "bpm", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 30, 240} | |
- }, { | |
- "divider", | |
- INPUT | CONTROL, | |
- {BOUNDED | INTEGER | DEFAULT_MIN, 2, 4} | |
- }, { | |
- "feedback", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "dry", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_LOW, 0, 1} | |
- }, { | |
- "blend", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_HIGH, 0, 1} | |
- }, { | |
- "out:l", | |
- OUTPUT | AUDIO, | |
- {0} | |
- }, { | |
- "out:r", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "bpm", CTRL_IN, {DEFAULT_MID, 30, 164} }, | |
+ { "divider", CTRL_IN, {INTEGER | DEFAULT_MID, 2, 4}, | |
+ "{2:'eighths',3:'triplets',4:'sixteenths'}" }, | |
+ { "feedback", CTRL_IN | GROUP, {DEFAULT_HIGH, 0, 1} }, | |
+ { "dry", CTRL_IN | GROUP, {DEFAULT_MID, 0, 1} }, | |
+ { "blend", CTRL_IN, {DEFAULT_1, 0, 1} }, | |
+ { "tune (Hz)", CTRL_IN | GROUP, {DEFAULT_440, 415, 467} }, | |
+ | |
+ { "in", AUDIO_IN }, | |
+ { "out.l", AUDIO_OUT }, | |
+ { "out.r", AUDIO_OUT } | |
}; | |
template <> void | |
Descriptor<Scape>::setup() | |
{ | |
- UniqueID = 2588; | |
Label = "Scape"; | |
- Properties = HARD_RT; | |
- Name = CAPS "Scape - Stereo delay + Filters"; | |
+ Name = CAPS "Scape - Stereo delay with chromatic resonances"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2004-12"; | |
/* fill port info and vtable */ | |
autogen(); | |
diff --git a/plugins/LadspaEffect/caps/Scape.h b/plugins/LadspaEffect/caps/Scape.h | |
index 25cca9a1e..e1b02caa5 100644 | |
--- a/plugins/LadspaEffect/caps/Scape.h | |
+++ b/plugins/LadspaEffect/caps/Scape.h | |
@@ -9,7 +9,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -23,20 +23,18 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _SCAPE_H_ | |
-#define _SCAPE_H_ | |
+#ifndef SCAPE_H | |
+#define SCAPE_H | |
#include "dsp/Sine.h" | |
#include "dsp/Roessler.h" | |
#include "dsp/Lorenz.h" | |
#include "dsp/Delay.h" | |
-#include "dsp/OnePole.h" | |
-#include "dsp/BiQuad.h" | |
+#include "dsp/IIR1.h" | |
+#include "dsp/IIR2.h" | |
#include "dsp/RBJ.h" | |
#include "dsp/SVF.h" | |
-typedef DSP::SVF<1> SVF; | |
- | |
class Scape | |
: public Plugin | |
{ | |
@@ -44,36 +42,22 @@ class Scape | |
sample_t time, fb; | |
double period; | |
- DSP::Lorenz lfo[2]; | |
+ struct { | |
+ DSP::Lorenz lorenz; | |
+ DSP::LP1<sample_t> lp; | |
+ } lfo[2]; | |
+ | |
DSP::Delay delay; | |
- SVF svf[4]; | |
- DSP::OnePoleHP hipass[4]; | |
+ DSP::SVFI<1> svf[4]; | |
+ DSP::HP1<float> hipass[4]; | |
- template <sample_func_t> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
public: | |
static PortInfo port_info []; | |
- void init() | |
- { | |
- delay.init ((int) (2.01 * fs)); /* two seconds = 30 bpm + */ | |
- for (int i = 0; i < 2; ++i) | |
- lfo[i].init(), | |
- lfo[i].set_rate (.00000001 * fs); | |
- } | |
- | |
+ void init(); | |
void activate(); | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
}; | |
-#endif /* _SCAPE_H_ */ | |
+#endif /* SCAPE_H */ | |
diff --git a/plugins/LadspaEffect/caps/Sin.cc b/plugins/LadspaEffect/caps/Sin.cc | |
index 150ddf88b..c97da2917 100644 | |
--- a/plugins/LadspaEffect/caps/Sin.cc | |
+++ b/plugins/LadspaEffect/caps/Sin.cc | |
@@ -1,7 +1,7 @@ | |
/* | |
Sin.cc | |
- Copyright 2002-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -11,7 +11,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -31,28 +31,41 @@ | |
#include "Descriptor.h" | |
void | |
-Sin::init() | |
-{ | |
- sin.set_f (f = .005, fs, 0); | |
- gain = 0; | |
+Sin::activate() | |
+{ | |
+ gain = getport(1); | |
+ f = getport(0); | |
+ sin.set_f (f, fs, 0); | |
} | |
-template <sample_func_t F> | |
void | |
-Sin::one_cycle (int frames) | |
+Sin::cycle (uint frames) | |
{ | |
- if (f != *ports[0]) | |
- sin.set_f (f = getport(0), fs, sin.get_phase()); | |
- | |
- double g = (gain == *ports[1]) ? | |
- 1 : pow (getport(1) / gain, 1. / (double) frames); | |
- | |
sample_t * d = ports[2]; | |
+ double g = getport(1); | |
+ g = (g == gain ? 1 : pow (g/gain, 1./(double) frames)); | |
- for (int i = 0; i < frames; ++i) | |
+ float ff = getport(0); | |
+ if (ff == f) | |
+ { | |
+ for (uint i = 0; i < frames; ++i) | |
+ { | |
+ d[i] = gain*sin.get(); | |
+ gain *= g; | |
+ } | |
+ } | |
+ else /* crossfade old and new frequency */ | |
{ | |
- F (d, i, gain * sin.get(), adding_gain); | |
- gain *= g; | |
+ sample_t g0=1, g1=0, dg=1./frames; | |
+ DSP::Sine sin0 = sin; | |
+ sin.set_f (f = ff, fs, sin.get_phase()); | |
+ for (uint i = 0; i < frames; ++i) | |
+ { | |
+ sample_t x = g0*sin0.get() + g1*sin.get(); | |
+ g0 -= dg, g1 += dg; | |
+ d[i] = gain*x; | |
+ gain *= g; | |
+ } | |
} | |
gain = getport(1); | |
@@ -63,31 +76,20 @@ Sin::one_cycle (int frames) | |
PortInfo | |
Sin::port_info [] = | |
{ | |
- { | |
- "f", | |
- INPUT | CONTROL, | |
- {BOUNDED | LOG | DEFAULT_100, 0.0001, 20000} | |
- }, { | |
- "volume", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, MIN_GAIN, 1} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "f (Hz)", CTRL_IN, {LOG | DEFAULT_440, 0.0001, 20000} }, | |
+ { "volume", CTRL_IN, {DEFAULT_MID, MIN_GAIN, 1} }, | |
+ | |
+ { "out", OUTPUT | AUDIO, {0} } | |
}; | |
template <> void | |
Descriptor<Sin>::setup() | |
{ | |
- UniqueID = 1781; | |
Label = "Sin"; | |
- Properties = HARD_RT; | |
Name = CAPS "Sin - Sine wave generator"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2004-13"; | |
/* fill port info and vtable */ | |
autogen(); | |
diff --git a/plugins/LadspaEffect/caps/Sin.h b/plugins/LadspaEffect/caps/Sin.h | |
index fd540aa4d..819c79c3c 100644 | |
--- a/plugins/LadspaEffect/caps/Sin.h | |
+++ b/plugins/LadspaEffect/caps/Sin.h | |
@@ -1,7 +1,7 @@ | |
/* | |
Sin.h | |
- Copyright 2004-11 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -11,7 +11,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,8 +25,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _SIN_H_ | |
-#define _SIN_H_ | |
+#ifndef SIN_H | |
+#define SIN_H | |
#include "dsp/Sine.h" | |
@@ -38,25 +38,13 @@ class Sin | |
DSP::Sine sin; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
public: | |
static PortInfo port_info []; | |
- void init(); | |
- void activate() | |
- { gain = getport(1); } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
+ void init() {} | |
+ void activate(); | |
}; | |
-#endif /* _SIN_H_ */ | |
+#endif /* SIN_H */ | |
diff --git a/plugins/LadspaEffect/caps/ToneStack.cc b/plugins/LadspaEffect/caps/ToneStack.cc | |
index 4005f1851..c80ee04cf 100644 | |
--- a/plugins/LadspaEffect/caps/ToneStack.cc | |
+++ b/plugins/LadspaEffect/caps/ToneStack.cc | |
@@ -3,7 +3,9 @@ | |
Copyright 2006-7 | |
David Yeh <dtyeh@ccrma.stanford.edu> | |
- Tim Goetze <tim@quitte.de> (cosmetics) | |
+ | |
+ 2007-2013 | |
+ Tim Goetze <tim@quitte.de> (cosmetics) | |
Tone Stack emulation. | |
* | |
@@ -11,7 +13,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -26,65 +28,79 @@ | |
*/ | |
#include "basics.h" | |
+#include "dsp/util.h" | |
+#include "dsp/Sine.h" | |
#include "ToneStack.h" | |
#include "Descriptor.h" | |
-#include "dsp/tonestack/ks_tab.h" | |
-#include "dsp/tonestack/vs_tab.h" | |
+const char * | |
+DSP::ToneStack::presetdict = | |
+ "{0:'basswoman', 1:'stanford', 2:'wookie', 3:'DC 30', 4:'juice 800'," | |
+ "5:'twin', 6:'AK 20', 7:'nihon ace', 8:'porky',}"; | |
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 | |
+ /* for convenience, */ | |
+ #define k *1e3 | |
+ #define M *1e6 | |
+ #define nF *1e-9 | |
+ #define pF *1e-12 | |
/* parameter order is R1 - R4, C1 - C3 */ | |
+ /* R1=treble R2=Bass R3=Mid, C1-3 related caps, R4 = parallel resistor */ | |
/* { 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, 1 M, 25 k, 56 k, 250 pF, 20 nF, 20 nF}, /* 59 Bassman 5F6-A */ | |
{250 k, 250 k, 4.8 k, 100 k, 250 pF, 100 nF, 47 nF}, /* 64 Princeton AA1164 */ | |
- /* Marshall */ | |
+ {250 k, 1 M, 25 k, 47 k, 600 pF, 20 nF, 20 nF}, /* Mesa Dual Rect. 'Orange' */ | |
+ /* Vox -- R3 is fixed (circuit differs anyway) */ | |
+ {1 M, 1 M, 20 k, 100 k, 50 pF, 22 nF, 22 nF}, /* 59/86 Vox AC-30 */ | |
+ | |
{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 */ | |
+ {250 k, 250 k, 10 k, 100 k, 120 pF, 100 nF, 47 nF}, /* 69 Twin Reverb AA270 */ | |
+ {500 k, 1 M, 25 k, 47 k, 150 pF, 22 nF, 22 nF}, /* Hughes & Kettner Tube 20 */ | |
+ {250 k, 250 k, 10 k, 100 k, 150 pF, 82 nF, 47 nF}, /* Roland Jazz Chorus */ | |
+ {250 k, 1 M, 50 k, 33 k, 100 pF, 22 nF, 22 nF}, /* Pignose G40V */ | |
#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) */ | |
+ /* R4 is a 10 k fixed + 100 k pot in series actually */ | |
{250 k, 1 M, 25 k, 33 k, 500 pF, 22 nF, 22 nF}, /* 67 Major Lead 200 */ | |
+ | |
+ {250 k, 1 M, 25 k, 56 k, 500 pF, 22 nF, 22 nF}, /* 81 2000 Lead */ | |
{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); | |
+ model = -1; | |
} | |
-template <sample_func_t F> | |
void | |
-ToneStack::one_cycle (int frames) | |
+ToneStack::cycle (uint frames) | |
{ | |
- sample_t * s = ports[0]; | |
- tonestack.start_cycle (ports + 1); | |
+ int m = getport(0); | |
+ | |
+ if (m != model) | |
+ { | |
+ model = m; | |
+ tonestack.setmodel (model); | |
+ } | |
+ | |
+ sample_t * s = ports[4]; | |
sample_t * d = ports[5]; | |
- for (int i = 0; i < frames; ++i) | |
+ float bass=getport(1), mid=getport(2), treble=getport(3); | |
+ | |
+ tonestack.updatecoefs (bass, mid, treble); | |
+ for (uint i = 0; i < frames; ++i) | |
{ | |
- register sample_t a = s[i]; | |
- a = tonestack.process (a + normal); | |
- F (d, i, a, adding_gain); | |
+ sample_t a = s[i]; | |
+ d[i] = tonestack.process(a + normal); | |
} | |
} | |
@@ -92,104 +108,26 @@ ToneStack::one_cycle (int frames) | |
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} | |
- } | |
+ { "model", CTRL_IN, {DEFAULT_0 | INTEGER, 0, 8}, DSP::ToneStack::presetdict }, | |
+ { "bass", CTRL_IN | GROUP, {DEFAULT_MID, 0, 1} }, | |
+ { "mid", CTRL_IN, {DEFAULT_MID, 0, 1} }, | |
+ { "treble", CTRL_IN, {DEFAULT_MID, 0, 1} }, | |
+ | |
+ { "in", INPUT | AUDIO, {BOUNDED, -1, 1} }, | |
+ { "out", OUTPUT | AUDIO } | |
}; | |
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"; | |
+ Name = CAPS "ToneStack - Classic amplifier tone stack emulation"; | |
+ Maker = "David T. Yeh <dtyeh@ccrma.stanford.edu>"; | |
+ Copyright = "2006-12"; | |
/* fill port info and vtable */ | |
autogen(); | |
} | |
-/* //////////////////////////////////////////////////////////////////////// */ | |
- | |
-template <sample_func_t F> | |
-void | |
-ToneStackLT::one_cycle (int frames) | |
-{ | |
- sample_t * s = ports[0]; | |
- tonestack.updatecoefs (ports + 1); | |
- sample_t * d = ports[4]; | |
- | |
- for (int i = 0; i < frames; ++i) | |
- { | |
- register sample_t 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(); | |
-} | |
diff --git a/plugins/LadspaEffect/caps/ToneStack.h b/plugins/LadspaEffect/caps/ToneStack.h | |
index f98a0a0d6..c88d7b559 100644 | |
--- a/plugins/LadspaEffect/caps/ToneStack.h | |
+++ b/plugins/LadspaEffect/caps/ToneStack.h | |
@@ -3,6 +3,7 @@ | |
Copyright 2006-7 | |
David Yeh <dtyeh@ccrma.stanford.edu> | |
+ 2006-14 | |
Tim Goetze <tim@quitte.de> (cosmetics) | |
Tone Stack emulation. | |
@@ -11,7 +12,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,8 +26,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _TONESTACK_H_ | |
-#define _TONESTACK_H_ | |
+#ifndef TONESTACK_H | |
+#define TONESTACK_H | |
#include "dsp/util.h" | |
#include "dsp/windows.h" | |
@@ -35,64 +36,18 @@ | |
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); | |
- } | |
-}; | |
- | |
-/* /////////////////////////////////////////////////////////////////////// */ | |
+ int model; | |
-class ToneStackLT | |
-: public Plugin | |
-{ | |
- private: | |
- DSP::ToneStackLT tonestack; | |
+ DSP::ToneStack tonestack; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint 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); | |
- } | |
+ void init() { tonestack.init(fs); } | |
+ void activate(); | |
}; | |
-#endif /* _TONESTACK_H_ */ | |
+#endif /* TONESTACK_H */ | |
diff --git a/plugins/LadspaEffect/caps/White.cc b/plugins/LadspaEffect/caps/White.cc | |
index 28b2c3643..381d73b05 100644 | |
--- a/plugins/LadspaEffect/caps/White.cc | |
+++ b/plugins/LadspaEffect/caps/White.cc | |
@@ -1,17 +1,17 @@ | |
/* | |
White.cc | |
- Copyright 2004-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- white noise generation. | |
+ Approximating white pseudonoise generation. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -30,18 +30,28 @@ | |
#include "White.h" | |
#include "Descriptor.h" | |
-template <sample_func_t F> | |
void | |
-White::one_cycle (int frames) | |
+White::activate() | |
+{ | |
+ gain = getport(0); | |
+ white.init (frandom()); | |
+ cream.init (frandom()); | |
+ hp.set_f (.48); | |
+} | |
+ | |
+void | |
+White::cycle (uint frames) | |
{ | |
double g = (gain == *ports[0]) ? | |
1 : pow (getport(0) / gain, 1. / (double) frames); | |
sample_t * d = ports[1]; | |
- for (int i = 0; i < frames; ++i) | |
+ for (uint i = 0; i < frames; ++i) | |
{ | |
- F (d, i, gain * white.get(), adding_gain); | |
+ sample_t x = .4*white.get(); | |
+ x += hp.process(cream.get()); | |
+ d[i] = gain*x; | |
gain *= g; | |
} | |
@@ -53,27 +63,18 @@ White::one_cycle (int frames) | |
PortInfo | |
White::port_info [] = | |
{ | |
- { | |
- "volume", | |
- INPUT | CONTROL, | |
- {BOUNDED | DEFAULT_MID, MIN_GAIN, 1} | |
- }, { | |
- "out", | |
- OUTPUT | AUDIO, | |
- {0} | |
- } | |
+ { "volume", INPUT | CONTROL, {DEFAULT_HIGH, MIN_GAIN, 1} }, | |
+ { "out", OUTPUT | AUDIO} | |
}; | |
template <> void | |
Descriptor<White>::setup() | |
{ | |
- UniqueID = 1785; | |
Label = "White"; | |
- Properties = HARD_RT; | |
- Name = CAPS "White - White noise generator"; | |
+ Name = CAPS "White - Noise generator"; | |
Maker = "Tim Goetze <tim@quitte.de>"; | |
- Copyright = "GPL, 2004-7"; | |
+ Copyright = "2004-13"; | |
/* fill port info and vtable */ | |
autogen(); | |
diff --git a/plugins/LadspaEffect/caps/White.h b/plugins/LadspaEffect/caps/White.h | |
index 5633599e8..65bde1930 100644 | |
--- a/plugins/LadspaEffect/caps/White.h | |
+++ b/plugins/LadspaEffect/caps/White.h | |
@@ -1,17 +1,17 @@ | |
/* | |
White.h | |
- Copyright 2004-5 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-12 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- white noise generator. | |
+ Noise generator. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,10 +25,11 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _WHITE_H_ | |
-#define _WHITE_H_ | |
+#ifndef WHITE_H | |
+#define WHITE_H | |
#include "dsp/White.h" | |
+#include "dsp/IIR1.h" | |
class White | |
: public Plugin | |
@@ -36,27 +37,16 @@ class White | |
public: | |
sample_t gain; | |
- DSP::White white; | |
+ DSP::White white, cream; | |
+ DSP::HP1<sample_t> hp; | |
- template <sample_func_t F> | |
- void one_cycle (int frames); | |
+ void cycle (uint frames); | |
public: | |
static PortInfo port_info []; | |
void init() {} | |
- void activate() | |
- { gain = getport(0); } | |
- | |
- void run (int n) | |
- { | |
- one_cycle<store_func> (n); | |
- } | |
- | |
- void run_adding (int n) | |
- { | |
- one_cycle<adding_func> (n); | |
- } | |
+ void activate(); | |
}; | |
-#endif /* _WHITE_H_ */ | |
+#endif /* WHITE_H */ | |
diff --git a/plugins/LadspaEffect/caps/basics.h b/plugins/LadspaEffect/caps/basics.h | |
index df24e8c05..643d96e2d 100644 | |
--- a/plugins/LadspaEffect/caps/basics.h | |
+++ b/plugins/LadspaEffect/caps/basics.h | |
@@ -1,18 +1,18 @@ | |
/* | |
basics.h | |
- Copyright 2004-9 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-12 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- common constants, typedefs, utility functions | |
+ Common constants, typedefs, utility functions | |
and simplified LADSPA #defines. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -26,8 +26,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _BASICS_H_ | |
-#define _BASICS_H_ | |
+#ifndef BASICS_H | |
+#define BASICS_H | |
#define _GNU_SOURCE 1 | |
#define _USE_GNU 1 | |
@@ -42,90 +42,78 @@ | |
#include <string.h> | |
#include <math.h> | |
+#include <float.h> | |
#include <assert.h> | |
#include <stdio.h> | |
-#include <stdint.h> | |
- | |
-#include <ladspa.h> | |
- | |
-/* reducing LADSPA_DEFINES_WITH_LOTS_OF_CHARACTERS_REALLY verbosity */ | |
-#define BOUNDED (LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE) | |
-#define INTEGER LADSPA_HINT_INTEGER | |
-#define LOG LADSPA_HINT_LOGARITHMIC | |
-#define TOGGLE LADSPA_HINT_TOGGLED | |
- | |
-#define DEFAULT_0 LADSPA_HINT_DEFAULT_0 | |
-#define DEFAULT_1 LADSPA_HINT_DEFAULT_1 | |
-#define DEFAULT_100 LADSPA_HINT_DEFAULT_100 | |
-#define DEFAULT_440 LADSPA_HINT_DEFAULT_440 | |
-#define DEFAULT_MIN LADSPA_HINT_DEFAULT_MINIMUM | |
-#define DEFAULT_LOW LADSPA_HINT_DEFAULT_LOW | |
-#define DEFAULT_MID LADSPA_HINT_DEFAULT_MIDDLE | |
-#define DEFAULT_HIGH LADSPA_HINT_DEFAULT_HIGH | |
-#define DEFAULT_MAX LADSPA_HINT_DEFAULT_MAXIMUM | |
- | |
-#define INPUT LADSPA_PORT_INPUT | |
-#define OUTPUT LADSPA_PORT_OUTPUT | |
-#define AUDIO LADSPA_PORT_AUDIO | |
-#define CONTROL LADSPA_PORT_CONTROL | |
-#define HARD_RT LADSPA_PROPERTY_HARD_RT_CAPABLE | |
+#include "ladspa.h" | |
+ | |
+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; | |
-#define TEN_TO_THE_SIXTH 1000000 | |
+#define MIN_GAIN 1e-6 /* -120 dB */ | |
+/* smallest non-denormal 32 bit IEEE float is 1.18e-38 */ | |
+#define NOISE_FLOOR 1e-20 /* -400 dB */ | |
-#define MIN_GAIN .000001 /* -120 dB */ | |
+#define HARD_RT LADSPA_PROPERTY_HARD_RT_CAPABLE | |
-/* smallest non-denormal 32 bit IEEE float is 1.18�10-38 */ | |
-#define NOISE_FLOOR .00000000000005 /* -266 dB */ | |
+/* some LADSPA_DEFINES_THAT_COME_WITH_LOTS_OF_CHARACTERS */ | |
+#define INPUT LADSPA_PORT_INPUT | |
+#define OUTPUT LADSPA_PORT_OUTPUT | |
+#define CONTROL LADSPA_PORT_CONTROL | |
+#define AUDIO LADSPA_PORT_AUDIO | |
+ | |
+#define AUDIO_IN AUDIO|INPUT | |
+#define AUDIO_OUT AUDIO|OUTPUT | |
+#define CTRL_IN CONTROL|INPUT | |
+#define CTRL_OUT CONTROL|OUTPUT | |
+ | |
+/* extending LADSPA_PORT_* */ | |
+#define LADSPA_PORT_GROUP (AUDIO<<1) /* 16 */ | |
+#define GROUP LADSPA_PORT_GROUP | |
+ | |
+/* more LADSPA_DEFINES_THAT_REALLY_COME_WITH_LOTS_OF_CHARACTERS */ | |
+#define BOUNDED (LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE) | |
+#define INTEGER LADSPA_HINT_INTEGER | |
+#define LOG LADSPA_HINT_LOGARITHMIC | |
+#define TOGGLE LADSPA_HINT_TOGGLED | |
+ | |
+#define DEFAULT_0 LADSPA_HINT_DEFAULT_0 | |
+#define DEFAULT_1 LADSPA_HINT_DEFAULT_1 | |
+#define DEFAULT_100 LADSPA_HINT_DEFAULT_100 | |
+#define DEFAULT_440 LADSPA_HINT_DEFAULT_440 | |
+#define DEFAULT_MIN LADSPA_HINT_DEFAULT_MINIMUM | |
+#define DEFAULT_LOW LADSPA_HINT_DEFAULT_LOW | |
+#define DEFAULT_MID LADSPA_HINT_DEFAULT_MIDDLE | |
+#define DEFAULT_HIGH LADSPA_HINT_DEFAULT_HIGH | |
+#define DEFAULT_MAX LADSPA_HINT_DEFAULT_MAXIMUM | |
-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; | |
+/* //////////////////////////////////////////////////////////////////////// */ | |
typedef struct { | |
const char * name; | |
LADSPA_PortDescriptor descriptor; | |
LADSPA_PortRangeHint range; | |
+ const char * meta; | |
} PortInfo; | |
typedef LADSPA_Data sample_t; | |
+typedef unsigned int uint; | |
typedef unsigned long ulong; | |
-/* flavours for sample store functions run() and run_adding() */ | |
-typedef void (*sample_func_t) (sample_t *, int, sample_t, sample_t); | |
- | |
-inline void | |
-store_func (sample_t * s, int i, sample_t x, sample_t gain) | |
-{ | |
- s[i] = x; | |
-} | |
- | |
-inline void | |
-adding_func (sample_t * s, int i, sample_t x, sample_t gain) | |
-{ | |
- s[i] += gain * x; | |
-} | |
+/* prototype that takes a sample and yields a sample */ | |
+typedef sample_t (*clip_func_t) (sample_t); | |
#ifndef max | |
- | |
-template <class X, class Y> | |
-X min (X x, Y y) | |
-{ | |
- return x < y ? x : (X) y; | |
-} | |
- | |
-template <class X, class Y> | |
-X max (X x, Y y) | |
-{ | |
- return x > y ? x : (X) y; | |
-} | |
- | |
+template <class X, class Y> X min (X x, Y y) { return x < (X)y ? x : (X)y; } | |
+template <class X, class Y> X max (X x, Y y) { return x > (X)y ? x : (X)y; } | |
#endif /* ! max */ | |
template <class T> | |
@@ -136,11 +124,7 @@ T clamp (T value, T lower, T upper) | |
return value; | |
} | |
-static inline float | |
-frandom() | |
-{ | |
- return (float) rand() / (float) RAND_MAX; | |
-} | |
+static inline float frandom() { return (float) random() / (float) RAND_MAX; } | |
/* NB: also true if 0 */ | |
inline bool | |
@@ -150,7 +134,7 @@ is_denormal (float & f) | |
return ((i & 0x7f800000) == 0); | |
} | |
-/* todo: not sure if this double version is correct, actually ... */ | |
+/* not used, check validity before using */ | |
inline bool | |
is_denormal (double & f) | |
{ | |
@@ -158,7 +142,28 @@ is_denormal (double & f) | |
return ((i & 0x7fe0000000000000ll) == 0); | |
} | |
-#ifdef __i386__ | |
+/* lovely algorithm from | |
+ http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2Float | |
+*/ | |
+inline uint | |
+next_power_of_2 (uint n) | |
+{ | |
+ assert (n <= 0x40000000); | |
+ | |
+ --n; | |
+ n |= n >> 1; | |
+ n |= n >> 2; | |
+ n |= n >> 4; | |
+ n |= n >> 8; | |
+ n |= n >> 16; | |
+ | |
+ return ++n; | |
+} | |
+ | |
+inline double db2lin (double db) { return pow(10, .05*db); } | |
+inline double lin2db (double lin) { return 20*log10(lin); } | |
+ | |
+#if defined(__i386__) || defined(__amd64__) | |
#define TRAP asm ("int $3;") | |
#else | |
#define TRAP | |
@@ -168,10 +173,11 @@ is_denormal (double & f) | |
#define CAPS "C* " | |
-class Plugin { | |
+class Plugin | |
+{ | |
public: | |
- double fs; /* sample rate */ | |
- double adding_gain; /* for run_adding() */ | |
+ float fs, over_fs; /* sample rate and 1/fs */ | |
+ float adding_gain; /* for run_adding() */ | |
int first_run; /* 1st block after activate(), do no parameter smoothing */ | |
sample_t normal; /* renormal constant */ | |
@@ -196,4 +202,4 @@ class Plugin { | |
} | |
}; | |
-#endif /* _BASICS_H_ */ | |
+#endif /* BASICS_H */ | |
diff --git a/plugins/LadspaEffect/caps/caps.rdf b/plugins/LadspaEffect/caps/caps.rdf | |
index dbcfcc566..64c927a97 100644 | |
--- a/plugins/LadspaEffect/caps/caps.rdf | |
+++ b/plugins/LadspaEffect/caps/caps.rdf | |
@@ -1,447 +1,998 @@ | |
-<?xml version='1.0' encoding='ISO-8859-1'?> | |
-<!-- | |
+<?xml version='1.0' encoding='utf-8'?><!-- | |
caps.rdf | |
- Metadata for the CAPS Audio Plugin Suite | |
+ Metadata for the CAPS Audio Plugin Suite | |
+ Automatically generated based on work done by | |
- Automatically generated based on work done by | |
- Paul Winkler, | |
- Pete Leigh and | |
- Tim Goetze. | |
+ Paul Winkler, Pete Leigh, and Tim Goetze. | |
- Welcome to the Dept. of Redundancy Dept. Dept. Dept. | |
+ Welcome to the Dept. of Redundancy Dept. | |
- --> | |
-<!DOCTYPE rdf:RDF | |
- [ | |
+--> | |
+<!DOCTYPE rdf:RDF [ | |
<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> | |
<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> | |
<!ENTITY dc 'http://purl.org/dc/elements/1.1/'> | |
- <!ENTITY ladspa 'http://ladspa.org/ontology#'> | |
- ] | |
-> | |
+ <!ENTITY caps 'http://quitte.de/dsp/caps.html#'> | |
+ <!ENTITY ladspa 'http://ladspa.org/ontology#'> ]> | |
<rdf:RDF | |
xmlns:rdf="&rdf;" | |
xmlns:rdfs="&rdfs;" | |
xmlns:dc="&dc;" | |
- xmlns:ladspa="&ladspa;" | |
-> | |
+ xmlns:caps="∩︀" | |
+ xmlns:ladspa="&ladspa;"> | |
- <!-- CabinetI --> | |
+ <!-- Noisegate --> | |
+ <ladspa:FilterPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Noisegate'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2602.3" | |
+ ladspa:hasLabel="mains (Hz)"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="50" | |
+ ladspa:hasLabel="global" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="60" | |
+ ladspa:hasLabel="imperial" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ </ladspa:FilterPlugin> | |
+ | |
+ <!-- Compress --> | |
+ <ladspa:CompressorPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Compress'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;1772.0" | |
+ ladspa:hasLabel="measure"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="peak" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="rms" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;1772.1" | |
+ ladspa:hasLabel="mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="no limiting" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="saturating 2x" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="saturating 4x" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="saturating 4x128" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ </ladspa:CompressorPlugin> | |
+ | |
+ <!-- CompressX2 --> | |
+ <ladspa:CompressorPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#CompressX2'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2598.0" | |
+ ladspa:hasLabel="measure"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="peak" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="rms" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2598.1" | |
+ ladspa:hasLabel="mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="linear" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="saturating 2x" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="saturating 4x" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="saturating 4x128" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ </ladspa:CompressorPlugin> | |
+ | |
+ <!-- ToneStack --> | |
<ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1766'> | |
- <ladspa:hasPort> | |
- <ladspa:InputControlPort | |
- rdf:about="&ladspa;1766.1" | |
+ rdf:about='http://quitte.de/dsp/caps.html#ToneStack'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2589.0" | |
ladspa:hasLabel="model"> | |
- <ladspa:hasScale> | |
- <ladspa:Scale> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="0" | |
- ladspa:hasLabel="none" /> | |
+ ladspa:hasLabel="basswoman" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="1" | |
- ladspa:hasLabel="Unmatched off-axis" /> | |
+ ladspa:hasLabel="stanford" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="2" | |
- ladspa:hasLabel="Unmatched on-axis" /> | |
+ ladspa:hasLabel="wookie" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="3" | |
- ladspa:hasLabel="Supertramp" /> | |
+ ladspa:hasLabel="DC 30" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="4" | |
- ladspa:hasLabel="Little Wing 68" /> | |
+ ladspa:hasLabel="juice 800" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="5" | |
- ladspa:hasLabel="Martial" /> | |
+ ladspa:hasLabel="twin" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="6" | |
- ladspa:hasLabel="Mesa" /> | |
+ ladspa:hasLabel="AK 20" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="7" | |
- ladspa:hasLabel="Pro Jr" /> | |
+ ladspa:hasLabel="nihon ace" /> | |
</ladspa:hasPoint> | |
- </ladspa:Scale> | |
- </ladspa:hasScale> | |
- </ladspa:InputControlPort> | |
- </ladspa:hasPort> | |
- </ladspa:SimulatorPlugin> | |
- | |
- <!-- ChorusI --> | |
- <ladspa:ChorusPlugin | |
- rdf:about='http://ladspa.org/ontology#1767'> | |
- </ladspa:ChorusPlugin> | |
- | |
- <!-- StereoChorusI --> | |
- <ladspa:ChorusPlugin | |
- rdf:about='http://ladspa.org/ontology#1768'> | |
- </ladspa:ChorusPlugin> | |
- | |
- <!-- Click --> | |
- <ladspa:TimePlugin | |
- rdf:about='http://ladspa.org/ontology#1769'> | |
- </ladspa:TimePlugin> | |
- | |
- <!-- CEO --> | |
- <ladspa:OscillatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1770'> | |
- </ladspa:OscillatorPlugin> | |
- | |
- <!-- Clip --> | |
- <ladspa:DistortionPlugin | |
- rdf:about='http://ladspa.org/ontology#1771'> | |
- </ladspa:DistortionPlugin> | |
- | |
- <!-- Compress --> | |
- <ladspa:CompressorPlugin | |
- rdf:about='http://ladspa.org/ontology#1772'> | |
- </ladspa:CompressorPlugin> | |
- | |
- <!-- Eq --> | |
- <ladspa:EQPlugin | |
- rdf:about='http://ladspa.org/ontology#1773'> | |
- </ladspa:EQPlugin> | |
- | |
- <!-- Lorenz --> | |
- <ladspa:GeneratorPlugin | |
- rdf:about='http://ladspa.org/ontology#1774'> | |
- </ladspa:GeneratorPlugin> | |
- | |
- <!-- PhaserI --> | |
- <ladspa:PhaserPlugin | |
- rdf:about='http://ladspa.org/ontology#1775'> | |
- </ladspa:PhaserPlugin> | |
- | |
- <!-- PreampIII --> | |
- <ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1776'> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="8" | |
+ ladspa:hasLabel="porky" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
</ladspa:SimulatorPlugin> | |
- <!-- PreampIV --> | |
+ <!-- AmpVTS --> | |
<ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1777'> | |
+ rdf:about='http://quitte.de/dsp/caps.html#AmpVTS'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2592.0" | |
+ ladspa:hasLabel="over"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="2x" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="4x" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="8x" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2592.4" | |
+ ladspa:hasLabel="tonestack"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="basswoman" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="stanford" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="wookie" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="DC 30" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="4" | |
+ ladspa:hasLabel="juice 800" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="5" | |
+ ladspa:hasLabel="twin" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="6" | |
+ ladspa:hasLabel="AK 20" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="7" | |
+ ladspa:hasLabel="nihon ace" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="8" | |
+ ladspa:hasLabel="porky" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
</ladspa:SimulatorPlugin> | |
- <!-- JVRev --> | |
- <ladspa:ReverbPlugin | |
- rdf:about='http://ladspa.org/ontology#1778'> | |
- </ladspa:ReverbPlugin> | |
- | |
- <!-- Plate --> | |
- <ladspa:ReverbPlugin | |
- rdf:about='http://ladspa.org/ontology#1779'> | |
- </ladspa:ReverbPlugin> | |
- | |
- <!-- Roessler --> | |
+ <!-- AmpVI --> | |
<ladspa:GeneratorPlugin | |
- rdf:about='http://ladspa.org/ontology#1780'> | |
- </ladspa:GeneratorPlugin> | |
- | |
- <!-- Sin --> | |
- <ladspa:OscillatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1781'> | |
- </ladspa:OscillatorPlugin> | |
- | |
- <!-- SweepVFI --> | |
- <ladspa:FilterPlugin | |
- rdf:about='http://ladspa.org/ontology#1782'> | |
- <ladspa:hasPort> | |
- <ladspa:InputControlPort | |
- rdf:about="&ladspa;1782.3" | |
- ladspa:hasLabel="model"> | |
- <ladspa:hasScale> | |
- <ladspa:Scale> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ rdf:about='http://quitte.de/dsp/caps.html#AmpVI'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;1789.0" | |
+ ladspa:hasLabel="over"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="4x" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="8x" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;1789.5" | |
+ ladspa:hasLabel="tonestack"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="0" | |
- ladspa:hasLabel="low pass" /> | |
+ ladspa:hasLabel="basswoman" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="1" | |
- ladspa:hasLabel="band pass" /> | |
+ ladspa:hasLabel="stanford" /> | |
</ladspa:hasPoint> | |
- </ladspa:Scale> | |
- </ladspa:hasScale> | |
- </ladspa:InputControlPort> | |
- </ladspa:hasPort> | |
- </ladspa:FilterPlugin> | |
- | |
- <!-- VCOs --> | |
- <ladspa:OscillatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1783'> | |
- </ladspa:OscillatorPlugin> | |
- | |
- <!-- VCOd --> | |
- <ladspa:OscillatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1784'> | |
- </ladspa:OscillatorPlugin> | |
- | |
- <!-- White --> | |
- <ladspa:GeneratorPlugin | |
- rdf:about='http://ladspa.org/ontology#1785'> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="wookie" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="DC 30" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="4" | |
+ ladspa:hasLabel="juice 800" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="5" | |
+ ladspa:hasLabel="twin" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="6" | |
+ ladspa:hasLabel="AK 20" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="7" | |
+ ladspa:hasLabel="nihon ace" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="8" | |
+ ladspa:hasLabel="porky" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;1789.14" | |
+ ladspa:hasLabel="cab"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="twin" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="supro" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="chief" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="wookie" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="4" | |
+ ladspa:hasLabel="tweedie" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="5" | |
+ ladspa:hasLabel="vox" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
</ladspa:GeneratorPlugin> | |
- <!-- AmpIII --> | |
+ <!-- CabinetIII --> | |
<ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1786'> | |
+ rdf:about='http://quitte.de/dsp/caps.html#CabinetIII'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2601.0" | |
+ ladspa:hasLabel="model"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="twin" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="wookie" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="blue" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="4" | |
+ ladspa:hasLabel="indigo" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="5" | |
+ ladspa:hasLabel="supra" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="6" | |
+ ladspa:hasLabel="tweedie" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="7" | |
+ ladspa:hasLabel="basswoman" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="8" | |
+ ladspa:hasLabel="martial" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="9" | |
+ ladspa:hasLabel="poser" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="10" | |
+ ladspa:hasLabel="cabby" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="11" | |
+ ladspa:hasLabel="angel" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="12" | |
+ ladspa:hasLabel="matched" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="13" | |
+ ladspa:hasLabel="yellow" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="14" | |
+ ladspa:hasLabel="piquey" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="15" | |
+ ladspa:hasLabel="paladin" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="16" | |
+ ladspa:hasLabel="turtle" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2601.1" | |
+ ladspa:hasLabel="alt"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="on" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
</ladspa:SimulatorPlugin> | |
- <!-- HRTF --> | |
+ <!-- CabinetIV --> | |
<ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1787'> | |
+ rdf:about='http://quitte.de/dsp/caps.html#CabinetIV'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2606.0" | |
+ ladspa:hasLabel="model"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="mega wookie 800" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="mega wookie 812" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="mega wookie 828" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="mega wookie 868" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="4" | |
+ ladspa:hasLabel="mega wookie 908" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="5" | |
+ ladspa:hasLabel="mega wookie 912" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="6" | |
+ ladspa:hasLabel="mega wookie 936" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="7" | |
+ ladspa:hasLabel="mega wookie 968" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="8" | |
+ ladspa:hasLabel="mega wookie 992" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="9" | |
+ ladspa:hasLabel="unmatched" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="10" | |
+ ladspa:hasLabel="twin A" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="11" | |
+ ladspa:hasLabel="twin B" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="12" | |
+ ladspa:hasLabel="twin C" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="13" | |
+ ladspa:hasLabel="blue A" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="14" | |
+ ladspa:hasLabel="blue B" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="15" | |
+ ladspa:hasLabel="tweedie A" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="16" | |
+ ladspa:hasLabel="tweedie B" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="17" | |
+ ladspa:hasLabel="mini wookie A" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="18" | |
+ ladspa:hasLabel="mini wookie B" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="19" | |
+ ladspa:hasLabel="rosie A" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="20" | |
+ ladspa:hasLabel="rosie B" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="21" | |
+ ladspa:hasLabel="indigo" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="22" | |
+ ladspa:hasLabel="angel" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="23" | |
+ ladspa:hasLabel="sixty-one" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="24" | |
+ ladspa:hasLabel="sixty-two" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
</ladspa:SimulatorPlugin> | |
- <!-- Pan --> | |
- <ladspa:DelayPlugin | |
- rdf:about='http://ladspa.org/ontology#1788'> | |
- </ladspa:DelayPlugin> | |
- | |
- <!-- AmpIV --> | |
- <ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#1794'> | |
- </ladspa:SimulatorPlugin> | |
+ <!-- Plate --> | |
+ <ladspa:ReverbPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Plate'> | |
+ </ladspa:ReverbPlugin> | |
- <!-- Plate2x2 --> | |
+ <!-- PlateX2 --> | |
<ladspa:ReverbPlugin | |
- rdf:about='http://ladspa.org/ontology#1795'> | |
+ rdf:about='http://quitte.de/dsp/caps.html#PlateX2'> | |
</ladspa:ReverbPlugin> | |
- <!-- CabinetII --> | |
- <ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#2581'> | |
- <ladspa:hasPort> | |
- <ladspa:InputControlPort | |
- rdf:about="&ladspa;2581.1" | |
- ladspa:hasLabel="model"> | |
- <ladspa:hasScale> | |
- <ladspa:Scale> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <!-- Saturate --> | |
+ <ladspa:DistortionPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Saturate'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;1771.0" | |
+ ladspa:hasLabel="mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="0" | |
- ladspa:hasLabel="none" /> | |
+ ladspa:hasLabel="bypass" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="1" | |
- ladspa:hasLabel="Unmatched off-axis" /> | |
+ ladspa:hasLabel="atan" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="2" | |
- ladspa:hasLabel="Unmatched on-axis" /> | |
+ ladspa:hasLabel="atan15" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="3" | |
- ladspa:hasLabel="Supertramp" /> | |
+ ladspa:hasLabel="clip" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="4" | |
- ladspa:hasLabel="Little Wing 68" /> | |
+ ladspa:hasLabel="one5" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="5" | |
- ladspa:hasLabel="Martial" /> | |
+ ladspa:hasLabel="one53" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="6" | |
- ladspa:hasLabel="Mesa" /> | |
+ ladspa:hasLabel="clip3" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="7" | |
- ladspa:hasLabel="Pro Jr" /> | |
+ ladspa:hasLabel="clip9" /> | |
</ladspa:hasPoint> | |
- </ladspa:Scale> | |
- </ladspa:hasScale> | |
- </ladspa:InputControlPort> | |
- </ladspa:hasPort> | |
- </ladspa:SimulatorPlugin> | |
- | |
- <!-- SweepVFII --> | |
- <ladspa:FilterPlugin | |
- rdf:about='http://ladspa.org/ontology#2582'> | |
- <ladspa:hasPort> | |
- <ladspa:InputControlPort | |
- rdf:about="&ladspa;2582.3" | |
- ladspa:hasLabel="model"> | |
- <ladspa:hasScale> | |
- <ladspa:Scale> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
- rdf:value="0" | |
- ladspa:hasLabel="low pass" /> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="8" | |
+ ladspa:hasLabel="sin1" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
- rdf:value="1" | |
- ladspa:hasLabel="band pass" /> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="9" | |
+ ladspa:hasLabel="pow7" /> | |
</ladspa:hasPoint> | |
- </ladspa:Scale> | |
- </ladspa:hasScale> | |
- </ladspa:InputControlPort> | |
- </ladspa:hasPort> | |
- </ladspa:FilterPlugin> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="10" | |
+ ladspa:hasLabel="tanh" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="11" | |
+ ladspa:hasLabel="rectify" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ </ladspa:DistortionPlugin> | |
- <!-- ChorusII --> | |
- <ladspa:ChorusPlugin | |
- rdf:about='http://ladspa.org/ontology#2583'> | |
- </ladspa:ChorusPlugin> | |
+ <!-- Spice --> | |
+ <ladspa:DistortionPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Spice'> | |
+ </ladspa:DistortionPlugin> | |
+ | |
+ <!-- SpiceX2 --> | |
+ <ladspa:DistortionPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#SpiceX2'> | |
+ </ladspa:DistortionPlugin> | |
- <!-- StereoChorusII --> | |
+ <!-- ChorusI --> | |
<ladspa:ChorusPlugin | |
- rdf:about='http://ladspa.org/ontology#2584'> | |
+ rdf:about='http://quitte.de/dsp/caps.html#ChorusI'> | |
</ladspa:ChorusPlugin> | |
- <!-- Dirac --> | |
- <ladspa:GeneratorPlugin | |
- rdf:about='http://ladspa.org/ontology#2585'> | |
- </ladspa:GeneratorPlugin> | |
- | |
<!-- PhaserII --> | |
<ladspa:PhaserPlugin | |
- rdf:about='http://ladspa.org/ontology#2586'> | |
+ rdf:about='http://quitte.de/dsp/caps.html#PhaserII'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2586.1" | |
+ ladspa:hasLabel="lfo"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="sine" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="fractal" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
</ladspa:PhaserPlugin> | |
- <!-- AmpV --> | |
- <ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#2587'> | |
- </ladspa:SimulatorPlugin> | |
- | |
- <!-- Scape --> | |
- <ladspa:DelayPlugin | |
- rdf:about='http://ladspa.org/ontology#2588'> | |
- </ladspa:DelayPlugin> | |
- | |
- <!-- ToneStack --> | |
- <ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#2589'> | |
- <ladspa:hasPort> | |
- <ladspa:InputControlPort | |
- rdf:about="&ladspa;2589.1" | |
- ladspa:hasLabel="model"> | |
- <ladspa:hasScale> | |
- <ladspa:Scale> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <!-- AutoFilter --> | |
+ <ladspa:FilterPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#AutoFilter'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2593.0" | |
+ ladspa:hasLabel="mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="0" | |
- ladspa:hasLabel="'59 Bassman" /> | |
+ ladspa:hasLabel="low pass" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="1" | |
- ladspa:hasLabel="'69 Twin Reverb" /> | |
+ ladspa:hasLabel="band pass" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2593.1" | |
+ ladspa:hasLabel="filter"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="breathy" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="fat" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ </ladspa:FilterPlugin> | |
+ | |
+ <!-- Scape --> | |
+ <ladspa:DelayPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Scape'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2588.1" | |
+ ladspa:hasLabel="divider"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="2" | |
- ladspa:hasLabel="'64 Princeton" /> | |
+ ladspa:hasLabel="eighths" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="3" | |
- ladspa:hasLabel="'59/'81 JCM 800" /> | |
+ ladspa:hasLabel="triplets" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="4" | |
- ladspa:hasLabel="'78 Club & Country" /> | |
- </ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
- rdf:value="5" | |
- ladspa:hasLabel="'59/'86 AC-30 of sorts" /> | |
+ ladspa:hasLabel="sixteenths" /> | |
</ladspa:hasPoint> | |
- </ladspa:Scale> | |
- </ladspa:hasScale> | |
- </ladspa:InputControlPort> | |
- </ladspa:hasPort> | |
- </ladspa:SimulatorPlugin> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ </ladspa:DelayPlugin> | |
- <!-- ToneStackLT --> | |
- <ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#2590'> | |
- </ladspa:SimulatorPlugin> | |
+ <!-- Eq10 --> | |
+ <ladspa:EQPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Eq10'> | |
+ </ladspa:EQPlugin> | |
- <!-- AmpVTS --> | |
- <ladspa:SimulatorPlugin | |
- rdf:about='http://ladspa.org/ontology#2592'> | |
- <ladspa:hasPort> | |
- <ladspa:InputControlPort | |
- rdf:about="&ladspa;2592.1" | |
- ladspa:hasLabel="model"> | |
- <ladspa:hasScale> | |
- <ladspa:Scale> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <!-- Eq10X2 --> | |
+ <ladspa:EQPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Eq10X2'> | |
+ </ladspa:EQPlugin> | |
+ | |
+ <!-- Eq4p --> | |
+ <ladspa:EQPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Eq4p'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2608.0" | |
+ ladspa:hasLabel="a.mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="0" | |
- ladspa:hasLabel="'59 Bassman" /> | |
+ ladspa:hasLabel="lowshelve" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="1" | |
- ladspa:hasLabel="'69 Twin Reverb" /> | |
+ ladspa:hasLabel="band" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
+ <ladspa:hasPoint><ladspa:Point | |
rdf:value="2" | |
- ladspa:hasLabel="'64 Princeton" /> | |
+ ladspa:hasLabel="hishelve" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="-1" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2608.4" | |
+ ladspa:hasLabel="b.mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="lowshelve" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
- rdf:value="3" | |
- ladspa:hasLabel="'59/'81 JCM 800" /> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="band" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
- rdf:value="4" | |
- ladspa:hasLabel="'78 Club & Country" /> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="hishelve" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="-1" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2608.8" | |
+ ladspa:hasLabel="c.mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="lowshelve" /> | |
</ladspa:hasPoint> | |
- <ladspa:hasPoint> | |
- <ladspa:Point | |
- rdf:value="5" | |
- ladspa:hasLabel="'59/'86 AC-30 of sorts" /> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="band" /> | |
</ladspa:hasPoint> | |
- </ladspa:Scale> | |
- </ladspa:hasScale> | |
- </ladspa:InputControlPort> | |
- </ladspa:hasPort> | |
- </ladspa:SimulatorPlugin> | |
- | |
- <!-- AutoWah --> | |
- <ladspa:FilterPlugin | |
- rdf:about='http://ladspa.org/ontology#2593'> | |
- </ladspa:FilterPlugin> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="hishelve" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="-1" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2608.12" | |
+ ladspa:hasLabel="d.mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="lowshelve" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="band" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="hishelve" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="-1" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2608.16" | |
+ ladspa:hasLabel="_latency"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="3 samples" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ </ladspa:EQPlugin> | |
- <!-- Eq2x2 --> | |
+ <!-- EqFA4p --> | |
<ladspa:EQPlugin | |
- rdf:about='http://ladspa.org/ontology#2594'> | |
+ rdf:about='http://quitte.de/dsp/caps.html#EqFA4p'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2609.0" | |
+ ladspa:hasLabel="a.act"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="on" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2609.4" | |
+ ladspa:hasLabel="b.act"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="on" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2609.8" | |
+ ladspa:hasLabel="c.act"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="on" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2609.12" | |
+ ladspa:hasLabel="d.act"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="off" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="on" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2609.17" | |
+ ladspa:hasLabel="_latency"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="3 samples" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
</ladspa:EQPlugin> | |
+ <!-- Wider --> | |
+ <ladspa:DelayPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Wider'> | |
+ </ladspa:DelayPlugin> | |
+ | |
<!-- Narrower --> | |
<ladspa:FilterPlugin | |
- rdf:about='http://ladspa.org/ontology#2595'> | |
+ rdf:about='http://quitte.de/dsp/caps.html#Narrower'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;2595.0" | |
+ ladspa:hasLabel="mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="crossfeed mixing" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="mid/side processing" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
</ladspa:FilterPlugin> | |
- <!-- Goodbye, Dept. of Redundancy Dept. Dept. Dept. --> | |
+ <!-- Sin --> | |
+ <ladspa:OscillatorPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Sin'> | |
+ </ladspa:OscillatorPlugin> | |
+ | |
+ <!-- White --> | |
+ <ladspa:GeneratorPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#White'> | |
+ </ladspa:GeneratorPlugin> | |
+ | |
+ <!-- Fractal --> | |
+ <ladspa:GeneratorPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Fractal'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;1774.1" | |
+ ladspa:hasLabel="mode"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="lorenz" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="roessler" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ </ladspa:GeneratorPlugin> | |
+ | |
+ <!-- Click --> | |
+ <ladspa:TimePlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#Click'> | |
+ <ladspa:hasPort> | |
+ <ladspa:InputControlPort rdf:about="&ladspa;1769.0" | |
+ ladspa:hasLabel="model"> | |
+ <ladspa:hasScale><ladspa:Scale> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="0" | |
+ ladspa:hasLabel="box" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="1" | |
+ ladspa:hasLabel="stick" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="2" | |
+ ladspa:hasLabel="beep" /> | |
+ </ladspa:hasPoint> | |
+ <ladspa:hasPoint><ladspa:Point | |
+ rdf:value="3" | |
+ ladspa:hasLabel="dirac" /> | |
+ </ladspa:hasPoint> | |
+ </ladspa:Scale></ladspa:hasScale> | |
+ </ladspa:InputControlPort> | |
+ </ladspa:hasPort> | |
+ </ladspa:TimePlugin> | |
+ | |
+ <!-- CEO --> | |
+ <ladspa:OscillatorPlugin | |
+ rdf:about='http://quitte.de/dsp/caps.html#CEO'> | |
+ </ladspa:OscillatorPlugin> | |
+ <!-- Goodbye, Dept. of Redundancy Dept. --> | |
</rdf:RDF> | |
diff --git a/plugins/LadspaEffect/caps/configure.py b/plugins/LadspaEffect/caps/configure.py | |
index 227a1328f..82cfc3537 100755 | |
--- a/plugins/LadspaEffect/caps/configure.py | |
+++ b/plugins/LadspaEffect/caps/configure.py | |
@@ -2,29 +2,43 @@ | |
import os | |
CFLAGS = [] | |
-OSX_LDFLAGS = "-bundle -undefined suppress -flat_namespace" | |
+ARCH = [] | |
+ | |
+def dude_we_think_so_different(): | |
+ try: return 'Darwin' == os.popen ('uname -s').read().strip() | |
+ except: return 0 | |
+OSX = dude_we_think_so_different() | |
+if OSX: | |
+ OSX_LDFLAGS = "-bundle -undefined suppress -flat_namespace" | |
+ ARCH += ("-arch","i386","-arch","x86_64") | |
+ import ctypes as C | |
+ libc = C.CDLL("libc.dylib") | |
+ def osx_query(k): | |
+ size = C.c_uint(0) | |
+ libc.sysctlbyname(k,None,C.byref(size),None,0) | |
+ buf = C.create_string_buffer(size.value) | |
+ libc.sysctlbyname(k,buf,C.byref(size),None,0) | |
+ return buf.value | |
def we_have_sse(): | |
+ if OSX: return osx_query("hw.optional.sse2") | |
try: return 'sse' in open ('/proc/cpuinfo').read().split() | |
except: return 0 | |
def we_have_ssse3(): | |
+ if OSX: return osx_query("hw.optional.sse3") | |
try: return 'ssse3' in open ('/proc/cpuinfo').read().split() | |
except: return 0 | |
- | |
-def we_think_so_different_dude(): | |
- try: return 'Darwin' == os.popen ('uname -s').read().strip() | |
- except: return 0 | |
- | |
+ | |
def store(): | |
f = open ('defines.make', 'w') | |
f.write ("_CFLAGS=" + ' '.join (CFLAGS) + "\n") | |
- if we_think_so_different_dude(): | |
+ f.write ("ARCH=" + ' '.join (ARCH) + "\n") | |
+ if OSX: | |
f.write ("_LDFLAGS=" + OSX_LDFLAGS + "\n") | |
f.write ("STRIP = echo\n") | |
- | |
+ os.system ("make clean") | |
+ | |
if __name__ == '__main__': | |
- if we_have_sse(): | |
- CFLAGS += ('-msse', '-mfpmath=sse') | |
- if we_have_ssse3(): | |
- CFLAGS += ('-msse3',) | |
+ if we_have_sse(): CFLAGS += ('-msse', '-mfpmath=sse') | |
+ if we_have_ssse3(): CFLAGS += ('-msse3',) | |
store() | |
diff --git a/plugins/LadspaEffect/caps/dsp/Delay.h b/plugins/LadspaEffect/caps/dsp/Delay.h | |
index a9aa517ec..3be9972a5 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/Delay.h | |
+++ b/plugins/LadspaEffect/caps/dsp/Delay.h | |
@@ -1,7 +1,7 @@ | |
/* | |
dsp/Delay.h | |
- Copyright 2003-4, 2010 Tim Goetze <tim@quitte.de> | |
+ Copyright 2003-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -9,13 +9,13 @@ | |
and an allpass interpolating tap (which needs more work). | |
delay line storage is aligned to powers of two for simplified wrapping | |
- checks (no conditional or modulo, binary and suffices instead). | |
+ checks (no conditional or modulo, binary 'and' suffices instead). | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -29,8 +29,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_DELAY_H_ | |
-#define _DSP_DELAY_H_ | |
+#ifndef DSP_DELAY_H | |
+#define DSP_DELAY_H | |
#include "util.h" | |
#include "FPTruncateMode.h" | |
@@ -40,26 +40,20 @@ namespace DSP { | |
class Delay | |
{ | |
public: | |
- int size; | |
+ uint size; | |
sample_t * data; | |
- int read, write; | |
+ uint read, write; | |
- Delay() | |
- { | |
- read = write = 0; | |
- data = 0; | |
- } | |
+ Delay() { read = write = 0; data = 0; } | |
- ~Delay() | |
- { | |
- if (data) free (data); | |
- } | |
+ ~Delay() { free (data); } | |
- void init (int n) | |
+ void init (uint n) | |
{ | |
size = next_power_of_2 (n); | |
+ assert (size <= (1 << 20)); | |
data = (sample_t *) calloc (sizeof (sample_t), size); | |
- size -= 1; | |
+ --size; /* used as mask for confining access */ | |
write = n; | |
} | |
@@ -68,37 +62,25 @@ class Delay | |
memset (data, 0, (size + 1) * sizeof (sample_t)); | |
} | |
- sample_t & | |
- operator [] (int i) | |
- { | |
- return data [(write - i) & size]; | |
- } | |
+ sample_t & operator [] (int i) { return data [(write - i) & size]; } | |
- inline void | |
- put (sample_t x) | |
+ inline void put (sample_t x) | |
{ | |
data [write] = x; | |
write = (write + 1) & size; | |
} | |
- inline sample_t | |
- get() | |
+ inline sample_t get() | |
{ | |
sample_t x = data [read]; | |
read = (read + 1) & size; | |
return x; | |
} | |
- | |
- inline sample_t | |
- putget (sample_t x) | |
- { | |
- put (x); | |
- return get(); | |
- } | |
+ inline sample_t peek() { return data [read]; } | |
+ inline sample_t putget (sample_t x) {put(x); return get();} | |
/* fractional lookup, linear interpolation */ | |
- inline sample_t | |
- get_at (float f) | |
+ inline sample_t get_linear (float f) | |
{ | |
int n; | |
fistp (f, n); /* read: i = (int) f; relies on FPTruncateMode */ | |
@@ -108,8 +90,7 @@ class Delay | |
} | |
/* fractional lookup, cubic interpolation */ | |
- inline sample_t | |
- get_cubic (float f) | |
+ inline sample_t get_cubic (float f) | |
{ | |
int n; | |
fistp (f, n); /* see FPTruncateMode */ | |
@@ -132,40 +113,38 @@ class Delay | |
} | |
}; | |
-/* allpass variant */ | |
- | |
-class DelayTapA | |
+class MovingAverage | |
+: public Delay | |
{ | |
public: | |
- sample_t x1, y1; | |
+ sample_t state, over_n; | |
- DelayTapA() | |
+ void init (uint n) | |
{ | |
- reset(); | |
+ this->Delay::init (n); | |
+ over_n = 1. / n; | |
+ /* adjust write pointer so we have a full history of zeros */ | |
+ write = (write + size + 1) & size; | |
+ state = 0; | |
} | |
void reset() | |
{ | |
- x1 = y1 = 0; | |
+ this->Delay::reset(); | |
+ state = 0; | |
} | |
- sample_t get (Delay & d, float f) | |
- { | |
- int n; | |
- fistp (f, n); /* read: n = (int) f; relies on FPTruncateMode */ | |
- f -= n; | |
- if (0 && f < .5) | |
- f += 1, | |
- n -= 1; | |
- | |
- sample_t x = d[n]; | |
- f = (1 - f) / (1 + f); | |
- y1 = x1 + f * x - f * y1; | |
- x1 = x; | |
- return y1; | |
+ void process (sample_t x) | |
+ { | |
+ x *= over_n; | |
+ state -= this->Delay::get(); | |
+ state += x; | |
+ this->Delay::put (x); | |
} | |
+ | |
+ sample_t get() { return state; } | |
}; | |
}; /* namespace DSP */ | |
-#endif /* _DSP_DELAY_H_ */ | |
+#endif /* DSP_DELAY_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/Eq.h b/plugins/LadspaEffect/caps/dsp/Eq.h | |
index 92639e8a1..feac91443 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/Eq.h | |
+++ b/plugins/LadspaEffect/caps/dsp/Eq.h | |
@@ -1,18 +1,17 @@ | |
/* | |
Eq.h | |
- Copyright 2004-7 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-14 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. | |
+ Filter prototypes from a motorola paper implementing a similar circuit on a DSP56k. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -26,47 +25,21 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_EQ_H_ | |
-#define _DSP_EQ_H_ | |
+#ifndef DSP_EQ_H | |
+#define DSP_EQ_H | |
namespace DSP { | |
-/* 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. | |
- */ | |
-template <class T> | |
-void | |
-_BP (double fc, double Q, T * ca, T * cb) | |
-{ | |
- double theta = 2 * fc * M_PI; | |
- | |
- 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; | |
- | |
- cb[0] = 0; | |
- cb[1] = 2 * c; | |
- cb[2] = -2 * b; | |
-} | |
- | |
template <int Bands, class eq_sample = float> | |
class Eq | |
{ | |
public: | |
/* recursion coefficients, 3 per band */ | |
- eq_sample __attribute__ ((aligned)) a[Bands], b[Bands], c[Bands]; | |
+ eq_sample a[Bands], b[Bands], c[Bands]; | |
/* past outputs, 2 per band */ | |
- eq_sample __attribute__ ((aligned)) y[2][Bands]; | |
+ eq_sample y[2][Bands]; | |
/* current gain and recursion factor, each 1 per band = 2 */ | |
- eq_sample __attribute__ ((aligned)) gain[Bands], gf[Bands]; | |
+ eq_sample gain[Bands], gf[Bands]; | |
/* input history */ | |
eq_sample x[2]; | |
/* history index */ | |
@@ -83,10 +56,11 @@ class Eq | |
void reset() | |
{ | |
for (int z = 0; z < 2; ++z) | |
- { | |
- memset( y[z], 0, Bands*sizeof( eq_sample ) ); | |
- x[z] = 0; | |
- } | |
+ for (int i = 0; i < Bands; ++i) | |
+ y[z][i] = 0; | |
+ | |
+ for (int i = 0; i < 2; ++i) | |
+ x[i] = 0; | |
} | |
void init (double fs, double Q) | |
@@ -94,8 +68,8 @@ class Eq | |
double f = 31.25; | |
int i = 0; | |
- for (i = 0; i < Bands && f < fs / 2; ++i, f *= 2) | |
- init_band (i, 2 * f * M_PI / fs, Q); | |
+ for (i = 0; i < Bands && f < .48*fs; ++i, f *= 2) | |
+ init_band (i, 2*f*M_PI/fs, Q); | |
/* just in case, zero the remaining coefficients */ | |
for ( ; i < Bands; ++i) | |
zero_band (i); | |
@@ -105,21 +79,18 @@ class Eq | |
void init_band (int i, double theta, double Q) | |
{ | |
- b[i] = (Q - theta * .5) / (2 * Q + theta); | |
- a[i] = (.5 - b[i]) / 2; | |
- c[i] = (.5 + b[i]) * cos (theta); | |
+ b[i] = (Q - .5*theta)/(2*Q + theta); | |
+ a[i] = (.5 - b[i])*.5; | |
+ 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; | |
} | |
- void zero_band (int i) | |
- { | |
- a[i] = b[i] = c[i] = 0; | |
- } | |
+ void zero_band (int i) { a[i] = b[i] = c[i] = 0; } | |
/* per-band recursion: | |
- * y = 2 * (a * (x - x[-2]) + c * y[-1] - b * y[-2]) | |
+ * y = 2*(a*(x - x[-2]) + c*y[-1] - b*y[-2]) | |
*/ | |
eq_sample process (eq_sample s) | |
{ | |
@@ -133,7 +104,7 @@ class Eq | |
for (int i = 0; i < Bands; ++i) | |
{ | |
- y2[i] = normal + 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]; | |
} | |
@@ -155,4 +126,4 @@ class Eq | |
} /* namespace DSP */ | |
-#endif /* _DSP_EQ_H_ */ | |
+#endif /* DSP_EQ_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/FIR.h b/plugins/LadspaEffect/caps/dsp/FIR.h | |
index 8cb69ef0f..20c5fe318 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/FIR.h | |
+++ b/plugins/LadspaEffect/caps/dsp/FIR.h | |
@@ -1,17 +1,25 @@ | |
/* | |
dsp/FIR.h | |
- Copyright 2003-10 Tim Goetze <tim@quitte.de> | |
+ Copyright 2003-12 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
finite impulse response filters, with options for up- and down-sampling. | |
*/ | |
+/* | |
+ Somewhat surprisingly, exploiting the symmetry of linear-phase filter | |
+ kernels by only storing one half of the kernel does not improve | |
+ performance on this Core2 chip, on the contrary. apparently, | |
+ memory bandwidth (the full kernel likely being read into the CPU | |
+ cache as soon as it is accessed) is not an issue, but additional index | |
+ arithmetic becomes one. | |
+*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,59 +33,32 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _FIR_H_ | |
-#define _FIR_H_ | |
+#ifndef FIR_H | |
+#define FIR_H | |
#include "util.h" | |
namespace DSP { | |
-/* brute-force FIR filter with downsampling method (decimating). | |
- * | |
- * CAVEAT: constructing it from another FIR makes the filter share the other's | |
- * kernel data set. IOW, the other FIR must be valid throughout the lifetime | |
- * of this instance. | |
- */ | |
+/* | |
+ Brute-force FIR filter with downsampling method (decimating). | |
+*/ | |
class FIR | |
{ | |
public: | |
/* kernel length, history length - 1 */ | |
- int n, m; | |
+ uint n, m; | |
/* coefficients, history */ | |
sample_t * c, * x; | |
- bool borrowed_kernel; | |
/* history index */ | |
int h; | |
- FIR (int N) | |
- { | |
- c = 0; | |
- init (N); | |
- } | |
- | |
- FIR (FIR & fir) | |
- { | |
- c = fir.c; | |
- init (fir.n); | |
- } | |
- | |
- FIR (int n, sample_t * kernel) | |
- { | |
- c = 0; | |
- init (n); | |
- memcpy (c, kernel, n * sizeof (*c)); | |
- } | |
- | |
- ~FIR() | |
- { | |
- if (!borrowed_kernel) | |
- free (c); | |
- free (x); | |
- } | |
+ FIR() { c = x = 0; } | |
+ ~FIR() { free(c); free(x); } | |
- void init (int N) | |
+ void init (uint N) | |
{ | |
n = N; | |
@@ -85,12 +66,7 @@ class FIR | |
* history pointer by & instead of %, saving a few cpu cycles. */ | |
m = next_power_of_2 (n); | |
- if (c) | |
- borrowed_kernel = true; | |
- else | |
- borrowed_kernel = false, | |
- c = (sample_t *) malloc (n * sizeof (sample_t)); | |
- | |
+ c = (sample_t *) malloc (n * sizeof (sample_t)); | |
x = (sample_t *) malloc (m * sizeof (sample_t)); | |
m -= 1; | |
@@ -104,14 +80,13 @@ class FIR | |
memset (x, 0, n * sizeof (sample_t)); | |
} | |
- /* TODO: write an SSE-enabled version */ | |
inline sample_t process (sample_t s) | |
{ | |
x[h] = s; | |
s *= c[0]; | |
- for (int Z = 1, z = h - 1; Z < n; --z, ++Z) | |
+ for (uint Z = 1, z = h - 1; Z < n; --z, ++Z) | |
s += c[Z] * x[z & m]; | |
h = (h + 1) & m; | |
@@ -123,7 +98,7 @@ class FIR | |
* OVER is the oversampling factor. just here for documentation, use | |
* a FIRUpsampler instead. | |
*/ | |
- template <int Z, int OVER> | |
+ template <uint Z, uint OVER> | |
inline sample_t upsample (sample_t s) | |
{ | |
x[h] = s; | |
@@ -133,7 +108,7 @@ class FIR | |
/* for the interpolation, iterate over the history in z ^ -OVER | |
* steps -- all the samples between are 0. | |
*/ | |
- for (int j = Z, z = h - Z; j < n; --z, j += OVER) | |
+ for (uint j = Z, z = h - Z; j < n; --z, j += OVER) | |
s += c[j] * x[z & m]; | |
h = (h + 1) & m; | |
@@ -149,40 +124,20 @@ class FIR | |
} | |
}; | |
-/* close relative of FIR, but distinct enough to not justify inheritance. | |
- * | |
- * the difference to the FIR is the shorter history length. don't need | |
- * to clutter the d-cache with interleaved 0s. | |
- * | |
- * however, an initial test shows this to be a fraction *slower* than a | |
- * complete FIR for N = 32, OVER = 4. | |
- */ | |
+/* FIR upsampler, optimised not to store the 0 samples */ | |
+template <int N, int Oversample> | |
class FIRUpsampler | |
{ | |
public: | |
- /* kernel length, history length - 1 */ | |
- int n, m; | |
+ uint m; /* history length - 1 */ | |
+ int h; /* history index */ | |
- /* oversampling ratio */ | |
- int over; | |
- | |
- /* coefficients, history */ | |
- sample_t * c, * x; | |
+ sample_t * c, * x; /* coefficients, history */ | |
- /* history index */ | |
- int h; | |
- | |
- FIRUpsampler (int _n, int _over) | |
+ FIRUpsampler() | |
{ | |
c = x = 0; | |
- init (_n, _over); | |
- } | |
- | |
- FIRUpsampler (FIR & fir, int _over) | |
- { | |
- c = x = 0; | |
- init (fir.n, _over); | |
- memcpy (c, fir.c, n * sizeof (sample_t)); | |
+ init(); | |
} | |
~FIRUpsampler() | |
@@ -191,20 +146,16 @@ class FIRUpsampler | |
if (x) free (x); | |
} | |
- void init (int _n, int _over) | |
+ void init() | |
{ | |
- /* oversampling ratio must be multiple of FIR kernel length */ | |
- // assert (_n % _over == 0); | |
- | |
- n = _n; | |
- over = _over; | |
+ /* FIR kernel length must be a multiple of the oversampling ratio */ | |
+ assert (N % Oversample == 0); | |
/* like FIR, keep the history buffer a power of 2; additionally, | |
- * compress and don't store the 0 samples inbetween. | |
- */ | |
- m = next_power_of_2 ((n + over - 1) / over); | |
+ * don't store the 0 samples inbetween. */ | |
+ m = next_power_of_2 ((N + Oversample - 1) / Oversample); | |
- c = (sample_t *) malloc (n * sizeof (sample_t)); | |
+ c = (sample_t *) malloc (N * sizeof (sample_t)); | |
x = (sample_t *) malloc (m * sizeof (sample_t)); | |
m -= 1; | |
@@ -225,7 +176,7 @@ class FIRUpsampler | |
s = 0; | |
- for (int Z = 0, z = h; Z < n; --z, Z += over) | |
+ for (uint Z = 0, z = h; Z < N; --z, Z += Oversample) | |
s += c[Z] * x[z & m]; | |
h = (h + 1) & m; | |
@@ -235,18 +186,70 @@ class FIRUpsampler | |
/* upsample a zero sample (interleaving), Z being the time, in samples, | |
* since the last non-0 sample. */ | |
- inline sample_t pad (int Z) | |
+ inline sample_t pad (uint Z) | |
{ | |
sample_t s = 0; | |
- for (int z = h - 1; Z < n; --z, Z += over) | |
+ for (uint z = h-1; Z < N; --z, Z += Oversample) | |
+ s += c[Z] * x[z & m]; | |
+ | |
+ return s; | |
+ } | |
+ | |
+}; | |
+ | |
+/* templating for kernel length allows g++ to optimise aggressively | |
+ * resulting in appreciable performance gains. */ | |
+template <int N> | |
+class FIRn | |
+{ | |
+ public: | |
+ /* history length - 1 */ | |
+ uint m; | |
+ | |
+ /* coefficients, history */ | |
+ sample_t c[N], x[N]; | |
+ | |
+ /* history index */ | |
+ int h; | |
+ | |
+ FIRn() | |
+ { | |
+ /* keeping history size a power of 2 makes it possible to wrap the | |
+ * history pointer by & instead of %, saving a few cpu cycles. */ | |
+ m = next_power_of_2 (N) - 1; | |
+ | |
+ reset(); | |
+ } | |
+ | |
+ void reset() | |
+ { | |
+ h = 0; | |
+ memset (x, 0, N * sizeof (sample_t)); | |
+ } | |
+ | |
+ inline sample_t process (sample_t s) | |
+ { | |
+ x[h] = s; | |
+ | |
+ s *= c[0]; | |
+ | |
+ for (uint Z = 1, z = h - 1; Z < N; --z, ++Z) | |
s += c[Z] * x[z & m]; | |
+ h = (h + 1) & m; | |
+ | |
return s; | |
} | |
+ /* used in downsampling */ | |
+ inline void store (sample_t s) | |
+ { | |
+ x[h] = s; | |
+ h = (h + 1) & m; | |
+ } | |
}; | |
-}; /* namespace DSP */ | |
+} /* namespace DSP */ | |
-#endif /* _FIR_H_ */ | |
+#endif /* FIR_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h b/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h | |
index 354d062be..8900c39de 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h | |
+++ b/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h | |
@@ -1,19 +1,42 @@ | |
-/* Copyright 2001-4 tim goetze <tim@quitte.de> -- see 'COPYING'. */ | |
- | |
-/* Sets the FP rounding mode to 'truncate' in the constructor | |
- * and loads the previous FP conrol word in the destructor. | |
- * | |
- * 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__ | |
+/* | |
+ FPTruncateMode.h | |
+ | |
+ Copyright 2001-11 Tim Goetze <tim@quitte.de> | |
+ | |
+ http://quitte.de/dsp/ | |
+ | |
+ Sets the FP rounding mode to 'truncate' in the constructor | |
+ and loads the previous FP conrol word in the destructor. | |
+ | |
+ 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. | |
+ | |
+*/ | |
+/* | |
+ 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 3 | |
+ 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_FP_TRUNCATE_MODE_H | |
+#define DSP_FP_TRUNCATE_MODE_H | |
+ | |
+#if defined(__i386__) && !defined(__SSE2__) | |
#define fstcw(i) \ | |
__asm__ __volatile__ ("fstcw %0" : "=m" (i)) | |
@@ -32,6 +55,14 @@ | |
#endif | |
namespace DSP { | |
+ | |
+static inline int | |
+fast_trunc (float f) | |
+{ | |
+ int i; | |
+ fistp (f, i); | |
+ return i; | |
+} | |
class FPTruncateMode | |
{ | |
@@ -53,4 +84,4 @@ class FPTruncateMode | |
} /* namespace DSP */ | |
-#endif /* _DSP_FP_TRUNCATE_MODE_H_ */ | |
+#endif /* DSP_FP_TRUNCATE_MODE_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/Lorenz.h b/plugins/LadspaEffect/caps/dsp/Lorenz.h | |
index bb57a7cc3..5247c43a1 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/Lorenz.h | |
+++ b/plugins/LadspaEffect/caps/dsp/Lorenz.h | |
@@ -1,7 +1,7 @@ | |
/* | |
dsp/Lorenz.h | |
- Copyright 2001-4 Tim Goetze <tim@quitte.de> | |
+ Copyright 2001-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -11,7 +11,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,8 +25,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_LORENZ_H_ | |
-#define _DSP_LORENZ_H_ | |
+#ifndef DSP_LORENZ_H | |
+#define DSP_LORENZ_H | |
namespace DSP { | |
@@ -56,16 +56,9 @@ class Lorenz | |
{ | |
I = 0; | |
- x[0] = .1 + seed - frandom() * .1; | |
- y[0] = 0; | |
- z[0] = 0; | |
- | |
- /* progress quickly to get a 'stable' system */ | |
- h = .001; | |
- | |
- int n = 10000 + min ((int) (10000 * seed), 10000); | |
- for (int i = 0; i < n; ++i) | |
- step(); | |
+ x[0] = -2.884960 + seed; | |
+ y[0] = -5.549104; | |
+ z[0] = 7.801511; | |
h = _h; | |
} | |
@@ -80,29 +73,23 @@ class Lorenz | |
{ | |
int J = I ^ 1; | |
- x[J] = x[I] + h * a * (y[I] - x[I]); | |
- y[J] = y[I] + h * (x[I] * (b - z[I]) - y[I]); | |
- z[J] = z[I] + h * (x[I] * y[I] - c * z[I]); | |
+ x[J] = x[I] + h*a*(y[I] - x[I]); | |
+ y[J] = y[I] + h*(x[I] * (b - z[I]) - y[I]); | |
+ z[J] = z[I] + h*(x[I] * y[I] - c * z[I]); | |
I = J; | |
} | |
- | |
- double get_x() | |
- { | |
- return .024 * (x[I] - .172); | |
- } | |
- | |
- double get_y() | |
- { | |
- return .018 * (y[I] - .172); | |
- } | |
- | |
- double get_z() | |
- { | |
- return .019 * (z[I] - 25.43); | |
- } | |
+#if 0 | |
+ double get_x() {return x[I];} | |
+ double get_y() {return y[I];} | |
+ double get_z() {return z[I];} | |
+#else | |
+ double get_x() {return (x[I]+0.01661)*-.04;} | |
+ double get_y() {return (y[I]-0.02379)*-.03;} | |
+ double get_z() {return (z[I]-24.1559)*.03;} | |
+#endif | |
}; | |
} /* namespace DSP */ | |
-#endif /* _DSP_LORENZ_H_ */ | |
+#endif /*DSP_LORENZ_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/RBJ.h b/plugins/LadspaEffect/caps/dsp/RBJ.h | |
index 0a1db6b39..7f0acb977 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/RBJ.h | |
+++ b/plugins/LadspaEffect/caps/dsp/RBJ.h | |
@@ -1,17 +1,15 @@ | |
/* | |
dsp/RBJ.h | |
- Copyright | |
- 1998 Robert Bristow-Johnson | |
- 2004-10 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
+ | |
+ Filter prototypes from Robert Bristow-Johnson's lovely eq cookbook. | |
- biquad prototypes according to the eq cookbook. easy-to-use, nice, | |
- predictable filters. thanks rbj! | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,10 +23,10 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_RBJ_H_ | |
-#define _DSP_RBJ_H_ | |
+#ifndef DSP_RBJ_H | |
+#define DSP_RBJ_H | |
-#include "BiQuad.h" | |
+#include "IIR2.h" | |
namespace DSP { | |
namespace RBJ { | |
@@ -65,11 +63,11 @@ class RBJ | |
ca[2] = b[2] * a0i; | |
/* our bi-quad implementation /adds/ b[i] * y[i] so we need to | |
- * toggle the sign for the b[] coefficients. | |
- */ | |
- cb[0] = 0; | |
- cb[1] = -a[1] * a0i; | |
- cb[2] = -a[2] * a0i; | |
+ * toggle the sign for the b[] coefficients. */ | |
+ a0i = -a0i; | |
+ | |
+ cb[1] = a[1] * a0i; | |
+ cb[2] = a[2] * a0i; | |
} | |
}; | |
@@ -80,12 +78,9 @@ class LP | |
: public RBJ | |
{ | |
public: | |
- LP (double f, double Q, BiQuad & bq) : RBJ (f, Q) | |
- { ab (bq.a, bq.b); } | |
- | |
template <class T> | |
- LP (double f, double Q, T * ca, T * cb) : RBJ (f, Q) | |
- { ab (ca, cb); } | |
+ LP (double f, double Q, T& filter) : RBJ (f, Q) | |
+ { ab (filter.a, filter.b); } | |
template <class T> | |
void ab (T * ca, T * cb) | |
@@ -106,12 +101,9 @@ class BP | |
: public RBJ | |
{ | |
public: | |
- BP (double f, double Q, BiQuad & bq) : RBJ (f, Q) | |
- { ab (bq.a, bq.b); } | |
- | |
template <class T> | |
- BP (double f, double Q, T * ca, T * cb) : RBJ (f, Q) | |
- { ab (ca, cb); } | |
+ BP (double f, double Q, T& filter) : RBJ (f, Q) | |
+ { ab (filter.a, filter.b); } | |
template <class T> | |
void ab (T * ca, T * cb) | |
@@ -132,12 +124,9 @@ class HP | |
: public RBJ | |
{ | |
public: | |
- HP (double f, double Q, BiQuad & bq) : RBJ (f, Q) | |
- { ab (bq.a, bq.b); } | |
- | |
template <class T> | |
- HP (double f, double Q, T * ca, T * cb) : RBJ (f, Q) | |
- { ab (ca, cb); } | |
+ HP (double f, double Q, T& filter) : RBJ (f, Q) | |
+ { ab (filter.a, filter.b); } | |
template <class T> | |
void ab (T * ca, T * cb) | |
@@ -158,12 +147,9 @@ class Notch | |
: public RBJ | |
{ | |
public: | |
- Notch (double f, double Q, BiQuad & bq) : RBJ (f, Q) | |
- { ab (bq.a, bq.b); } | |
- | |
template <class T> | |
- Notch (double f, double Q, T * ca, T * cb) : RBJ (f, Q) | |
- { ab (ca, cb); } | |
+ Notch (double f, double Q, T& filter) : RBJ (f, Q) | |
+ { ab (filter.a, filter.b); } | |
template <class T> | |
void ab (T * ca, T * cb) | |
@@ -180,6 +166,30 @@ class Notch | |
} | |
}; | |
+class AllPass | |
+: public RBJ | |
+{ | |
+ public: | |
+ template <class T> | |
+ AllPass (double f, double Q, T& filter) : RBJ (f, Q) | |
+ { ab (filter.a, filter.b); } | |
+ | |
+ template <class T> | |
+ void ab (T * ca, T * cb) | |
+ { | |
+ b[0] = 1 - alpha; | |
+ b[1] = -2 * cos; | |
+ b[2] = 1 + alpha; | |
+ | |
+ a[0] = 1 + alpha; | |
+ a[1] = -2 * cos; | |
+ a[2] = 1 - alpha; | |
+ | |
+ make_direct_I (ca, cb); | |
+ } | |
+}; | |
+ | |
+ | |
/* shelving and peaking dept. ////////////////////////////////////////////// */ | |
class PeakShelve | |
@@ -194,7 +204,7 @@ class PeakShelve | |
{ | |
A = pow (10, dB * .025); | |
double S = Q; /* slope */ | |
- beta = sqrt ((A * A + 1) / S - (A - 1) * (A - 1)); | |
+ beta = sqrt ((A*A + 1)/S - (A-1)*(A-1)); | |
} | |
}; | |
@@ -202,28 +212,24 @@ class LoShelve | |
: public PeakShelve | |
{ | |
public: | |
- LoShelve (double f, double Q, double dB, BiQuad & bq) | |
- : PeakShelve (f, Q, dB) | |
- { ab (bq.a, bq.b); } | |
- | |
template <class T> | |
- LoShelve (double f, double Q, double dB, T * ca, T * cb) | |
+ LoShelve (double f, double Q, double dB, T& filter) | |
: PeakShelve (f, Q, dB) | |
- { ab (ca, cb); } | |
+ { ab (filter.a, filter.b); } | |
template <class T> | |
void ab (T * ca, T * cb) | |
{ | |
- double Ap1 = A + 1, Am1 = A - 1; | |
- double beta_sin = beta * sin; | |
+ double Ap1 = A+1, Am1 = A-1; | |
+ double beta = 2*sqrt(A)*alpha; | |
- b[0] = A * (Ap1 - Am1 * cos + beta_sin); | |
- b[1] = 2 * A * (Am1 - Ap1 * cos); | |
- b[2] = A * (Ap1 - Am1 * cos - beta_sin); | |
+ b[0] = A*(Ap1 - Am1*cos + beta); | |
+ b[1] = 2*A*(Am1 - Ap1*cos); | |
+ b[2] = A*(Ap1 - Am1*cos - beta); | |
- a[0] = Ap1 + Am1 * cos + beta_sin; | |
- a[1] = -2 * (Am1 + Ap1 * cos); | |
- a[2] = Ap1 + Am1 * cos - beta_sin; | |
+ a[0] = Ap1 + Am1*cos + beta; | |
+ a[1] = -2 * (Am1 + Ap1*cos); | |
+ a[2] = Ap1 + Am1*cos - beta; | |
make_direct_I (ca, cb); | |
} | |
@@ -233,14 +239,10 @@ class PeakingEQ | |
: public PeakShelve | |
{ | |
public: | |
- PeakingEQ (double f, double Q, double dB, BiQuad & bq) | |
- : PeakShelve (f, Q, dB) | |
- { ab (bq.a, bq.b); } | |
- | |
template <class T> | |
- PeakingEQ (double f, double Q, double dB, T * ca, T * cb) | |
+ PeakingEQ (double f, double Q, double dB, T& filter) | |
: PeakShelve (f, Q, dB) | |
- { ab (ca, cb); } | |
+ { ab (filter.a, filter.b); } | |
template <class T> | |
void ab (T * ca, T * cb) | |
@@ -261,28 +263,24 @@ class HiShelve | |
: public PeakShelve | |
{ | |
public: | |
- HiShelve (double f, double Q, double dB, BiQuad & bq) | |
- : PeakShelve (f, Q, dB) | |
- { ab (bq.a, bq.b); } | |
- | |
template <class T> | |
- HiShelve (double f, double Q, double dB, T * ca, T * cb) | |
+ HiShelve (double f, double Q, double dB, T& filter) | |
: PeakShelve (f, Q, dB) | |
- { ab (ca, cb); } | |
+ { ab (filter.a, filter.b); } | |
template <class T> | |
void ab (T * ca, T * cb) | |
{ | |
double Ap1 = A + 1, Am1 = A - 1; | |
- double beta_sin = beta * sin; | |
+ double beta = 2*sqrt(A)*alpha; | |
- b[0] = A * (Ap1 + Am1 * cos + beta_sin); | |
+ b[0] = A * (Ap1 + Am1 * cos + beta); | |
b[1] = -2 * A * (Am1 + Ap1 * cos); | |
- b[2] = A * (Ap1 + Am1 * cos - beta_sin); | |
+ b[2] = A * (Ap1 + Am1 * cos - beta); | |
- a[0] = Ap1 - Am1 * cos + beta_sin; | |
+ a[0] = Ap1 - Am1 * cos + beta; | |
a[1] = 2 * (Am1 - Ap1 * cos); | |
- a[2] = Ap1 - Am1 * cos - beta_sin; | |
+ a[2] = Ap1 - Am1 * cos - beta; | |
make_direct_I (ca, cb); | |
} | |
@@ -291,4 +289,4 @@ class HiShelve | |
} /* ~namespace RBJ */ | |
} /* ~namespace DSP */ | |
-#endif /* _DSP_RBJ_H_ */ | |
+#endif /* DSP_RBJ_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/RMS.h b/plugins/LadspaEffect/caps/dsp/RMS.h | |
index 3b7806729..4b21c0384 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/RMS.h | |
+++ b/plugins/LadspaEffect/caps/dsp/RMS.h | |
@@ -1,17 +1,17 @@ | |
/* | |
dsp/RMS.h | |
- Copyright 2004 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- root-mean-square accumulator. | |
+ Sliding window, running sum root-mean-square. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,22 +25,26 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_RMS_H_ | |
-#define _DSP_RMS_H_ | |
+#ifndef DSP_RMS_H | |
+#define DSP_RMS_H | |
namespace DSP { | |
+template <int N> | |
class RMS | |
{ | |
protected: | |
- sample_t buffer[64]; | |
+ sample_t buffer[N]; | |
int write; | |
public: | |
- double sum; | |
+ double sum, over_N; | |
RMS() | |
{ | |
+ /* g++ doesn't reliably optimise the division in get() below into | |
+ * a multiplication with 1/N */ | |
+ over_N = 1./N; | |
write = 0; | |
reset(); | |
} | |
@@ -51,27 +55,21 @@ class RMS | |
memset (buffer, 0, sizeof (buffer)); | |
} | |
- /* caution: pass in the *squared* sample value */ | |
+ /* caution: pass in the SQUARED! sample value */ | |
void store (sample_t x) | |
{ | |
sum -= buffer[write]; | |
sum += (buffer[write] = x); | |
- write = (write + 1) & 63; | |
+ write = (write+1) & (N-1); | |
} | |
- sample_t process (sample_t x) | |
+ sample_t get() | |
{ | |
- store (x); | |
- return rms(); | |
- } | |
- | |
- sample_t rms() | |
- { | |
- /* fabs it before sqrt, just in case ... */ | |
- return sqrt (fabs (sum) / 64); | |
+ /* lack of running sum accuracy necessitates fabs() */ | |
+ return sqrt(fabs(sum * over_N)); | |
} | |
}; | |
} /* namespace DSP */ | |
-#endif /* _DSP_RMS_H_ */ | |
+#endif /* DSP_RMS_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/Roessler.h b/plugins/LadspaEffect/caps/dsp/Roessler.h | |
index e4ec86303..f45d97b77 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/Roessler.h | |
+++ b/plugins/LadspaEffect/caps/dsp/Roessler.h | |
@@ -1,17 +1,17 @@ | |
/* | |
dsp/Roessler.h | |
- Copyright 2003-4 Tim Goetze <tim@quitte.de> | |
+ Copyright 2003-13 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- Roessler fractal. | |
+ Roessler attractor. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,8 +25,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_ROESSLER_H_ | |
-#define _DSP_ROESSLER_H_ | |
+#ifndef DSP_ROESSLER_H | |
+#define DSP_ROESSLER_H | |
namespace DSP { | |
@@ -58,43 +58,39 @@ class Roessler | |
I = 0; | |
- x[0] = .0001 + .0001 * seed; | |
- y[0] = .0001; | |
- z[0] = .0001; | |
- | |
- for (int i = 0; i < 5000; ++i) | |
- get(); | |
+ x[0] = -0.327732 + .0001 * seed; | |
+ y[0] = 2.569375; | |
+ z[0] = 0.036099; | |
} | |
- sample_t get() | |
+ void step() | |
{ | |
int J = I ^ 1; | |
- x[J] = x[I] + h * (- y[I] - z[I]); | |
- y[J] = y[I] + h * (x[I] + a * y[I]); | |
- z[J] = z[I] + h * (b + z[I] * (x[I] - c)); | |
+ x[J] = x[I] + h*(-y[I] - z[I]); | |
+ y[J] = y[I] + h*(x[I] + a*y[I]); | |
+ z[J] = z[I] + h*(b + z[I]*(x[I] - c)); | |
I = J; | |
- | |
- return x[I] * .01725 + z[I] * .015; | |
} | |
- double get_x() | |
- { | |
- return x[I]; | |
- } | |
- | |
- double get_y() | |
+ sample_t get() | |
{ | |
- return y[I]; | |
+ step(); | |
+ return x[I]*.01725 + z[I]*.015; | |
} | |
- double get_z() | |
- { | |
- return z[I]; | |
- } | |
+#if 0 | |
+ double get_x() { return x[I]; } | |
+ double get_y() { return y[I]; } | |
+ double get_z() { return z[I]; } | |
+#else | |
+ double get_x() {return (x[I]-0.22784)*-.08;} | |
+ double get_y() {return (y[I]+1.13942)*-.09;} | |
+ double get_z() {return (z[I]-1.13929)*.055;} | |
+#endif | |
}; | |
} /* namespace DSP */ | |
-#endif /* _DSP_ROESSLER_H_ */ | |
+#endif /* DSP_ROESSLER_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/SVF.h b/plugins/LadspaEffect/caps/dsp/SVF.h | |
index ccd5734ab..7d387bf86 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/SVF.h | |
+++ b/plugins/LadspaEffect/caps/dsp/SVF.h | |
@@ -1,18 +1,20 @@ | |
/* | |
dsp/SVF.h | |
- Copyright 2002-4 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-12 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- ladder filter in Chamberlin topology. supports largely independent | |
- f and Q adjustments and sweeps. | |
+ SVF*: State-variable filter in Chamberlin topology, | |
+ supports f and Q sweeps. | |
+ | |
+ StackedSVF: building ladders from the above. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -26,7 +28,7 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
/* | |
- inspired by this music-dsp entry: | |
+ Based on this music-dsp entry: | |
State Variable Filter (Double Sampled, Stable) | |
Type : 2 Pole Low, High, Band, Notch and Peaking | |
@@ -69,14 +71,14 @@ | |
output[i] = out; | |
} | |
*/ | |
- | |
-#ifndef _DSP_SVF_H_ | |
-#define _DSP_SVF_H_ | |
+#ifndef DSP_SVF_H | |
+#define DSP_SVF_H | |
namespace DSP { | |
-template <int OVERSAMPLE> | |
-class SVF | |
+/* oversampling only makes sense for LP */ | |
+template <int Oversample> | |
+class SVFI | |
{ | |
protected: | |
/* loop parameters */ | |
@@ -94,7 +96,7 @@ class SVF | |
High = 2 | |
}; | |
- SVF() | |
+ SVFI() | |
{ | |
set_out (Low); | |
set_f_Q (.1, .1); | |
@@ -108,7 +110,7 @@ class SVF | |
void set_f_Q (double fc, double Q) | |
{ | |
/* this is a very tight limit */ | |
- f = min (.25, 2 * sin (M_PI * fc / OVERSAMPLE)); | |
+ f = min (.25, 2 * sin (M_PI * fc / Oversample)); | |
q = 2 * cos (pow (Q, .1) * M_PI * .5); | |
q = min (q, min (2., 2 / f - f * .5)); | |
@@ -135,56 +137,179 @@ class SVF | |
{ | |
x = qnorm * x; | |
- for (int pass = 0; pass < OVERSAMPLE; ++pass) | |
+ for (int pass = 0; pass < Oversample; ++pass) | |
{ | |
hi = x - lo - q * band; | |
band += f * hi; | |
lo += f * band; | |
- /* zero-padding, not 0th order holding. */ | |
+ /* zero padding */ | |
x = 0; | |
} | |
- /* peak and notch outputs don't belong in the loop, put them | |
- * here (best in a template) if needed. */ | |
- | |
return *out; | |
} | |
}; | |
-template <int STACKED, int OVERSAMPLE> | |
+/* //////////////////////////////////////////////////////////////////////// */ | |
+ | |
+/* | |
+ Alternative SVF implementation based on (this is the corrected version): | |
+ | |
+ From andy@cytomic.com Mon May 23 21:47:40 2011 | |
+ Subject: Re: [music-dsp] Trapezoidal and other integration methods applied tomusical resonant filters | |
+ From: Andrew Simper <andy@cytomic.com> | |
+ To: A discussion list for music-related DSP <music-dsp@music.columbia.edu> | |
+ Reply-To: A discussion list for music-related DSP <music-dsp@music.columbia.edu> | |
+ Date: Tue, 17 May 2011 17:48:27 +1000 | |
+ | |
+ Hi Vadim, | |
+ | |
+ I want to thank you for your excellent paper "Generation of | |
+ bandlimited sync transitions for sine waveforms", which I feel is the | |
+ most thorough coverage in a paper of the method I use in Synth Squad, | |
+ which I call "corrective grains". You also outline in that paper | |
+ another couple of methods which I didn't even know existed, so I thank | |
+ you for showing me some interesting new ways to approach the problem | |
+ of band limiting transitions in waveforms. | |
+ | |
+ I'm not sure what a "non-zero impedance approach" is, but standard | |
+ circuit simulation stuff handles any number of arbitrary impedance | |
+ devices connected in any topology, so I'm happy to not try | |
+ re-inventing anything since I can apply these techniques in a brain | |
+ dead crank the handle type way and get great results for both the | |
+ linear and non-linear cases. | |
+ | |
+ Thanks for letting me know about all the papers you know of, it sounds | |
+ like I should get on and publish something as it isn't really covered | |
+ in detail anywhere yet. As a start below I have included the | |
+ difference equation for the linear trapezoidal svf: | |
+ | |
+ init: | |
+ v1 = v2 = 0; | |
+ v0z = v1z = v2z = 0; | |
+ | |
+ process: | |
+ g = tan (pi * cutoff / samplerate); | |
+ k = damping factor (typically in the range 2 to 0); | |
+ v1z = v1; | |
+ v2z = v2; | |
+ v0 = input; | |
+ v1 = v1z + g * (v0 + v0z - 2*(g + k)*v1z - 2*v2z) / (1 + g*(g + k)); | |
+ v2 = v2z + g * (v1 + v1z); | |
+ v0z = v0; | |
+ | |
+ outputs (the same as the analog circuit): | |
+ band = v1; | |
+ low = v2; | |
+ high = v0 - k*v1 - v2; | |
+ notch = high + low; | |
+ peak = high - low; | |
+ | |
+ | |
+ Andy | |
+ -- | |
+ cytomic - sound music software | |
+ skype: andrewsimper | |
+*/ | |
+ | |
+class SVFII | |
+{ | |
+ public: | |
+ sample_t v[3]; | |
+ sample_t k, g, c1, c2; | |
+ int out; | |
+ | |
+ public: | |
+ SVFII() { out = 0; reset(); } | |
+ | |
+ void set_out (int o) { out = 2-(o&1); } | |
+ | |
+ void reset() | |
+ { | |
+ for (uint i=0; i < 3; ++i) | |
+ v[i] = 0; | |
+ } | |
+ | |
+ void set_f_Q (sample_t fc, sample_t q) | |
+ { | |
+ k = (1-.99*q); | |
+ g = tan (fc*M_PI); | |
+ c1 = 2*(g+k); | |
+ c2 = g/(1 + g*(g+k)); | |
+ } | |
+ | |
+ sample_t process (sample_t x) | |
+ { _process (x); return v[out]; } | |
+ | |
+ void _process (sample_t x) | |
+ { | |
+ sample_t v1 = v[1] + c2*(x + v[0] - c1*v[1] - 2*v[2]); | |
+ sample_t v2 = v[2] + g*(v1 + v[1]); | |
+ v[0] = x; | |
+ v[1] = v1; | |
+ v[2] = v2; | |
+ } | |
+ | |
+ /* | |
+ outputs (the same as the analog circuit): | |
+ band = v1; | |
+ low = v2; | |
+ high = v0 - k*v1 - v2; | |
+ notch = high + low; | |
+ peak = high - low; | |
+ */ | |
+ | |
+ sample_t process_lp (sample_t x) | |
+ { _process (x); return v[2]; } | |
+ sample_t process_bp (sample_t x) | |
+ { _process (x); return v[1]; } | |
+ sample_t process_hp (sample_t x) | |
+ { _process (x); return v[0] - k*v[1] - v[2]; } | |
+}; | |
+ | |
+/* //////////////////////////////////////////////////////////////////////// */ | |
+ | |
+template <int N, class SVF> | |
class StackedSVF | |
{ | |
public: | |
- SVF<OVERSAMPLE> svf [STACKED]; | |
+ SVF svf[N]; | |
void reset() | |
{ | |
- for (int i = 0; i < STACKED; ++i) | |
+ for (int i = 0; i < N; ++i) | |
svf[i].reset(); | |
} | |
void set_out (int out) | |
{ | |
- for (int i = 0; i < STACKED; ++i) | |
+ for (int i = 0; i < N; ++i) | |
svf[i].set_out (out); | |
} | |
void set_f_Q (double f, double Q) | |
{ | |
- for (int i = 0; i < STACKED; ++i) | |
+ for (int i = 0; i < N; ++i) | |
svf[i].set_f_Q (f, Q); | |
} | |
sample_t process (sample_t x) | |
{ | |
- for (int i = 0; i < STACKED; ++i) | |
+ for (int i = 0; i < N; ++i) | |
x = svf[i].process (x); | |
+ return x; | |
+ } | |
+ template<clip_func_t clip> | |
+ sample_t process (sample_t x, sample_t g) | |
+ { | |
+ for (int i = 0; i < N; ++i) | |
+ x = clip (svf[i].process (g*x)); | |
return x; | |
} | |
}; | |
} /* namespace DSP */ | |
-#endif /* _DSP_SVF_H_ */ | |
+#endif /* DSP_SVF_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/Sine.h b/plugins/LadspaEffect/caps/dsp/Sine.h | |
index a54c66161..a3c0a2737 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/Sine.h | |
+++ b/plugins/LadspaEffect/caps/dsp/Sine.h | |
@@ -1,17 +1,18 @@ | |
/* | |
dsp/Sine.h | |
- Copyright 2003-4 Tim Goetze <tim@quitte.de> | |
+ Copyright 2003-14 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- direct form I recursive sin() generator. | |
+ Direct form I recursive sin() generator. Utilising doubles | |
+ for stability. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,14 +26,14 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_SINE_H_ | |
-#define _DSP_SINE_H_ | |
+#ifndef DSP_SINE_H | |
+#define DSP_SINE_H | |
namespace DSP { | |
class Sine | |
{ | |
- protected: | |
+ public: | |
int z; | |
double y[2]; | |
double b; | |
@@ -50,28 +51,28 @@ class Sine | |
set_f (f, fs, phase); | |
} | |
- Sine (double omega, double phase = 0.) | |
+ Sine (double w, double phase = 0.) | |
{ | |
- set_f (omega, phase); | |
+ set_f (w, phase); | |
} | |
inline void set_f (double f, double fs, double phase) | |
{ | |
- set_f (f * M_PI / fs, phase); | |
+ set_f (f*2*M_PI/fs, phase); | |
} | |
inline void set_f (double w, double phase) | |
{ | |
- b = 2 * cos (w); | |
+ b = 2*cos(w); | |
y[0] = sin (phase - w); | |
- y[1] = sin (phase - w * 2); | |
+ y[1] = sin (phase - 2*w); | |
z = 0; | |
} | |
/* advance and return 1 sample */ | |
inline double get() | |
{ | |
- register double s = b * y[z]; | |
+ register double s = b*y[z]; | |
z ^= 1; | |
s -= y[z]; | |
return y[z] = s; | |
@@ -79,17 +80,34 @@ class Sine | |
double get_phase() | |
{ | |
- double x0 = y[z], x1 = b * y[z] - y[z^1]; | |
- double phi = asin (x0); | |
+ double x0 = y[z], x1 = b*y[z] - y[z^1]; | |
+ double phi = asin(x0); | |
- /* slope is falling, we're into the 2nd half. */ | |
- if (x1 < x0) | |
- return M_PI - phi; | |
+ /* slope is falling: into the 2nd half. */ | |
+ return x1 < x0 ? M_PI - phi : phi; | |
+ } | |
+}; | |
+ | |
+/* same as above but including a damping coefficient d */ | |
+class DampedSine | |
+: public Sine | |
+{ | |
+ public: | |
+ double d; | |
- return phi; | |
+ public: | |
+ DampedSine() | |
+ { d = 1; } | |
+ | |
+ inline double get() | |
+ { | |
+ register double s = b * y[z]; | |
+ z ^= 1; | |
+ s -= d * y[z]; | |
+ return y[z] = d * s; | |
} | |
}; | |
} /* namespace DSP */ | |
-#endif /* _DSP_SINE_H_ */ | |
+#endif /* DSP_SINE_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/TDFII.h b/plugins/LadspaEffect/caps/dsp/TDFII.h | |
index 0252bc47a..eb2028bb0 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/TDFII.h | |
+++ b/plugins/LadspaEffect/caps/dsp/TDFII.h | |
@@ -3,6 +3,7 @@ | |
Copyright 2006-7 | |
David Yeh <dtyeh@ccrma.stanford.edu> (implementation) | |
+ 2006-14 | |
Tim Goetze <tim@quitte.de> (cosmetics) | |
transposed Direct Form II digital filter. | |
@@ -13,7 +14,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -27,23 +28,23 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_TDFII_H_ | |
-#define _DSP_TDFII_H_ | |
+#ifndef DSP_TDFII_H | |
+#define DSP_TDFII_H | |
namespace DSP { | |
-// ORDER is the highest power of s in the transfer function | |
-template <int Order> | |
+/* N is the highest power of s in the transfer function */ | |
+template <int N> | |
class TDFII | |
{ | |
public: | |
- double a[Order + 1]; | |
- double b[Order + 1]; | |
- double h[Order + 1]; | |
+ double a[N+1]; | |
+ double b[N+1]; | |
+ double h[N+1]; | |
void reset() | |
{ | |
- for (int i = 0; i <= Order; ++i) | |
+ for (int i = 0; i <= N; ++i) | |
h[i] = 0; // zero state | |
} | |
@@ -55,8 +56,9 @@ class TDFII | |
void clear() | |
{ | |
- for (int i=0; i<= Order; i++) | |
- a[i] = b[i] = 1; | |
+ for (int i=0; i<= N; i++) | |
+ a[i] = b[i] = 0; | |
+ b[0] = 1; | |
} | |
/* per-band recursion: | |
@@ -64,12 +66,12 @@ class TDFII | |
*/ | |
sample_t process (sample_t s) | |
{ | |
- double y = h[0] + b[0] * 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; | |
+ for (int i=1; i<N; ++i) | |
+ h[i-1] = h[i] + b[i]*s - a[i]*y; | |
- h[Order - 1] = b[Order] * s - a[Order] * y; | |
+ h[N-1] = b[N]*s - a[N]*y; | |
return (sample_t) y; | |
} | |
@@ -77,4 +79,4 @@ class TDFII | |
} /* namespace DSP */ | |
-#endif /* _DSP_TDFII_H_ */ | |
+#endif /* DSP_TDFII_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/ToneStack.h b/plugins/LadspaEffect/caps/dsp/ToneStack.h | |
index 4d0600856..82e300241 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/ToneStack.h | |
+++ b/plugins/LadspaEffect/caps/dsp/ToneStack.h | |
@@ -1,8 +1,10 @@ | |
/* | |
ToneStack.h | |
- Copyright 2006-9 | |
+ Copyright 2006 | |
David Yeh <dtyeh@ccrma.stanford.edu> (implementation) | |
+ | |
+ Copyright 2006-14 | |
Tim Goetze <tim@quitte.de> (cosmetics) | |
Tone Stack emulation. | |
@@ -11,7 +13,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,14 +27,12 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_TONESTACK_H_ | |
-#define _DSP_TONESTACK_H_ | |
+#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 { | |
@@ -41,9 +41,6 @@ typedef struct { | |
double C1, C2, C3; | |
} TSParameters; | |
-#define TS_N_PRESETS (sizeof (DSP::ToneStack::presets) / \ | |
- sizeof (DSP::TSParameters)) | |
- | |
class ToneStack | |
{ | |
private: | |
@@ -57,31 +54,17 @@ class ToneStack | |
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 fs; | |
TDFII<Order> filter; | |
public: | |
- int model; | |
- | |
- static TSParameters presets[]; /* in ../ToneStack.cc */ | |
- static int n_presets; | |
+ /* in ../ToneStack.cc */ | |
+ static const char * presetdict; | |
+ static TSParameters presets[]; | |
ToneStack() | |
{ | |
- model = -1; | |
- setparams (presets[0]); | |
+ setmodel(0); | |
} | |
void init (double _fs) | |
@@ -89,24 +72,12 @@ class ToneStack | |
c = 2 * _fs; | |
} | |
- void activate (sample_t ** ports) | |
- { | |
- filter.reset(); | |
- } | |
- | |
- /* pass in pointer to ports and relative index of first eq band control */ | |
- void start_cycle (sample_t ** ports, int bassindex = 1) | |
- { | |
- int m = clamp<int> ((int) *ports[0], 0, n_presets - 1); | |
- if (m != model) | |
- { | |
- model = m; | |
- setparams (presets[model]); | |
+ void reset() { filter.reset(); } | |
+ void setmodel (int model) | |
+ { | |
+ setparams (presets[model]); | |
filter.reset(); | |
} | |
- updatecoefs (ports + bassindex); | |
- } | |
- | |
void setparams (TSParameters & p) | |
{ | |
@@ -148,12 +119,17 @@ class ToneStack | |
filter.reset(); | |
} | |
- inline void updatecoefs (sample_t ** ports) | |
+ /* extensively reworked TG 5/2011 */ | |
+ inline void updatecoefs (double b, double m, double t) | |
{ | |
- /* 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); | |
+ struct { | |
+ double a1, a2, a3; | |
+ double b1, b2, b3; | |
+ } acoef; // analog coefficients | |
+ | |
+ // digital coefficients | |
+ double dcoef_a[Order + 1]; | |
+ double dcoef_b[Order + 1]; | |
m = (m - 1) * 3.5; | |
m = pow (10, m); | |
@@ -161,93 +137,36 @@ class ToneStack | |
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; | |
+ | |
+ double c2 = c*c, c3 = c2*c; | |
+ | |
+ acoef.a1 *= c, acoef.a2 *= c2, acoef.a3 *= c3; | |
+ | |
+ dcoef_a[0] = -1 - acoef.a1 - acoef.a2 - acoef.a3; // sets scale | |
+ dcoef_a[1] = -3 - acoef.a1 + acoef.a2 + 3*acoef.a3; | |
+ dcoef_a[2] = -3 + acoef.a1 + acoef.a2 - 3*acoef.a3; | |
+ dcoef_a[3] = -1 + acoef.a1 - acoef.a2 + acoef.a3; | |
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; | |
+ | |
+ acoef.b1 *= c, acoef.b2 *= c2, acoef.b3 *= c3; | |
+ | |
+ dcoef_b[0] = - acoef.b1 - acoef.b2 - acoef.b3; | |
+ dcoef_b[1] = - acoef.b1 + acoef.b2 + 3*acoef.b3; | |
+ dcoef_b[2] = acoef.b1 + acoef.b2 - 3*acoef.b3; | |
+ dcoef_b[3] = acoef.b1 - acoef.b2 + acoef.b3; | |
+ double a0i = 1. / dcoef_a[0]; | |
for (int i=1; i<=3; ++i) | |
- filter.a[i] = dcoef_a[i] / dcoef_a[0]; | |
+ filter.a[i] = dcoef_a[i] * a0i; | |
for (int i=0; i<=3; ++i) | |
- filter.b[i] = dcoef_b[i] / dcoef_a[0]; | |
+ filter.b[i] = dcoef_b[i] * a0i; | |
} | |
- // actualy do the DFII filtering, one sample at a time | |
- inline sample_t process (sample_t 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; | |
- LatFilt<Order> filter; | |
- | |
- public: | |
- ToneStackLT() | |
- { | |
- setparams (250000, 1000000, 25000, 56000, 0.25e-9, 20e-9, 20e-9); | |
- } | |
- | |
- void init (double _fs) | |
- { } | |
- | |
- void activate (sample_t ** ports) | |
- { | |
- filter.reset(); | |
- } | |
- | |
- void setparams | |
- (double R1, double R2, double R3, double R4, | |
- double C1, double C2, double C3) { | |
- } | |
- | |
- void updatecoefs (sample_t ** 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 | |
+ /* actually do the DFII filtering, one sample at a time */ | |
inline sample_t process (sample_t x) | |
{ | |
return filter.process (x); | |
@@ -256,4 +175,4 @@ class ToneStackLT | |
} /* namespace DSP */ | |
-#endif /* _DSP_TONESTACK_H_ */ | |
+#endif /* DSP_TONESTACK_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/White.h b/plugins/LadspaEffect/caps/dsp/White.h | |
index 1a9fe6ea7..bc5506187 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/White.h | |
+++ b/plugins/LadspaEffect/caps/dsp/White.h | |
@@ -1,7 +1,7 @@ | |
/* | |
dsp/White.h | |
- Copyright 2004 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-13 Tim Goetze <tim@quitte.de> | |
simple white noise generator, based on Jon Dattorro's 3/2002 JAES | |
paper. quite an elegant design; consumes next to no CPU on a processor | |
@@ -11,7 +11,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,8 +25,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_WHITE_H_ | |
-#define _DSP_WHITE_H_ | |
+#ifndef DSP_WHITE_H | |
+#define DSP_WHITE_H | |
namespace DSP { | |
@@ -56,27 +56,23 @@ class White | |
/* 32-bit version */ | |
sample_t get() | |
{ | |
-# define BIT(y) ((b << (31 - y)) & 0x80000000) | |
- | |
+ #define BIT(y) ((b << (31 - y)) & 0x80000000) | |
b = ((BIT (28) ^ BIT (27) ^ BIT (1) ^ BIT (0))) | (b >> 1); | |
return (4.6566128730773926e-10 * (sample_t) b) - 1; | |
- | |
-# undef BIT | |
+ #undef BIT | |
} | |
/* 31-bit version, at least 6 instructions less / sample. probably only | |
* pays off on a processor not providing a decent binary shift. */ | |
sample_t get_31() | |
{ | |
-# define BIT(y) ((b << (30 - y)) & 0x40000000) | |
- | |
+ #define BIT(y) ((b << (30 - y)) & 0x40000000) | |
b = ((BIT (3) ^ BIT (0))) | (b >> 1); | |
return (9.3132257461547852e-10 * (sample_t) b) - 1; | |
- | |
-# undef BIT | |
+ #undef BIT | |
} | |
}; | |
} /* namespace DSP */ | |
-#endif /* _DSP_WHITE_H_ */ | |
+#endif /* DSP_WHITE_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/sinc.h b/plugins/LadspaEffect/caps/dsp/sinc.h | |
index b002f234d..2c5231304 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/sinc.h | |
+++ b/plugins/LadspaEffect/caps/dsp/sinc.h | |
@@ -11,7 +11,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,8 +25,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _SINC_H_ | |
-#define _SINC_H_ | |
+#ifndef DSP_SINC_H | |
+#define DSP_SINC_H | |
#include "Sine.h" | |
@@ -53,6 +53,6 @@ sinc (double omega, sample_t * s, int n) | |
} | |
} | |
-}; /* namespace DSP */ | |
+} /* namespace DSP */ | |
-#endif /* _SINC_H_ */ | |
+#endif /* DSP_SINC_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/util.h b/plugins/LadspaEffect/caps/dsp/util.h | |
index 09416b5a5..50c6cb652 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/util.h | |
+++ b/plugins/LadspaEffect/caps/dsp/util.h | |
@@ -1,7 +1,7 @@ | |
/* | |
dsp/util.h | |
- Copyright 2002-4 Tim Goetze <tim@quitte.de> | |
+ Copyright 2002-12 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -11,7 +11,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,21 +25,27 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_UTIL_H_ | |
-#define _DSP_UTIL_H_ | |
+#ifndef DSP_UTIL_H | |
+#define DSP_UTIL_H | |
namespace DSP { | |
-inline int next_power_of_2 (int n) | |
-{ | |
- assert (n <= 0x40000000); | |
- | |
- int m = 1; | |
- | |
- while (m < n) | |
- m <<= 1; | |
+inline float pow2 (float x) { return x * x; } | |
+inline float pow3 (float x) { return x * pow2(x); } | |
+inline float pow4 (float x) { return pow2 (pow2(x)); } | |
+inline float pow5 (float x) { return x * pow4(x); } | |
+inline float pow6 (float x) { return pow3 (pow2(x)); } | |
+inline float pow7 (float x) { return x * (pow6 (x)); } | |
+inline float pow8 (float x) { return pow2 (pow4 (x)); } | |
- return m; | |
+inline float | |
+sgn (float x) | |
+{ | |
+ union { float f; uint32 i; } u; | |
+ u.f = x; | |
+ u.i &= 0x80000000; | |
+ u.i |= 0x3F800000; | |
+ return u.f; | |
} | |
inline bool | |
@@ -58,18 +64,6 @@ isprime (int v) | |
return true; | |
} | |
-inline double | |
-db2lin (double db) | |
-{ | |
- return pow (10., db * .05); | |
-} | |
- | |
-inline double | |
-lin2db (double lin) | |
-{ | |
- return 20. * log10 (lin); | |
-} | |
- | |
} /* namespace DSP */ | |
-#endif /* _DSP_UTIL_H_ */ | |
+#endif /* DSP_UTIL_H */ | |
diff --git a/plugins/LadspaEffect/caps/dsp/windows.h b/plugins/LadspaEffect/caps/dsp/windows.h | |
index 949a95818..b0b61b873 100644 | |
--- a/plugins/LadspaEffect/caps/dsp/windows.h | |
+++ b/plugins/LadspaEffect/caps/dsp/windows.h | |
@@ -1,17 +1,17 @@ | |
/* | |
dsp/windows.h | |
- Copyright 2004-11 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-12 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
- select few common windowing algorithms. | |
+ Window functions. | |
*/ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -25,8 +25,8 @@ | |
02111-1307, USA or point your web browser to http://www.gnu.org. | |
*/ | |
-#ifndef _DSP_WINDOWS_H_ | |
-#define _DSP_WINDOWS_H_ | |
+#ifndef DSP_WINDOWS_H | |
+#define DSP_WINDOWS_H | |
namespace DSP { | |
@@ -48,29 +48,43 @@ apply_window (sample_t &d, sample_t s) | |
template <window_sample_func_t F> | |
void | |
-hanning (sample_t * s, int n) | |
+hann (sample_t * s, int n, double step = 1) | |
{ | |
- /* could speed up by using DSP::Sine but we rarely use this window */ | |
+ step = step / n; | |
+ | |
for (int i = 0; i < n; ++i) | |
{ | |
- register double f = (double) i / n - 1; | |
+ register double f = i * step; | |
F (s[i], .5 - .5 * cos (2 * M_PI * f)); | |
} | |
} | |
+template <window_sample_func_t F> | |
+void | |
+hamming (sample_t * s, int n) | |
+{ | |
+ register float in = 1. / n; | |
+ | |
+ for (int i = 0; i < n; ++i) | |
+ { | |
+ register double f = i * in; | |
+ F (s[i], .54 - .46 * cos (2 * M_PI * f)); | |
+ } | |
+} | |
+ | |
template <window_sample_func_t F> | |
void | |
blackman (sample_t * s, int n) | |
{ | |
- register float w = n; | |
+ register float in = 1. / n; | |
for (int i = 0; i < n; ++i) | |
{ | |
register float f = (float) i; | |
register double b = .42f - | |
- .5f * cos (2.f * f * M_PI / w) + | |
- .08 * cos (4.f * f * M_PI / w); | |
+ .5f * cos (2.f * f * M_PI * in) + | |
+ .08 * cos (4.f * f * M_PI * in); | |
F (s[i], b); | |
} | |
@@ -93,8 +107,6 @@ blackman_harris (sample_t * s, int n) | |
.14128f * cos (w2 * f) - | |
.01168f * cos (w3 * f); | |
- bh *= .761f; | |
- | |
F (s[i], bh); | |
} | |
} | |
@@ -135,28 +147,39 @@ besseli (double x) | |
return ans; | |
} | |
+/* step = .5 : window [-n to 0] */ | |
template <window_sample_func_t F> | |
void | |
-kaiser (sample_t * s, int n, double beta) | |
+kaiser (sample_t * s, int n, double beta, double step = 1) | |
{ | |
double bb = besseli (beta); | |
int si = 0; | |
- for (double i = -n / 2 + .1; si < n; ++si, ++i) | |
+ for (double i = -n / 2 + .1; si < n; ++si, i += step) | |
{ | |
double k = besseli ((beta * sqrt (1 - pow ((2 * i / (n - 1)), 2)))) / bb; | |
/* can you spell hack */ | |
- if (!isfinite (k) || isnan(k)) | |
+ if (!finite (k) || isnan(k)) | |
k = 0; | |
F (s[si], k); | |
} | |
- /* asymmetrical hack: sort out first value! | |
- win[0] = win[len-1]; | |
- */ | |
} | |
-}; /* namespace DSP */ | |
+template <window_sample_func_t F> | |
+void | |
+xfade (sample_t * s, int n, int dir) /* dir [-1,1] */ | |
+{ | |
+ DSP::Sine cos(.5*M_PI/n, 0); | |
+ if (dir > 0) | |
+ for (int i=0; i<n; ++i) | |
+ s[i] *= cos.get(); | |
+ else | |
+ for (int i=n; --i>=0; ) | |
+ s[i] *= cos.get(); | |
+} | |
+ | |
+} /* namespace DSP */ | |
-#endif /* _DSP_WINDOWS_H_ */ | |
+#endif /* DSP_WINDOWS_H */ | |
diff --git a/plugins/LadspaEffect/caps/interface.cc b/plugins/LadspaEffect/caps/interface.cc | |
index 96e3d9806..82a4dc257 100644 | |
--- a/plugins/LadspaEffect/caps/interface.cc | |
+++ b/plugins/LadspaEffect/caps/interface.cc | |
@@ -1,7 +1,7 @@ | |
/* | |
interface.cc | |
- Copyright 2004-11 Tim Goetze <tim@quitte.de> | |
+ Copyright 2004-14 Tim Goetze <tim@quitte.de> | |
http://quitte.de/dsp/ | |
@@ -11,7 +11,7 @@ | |
/* | |
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 | |
+ as published by the Free Software Foundation; either version 3 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
@@ -29,117 +29,99 @@ | |
(2541 - 2580 donated to artemio@kdemail.net) | |
*/ | |
-#include <sys/time.h> | |
- | |
+#include "version.h" | |
#include "basics.h" | |
#include "Cabinet.h" | |
#include "Chorus.h" | |
#include "Phaser.h" | |
#include "Sin.h" | |
-#include "Lorenz.h" | |
-#include "Roessler.h" | |
+#include "Fractals.h" | |
#include "Reverb.h" | |
#include "Compress.h" | |
#include "Click.h" | |
#include "Eq.h" | |
-#include "Clip.h" | |
+#include "Saturate.h" | |
#include "White.h" | |
-#include "SweepVF.h" | |
-#include "VCO.h" | |
+#include "AutoFilter.h" | |
#include "Amp.h" | |
-#include "HRTF.h" | |
#include "Pan.h" | |
#include "Scape.h" | |
#include "ToneStack.h" | |
+#include "Noisegate.h" | |
+#ifdef SUMMER | |
+#include "AmpVI.h" | |
+#endif | |
#include "Descriptor.h" | |
-#define N 39 | |
-static DescriptorStub * descriptors [N]; | |
- | |
-/*static inline void | |
-seed() | |
-{ | |
- static struct timeval tv; | |
- gettimeofday (&tv, 0); | |
+#define N 35 | |
- srand (tv.tv_sec ^ tv.tv_usec); | |
-}*/ | |
+static DescriptorStub * descriptors[N+1]; | |
extern "C" { | |
+const LADSPA_Descriptor * | |
+ladspa_descriptor (unsigned long i) { return i < N ? descriptors[i] : 0; } | |
+ | |
__attribute__ ((constructor)) | |
void caps_so_init() | |
{ | |
DescriptorStub ** d = descriptors; | |
- | |
- *d++ = new Descriptor<Eq>(); | |
- *d++ = new Descriptor<Eq2x2>(); | |
- *d++ = new Descriptor<Compress>(); | |
- *d++ = new Descriptor<Pan>(); | |
- *d++ = new Descriptor<Narrower>(); | |
- | |
- *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>(); | |
- | |
- *d++ = new Descriptor<ChorusI>(); | |
- *d++ = new Descriptor<StereoChorusI>(); | |
- *d++ = new Descriptor<ChorusII>(); | |
- *d++ = new Descriptor<StereoChorusII>(); | |
- *d++ = new Descriptor<PhaserI>(); | |
- *d++ = new Descriptor<PhaserII>(); | |
- *d++ = new Descriptor<SweepVFI>(); | |
- *d++ = new Descriptor<SweepVFII>(); | |
- *d++ = new Descriptor<AutoWah>(); | |
- *d++ = new Descriptor<Scape>(); | |
- | |
- *d++ = new Descriptor<VCOs>(); | |
- *d++ = new Descriptor<VCOd>(); | |
- *d++ = new Descriptor<CEO>(); | |
- *d++ = new Descriptor<Sin>(); | |
- *d++ = new Descriptor<White>(); | |
- *d++ = new Descriptor<Lorenz>(); | |
- *d++ = new Descriptor<Roessler>(); | |
- | |
- *d++ = new Descriptor<JVRev>(); | |
- *d++ = new Descriptor<Plate>(); | |
- *d++ = new Descriptor<Plate2x2>(); | |
- | |
- *d++ = new Descriptor<Click>(); | |
- *d++ = new Descriptor<Dirac>(); | |
- *d++ = new Descriptor<HRTF>(); | |
- | |
- /* make sure N is correct */ | |
- assert (d - descriptors == N); | |
- | |
- //seed(); | |
+ /* make sure uninitialised array members are safe to pass to the host */ | |
+ memset (d, 0, sizeof (descriptors)); | |
+ | |
+ *d++ = new Descriptor<Noisegate>(2602); | |
+ *d++ = new Descriptor<Compress>(1772); | |
+ *d++ = new Descriptor<CompressX2>(2598); | |
+ | |
+ *d++ = new Descriptor<ToneStack>(2589); | |
+ *d++ = new Descriptor<AmpVTS>(2592); | |
+ #ifdef SUMMER | |
+ *d++ = new Descriptor<AmpVI>(1789); | |
+ #endif | |
+ *d++ = new Descriptor<CabinetIII>(2601); | |
+ *d++ = new Descriptor<CabinetIV>(2606); | |
+ | |
+ #ifdef WITH_JVREV | |
+ *d++ = new Descriptor<JVRev>(1778); | |
+ #endif | |
+ *d++ = new Descriptor<Plate>(1779); | |
+ *d++ = new Descriptor<PlateX2>(1795); | |
+ | |
+ *d++ = new Descriptor<Saturate>(1771); | |
+ *d++ = new Descriptor<Spice>(2603); | |
+ *d++ = new Descriptor<SpiceX2>(2607); | |
+ | |
+ *d++ = new Descriptor<ChorusI>(1767); | |
+ *d++ = new Descriptor<PhaserII>(2586); | |
+ | |
+ *d++ = new Descriptor<AutoFilter>(2593); | |
+ *d++ = new Descriptor<Scape>(2588); | |
+ | |
+ *d++ = new Descriptor<Eq10>(1773); | |
+ *d++ = new Descriptor<Eq10X2>(2594); | |
+ *d++ = new Descriptor<Eq4p>(2608); | |
+ *d++ = new Descriptor<EqFA4p>(2609); | |
+ | |
+ *d++ = new Descriptor<Wider>(1788); | |
+ *d++ = new Descriptor<Narrower>(2595); | |
+ | |
+ *d++ = new Descriptor<Sin>(1781); | |
+ *d++ = new Descriptor<White>(1785); | |
+ *d++ = new Descriptor<Fractal>(1774); | |
+ | |
+ *d++ = new Descriptor<Click>(1769); | |
+ *d++ = new Descriptor<CEO>(1770); | |
+ | |
+ assert (d - descriptors <= N); | |
} | |
__attribute__ ((destructor)) | |
void caps_so_fini() | |
{ | |
- for (ulong i = 0; i < N; ++i) | |
- delete descriptors[i]; | |
-} | |
- | |
-/* /////////////////////////////////////////////////////////////////////// */ | |
- | |
-const LADSPA_Descriptor * | |
-ladspa_descriptor (unsigned long i) | |
-{ | |
- if (i < N) | |
- return descriptors[i]; | |
- return 0; | |
+ DescriptorStub ** d = descriptors; | |
+ while (*d) delete *d++; | |
} | |
}; /* extern "C" */ | |
diff --git a/plugins/LadspaEffect/caps/waves/click.h b/plugins/LadspaEffect/caps/waves/click.h | |
index 35950d618..7b70c33c4 100644 | |
--- a/plugins/LadspaEffect/caps/waves/click.h | |
+++ b/plugins/LadspaEffect/caps/waves/click.h | |
@@ -1,520 +1,811 @@ | |
-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 | |
+ | |
+/* waves/click.wav FIR=1 order=512 lamda=.75 fs=44100 */ | |
+ParModel<128,1> waves_click_wav_44100 = { | |
+ 0.11460114, | |
+ { | |
+ -0.00801036, -0.00437272, -0.01923737, -0.00253075, | |
+ -0.00648994, -0.00776997, -0.01860548, -0.00644130, | |
+ 0.00520436, -0.01621573, -0.03557792, 0.03559465, | |
+ 0.04528972, 0.00142967, -0.02690233, 0.00387067, | |
+ 0.01202210, -0.00913367, -0.12593059, -0.03499388, | |
+ 0.59229385, -0.01582727, -0.02358125, -0.00178108, | |
+ 0.00131783, 0.01302483, 0.04418353, 0.00796544, | |
+ -0.03167847, -0.00119656, -0.13114750, 0.00537899, | |
+ 0.01266635, 0.00818518, -0.01660785, 0.00818485, | |
+ -0.08639357, 0.07799521, 0.05508884, 0.00611942, | |
+ 0.70356038, 0.15305657, 0.39794597, -0.01185024, | |
+ -0.03118234, -0.05298225, -0.02782197, -0.00275627, | |
+ -0.04141481, -0.01805514, -0.01233688, 0.04815136, | |
+ -0.06399583, 0.01918716, 0.02036182, -0.00266120, | |
+ 0.04895626, 0.08129077, -0.01342760, -0.05062315, | |
+ -0.65736554, -0.01797993, -0.01187212, -0.07787893, | |
+ -0.01672729, -0.00902957, -0.00936262, 0.00371489, | |
+ -0.00493522, 0.00673489, -0.00282674, -0.00337789, | |
+ -0.00977723, -0.01944006, -0.02274153, -0.01567306, | |
+ -0.17341614, -0.00563205, 0.00851487, -0.02242020, | |
+ -0.01366165, -0.02298474, -0.00408978, -0.20215733, | |
+ -0.00888382, 0.05442408, -0.00507438, -0.00211873, | |
+ -0.00027816, 0.00271952, -0.00053856, -0.01158311, | |
+ -0.95668280, -0.70104945, 0.01190954, -0.00250214, | |
+ -0.00282702, 0.00141126, 0.01150560, 0.01098170, | |
+ 0.11063452, 0.01253998, -0.00362207, -0.00277801, | |
+ -0.00485395, -0.01306347, -0.00624454, -0.00118300, | |
+ 0.16884005, -0.00998689, -0.02270602, -0.26187076, | |
+ 0.01057174, -0.00137631, -0.03196092, 0.01876055, | |
+ 0.00584417, 0.01082599, 0.00570504, 0.00014837, | |
+ 0.05147370, 0.11502819, 0.07810158, 0.01700537, | |
+ 0.01375180, -0.01434063, 0.10037500, -0.03078917, | |
+ -0.02134978, 0.00758978, 0.02752953, 0.00896111, | |
+ -0.00045713, 0.00317291, 0.01612274, 0.00305273, | |
+ -0.00737688, -0.00181491, -0.04810317, -0.01078441, | |
+ -0.01393700, -0.03032811, -0.00866760, -0.01167632, | |
+ -0.01093910, -0.02728863, 0.01593006, -0.00244225, | |
+ 0.00247628, -0.00832260, -0.00699572, -0.00590473, | |
+ -0.00525961, -0.00328823, 0.00496840, 0.07248269, | |
+ 0.00032443, 0.00409679, 0.00267323, 0.00409485, | |
+ -0.01149626, 0.00135450, -0.00028422, -0.08514588, | |
+ 0.00111169, 0.00076292, -0.01210985, -0.00746088, | |
+ -0.00782397, 0.04442359, 0.02741161, -0.00033953, | |
+ -0.00036715, 0.00022939, -0.02113007, 0.02510931, | |
+ -0.01847453, 0.55513923, -0.00032398, 0.03302554, | |
+ 0.00456084, 0.01960501, 0.00594076, 0.13100905, | |
+ -0.00992757, 0.02217631, 0.00173437, 0.01813148, | |
+ 0.31431870, 0.03579731, -0.01545872, 0.02894953, | |
+ 0.01857100, -0.04663962, -0.03454773, 0.01085674, | |
+ -0.00085560, 0.00143060, 0.00167543, 0.01801846, | |
+ 0.50907121, -0.00373045, 0.01089525, -0.01929823, | |
+ -0.14548998, 0.06113711, 0.01269359, 0.00908547, | |
+ 0.00059683, 0.14105735, -0.01655767, -0.04139227, | |
+ -0.02568801, -0.01952795, -0.04993042, 0.00312149, | |
+ -0.05268379, -0.02513374, -0.00621539, 0.04411396, | |
+ 0.02517143, -0.03095699, -0.00994749, -0.00325381, | |
+ 0.03790723, 0.00925886, 0.05758015, 0.06731543, | |
+ -0.04705107, 0.04562138, 0.03349326, -0.00016419, | |
+ -0.03072894, -0.00031122, -0.07718339, -0.01901704, | |
+ -0.00127605, -0.00714822, -0.00130834, 0.00433561, | |
+ 0.00784214, 0.00834263, -0.00445619, 0.01084318, | |
+ -0.02079089, -0.00064182, 0.00092321, 0.00124724, | |
+ -0.00159388, 0.00001954, -0.00225178, -0.00007790, | |
+ 0.00228459, -0.00008840, 20.03566330, -21.30088520, | |
+ }, | |
+ { | |
+ -0.00825338, -0.00460527, -0.01911642, -0.00365535, | |
+ -0.00985985, -0.00691171, -0.02719155, 0.00338503, | |
+ -0.00351405, -0.00145384, -0.05730309, -0.01398687, | |
+ 0.06509713, -0.01498935, -0.00165787, -0.03105759, | |
+ -0.00614204, -0.02259146, -0.03786953, -0.03730316, | |
+ -0.00108426, -0.01005194, 0.00826375, -0.00939937, | |
+ -0.04108634, -0.01602772, 0.03234978, 0.02527082, | |
+ 0.02434897, -0.02120368, 0.01250837, -0.05269571, | |
+ -0.03167402, -0.03199055, -0.05644224, -0.05277842, | |
+ -0.02399802, -0.19031444, -0.06932075, -0.01457847, | |
+ -0.50082974, 1.05280497, -0.20012478, 0.02569125, | |
+ -0.04060688, 0.01309408, 0.00839107, 0.01351404, | |
+ 0.01324414, -0.02351242, -0.00197684, -0.04716636, | |
+ 0.05858919, 0.00913807, -0.02536934, 0.07903951, | |
+ -0.09231554, 0.01364397, 0.01504049, 0.05725945, | |
+ 0.22612551, 0.01590616, 0.01308840, 0.02375183, | |
+ 0.02570857, 0.00439610, 0.00540560, -0.01325424, | |
+ 0.00286736, -0.01050283, -0.00172819, 0.00153410, | |
+ 0.00762565, 0.01212296, 0.01683834, 0.00852410, | |
+ 0.17020895, 0.00226729, -0.02098623, 0.00206338, | |
+ 0.01155989, -0.01788570, 0.00313641, 0.00877917, | |
+ 0.00254779, -0.03792502, 0.03327105, 0.00128761, | |
+ 0.00030796, -0.00804955, 0.00198101, 0.00805724, | |
+ 0.80972723, 0.64776361, -0.00959795, 0.00128870, | |
+ 0.00153595, 0.00350640, -0.01293794, -0.01179804, | |
+ -0.08709330, -0.00806075, 0.00102687, -0.00082285, | |
+ 0.00298772, 0.01845670, 0.00536226, -0.00626562, | |
+ -0.14211597, 0.00237446, 0.02931408, 0.27693094, | |
+ 0.00731413, 0.00143002, 0.01491001, -0.19273277, | |
+ -0.00836488, -0.01815681, -0.00835504, 0.00879294, | |
+ -0.05095979, -0.11953829, -0.06655675, -0.02031538, | |
+ -0.01052194, 0.01584005, -0.12607688, 0.02226865, | |
+ 0.01558786, -0.00564087, -0.03301911, -0.01131726, | |
+ -0.01276128, -0.00704631, -0.01755670, -0.00339444, | |
+ 0.00797796, 0.00065583, 0.05320774, 0.01317171, | |
+ 0.01073339, 0.03373677, 0.00517617, 0.01176885, | |
+ 0.01006345, 0.02528927, -0.02088920, 0.00370510, | |
+ -0.00264359, 0.00807548, 0.00714694, 0.00693162, | |
+ 0.00662557, 0.00487319, -0.00234691, -0.02775274, | |
+ 0.00083640, 0.00442225, -0.00051935, -0.00214123, | |
+ 0.01684535, -0.00118896, 0.00127088, 0.08420728, | |
+ -0.00056313, -0.00061912, 0.01353583, 0.00699881, | |
+ 0.00692256, -0.03507295, -0.01465288, 0.00066261, | |
+ -0.00104736, -0.00013704, 0.01804521, -0.00915598, | |
+ 0.01155830, -0.47875707, 0.00298850, -0.02884809, | |
+ -0.00333494, -0.01235335, -0.00232829, -0.12691767, | |
+ 0.01070559, -0.02133001, -0.00064016, -0.01744096, | |
+ -0.27248455, -0.03341364, 0.01816667, -0.02511440, | |
+ -0.02084069, 0.12035661, 0.03301860, -0.01012996, | |
+ -0.00171713, -0.00139072, 0.00021654, -0.01793485, | |
+ -0.44147641, 0.00427151, -0.01176987, 0.01928149, | |
+ 0.11101838, -0.06210885, -0.01095491, -0.00821494, | |
+ 0.00526477, -0.11810931, 0.02341464, 0.04503789, | |
+ 0.03118879, 0.01997654, 0.05077909, -0.00352510, | |
+ 0.07334572, 0.03091677, 0.00712660, -0.04257688, | |
+ -0.02066439, 0.03262349, 0.01272581, 0.00409567, | |
+ -0.04094286, -0.00956228, -0.05573960, -0.06192592, | |
+ 0.04647227, -0.04151480, -0.03226521, 0.00086844, | |
+ 0.03327896, 0.00179969, 0.07717299, 0.01916724, | |
+ 0.00157637, 0.00728525, 0.00158194, -0.00410025, | |
+ -0.00775500, -0.00845030, 0.00425407, -0.01018464, | |
+ 0.02063010, 0.00069693, -0.00090419, -0.00124705, | |
+ 0.00160624, -0.00003661, 0.00225119, 0.00007279, | |
+ -0.00228999, 0.00008631, 0.27165793, 21.11226830, | |
+ }, | |
+ { | |
+ -1.96364505, -1.95434020, -1.93511547, -1.88104164, | |
+ -1.81850660, -1.74715944, -1.67339193, -1.56650618, | |
+ -1.47129131, -1.35126510, -1.27694093, -1.15440982, | |
+ -1.04592759, -0.95373283, -0.84511305, -0.78350009, | |
+ -0.63966991, -0.51067132, -0.43091377, -0.29048067, | |
+ -0.21846534, -0.13998145, -0.08376817, 0.04263827, | |
+ 0.11684693, 0.19134294, 0.26585214, 0.32891268, | |
+ 0.41034433, 0.47249101, 0.51525103, 0.57924651, | |
+ 0.65978370, 0.72124958, 0.75826576, 0.80837800, | |
+ 0.84772546, 0.90911892, 0.93363082, 0.98933959, | |
+ 1.03960539, 1.06520009, 1.07528029, 1.11947552, | |
+ 1.15989068, 1.18585946, 1.20917862, 1.24663143, | |
+ 1.27908766, 1.30068891, 1.32235683, 1.35562762, | |
+ 1.36014174, 1.39814059, 1.41635242, 1.42842984, | |
+ 1.45562998, 1.46349177, 1.49751830, 1.50415384, | |
+ 1.51030336, 1.52233248, 1.53981117, 1.55700746, | |
+ 1.55978074, 1.57978080, 1.59236906, 1.60074105, | |
+ 1.61612689, 1.63292707, 1.64409904, 1.65577773, | |
+ 1.66306649, 1.67511403, 1.68135841, 1.69220232, | |
+ 1.70187210, 1.70255229, 1.71221276, 1.72024885, | |
+ 1.73094311, 1.74075993, 1.74861307, 1.75503645, | |
+ 1.75574123, 1.75739895, 1.77145875, 1.77843283, | |
+ 1.78309466, 1.78805172, 1.79528846, 1.79762679, | |
+ 1.79832582, 1.80495954, 1.80553504, 1.81340768, | |
+ 1.81706921, 1.82059413, 1.82584969, 1.83015449, | |
+ 1.83037733, 1.83858116, 1.84414935, 1.84666485, | |
+ 1.85151342, 1.85341606, 1.85843214, 1.86436340, | |
+ 1.86463265, 1.86765719, 1.87149116, 1.87644846, | |
+ 1.87887815, 1.87918939, 1.88315809, 1.88602092, | |
+ 1.88864139, 1.89243734, 1.89462905, 1.89713689, | |
+ 1.90008483, 1.90103148, 1.90175187, 1.90515321, | |
+ 1.90776505, 1.91138184, 1.91225523, 1.91386804, | |
+ 1.91566870, 1.91897218, 1.92027592, 1.92298415, | |
+ 1.92432883, 1.92700106, 1.92909474, 1.93169324, | |
+ 1.93390412, 1.93522204, 1.93587955, 1.93630981, | |
+ 1.93827044, 1.93948770, 1.94141215, 1.94353508, | |
+ 1.94439812, 1.94454227, 1.94511722, 1.94890989, | |
+ 1.94920626, 1.95064731, 1.95180464, 1.95327217, | |
+ 1.95437168, 1.95552697, 1.95707057, 1.95723667, | |
+ 1.95740696, 1.95757357, 1.95847554, 1.95963429, | |
+ 1.96097631, 1.96337668, 1.96424273, 1.96475261, | |
+ 1.96542431, 1.96620642, 1.96725458, 1.96915573, | |
+ 1.96945757, 1.96959879, 1.97137899, 1.97238531, | |
+ 1.97242181, 1.97258924, 1.97314987, 1.97355981, | |
+ 1.97466426, 1.97496104, 1.97527267, 1.97574219, | |
+ 1.97678271, 1.97692027, 1.97719716, 1.97889577, | |
+ 1.97926411, 1.97949766, 1.97982643, 1.98045693, | |
+ 1.98134183, 1.98155174, 1.98156052, 1.98194483, | |
+ 1.98339106, 1.98343978, 1.98367466, 1.98374225, | |
+ 1.98435319, 1.98540097, 1.98626108, 1.98678266, | |
+ 1.98693383, 1.98693752, 1.98748217, 1.98805842, | |
+ 1.98812786, 1.98829423, 1.98888556, 1.98902904, | |
+ 1.98923824, 1.98944407, 1.99031004, 1.99046458, | |
+ 1.99093367, 1.99114654, 1.99143178, 1.99157502, | |
+ 1.99182002, 1.99207540, 1.99245182, 1.99267788, | |
+ 1.99303664, 1.99327891, 1.99380389, 1.99402285, | |
+ 1.99417010, 1.99418138, 1.99420557, 1.99441530, | |
+ 1.99445092, 1.99448211, 1.99490129, 1.99526804, | |
+ 1.99533883, 1.99558663, 1.99674908, 1.99681339, | |
+ 1.99686689, 1.99703470, 1.99707909, 1.99720389, | |
+ 1.99759361, 1.99765222, 1.99770049, 1.99818398, | |
+ 1.99823026, 1.99852323, 1.99905058, 1.99917349, | |
+ 1.99924758, 1.99928924, 1.99933994, 1.99968304, | |
+ 1.99969782, 1.99987016, 1.09067840, 1.88726488, | |
+ }, | |
+ { | |
+ -0.97704045, -0.99183390, -0.93708902, -0.97955155, | |
+ -0.98080305, -0.97871140, -0.95950543, -0.95234049, | |
+ -0.97634872, -0.95856577, -0.94789216, -0.95375400, | |
+ -0.93271392, -0.96644808, -0.92520248, -0.97483712, | |
+ -0.97693315, -0.98035950, -0.94869104, -0.97826974, | |
+ -0.84945419, -0.98367181, -0.97475484, -0.98573710, | |
+ -0.97043708, -0.98558913, -0.96467636, -0.98418391, | |
+ -0.97285180, -0.98850521, -0.97044932, -0.97138686, | |
+ -0.99323398, -0.99492832, -0.97316186, -0.99114987, | |
+ -0.96840551, -0.98654972, -0.99436516, -0.99387937, | |
+ -0.97835052, -0.89515158, -0.97705210, -0.99267826, | |
+ -0.99032206, -0.99133999, -0.99504131, -0.99564250, | |
+ -0.99379172, -0.99305659, -0.99772365, -0.99250981, | |
+ -0.99127656, -0.99254527, -0.99372543, -0.98763978, | |
+ -0.99285644, -0.99027765, -0.99868612, -0.99373541, | |
+ -0.87473618, -0.99636627, -0.99799748, -0.98504053, | |
+ -0.99649793, -0.99796244, -0.99851844, -0.99248545, | |
+ -0.99890626, -0.99701282, -0.99809300, -0.99945546, | |
+ -0.99844353, -0.99624036, -0.99582091, -0.99626162, | |
+ -0.98527338, -0.99663399, -0.99668945, -0.99449311, | |
+ -0.99678121, -0.99302790, -0.99865196, -0.97564961, | |
+ -0.99840718, -0.99314665, -0.99369508, -0.99920045, | |
+ -0.99978810, -0.99657739, -0.99726929, -0.99693287, | |
+ -0.91459716, -0.96263617, -0.99744837, -0.99949955, | |
+ -0.99935768, -0.99752419, -0.99633732, -0.99701730, | |
+ -0.99150097, -0.99712557, -0.99822354, -0.99699010, | |
+ -0.99592263, -0.99492799, -0.99724988, -0.99774537, | |
+ -0.98972454, -0.99854200, -0.99633326, -0.99233800, | |
+ -0.99725762, -0.99980892, -0.99723656, -0.98456852, | |
+ -0.99830442, -0.99810097, -0.99864644, -0.99741568, | |
+ -0.99666206, -0.99564834, -0.99435393, -0.99612978, | |
+ -0.99595117, -0.99871723, -0.99294729, -0.99756104, | |
+ -0.99791650, -0.99724371, -0.99629371, -0.99672007, | |
+ -0.99596814, -0.99684235, -0.99715918, -0.99846859, | |
+ -0.99836101, -0.99834405, -0.99593622, -0.99806856, | |
+ -0.99727729, -0.99635166, -0.99765041, -0.99835726, | |
+ -0.99834348, -0.99635469, -0.99644369, -0.99865035, | |
+ -0.99762280, -0.99784782, -0.99790473, -0.99813161, | |
+ -0.99803142, -0.99796088, -0.99720753, -0.98838454, | |
+ -0.99853696, -0.99441824, -0.99747268, -0.99760525, | |
+ -0.99648322, -0.99922613, -0.99819254, -0.99437399, | |
+ -0.99847570, -0.99842506, -0.99777514, -0.99795135, | |
+ -0.99755648, -0.99518843, -0.99573241, -0.99938208, | |
+ -0.99827549, -0.99977573, -0.99741833, -0.99635819, | |
+ -0.99745537, -0.98746668, -0.99710794, -0.99612014, | |
+ -0.99788739, -0.99600282, -0.99703818, -0.99498836, | |
+ -0.99803503, -0.99691042, -0.99796973, -0.99730395, | |
+ -0.99114031, -0.99673581, -0.99745419, -0.99665650, | |
+ -0.99684300, -0.99021150, -0.99594162, -0.99795200, | |
+ -0.99724225, -0.99931033, -0.99743829, -0.99739907, | |
+ -0.99476507, -0.99852705, -0.99767887, -0.99764308, | |
+ -0.99599635, -0.99663032, -0.99767447, -0.99807745, | |
+ -0.99660543, -0.99343366, -0.99611993, -0.99659610, | |
+ -0.99642598, -0.99758494, -0.99670540, -0.99850984, | |
+ -0.99475098, -0.99347664, -0.99736200, -0.99717905, | |
+ -0.99651711, -0.99705339, -0.99710780, -0.99842593, | |
+ -0.99715351, -0.99832762, -0.99458881, -0.99635255, | |
+ -0.99719720, -0.99660614, -0.99717459, -0.99774412, | |
+ -0.99715688, -0.99723043, -0.99675455, -0.99805863, | |
+ -0.99830887, -0.99794045, -0.99784625, -0.99785239, | |
+ -0.99813563, -0.99810253, -0.99807122, -0.99929375, | |
+ -0.99932870, -0.99879124, -0.99925558, -0.99932738, | |
+ -0.99926567, -0.99937095, -0.99937822, -0.99979112, | |
+ -0.99970295, -0.99993750, -0.26331335, -0.88842209, | |
+ }, | |
+ { | |
+ }, | |
+}; | |
+/* waves/click.wav FIR=1 order=512 lamda=.75 fs=88200 */ | |
+ParModel<128,1> waves_click_wav_88200 = { | |
+ 0.05688155, | |
+ { | |
+ -0.00651687, -0.00657468, -0.00671149, -0.00701824, | |
+ -0.00769687, -0.00914084, -0.01172159, -0.01445015, | |
+ -0.01471631, -0.01259026, -0.01016024, -0.00822978, | |
+ -0.00674772, -0.00554561, -0.00449781, -0.00352233, | |
+ -0.00260511, -0.00208915, -0.00354676, -0.00572773, | |
+ -0.00290993, 0.00130638, 0.00076415, -0.07784121, | |
+ -0.00533162, -0.00345125, -0.00368124, -0.01079313, | |
+ -0.00494326, -0.03154695, -0.01625449, -0.02669628, | |
+ -0.02480882, 0.00197230, 0.01606147, 0.01393328, | |
+ -0.03158416, 0.01298643, -0.02462672, 0.00282215, | |
+ 0.01588631, -0.01766364, 0.01234442, -0.01211245, | |
+ -0.01346828, 0.00619511, 0.00124539, -0.09782232, | |
+ -0.03824062, 0.01178895, 0.03641683, 0.01013999, | |
+ 0.01000693, 0.01063385, 0.00407482, 0.01487241, | |
+ 0.01279400, 0.02098145, 0.00205903, 0.30264081, | |
+ 0.01626736, 0.00721657, 0.02338755, -0.01223397, | |
+ 0.00193612, -0.00959936, -2.16083928, -0.05208303, | |
+ 0.03774940, 0.01095298, 0.02061141, 0.03442734, | |
+ 0.04012323, 0.02890026, 0.05234532, 0.01090572, | |
+ -0.01823258, 0.01239973, 0.01736838, -0.25704599, | |
+ -0.01341568, -0.16434825, 0.10662447, 0.11372787, | |
+ 0.01536889, -0.00616665, 0.01507282, 0.00051383, | |
+ -0.00611664, -0.00205964, -0.03747649, -0.00910497, | |
+ -0.00251718, -0.01235697, -0.12752622, -0.00151400, | |
+ 0.00286436, 0.07345054, 0.00024697, -0.06639064, | |
+ -0.01190024, -0.02501453, -0.02905541, -0.04624837, | |
+ 0.08152444, 0.00703063, 0.03349856, -0.08675966, | |
+ -0.00733776, -0.00763688, -0.00371159, -0.00486678, | |
+ 0.00956294, -0.00400513, -0.00040325, -0.00445589, | |
+ 0.00577908, -0.00280394, -0.08524383, 0.01126226, | |
+ -0.01059592, -0.00243139, -0.00374530, -0.01484734, | |
+ -0.00238332, -0.00148958, -0.00436490, 0.02324843, | |
+ -0.01551250, -0.00315996, -0.00375106, -4.00112654, | |
+ 0.00055470, -0.03468413, 0.00083740, 0.00159674, | |
+ -0.00423401, -1.40991655, 0.01871968, -0.00677335, | |
+ 0.00257870, -0.00479791, 0.00497946, 0.06528763, | |
+ -0.00019922, -0.00020187, -0.00038173, 0.00135353, | |
+ -0.01092475, 0.00040689, 0.00454385, -0.00172824, | |
+ -0.00049134, 0.00331662, 0.02790781, 0.01454474, | |
+ 0.05787894, -0.12274072, 0.01971225, -0.00006868, | |
+ 0.00098248, -0.01439081, 0.01166790, -0.00290857, | |
+ -0.00879533, -0.02564209, -0.01974995, -0.05787053, | |
+ -0.00010300, -0.04975861, 0.01756328, 0.04143358, | |
+ 0.05442543, 0.02829266, 0.01806032, 0.02460312, | |
+ -0.00656049, 0.00379357, -0.01229355, -0.00145858, | |
+ -0.00492769, -0.02394335, 0.01677952, -0.00621200, | |
+ 0.00069218, 0.00228399, 0.01499730, -0.00657327, | |
+ -0.02983596, -0.01600253, -0.05736040, -0.08441712, | |
+ -0.01609917, 0.03347109, 0.00060681, -0.04480334, | |
+ -0.02617477, -0.00054369, 0.00019392, -0.08969180, | |
+ 0.00032010, -0.00269158, -0.00502240, -0.00859250, | |
+ -0.00690342, -0.00456394, 0.00143982, -0.00457352, | |
+ 0.01344540, -0.00286879, 0.00439123, 0.00583577, | |
+ 0.00281124, 0.00377200, -0.00032855, 0.00394066, | |
+ -0.00293155, -0.00942676, -0.00210653, 0.01370222, | |
+ 0.00955141, 0.06646763, -0.11781387, -0.00183560, | |
+ -0.01770097, 0.00112170, 0.16839471, 0.00306663, | |
+ -0.00588850, -0.02173861, -0.00416211, 0.00797271, | |
+ 0.01880619, 0.00037540, 0.01298905, -0.02593817, | |
+ -0.00612639, 0.01392465, -0.00900150, -0.00318937, | |
+ -0.02004652, -0.00281361, -0.02635298, 0.01180628, | |
+ 0.00193731, -0.01546053, -0.02230596, -0.01431754, | |
+ 0.00433324, -0.01568470, -0.01142058, -0.00432731, | |
+ 0.00334269, -0.00516261, -0.00830505, 7.78884582, | |
+ }, | |
+ { | |
+ -0.00625536, -0.00594595, -0.00544765, -0.00481021, | |
+ -0.00417416, -0.00390837, -0.00470913, -0.00673048, | |
+ -0.00800550, -0.00712813, -0.00515207, -0.00306725, | |
+ -0.00115110, 0.00059935, 0.00226937, 0.00400021, | |
+ 0.00602915, 0.00868664, 0.01121231, 0.00984823, | |
+ 0.00716033, 0.00461335, 0.00010320, 0.09113680, | |
+ 0.00418964, 0.00288496, -0.00323215, 0.00821647, | |
+ 0.01470153, 0.03651082, 0.02931787, -0.37304648, | |
+ 0.05564697, 0.02102914, -0.00733696, 0.01303606, | |
+ -0.02957835, -0.01267370, -0.02507027, -0.00267670, | |
+ -0.02312383, 0.02004863, -0.03017801, 0.00849766, | |
+ 0.00677824, 0.00286219, -0.01390221, 0.00258620, | |
+ -0.00073044, -0.00059544, -0.00762115, -0.00538835, | |
+ -0.01075921, -0.00080728, -0.00324069, -0.01035770, | |
+ -0.01824248, -0.01948197, -0.00439956, -0.49844168, | |
+ -0.00333610, 0.01029937, -0.01803461, 0.04661355, | |
+ -0.00133110, -0.01874437, 3.31008940, 0.03267894, | |
+ -0.07526405, 0.01591010, -0.02346503, -0.02334728, | |
+ -0.04534517, -0.03206432, -0.04625848, -0.01487187, | |
+ 0.04915528, -0.00893658, -0.01407617, 0.14421427, | |
+ -0.01855345, 0.13885125, -0.08114549, -0.03755342, | |
+ -0.02365518, -0.00424084, -0.02079123, -0.01056594, | |
+ -0.00751801, -0.00131911, 0.03479274, 0.00659452, | |
+ -0.00110328, 0.00547394, 0.06980213, -0.00048250, | |
+ 0.00031082, -0.07058160, 0.00438166, 0.07624769, | |
+ 0.00936153, 0.06009631, 0.01494311, 0.03743974, | |
+ -0.05898651, -0.00499020, 0.00701763, 0.07430495, | |
+ 0.00848231, 0.00308577, 0.00142627, 0.00273734, | |
+ -0.01293696, 0.00076346, -0.00117525, 0.00195301, | |
+ 0.00223041, 0.00072434, 0.12755424, -0.01311376, | |
+ 0.02360439, 0.00095374, 0.00347845, 0.16278796, | |
+ 0.00078825, 0.00046356, 0.00278807, -0.03535655, | |
+ 0.01245681, 0.00563285, -0.00024828, 3.83174976, | |
+ -0.00386115, 0.02527064, -0.00060326, -0.00923829, | |
+ 0.00207604, 1.62013410, -0.02692851, 0.00444555, | |
+ 0.00606154, 0.00234330, -0.02160522, -0.03101272, | |
+ -0.00083970, -0.00004014, 0.00026089, -0.00196908, | |
+ 0.01126657, -0.00373468, -0.00171005, 0.00125952, | |
+ 0.00008001, -0.00070845, -0.02923228, -0.01377043, | |
+ -0.05402411, 0.08661968, -0.01752837, -0.00242176, | |
+ -0.00513395, 0.01400616, -0.01217961, -0.00216946, | |
+ 0.00348686, 0.01004249, 0.02174698, 0.05760983, | |
+ -0.00031359, 0.04670734, -0.01546509, -0.04322861, | |
+ -0.05282721, -0.02691824, -0.01843818, -0.02204646, | |
+ 0.00394662, -0.00837068, 0.01239989, 0.00057863, | |
+ 0.00170607, 0.02244838, -0.02186322, 0.00115683, | |
+ -0.00583155, -0.00787486, -0.01582788, 0.00589560, | |
+ 0.03056752, 0.01581919, 0.06396945, 0.08045189, | |
+ 0.01595595, -0.04188537, -0.00021880, 0.04531677, | |
+ 0.04334938, 0.00092091, -0.00194514, 0.09758274, | |
+ 0.00052197, 0.00267403, 0.00464575, 0.00850966, | |
+ 0.00666222, 0.00899168, -0.00108443, 0.00641841, | |
+ -0.01100880, 0.00317664, -0.00399255, -0.00492195, | |
+ -0.00237982, -0.00288124, 0.00032578, -0.00392367, | |
+ 0.00373070, 0.00985712, 0.00214490, -0.01340282, | |
+ -0.00887067, -0.06467281, 0.12889633, 0.00203746, | |
+ 0.01922731, -0.00143807, -0.17267982, -0.00324677, | |
+ 0.00572029, 0.02407671, 0.00401636, -0.00760130, | |
+ -0.01917742, -0.00024424, -0.01299220, 0.02493341, | |
+ 0.00559709, -0.01423865, 0.00894918, 0.00330148, | |
+ 0.02018720, 0.00287493, 0.02641500, -0.01164774, | |
+ -0.00188347, 0.01532069, 0.02215442, 0.01433479, | |
+ -0.00430818, 0.01565984, 0.01141092, 0.00434204, | |
+ -0.00319708, 0.00515072, 0.00830768, 7.62546292, | |
+ }, | |
+ { | |
+ -1.94894229, -1.92634639, -1.88930614, -1.83875347, | |
+ -1.77606923, -1.70325708, -1.62329177, -1.53967915, | |
+ -1.45361151, -1.36278604, -1.26562291, -1.16285114, | |
+ -1.05606881, -0.94687691, -0.83668984, -0.72677909, | |
+ -0.61845011, -0.51358180, -0.41569828, -0.32603390, | |
+ -0.23618664, -0.14493387, -0.06649196, -0.00211176, | |
+ 0.11119331, 0.19389017, 0.31000628, 0.40112295, | |
+ 0.46862422, 0.51964917, 0.56113829, 0.64048093, | |
+ 0.64252682, 0.71843313, 0.77910104, 0.82339162, | |
+ 0.86774606, 0.91886959, 0.95729456, 1.00672320, | |
+ 1.03716504, 1.08050894, 1.10255520, 1.14906029, | |
+ 1.17277087, 1.21332422, 1.23359360, 1.25361512, | |
+ 1.29986372, 1.29997287, 1.34501339, 1.36166918, | |
+ 1.37876821, 1.40379551, 1.43051615, 1.44572649, | |
+ 1.46517265, 1.48029684, 1.49367641, 1.49758196, | |
+ 1.51431685, 1.52810945, 1.54608786, 1.55356031, | |
+ 1.57306455, 1.58049594, 1.59347337, 1.59385492, | |
+ 1.60307109, 1.61645151, 1.63115343, 1.64541270, | |
+ 1.65114703, 1.66497793, 1.67404448, 1.68630504, | |
+ 1.69643861, 1.70573317, 1.71300622, 1.71542764, | |
+ 1.72658147, 1.73209270, 1.74605967, 1.74618552, | |
+ 1.76020969, 1.76565496, 1.77239408, 1.77980270, | |
+ 1.78467707, 1.79117345, 1.79345166, 1.80158103, | |
+ 1.80685940, 1.81122597, 1.81783791, 1.81805194, | |
+ 1.82156474, 1.82822631, 1.83140777, 1.83501677, | |
+ 1.84027332, 1.84170088, 1.84764324, 1.85161181, | |
+ 1.85501528, 1.86067637, 1.86205250, 1.86669879, | |
+ 1.86979715, 1.87234631, 1.87677611, 1.88101380, | |
+ 1.88334608, 1.88621463, 1.88963846, 1.89168720, | |
+ 1.89387232, 1.89496840, 1.89717567, 1.89731117, | |
+ 1.90034347, 1.90123662, 1.90526688, 1.90816862, | |
+ 1.90837630, 1.91184181, 1.91351406, 1.91504833, | |
+ 1.91650242, 1.91718855, 1.92090939, 1.92171866, | |
+ 1.92375619, 1.92506916, 1.92607029, 1.92808236, | |
+ 1.93113876, 1.93220482, 1.93357444, 1.93586273, | |
+ 1.93728526, 1.93756715, 1.93886627, 1.94026183, | |
+ 1.94188049, 1.94400327, 1.94498078, 1.94575544, | |
+ 1.94628073, 1.94772091, 1.94924231, 1.95265875, | |
+ 1.95359372, 1.95399305, 1.95470698, 1.95637299, | |
+ 1.95639029, 1.95701223, 1.95863924, 1.96009936, | |
+ 1.96018468, 1.96188447, 1.96353875, 1.96528383, | |
+ 1.96624329, 1.96663801, 1.96671377, 1.96841834, | |
+ 1.96940672, 1.96992392, 1.97132386, 1.97241287, | |
+ 1.97280142, 1.97291984, 1.97350467, 1.97502994, | |
+ 1.97511859, 1.97563247, 1.97743635, 1.97795502, | |
+ 1.97799789, 1.97891021, 1.97895907, 1.97897897, | |
+ 1.97991821, 1.98044801, 1.98202130, 1.98276057, | |
+ 1.98349778, 1.98368260, 1.98369331, 1.98393565, | |
+ 1.98435440, 1.98439150, 1.98555079, 1.98650522, | |
+ 1.98657502, 1.98677364, 1.98700839, 1.98791695, | |
+ 1.98830037, 1.98833734, 1.98900050, 1.98902474, | |
+ 1.98947913, 1.99036819, 1.99041940, 1.99043149, | |
+ 1.99062113, 1.99063641, 1.99106989, 1.99121990, | |
+ 1.99146150, 1.99218226, 1.99310680, 1.99313466, | |
+ 1.99349619, 1.99395887, 1.99425333, 1.99437250, | |
+ 1.99443939, 1.99473292, 1.99481074, 1.99491761, | |
+ 1.99567192, 1.99569788, 1.99576165, 1.99591576, | |
+ 1.99595426, 1.99603011, 1.99621635, 1.99624249, | |
+ 1.99637351, 1.99650335, 1.99679517, 1.99698383, | |
+ 1.99755196, 1.99764904, 1.99809802, 1.99829153, | |
+ 1.99830971, 1.99834135, 1.99837372, 1.99850892, | |
+ 1.99851523, 1.99852210, 1.99858973, 1.99880222, | |
+ 1.99885687, 1.99887036, 1.99887902, 1.99916290, | |
+ 1.99932620, 1.99938641, 1.99955049, -0.14163802, | |
+ }, | |
+ { | |
+ -0.95667362, -0.95566037, -0.95394075, -0.95147371, | |
+ -0.94826338, -0.94451328, -0.94111519, -0.94011594, | |
+ -0.94324322, -0.94926683, -0.95574388, -0.96141426, | |
+ -0.96596010, -0.96936552, -0.97163782, -0.97270393, | |
+ -0.97236645, -0.97041991, -0.96814907, -0.97142825, | |
+ -0.98095051, -0.98974208, -0.99860242, -0.89513273, | |
+ -0.98711910, -0.99472025, -0.98786647, -0.98954366, | |
+ -0.98054112, -0.96882859, -0.96750359, -0.89364253, | |
+ -0.95834500, -0.98799889, -0.98534044, -0.98233901, | |
+ -0.97709644, -0.98995272, -0.97821908, -0.99273489, | |
+ -0.98578446, -0.99030433, -0.97977711, -0.99146475, | |
+ -0.98389461, -0.99443073, -0.98709352, -0.97849503, | |
+ -0.97903040, -0.99187515, -0.98821668, -0.99278653, | |
+ -0.99371844, -0.99192568, -0.99855161, -0.99448890, | |
+ -0.99401410, -0.99549415, -0.99191453, -0.82916758, | |
+ -0.99556071, -0.99560445, -0.99317449, -0.98842315, | |
+ -0.99871483, -0.99247266, -0.84876665, -0.99188828, | |
+ -0.98655101, -0.98746380, -0.99781703, -0.99670493, | |
+ -0.99371501, -0.99555116, -0.99679232, -0.99825174, | |
+ -0.99445063, -0.99774094, -0.99843530, -0.99076203, | |
+ -0.99554250, -0.99399548, -0.99686610, -0.99143335, | |
+ -0.99770997, -0.99837691, -0.99711090, -0.99896750, | |
+ -0.99845379, -0.99950585, -0.99651743, -0.99949519, | |
+ -0.99799250, -0.99834949, -0.99195543, -0.99922656, | |
+ -0.99845709, -0.99586887, -0.99678139, -0.99575250, | |
+ -0.99578572, -0.99400741, -0.99774550, -0.99745561, | |
+ -0.99634866, -0.99896773, -0.99702654, -0.99471346, | |
+ -0.99929069, -0.99881194, -0.99936854, -0.99938735, | |
+ -0.99860445, -0.99881526, -0.99935421, -0.99927153, | |
+ -0.99388984, -0.99938457, -0.97873380, -0.99820517, | |
+ -0.99590555, -0.99931140, -0.99837625, -0.97444806, | |
+ -0.99895387, -0.99969135, -0.99929693, -0.99636642, | |
+ -0.99858678, -0.99656306, -0.99838126, -0.92467758, | |
+ -0.99876884, -0.99691844, -0.99886554, -0.99784000, | |
+ -0.99880429, -0.97016390, -0.99822798, -0.99939915, | |
+ -0.99753974, -0.99920736, -0.99683171, -0.98917184, | |
+ -0.99840863, -0.99980030, -0.99993488, -0.99860994, | |
+ -0.99765033, -0.99838207, -0.99788850, -0.99974141, | |
+ -0.99970642, -0.99877851, -0.99783289, -0.99866346, | |
+ -0.99712323, -0.99259120, -0.99864275, -0.99902104, | |
+ -0.99818010, -0.99823881, -0.99861160, -0.99891674, | |
+ -0.99924492, -0.99724887, -0.99828442, -0.99777553, | |
+ -0.99980133, -0.99859891, -0.99896477, -0.99903434, | |
+ -0.99728279, -0.99912012, -0.99875307, -0.99902303, | |
+ -0.99744631, -0.99854657, -0.99939858, -0.99851740, | |
+ -0.99907577, -0.99863201, -0.99758519, -0.99806751, | |
+ -0.99724859, -0.99842770, -0.99894914, -0.99894202, | |
+ -0.99849321, -0.99920669, -0.99723289, -0.99705814, | |
+ -0.99885207, -0.99725696, -0.99945087, -0.99720040, | |
+ -0.98994567, -0.99926762, -0.99897937, -0.99357536, | |
+ -0.99923663, -0.99971031, -0.99935701, -0.99887304, | |
+ -0.99902345, -0.99686516, -0.99900800, -0.99849550, | |
+ -0.99742975, -0.99961860, -0.99931725, -0.99844959, | |
+ -0.99905337, -0.99824725, -0.99992442, -0.99883956, | |
+ -0.99840952, -0.99867739, -0.99951299, -0.99850550, | |
+ -0.99836435, -0.99551440, -0.99643711, -0.99941881, | |
+ -0.99791080, -0.99927371, -0.99743299, -0.99940003, | |
+ -0.99918620, -0.99660349, -0.99911894, -0.99871816, | |
+ -0.99865637, -0.99920314, -0.99870995, -0.99728571, | |
+ -0.99929598, -0.99898391, -0.99885323, -0.99939740, | |
+ -0.99844753, -0.99937124, -0.99847571, -0.99897344, | |
+ -0.99943441, -0.99860350, -0.99879225, -0.99882236, | |
+ -0.99949635, -0.99888125, -0.99893000, -0.99952165, | |
+ -0.99959968, -0.99942391, -0.99955196, 0.81844472, | |
+ }, | |
+ { | |
+ }, | |
+}; | |
+/* waves/click.wav FIR=1 order=512 lamda=.75 fs=176000 */ | |
+ParModel<128,1> waves_click_wav_176000 = { | |
+ 0.02434709, | |
+ { | |
+ 0.06098905, 0.00226393, -0.01467731, -0.02110868, | |
+ -0.02363945, -0.02432742, -0.02399472, -0.02303254, | |
+ -0.02165447, -0.01999026, -0.01812619, -0.01612344, | |
+ -0.01402729, -0.01187195, -0.00968380, -0.00748347, | |
+ -0.00528634, -0.00310362, -0.00094403, 0.00118603, | |
+ 0.00328388, 0.00534488, 0.00737145, 0.00935972, | |
+ 0.01129779, 0.01317620, 0.01496752, 0.01661433, | |
+ 0.01800033, 0.01888627, 0.01876830, 0.01658202, | |
+ 0.01030525, -0.00242128, 0.67346682, -0.01876058, | |
+ -0.02722657, -0.02468963, -0.01796084, -0.01132654, | |
+ -0.00585961, -0.00155623, 0.00179953, 0.00441079, | |
+ 0.00644218, 0.00805227, 0.00950106, 0.01174606, | |
+ 0.02242572, 0.77171297, 0.03438171, 0.01412708, | |
+ 0.00931229, 0.00185899, -0.00549888, 0.98367390, | |
+ -0.00118569, 0.00551708, -0.00773685, 0.03704726, | |
+ -0.01697661, -0.01581443, -0.02489874, -0.03686934, | |
+ -0.03730499, -0.01664727, -0.00896310, -0.01065738, | |
+ -0.01401908, -0.00410611, 0.02502894, -0.01557614, | |
+ -0.01954188, -0.01023971, 0.00344216, -0.00102523, | |
+ -0.00329702, 0.00395323, -0.07029570, -0.00520527, | |
+ 0.00465980, 0.00618719, -0.01045036, -0.23385176, | |
+ -0.01780882, 0.00296733, 0.00294064, -0.00601514, | |
+ -0.00429664, 0.00192871, 0.00718736, -0.00268484, | |
+ -0.02618994, 0.00041099, 0.00429604, -0.04453504, | |
+ 0.00293733, 0.00289707, 0.00540556, 0.00044379, | |
+ -0.19519015, -0.00302554, 0.00532550, 0.00710465, | |
+ 0.01321878, 0.00435021, 0.00192411, -0.00855998, | |
+ 0.00118486, 0.00840838, 0.00668282, 0.01774726, | |
+ -0.00152801, 0.12999898, 0.00886204, 0.02780493, | |
+ 0.00831030, -0.02677891, 0.00061920, -0.02558838, | |
+ 0.00472924, -0.04997955, 0.01742274, 0.01462019, | |
+ 0.07562432, 0.00807958, -0.00633704, 0.00939536, | |
+ -0.75372243, 0.01831989, 0.12219209, 0.01403120, | |
+ -0.02100244, 0.00240854, 0.02191492, -0.02918064, | |
+ 0.90600766, -0.34586882, -0.45150391, -0.06817464, | |
+ -0.01583615, 0.00908906, 0.00092285, 0.00440445, | |
+ -0.02729096, 0.00223921, 2.09107872, -0.01000035, | |
+ 0.01023520, -0.00947641, -0.00311226, 0.00159614, | |
+ 0.32732239, -0.00012292, -0.09593441, -0.12271546, | |
+ -0.07167270, 0.00512850, -0.01787615, -0.04603289, | |
+ 0.09842700, 0.05731869, 0.00962158, 0.06106990, | |
+ -0.01435243, -0.00941494, 0.07179246, -0.00029426, | |
+ -0.00502382, 0.03312447, -0.00290439, 0.00006796, | |
+ 0.00059874, 0.02220716, -0.00085033, 0.00837149, | |
+ 0.00147723, -0.00095300, -0.00561837, -0.00727285, | |
+ -0.00465746, 0.13605045, 0.00358532, 0.00425115, | |
+ -0.58543703, -0.01485469, -0.00713336, -0.00337102, | |
+ -0.01347155, 0.12309709, -0.00835561, 0.00201813, | |
+ 0.00444402, -0.11578490, 0.00419983, -0.00026993, | |
+ 0.00027031, -0.01037367, -0.00052725, -0.00268959, | |
+ -0.01712786, -0.02970153, -0.04064431, -0.01149815, | |
+ 0.02707296, -0.00031945, 0.07750356, 0.06390870, | |
+ 0.04421041, -0.01293176, -0.00358277, 0.04228385, | |
+ 0.01362498, -0.00270130, -0.13699968, -0.01145026, | |
+ -0.01828048, -0.00842409, 0.03505480, 0.00980542, | |
+ -0.07515192, -0.00771027, -0.01010197, -0.00051977, | |
+ -0.00793853, -0.01226382, 0.00803743, -0.00205038, | |
+ -0.01217024, 0.00308262, 0.00462687, 0.00340995, | |
+ -0.01084426, -0.00068438, 0.01571426, -0.00294172, | |
+ -0.06946321, -0.00780881, -0.00358895, -0.02551688, | |
+ 0.00327712, -0.00444228, -0.00094596, 0.00288545, | |
+ 0.00031785, 0.02411067, -0.00836837, -0.02910884, | |
+ 0.00269215, -0.00564422, 0.00187960, -0.00677084, | |
+ 0.00663074, -0.00410169, -0.62658904, -7.93843844, | |
+ }, | |
+ { | |
+ 0.04522918, -0.01268140, -0.02813894, -0.03236610, | |
+ -0.03214418, -0.02971049, -0.02605959, -0.02174386, | |
+ -0.01712259, -0.01245156, -0.00792062, -0.00367139, | |
+ 0.00019301, 0.00360115, 0.00650790, 0.00888857, | |
+ 0.01073494, 0.01205096, 0.01284902, 0.01314460, | |
+ 0.01295640, 0.01230009, 0.01118347, 0.00962184, | |
+ 0.00760142, 0.00510222, 0.00208486, -0.00151422, | |
+ -0.00578248, -0.01082024, -0.01665943, -0.02298868, | |
+ -0.02829032, -0.02811191, 0.35803690, -0.01667810, | |
+ 0.00088120, 0.01230432, 0.01599312, 0.01546016, | |
+ 0.01313488, 0.01013749, 0.00693100, 0.00369475, | |
+ 0.00046628, -0.00283882, -0.00655830, -0.01200426, | |
+ -0.02462307, -0.47456865, -0.01620119, -0.00126977, | |
+ -0.00065659, -0.00048795, 0.00140302, 0.46756552, | |
+ -0.00122688, -0.00313615, 0.00345698, -0.04395593, | |
+ 0.00140513, 0.01318834, 0.01889888, 0.02863739, | |
+ 0.01624800, 0.00997383, 0.01135935, 0.00933878, | |
+ 0.00473348, 0.00298933, 0.01205101, 0.02082042, | |
+ 0.02473127, 0.02846185, -0.01327927, 0.02021731, | |
+ 0.01028484, 0.01210275, 0.06176289, 0.00293859, | |
+ -0.00034889, -0.00255339, 0.02081475, 0.34958214, | |
+ 0.02296539, -0.01034936, -0.00086989, 0.01347206, | |
+ 0.00797478, 0.00114993, -0.00428785, -0.00229672, | |
+ 0.01123660, 0.00265517, -0.00354621, 0.04703003, | |
+ -0.00000231, -0.00263467, -0.00505434, -0.00352031, | |
+ 0.03911798, 0.00606643, -0.00422178, -0.00584416, | |
+ -0.00480983, -0.00071594, 0.00529214, 0.01028490, | |
+ 0.00205833, -0.00591082, -0.00439797, -0.01861432, | |
+ -0.01324084, -0.11186515, -0.00176793, -0.02332855, | |
+ -0.00898975, 0.03617151, -0.00383755, 0.03068079, | |
+ -0.00404364, 0.04356424, -0.01735018, -0.02240762, | |
+ -0.14067663, -0.00877207, 0.02474097, -0.00647462, | |
+ 0.80706923, -0.01005654, -0.09264670, -0.01368736, | |
+ -0.00405464, -0.00162657, -0.02710601, 0.02882654, | |
+ -0.71670742, 0.44455280, 0.46917750, 0.05515872, | |
+ 0.00892519, -0.00260486, -0.00293764, -0.01097746, | |
+ 0.02677955, -0.00371671, -1.81726976, 0.00805789, | |
+ -0.01254464, -0.04136218, 0.00009197, -0.00379440, | |
+ -0.29291362, 0.00056659, 0.14674353, 0.12538496, | |
+ 0.07844198, -0.01982504, 0.00922532, 0.03656100, | |
+ -0.08579495, -0.03649577, -0.00919409, -0.04577247, | |
+ 0.01233264, 0.00821160, -0.07330889, -0.00067866, | |
+ 0.00262968, -0.03541207, 0.00177886, -0.00089755, | |
+ -0.00220165, -0.02413650, -0.00090636, -0.00867515, | |
+ -0.00261372, 0.00025097, 0.00458401, 0.00400045, | |
+ 0.00222111, -0.14883379, -0.00664818, -0.00707583, | |
+ 0.59042310, 0.00256813, 0.00532773, 0.00069337, | |
+ 0.01348476, -0.12856677, 0.00721214, -0.00333945, | |
+ -0.00469628, 0.10152070, -0.00485155, 0.00016125, | |
+ -0.00074203, 0.01772097, -0.00011054, 0.00196853, | |
+ 0.01841237, 0.02833313, 0.04079748, 0.01060749, | |
+ -0.02418360, 0.00440616, -0.07003252, -0.04431098, | |
+ -0.02650598, 0.01126655, 0.00271672, -0.03095623, | |
+ -0.01062369, 0.00230230, 0.13836097, 0.01281531, | |
+ 0.02100732, 0.00925398, -0.03606145, -0.01177858, | |
+ 0.07695061, 0.00804508, 0.01120845, 0.00059161, | |
+ 0.00918049, 0.01298778, -0.00842048, 0.00290374, | |
+ 0.01284441, -0.00234914, -0.00532097, -0.00318897, | |
+ 0.01080631, 0.00087125, -0.01437134, 0.00292020, | |
+ 0.06959563, 0.00786169, 0.00364123, 0.02640005, | |
+ -0.00317185, 0.00439689, 0.00070503, -0.00260892, | |
+ -0.00038220, -0.02454593, 0.00828186, 0.02920132, | |
+ -0.00256188, 0.00565630, -0.00190378, 0.00691690, | |
+ -0.00665230, 0.00408547, -0.59355050, 7.83026612, | |
+ }, | |
+ { | |
+ -1.86819234, -1.85673817, -1.82806899, -1.78445773, | |
+ -1.72763728, -1.65917448, -1.58060646, -1.49346812, | |
+ -1.39927738, -1.29950803, -1.19555976, -1.08873368, | |
+ -0.98021367, -0.87105458, -0.76217585, -0.65436426, | |
+ -0.54827691, -0.44444950, -0.34330774, -0.24518058, | |
+ -0.15030398, -0.05884551, 0.02910517, 0.11348977, | |
+ 0.19431058, 0.27160561, 0.34544206, 0.41591267, | |
+ 0.48313180, 0.54724021, 0.60840145, 0.66682463, | |
+ 0.72277958, 0.77658625, 0.77832329, 0.82843517, | |
+ 0.87808486, 0.92510764, 0.96943470, 1.01125656, | |
+ 1.05080447, 1.08826991, 1.12380591, 1.15752708, | |
+ 1.18951432, 1.21980409, 1.24834447, 1.27482493, | |
+ 1.29767289, 1.30236436, 1.31583140, 1.34047577, | |
+ 1.36421540, 1.39020691, 1.42022310, 1.42463864, | |
+ 1.44963360, 1.46603539, 1.47739751, 1.51130913, | |
+ 1.51157919, 1.54303426, 1.55088373, 1.56189101, | |
+ 1.57411063, 1.58808640, 1.60134966, 1.61927080, | |
+ 1.63412139, 1.64473845, 1.64539851, 1.66117824, | |
+ 1.67026840, 1.67526366, 1.68619019, 1.69506315, | |
+ 1.70581310, 1.71443861, 1.71865273, 1.73220344, | |
+ 1.73934090, 1.74449232, 1.75251275, 1.75542977, | |
+ 1.75595414, 1.76191856, 1.77177628, 1.77501763, | |
+ 1.78307572, 1.79168355, 1.79652221, 1.80160704, | |
+ 1.80584645, 1.81461059, 1.81804214, 1.82029727, | |
+ 1.82821501, 1.83370600, 1.83714618, 1.83736749, | |
+ 1.83770096, 1.84003601, 1.84983860, 1.85220304, | |
+ 1.85473511, 1.86033114, 1.86321075, 1.86591985, | |
+ 1.87000562, 1.87490812, 1.87856856, 1.88108573, | |
+ 1.88231573, 1.88248593, 1.88839407, 1.89032331, | |
+ 1.89294687, 1.89379480, 1.89795294, 1.90153066, | |
+ 1.90523868, 1.90531340, 1.90858989, 1.91037271, | |
+ 1.91179613, 1.91396533, 1.91452225, 1.91612775, | |
+ 1.91684840, 1.91835419, 1.92135292, 1.92288939, | |
+ 1.92655149, 1.92685106, 1.92938993, 1.93088837, | |
+ 1.93134652, 1.93271955, 1.93294241, 1.93751772, | |
+ 1.93977054, 1.94090671, 1.94383410, 1.94443878, | |
+ 1.94637496, 1.94673773, 1.94737455, 1.94920869, | |
+ 1.95030131, 1.95053069, 1.95186962, 1.95324998, | |
+ 1.95347283, 1.95445603, 1.95558411, 1.95585049, | |
+ 1.95593504, 1.95858674, 1.96061092, 1.96130141, | |
+ 1.96203514, 1.96426121, 1.96439463, 1.96633267, | |
+ 1.96667868, 1.96752136, 1.96815013, 1.96852834, | |
+ 1.96957905, 1.97001504, 1.97085652, 1.97223355, | |
+ 1.97318499, 1.97327210, 1.97473731, 1.97531536, | |
+ 1.97650730, 1.97762155, 1.97793024, 1.97837039, | |
+ 1.97844267, 1.97845433, 1.97943446, 1.98032470, | |
+ 1.98059229, 1.98088201, 1.98103655, 1.98106709, | |
+ 1.98215784, 1.98334071, 1.98371017, 1.98380767, | |
+ 1.98485861, 1.98571409, 1.98573068, 1.98609526, | |
+ 1.98690514, 1.98721954, 1.98796518, 1.98816736, | |
+ 1.98856611, 1.98913466, 1.98926863, 1.98953699, | |
+ 1.98972856, 1.99012332, 1.99020621, 1.99105696, | |
+ 1.99106376, 1.99118455, 1.99203188, 1.99207502, | |
+ 1.99281319, 1.99360542, 1.99366495, 1.99373126, | |
+ 1.99380062, 1.99397718, 1.99402008, 1.99408420, | |
+ 1.99418786, 1.99437904, 1.99537684, 1.99554820, | |
+ 1.99555609, 1.99597871, 1.99618405, 1.99621344, | |
+ 1.99628324, 1.99648666, 1.99687298, 1.99703677, | |
+ 1.99714388, 1.99752511, 1.99790723, 1.99801221, | |
+ 1.99808558, 1.99811508, 1.99814920, 1.99823136, | |
+ 1.99828427, 1.99842796, 1.99857510, 1.99870166, | |
+ 1.99888219, 1.99888684, 1.99889745, 1.99895103, | |
+ 1.99918401, 1.99931471, 1.99936617, 1.99940964, | |
+ 1.99944240, 1.99969247, -1.79264372, 1.64394975, | |
+ }, | |
+ { | |
+ -0.88098881, -0.89299239, -0.90185638, -0.90891432, | |
+ -0.91484634, -0.92001006, -0.92460876, -0.92876642, | |
+ -0.93256204, -0.93604925, -0.93926563, -0.94223869, | |
+ -0.94498963, -0.94753590, -0.94989146, -0.95206813, | |
+ -0.95407677, -0.95592694, -0.95762562, -0.95918179, | |
+ -0.96060065, -0.96188860, -0.96305439, -0.96408474, | |
+ -0.96499778, -0.96578881, -0.96645662, -0.96700025, | |
+ -0.96741662, -0.96770276, -0.96786336, -0.96793238, | |
+ -0.96800600, -0.96832661, -0.82493117, -0.96931195, | |
+ -0.97117996, -0.97357024, -0.97600249, -0.97824263, | |
+ -0.98023039, -0.98196055, -0.98343986, -0.98466079, | |
+ -0.98558937, -0.98613952, -0.98611882, -0.98506894, | |
+ -0.98184418, -0.80578217, -0.98005055, -0.98532696, | |
+ -0.98740242, -0.99686439, -0.99377936, -0.83716713, | |
+ -0.99590399, -0.99114440, -0.99542140, -0.98356704, | |
+ -0.99386702, -0.99460114, -0.99039330, -0.98900904, | |
+ -0.98931356, -0.99301988, -0.99520438, -0.99578296, | |
+ -0.99342258, -0.99612913, -0.98418889, -0.99429473, | |
+ -0.99329636, -0.98927783, -0.99244461, -0.99020343, | |
+ -0.99687268, -0.99413650, -0.99184903, -0.99866652, | |
+ -0.99703503, -0.99469502, -0.99565270, -0.91751485, | |
+ -0.99429464, -0.99321057, -0.99684637, -0.99521669, | |
+ -0.99692762, -0.99935732, -0.99883256, -0.99807494, | |
+ -0.99665506, -0.99889769, -0.99848591, -0.99469487, | |
+ -0.99833896, -0.99959252, -0.99910079, -0.99361947, | |
+ -0.96101401, -0.99480994, -0.99903675, -0.99858011, | |
+ -0.99716010, -0.99859487, -0.99813393, -0.99794162, | |
+ -0.99822455, -0.99931888, -0.99954259, -0.99787803, | |
+ -0.99614414, -0.99412421, -0.99866741, -0.99808305, | |
+ -0.99728596, -0.99523137, -0.99756893, -0.99785287, | |
+ -0.99970481, -0.99727397, -0.99859226, -0.99828461, | |
+ -0.99205742, -0.99916731, -0.99161508, -0.99922175, | |
+ -0.97116004, -0.99840894, -0.99562712, -0.99819873, | |
+ -0.99742011, -0.99993406, -0.99815432, -0.99797711, | |
+ -0.99552057, -0.99466084, -0.99679303, -0.99798108, | |
+ -0.99918134, -0.99811629, -0.99964259, -0.99884726, | |
+ -0.99800806, -0.99976124, -0.95844670, -0.99953493, | |
+ -0.99902968, -0.99484213, -0.99943855, -0.99930849, | |
+ -0.99595869, -0.99941887, -0.99465788, -0.99687520, | |
+ -0.99800100, -0.99796746, -0.99868175, -0.99828645, | |
+ -0.99789241, -0.99837118, -0.99942569, -0.99064249, | |
+ -0.99945590, -0.99958417, -0.99740982, -0.99957234, | |
+ -0.99953187, -0.99778523, -0.99932190, -0.99941251, | |
+ -0.99956455, -0.99876309, -0.99954640, -0.99889394, | |
+ -0.99940071, -0.99981641, -0.99958115, -0.99865912, | |
+ -0.99915271, -0.99452281, -0.99900256, -0.99923273, | |
+ -0.98267541, -0.99416830, -0.99870986, -0.99934671, | |
+ -0.99923993, -0.99812928, -0.99975253, -0.99938306, | |
+ -0.99910712, -0.99658059, -0.99902451, -0.99996005, | |
+ -0.99968734, -0.99831217, -0.99984258, -0.99976535, | |
+ -0.99889458, -0.99874164, -0.99844551, -0.99937064, | |
+ -0.99708208, -0.99881195, -0.99813412, -0.99808880, | |
+ -0.99781052, -0.99946838, -0.99967677, -0.99817677, | |
+ -0.99916974, -0.99933976, -0.99452300, -0.99892304, | |
+ -0.99929936, -0.99893649, -0.99866086, -0.99716059, | |
+ -0.99785790, -0.99873466, -0.99783572, -0.99956801, | |
+ -0.99935556, -0.99938340, -0.99778535, -0.99896470, | |
+ -0.99942589, -0.99907229, -0.99874209, -0.99906976, | |
+ -0.99845380, -0.99976813, -0.99829761, -0.99972844, | |
+ -0.99810166, -0.99928800, -0.99957914, -0.99837911, | |
+ -0.99929972, -0.99907355, -0.99930534, -0.99872942, | |
+ -0.99975620, -0.99897987, -0.99945931, -0.99920610, | |
+ -0.99937016, -0.99931557, -0.99979993, -0.99968604, | |
+ -0.99951149, -0.99970281, -0.80210951, -0.64553083, | |
+ }, | |
+ { | |
+ }, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment