added CAPS, several bugfixes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@414 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
23
ChangeLog
23
ChangeLog
@@ -1,3 +1,26 @@
|
||||
2006-09-25 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* plugins/vst_effect/vst_control_dialog.cpp:
|
||||
do not try to reparent effect's plugin-widget in destructor - fixes
|
||||
crash when deleting vst-effect from effect-chain
|
||||
|
||||
* src/lib/mmp.cpp:
|
||||
do not indent mmp-files anymore as it wastes *a lot* of unneccesary
|
||||
space
|
||||
|
||||
* data/projects/cool_songs/StrictProduction-Underline.mmp:
|
||||
added another cool project
|
||||
|
||||
* plugins/ladspa_base/ladspa_manager.cpp:
|
||||
- always add /usr/lib/ladspa and /usr/local/lib/ladspa to directories
|
||||
where to search for LADSPA-plugins
|
||||
- also search in /usr/lib/lmms/ladspa for LADSPA-plugins (that's where
|
||||
for example CAPS is installed)
|
||||
|
||||
* plugins/ladspa_effect/caps/:
|
||||
added CAPS (C Audio Plugin Suite) for providing a basic LADSPA-plugin-
|
||||
collection
|
||||
|
||||
2006-09-23 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* plugins/vst_effect/vst_control_dialog.cpp:
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(lmms, 0.2.1-svn20060923, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20060923)
|
||||
AC_INIT(lmms, 0.2.1-svn20060925, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20060925)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
@@ -508,6 +508,7 @@ AC_CONFIG_FILES([Makefile
|
||||
plugins/flp_import/Makefile
|
||||
plugins/ladspa_base/Makefile
|
||||
plugins/ladspa_effect/Makefile
|
||||
plugins/ladspa_effect/caps/Makefile
|
||||
plugins/midi_import/Makefile
|
||||
plugins/organic/Makefile
|
||||
plugins/plucked_string_synth/Makefile
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
5068
data/projects/cool_songs/StrictProduction-Underline.mmp
Normal file
5068
data/projects/cool_songs/StrictProduction-Underline.mmp
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -63,12 +63,13 @@ ladspaManager::ladspaManager( engine * _engine )
|
||||
configManager::inst()->ladspaDir() );
|
||||
#endif
|
||||
|
||||
// set default-directory if nothing is specified...
|
||||
ladspaDirectories.push_back( "/usr/lib/lmms/ladspa" );
|
||||
/* // set default-directory if nothing is specified...
|
||||
if( ladspaDirectories.isEmpty() )
|
||||
{
|
||||
{*/
|
||||
ladspaDirectories.push_back( "/usr/lib/ladspa" );
|
||||
ladspaDirectories.push_back( "/usr/local/lib/ladspa" );
|
||||
}
|
||||
// }
|
||||
for( QStringList::iterator it = ladspaDirectories.begin();
|
||||
it != ladspaDirectories.end(); ++it )
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
SUBDIRS = caps
|
||||
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. -I../ladspa_base/
|
||||
|
||||
@@ -27,7 +29,7 @@ CLEANFILES = $(MOC_FILES) ./embedded_resources.h
|
||||
|
||||
|
||||
|
||||
pkglib_LTLIBRARIES= libladspaeffect.la
|
||||
pkglib_LTLIBRARIES = libladspaeffect.la
|
||||
|
||||
libladspaeffect_la_SOURCES = ladspa_effect.cpp \
|
||||
ladspa_control_dialog.cpp \
|
||||
|
||||
486
plugins/ladspa_effect/caps/Amp.cc
Normal file
486
plugins/ladspa_effect/caps/Amp.cc
Normal file
@@ -0,0 +1,486 @@
|
||||
/*
|
||||
Amp.cc
|
||||
|
||||
Copyright 2003-6 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
tube amplifier models
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Amp.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
AmpStub::init (double _fs, bool adjust_downsampler)
|
||||
{
|
||||
fs = _fs;
|
||||
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;
|
||||
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
AmpIII::init (double _fs)
|
||||
{
|
||||
this->AmpStub::init (_fs, false);
|
||||
|
||||
/* need to filter out dc before the power amp stage, which is running at
|
||||
* the oversampled rate */
|
||||
dc_blocker.set_f (10. / (fs * OVERSAMPLE));
|
||||
|
||||
DSP::RBJ::LoShelve (200 / (_fs), .2, -3, filter.a, filter.b);
|
||||
}
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void
|
||||
AmpIII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
d_sample gain = *ports[1];
|
||||
d_sample temp = *ports[2] * tube.scale;
|
||||
|
||||
drive = *ports[3] * .5;
|
||||
i_drive = 1 / (1 - drive);
|
||||
|
||||
d_sample * d = ports[4];
|
||||
|
||||
*ports[5] = 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 one_over_n = 1. / frames;
|
||||
double gf = pow (current.g / g, one_over_n);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register d_sample 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 (
|
||||
tube.transfer_clip (up.pad (o)))));
|
||||
|
||||
F (d, i, a, adding_gain);
|
||||
|
||||
g *= gf;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
current.g = g;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
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()
|
||||
{
|
||||
UniqueID = 1786;
|
||||
Label = "AmpIII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: AmpIII - Tube amp emulation";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
AmpIV::init (double _fs)
|
||||
{
|
||||
this->AmpStub::init (_fs, 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);
|
||||
}
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void
|
||||
AmpIV::one_cycle (int frames)
|
||||
{
|
||||
double one_over_n = 1. / frames;
|
||||
|
||||
d_sample * s = ports[0];
|
||||
|
||||
d_sample gain = *ports[1];
|
||||
d_sample temp = *ports[2] * tube.scale;
|
||||
|
||||
tone.start_cycle (ports + 3, one_over_n);
|
||||
|
||||
drive = *ports[7] * .5;
|
||||
i_drive = 1 / (1 - drive);
|
||||
|
||||
d_sample * 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 d_sample 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 (
|
||||
tube.transfer_clip (up.pad (o)))));
|
||||
|
||||
F (d, i, a, adding_gain);
|
||||
|
||||
g *= gf;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
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 emulation + tone controls";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
AmpV::init (double _fs)
|
||||
{
|
||||
this->AmpStub::init (_fs, 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);
|
||||
|
||||
/* power supply capacitor */
|
||||
for (int i = 0; i < 2; ++i)
|
||||
DSP::RBJ::LP (10. / _fs, .3, power_cap[i].a, power_cap[i].b);
|
||||
}
|
||||
|
||||
static int _turn = 0;
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void
|
||||
AmpV::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
d_sample gain = *ports[1];
|
||||
|
||||
if (*ports[2] != cut)
|
||||
{
|
||||
cut = *ports[2];
|
||||
DSP::RBJ::LoShelve (210. / fs, .2, cut, filter[0].a, filter[0].b);
|
||||
}
|
||||
if (*ports[3] != tone)
|
||||
{
|
||||
tone = *ports[3];
|
||||
double f = tone * tone * 8400 + 420;
|
||||
double q = tone * .4 + .2;
|
||||
double db = tone * 2 + 2;
|
||||
DSP::RBJ::LoShelve (f / fs, q, db, filter[2].a, filter[2].b);
|
||||
}
|
||||
|
||||
drive = *ports[4] * .5;
|
||||
i_drive = 1 / (1 - drive);
|
||||
|
||||
#define MAX_WATTS port_info[5].range.UpperBound
|
||||
d_sample sag = (MAX_WATTS - *ports[5]) / MAX_WATTS;
|
||||
sag = .6 * sag * sag;
|
||||
|
||||
d_sample * d = ports[6];
|
||||
|
||||
*ports[7] = OVERSAMPLE;
|
||||
|
||||
double g = current.g;
|
||||
|
||||
current.g = max (gain < 1 ? gain : pow (20, gain - 1), .000001);
|
||||
if (0 && (++_turn & 127) == 0)
|
||||
fprintf (stderr, "supply = %.3f sag = %.3f\n", supply, sag);
|
||||
|
||||
if (g == 0) g = current.g;
|
||||
|
||||
/* recursive fade to prevent zipper noise from the 'gain' knob */
|
||||
double one_over_n = 1. / frames;
|
||||
double gf = pow (current.g / g, one_over_n);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register d_sample a = s[i];
|
||||
register d_sample 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);
|
||||
|
||||
{
|
||||
for (int o = 1; o < OVERSAMPLE; ++o)
|
||||
down.store (
|
||||
power_transfer (
|
||||
dc_blocker.process (
|
||||
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 i = 0; i < 2; ++i)
|
||||
supply = 0.9 * (power_cap[i].process (supply));
|
||||
|
||||
g *= gf;
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
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 - Refined tube amp emulation";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
|
||||
339
plugins/ladspa_effect/caps/Amp.h
Normal file
339
plugins/ladspa_effect/caps/Amp.h
Normal file
@@ -0,0 +1,339 @@
|
||||
/*
|
||||
Amp.h
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
oversampled tube amplifier emulation.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _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/FIR.h"
|
||||
#include "dsp/sinc.h"
|
||||
#include "dsp/windows.h"
|
||||
|
||||
#include "dsp/RBJ.h"
|
||||
#include "dsp/Eq.h"
|
||||
|
||||
class AmpStub
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
|
||||
/* oscillating NOISE_FLOOR, added to prevent denormals in signal */
|
||||
d_sample normal;
|
||||
|
||||
DSP::TwelveAX7_3 tube;
|
||||
|
||||
d_sample 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 (double _fs, bool adjust_downsampler = false);
|
||||
|
||||
inline d_sample power_transfer (d_sample 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[];
|
||||
d_sample * ports [5];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
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[];
|
||||
d_sample * ports [6];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
/* /////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
typedef struct
|
||||
{float center, Q, adjust;}
|
||||
PreampBand;
|
||||
|
||||
class ToneControls
|
||||
{
|
||||
public:
|
||||
d_sample eq_gain[4];
|
||||
DSP::Eq<4,4> eq;
|
||||
static PreampBand bands[4];
|
||||
d_sample normal;
|
||||
|
||||
public:
|
||||
void init (double _fs);
|
||||
void activate (d_sample **);
|
||||
|
||||
inline void
|
||||
start_cycle (d_sample ** 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);
|
||||
}
|
||||
}
|
||||
|
||||
double get_band_gain (int i, double g);
|
||||
void set_band_gain (int i, float g);
|
||||
|
||||
inline d_sample process (d_sample x)
|
||||
{
|
||||
return eq.process (x);
|
||||
}
|
||||
};
|
||||
|
||||
/* /////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
class PreampIV
|
||||
: public PreampIII
|
||||
{
|
||||
public:
|
||||
ToneControls tone;
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [9];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
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[];
|
||||
d_sample * ports [10];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
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];
|
||||
|
||||
d_sample cut, tone;
|
||||
|
||||
/* supply voltage sag */
|
||||
d_sample supply;
|
||||
DSP::BiQuad power_cap[2];
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [7];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
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.;
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func, OVERSAMPLE> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func, OVERSAMPLE> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _AMP_H_ */
|
||||
187
plugins/ladspa_effect/caps/Cabinet-Models32.h
Normal file
187
plugins/ladspa_effect/caps/Cabinet-Models32.h
Normal file
@@ -0,0 +1,187 @@
|
||||
/*
|
||||
Cabinet-Models32.h
|
||||
|
||||
Copyright 2005 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
Coefficients for 32nd order IIR filters modeling the frequency
|
||||
responses of a few select instrument amplifier speaker boxes.
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
Model32
|
||||
CabinetII::models44100 [] = {
|
||||
{
|
||||
1, /* identity */
|
||||
{1},
|
||||
{0},
|
||||
0.2500
|
||||
},
|
||||
{
|
||||
32, /* matchless_off */
|
||||
{0.751133877447, 0.476665652568, 0.232649157621, 0.073490164573, -0.0520549100755, -0.121257530713, -0.100197130001, -0.0412212505538, 0.0304188276576, 0.0756296082021, 0.0339966964433, -0.0188218345374, -0.0138445066369, 0.0213454687998, 0.0509702380835, 0.0734535180348, 0.0423999627069, 0.0153810625747, 0.0251173605116, 0.0231247294211, 0.0118254107717, 0.0397159715652, 0.0509631315658, 0.0289647310658, -0.0151415828019, -0.0678734405803, -0.093244908543, -0.066522401653, -0.0390777734265, -0.0206522167345, -0.0140462622686, -0.000367155236373},
|
||||
{0.0, 0.582601584085, 0.179375009603, -0.0310635155569, -0.115346798496, -0.0929627102659, -0.00905181962865, 0.0529760132518, 0.0660791287878, 0.0264313110774, -0.0527906709163, -0.0832644831913, -0.047761487157, -0.00525089678838, 0.00920853658047, 0.00160221988302, -0.036921883774, -0.0508637181262, -0.0369139574948, -0.0297884797081, -0.0131892593004, 0.0328205903451, 0.0532522735819, 0.0434869096278, 0.0171966303505, -0.0117058173799, -0.0222005420711, -0.00885326183421, -0.00467956865215, -0.0017726627279, -0.00860012741033, -0.046231460458},
|
||||
0.1088
|
||||
},
|
||||
{
|
||||
32, /* matchless_on */
|
||||
{0.737841828858, 0.460204992853, 0.280744637086, 0.0935206597339, -0.0705817082991, -0.156854249167, -0.144106172504, -0.0685499381158, 0.00620304241081, 0.0610934722291, 0.0465273895752, -0.0126452119054, -0.0649026246806, -0.0713209874063, -0.0596110923629, -0.0415373874755, -0.0389721881465, -0.0284327312853, -0.0109349222879, 0.0222033554026, 0.0552410801, 0.0896637673103, 0.106570641198, 0.122226072209, 0.115856033255, 0.0801435470104, 0.0100505511461, -0.0489360304782, -0.0829690212741, -0.0887089006669, -0.0886065785655, -0.0469811200837},
|
||||
{0.0, 0.611100232423, 0.191219480026, -0.0831423854754, -0.193756321128, -0.162103938394, -0.0633420329893, 0.0168905353821, 0.0319336623225, 0.00544046343502, -0.0450052997134, -0.0655650754908, -0.0385274002732, 0.0140346387674, 0.0381359817338, 0.0270741530904, -0.00985978537582, -0.0339616898786, -0.039510862758, -0.0234251294011, -0.00577196250278, 0.00602171273173, -0.0012115688049, -0.00850899153196, -0.0195544970682, -0.0235059343611, -0.0181958065493, 0.00619896262657, 0.0223536984999, 0.0126908937718, -0.0260364491855, -0.048766780312},
|
||||
0.1398
|
||||
},
|
||||
{
|
||||
32, /* superchamp */
|
||||
{0.764583545976, 0.538738620869, 0.179425189777, -0.0185116138637, -0.155373227876, -0.162444114313, -0.0955812737534, -0.0527583372679, 0.0109899803101, 0.027210394773, -0.0177057767782, -0.03205717291, -0.0483168565776, -0.00731185525588, 0.0552452873245, 0.075576957847, 0.0442457880974, -0.0118721835978, -0.0177888197761, 0.0351775943888, 0.0348792107809, 0.0127082443141, -0.0055147874283, -0.025538492041, -0.0266140723472, -0.00351312980821, -0.00705954101235, -0.0071756277097, -0.0073123807337, 0.00388589850911, 0.00920641143732, 0.00675123073573},
|
||||
{0.0, 0.60762891993, 0.0804538514268, -0.139045714146, -0.188318237239, -0.102850850916, -0.014327283229, 0.0095126479685, 0.00675439266545, -0.0369566468812, -0.0735379197498, -0.0464884257152, -0.00652653570483, 0.0460655599383, 0.0503985731174, -5.63018161884e-05, -0.0506993010893, -0.0519236737825, 0.00601034157191, 0.0565585753845, 0.0271235886591, -0.0124334855533, -0.0275977294885, -0.0178167665585, 0.0128169339437, 0.0370635121992, 0.0234037648427, 0.00539790260771, -0.0105614779717, -0.00455010484908, 0.0101491481873, 0.0220600470141},
|
||||
0.1771
|
||||
},
|
||||
{
|
||||
32, /* fender_68 */
|
||||
{0.952578805555, 0.423653323267, -0.299325586902, -0.181365977098, -0.00917621972835, -0.106211820702, -0.144312857058, -0.0664525836173, -0.0308777018884, -0.0289677657295, 0.06172127279, 0.0700934900581, 0.00309908907112, -0.00891983996273, -0.0687746247517, -0.0146407179784, 0.0264920122813, 0.0134951652977, 0.0480259959669, 0.021152058087, -0.0229395195318, 0.00306616207055, 0.015377268642, -0.0166969251715, -0.0472474005373, -0.0257631159809, -0.0298364749235, -0.0359529903186, -0.0228763062676, -0.0190698276841, -0.0481625561196, -0.024778494842},
|
||||
{0.0, 0.373287747089, -0.379113471957, -0.162638822705, -0.0309789534425, -0.113942084113, -0.0746182251996, 0.00371088736605, -0.0311272559258, -0.0641468114835, -0.01820597504, -0.0106553201186, -0.0025754233332, 0.00779983208005, -0.0133002473609, 0.0474101909397, 0.0302769494631, -0.0206219756872, 0.00091004302278, 0.00989883124397, -0.00095818764248, -0.00710510898183, -0.0103772680579, 0.00636775505307, 0.0172954284337, 0.00560785607672, -0.00550757886611, 0.0349170637518, 0.033667260855, 0.0263631580776, 0.110816169944, 0.0551965257177},
|
||||
0.5267
|
||||
},
|
||||
{
|
||||
32, /* marshall */
|
||||
{0.632136921276, 0.487520501766, 0.267166936676, 0.0328329910029, -0.124746548218, -0.175922403211, -0.134056005594, -0.0275494615733, 0.0707349518645, 0.112423870345, 0.0758114749041, 0.0139250983739, -0.0210142361937, -0.00193163235992, 0.0197248569676, 0.0206461311409, -0.00897578938148, -0.0306233925441, -0.041776582616, -0.0398244883075, -0.0328395317644, -0.0101508675516, 0.00636535089023, 0.0217430701187, 0.0223553033142, 0.0237782685683, 0.0278909244449, 0.0469073547267, 0.0509466858461, 0.0336174039295, 0.0028829896058, 0.0114245696423},
|
||||
{0.0, 0.618938053184, 0.180052941443, -0.1028119852, -0.19233134457, -0.14303971742, -0.0450998045919, 0.0341843500162, 0.0465086637485, 0.0071435730282, -0.0461779135605, -0.059013077843, -0.0284397368519, 0.0187689538251, 0.0341298347311, 0.0244703904826, 0.00720524642447, 0.00991307420138, 0.018738094495, 0.0275442994126, 0.0299092523536, 0.0339721143791, 0.0270175082759, 0.0151058732685, -0.00751060215331, -0.0236467101096, -0.0272347092017, -0.00812409176413, 0.0141531255726, 0.0270163512016, 0.00208457244433, -0.0784208903527},
|
||||
0.1132
|
||||
},
|
||||
};
|
||||
|
||||
Model32
|
||||
CabinetII::models48000 [] = {
|
||||
{
|
||||
1, /* identity */
|
||||
{1},
|
||||
{0},
|
||||
0.2500
|
||||
},
|
||||
{
|
||||
32, /* matchless_off */
|
||||
{0.751616859768, 0.455477674067, 0.236301148417, 0.0831041136969, -0.0271403780165, -0.100856772665, -0.105648770896, -0.0532306291781, 0.00532168244437, 0.0769562829624, 0.0998339309568, 0.0558038693299, -0.00395884124382, -0.0114310936324, -0.00035476064153, 0.0174339944264, 0.0326924241347, 0.0270873548662, -0.00429020715999, 0.00156163927912, 0.0110729521074, -0.00355947960002, -0.0197465530354, -0.00226491671692, 0.000562585645118, -0.0113374627036, -0.0395530054938, -0.0773637715714, -0.110300349197, -0.102242460538, -0.0802708342222, -0.0368542661019},
|
||||
{0.0, 0.573363683971, 0.199471497847, -0.0100987131104, -0.10105055289, -0.104899707204, -0.0453437303875, 0.0227558858103, 0.0494210617945, 0.0469948522053, -0.000869801014908, -0.060632162889, -0.078080719406, -0.036500327, 0.00169111404144, 0.0161416041893, 0.00446588199593, -0.0256497606161, -0.052007235054, -0.0329954828689, -0.00846672300472, 0.00503287700528, 0.0225460696732, 0.0488769816297, 0.0448900330347, 0.0265213842101, 0.00867720983291, 0.00309440217249, 0.0106055108636, 0.0271743998844, 0.00790666559882, -0.0494793375024},
|
||||
0.0972
|
||||
},
|
||||
{
|
||||
32, /* matchless_on */
|
||||
{0.736752793274, 0.42789796886, 0.276149514408, 0.115820415827, -0.0320628697966, -0.121795204879, -0.142828258933, -0.0859958693575, -0.0176210080708, 0.0507262077785, 0.0760681727953, 0.0516030677135, -0.0156690595908, -0.0681826247693, -0.0944163538419, -0.0902627133447, -0.0823076517005, -0.0734934090705, -0.0692943287136, -0.0513490885216, -0.0305887683924, 0.00285704997857, 0.0369925466712, 0.0764037770343, 0.103822670992, 0.130505051247, 0.126189167018, 0.0870288516942, 0.00607091602923, -0.0716539223465, -0.122336223951, -0.107802803871},
|
||||
{0.0, 0.60867772822, 0.226828570484, -0.0393069664502, -0.171393086666, -0.174192716258, -0.103361484389, -0.0132853346158, 0.028065787663, 0.0276791758057, -0.0093177316362, -0.0469821632045, -0.0621330892865, -0.0326281391326, 0.00952584471493, 0.0391305970452, 0.0343547401694, 0.0103991548433, -0.0167038490391, -0.0239538249183, -0.0200522931237, -0.00619037145571, 0.00112030880301, 0.00379111038519, -0.00425737141588, -0.00510101082859, -0.00618382168232, 0.00222622566288, 0.012234432496, 0.0240659559777, 0.00806553945799, -0.0500627523652},
|
||||
0.1292
|
||||
},
|
||||
{
|
||||
32, /* superchamp */
|
||||
{0.736144077022, 0.533697136818, 0.208223243775, 0.0105446749467, -0.115112852124, -0.167784888349, -0.118309369108, -0.0686796829989, -0.0320689348914, 0.0293577338735, 0.0228074058112, -0.00942321170451, -0.0247236206138, -0.0382275338893, -0.0220962904251, 0.0369265390908, 0.0652234781224, 0.0625494411772, 0.0203218939615, -0.0130049534934, 0.00776964355966, 0.0408524993227, 0.0187403995074, -0.00323676614764, -0.011729909669, -0.0146182789026, -0.00520348014418, 0.0251718299467, 0.0292350516935, 0.0265773340322, 0.0181154887123, 0.00421057480694},
|
||||
{0.0, 0.610899704338, 0.116614493347, -0.107102211172, -0.17045907835, -0.125900190491, -0.0364778545046, 0.00268191730596, 0.00393059621292, -0.00442930148683, -0.0496456084728, -0.0641110080937, -0.0380451267687, -0.00269939732468, 0.0336320714582, 0.0473822399663, 0.00672982206906, -0.0376868259805, -0.0574242984978, -0.0235397064668, 0.0375124576452, 0.0561991090538, 0.0137707473486, -0.019313535496, -0.0308393757193, -0.0231851781013, -0.000359955230619, 0.0224262684571, 0.0140137052508, 0.000784652753983, -0.00886431320574, 0.00520310404507},
|
||||
0.1627
|
||||
},
|
||||
{
|
||||
32, /* fender_68 */
|
||||
{0.940499002611, 0.474406048513, -0.234027864276, -0.245068743132, -0.0275886925241, -0.0375353084644, -0.116020540053, -0.0788142311793, -0.0192628993487, -0.0208031874862, -0.036274591111, 0.0274443468203, 0.0248807593189, -0.00647753415313, 0.0123263590476, -0.0207149994271, -0.0169433327912, 0.0367748568855, 0.0157152144192, 0.0219763333967, 0.0220500063178, -0.0236599648747, -0.028051497911, 0.0300390624893, 0.0503387731847, 0.0200944005064, -0.0199651438354, -0.0189512878551, -0.0341641453641, -0.0429368448753, -0.00172415323758, 0.0187773541719},
|
||||
{0.0, 0.438339721191, -0.314663980515, -0.200197131305, -0.0199447108206, -0.0806444850114, -0.112178302737, -0.0407327776523, -0.0162859630428, -0.04823028022, -0.0411406583855, 0.0181605305425, 0.0182296926714, 0.0118833391549, 0.00393162532115, -0.0208012980893, 0.0236552029021, 0.0440436249244, -0.015760708804, -0.00800215008051, 0.0264390446392, 0.0224755303713, -0.00488388416495, -0.0302927869543, -0.0389708286652, -0.0213138828272, -0.0196593434643, -0.0250837259433, -0.0171306364105, -0.00247139702561, -0.0442683480699, 0.00104076341183},
|
||||
0.4976
|
||||
},
|
||||
{
|
||||
32, /* marshall */
|
||||
{0.632432814914, 0.466340577796, 0.289928964438, 0.0873773815151, -0.0637714745665, -0.134210611966, -0.135503699906, -0.0734327294692, 0.00792058229369, 0.0760927054439, 0.0890306791735, 0.0595619591479, 0.00922265898468, -0.00784921065447, 0.00721708132165, 0.0350086110935, 0.0376247852781, 0.0202910905225, -0.00870656585895, -0.0201433438279, -0.0279367587019, -0.0245180701261, -0.0152282108474, 0.00828831561931, 0.026894267099, 0.0460507228179, 0.0479724909309, 0.0409446830643, 0.0201085872414, 0.00561387003945, -0.00753169056058, 0.000986659484038},
|
||||
{0.0, 0.594136919296, 0.201493775156, -0.0716153113375, -0.180702317671, -0.160390621032, -0.0826806167453, 0.000697581661664, 0.0397029332137, 0.0299147550153, -0.0177304803895, -0.0570701545448, -0.0652412298089, -0.0298128518083, 0.0124560081161, 0.0355161884622, 0.0255626596849, 0.00762986123778, -0.00431800264305, 0.00420452150537, 0.0150803653129, 0.0291131391488, 0.0359312991789, 0.0364212054952, 0.0203516393338, 0.0022141464642, -0.0149317465975, -0.0121651677123, 0.00704936522966, 0.0353605810957, 0.0322793623201, -0.0307481566657},
|
||||
0.0996
|
||||
},
|
||||
};
|
||||
|
||||
Model32
|
||||
CabinetII::models88200 [] = {
|
||||
{
|
||||
1, /* identity */
|
||||
{1},
|
||||
{0},
|
||||
0.2500
|
||||
},
|
||||
{
|
||||
32, /* matchless_off */
|
||||
{0.581241782856, 0.351127495653, 0.293447498861, 0.203644809011, 0.122868019886, 0.0798136296596, 0.0627344813847, 0.0582949053671, 0.0495483041303, 0.0432630437098, 0.040778980166, 0.0502959955879, 0.06102889964, 0.0717641907075, 0.0748815766238, 0.0800912666293, 0.0851573668252, 0.0920643205477, 0.0863975575062, 0.0672325976358, 0.0316956083124, -0.00434276880274, -0.0353531287352, -0.0497775530225, -0.0549729489782, -0.0523697171754, -0.0527017492312, -0.0496529350336, -0.0432932459975, -0.02532771672, -0.00704167237723, 0.0048594343372},
|
||||
{0.0, 0.527351085198, 0.306902134941, 0.121666659808, -0.000869395618695, -0.0590060725486, -0.0800321294614, -0.0812161497866, -0.0756902882293, -0.0586480829698, -0.035146960319, -0.00693669578546, 0.0137459416267, 0.0260709477944, 0.027142282904, 0.0255107789641, 0.0184912445046, 0.00787311464383, -0.012080806249, -0.0326630439808, -0.0479929895538, -0.0449384101923, -0.0257392906728, 0.00611234738181, 0.0331632616028, 0.0482685642726, 0.0424761053987, 0.0227984734932, -0.00689764194843, -0.0338856201523, -0.0506606159856, -0.036511204766},
|
||||
0.0505
|
||||
},
|
||||
{
|
||||
32, /* matchless_on */
|
||||
{0.754229081317, 0.28992460445, 0.25506113675, 0.205825249671, 0.149736304722, 0.0965453802519, 0.043937905171, 0.000434005345846, -0.0380077969732, -0.0648440473691, -0.0820185458195, -0.0804769096126, -0.067903181347, -0.0457545818062, -0.024506391213, 0.000276698483466, 0.0227732012504, 0.0462273060245, 0.0612627993168, 0.0704402843546, 0.0668070265589, 0.0560526861609, 0.0360109823522, 0.0171596012087, -0.00254977646019, -0.0169995310247, -0.0326802854744, -0.0431803638863, -0.0527933574758, -0.0537365642607, -0.0484658084207, -0.0264410770067},
|
||||
{0.0, 0.473323278291, 0.304447812378, 0.156758267418, 0.0407417557578, -0.0375541115795, -0.084174169143, -0.0995647273704, -0.0953485009639, -0.0745284443813, -0.047611748504, -0.0160860230858, 0.00812108121932, 0.022520582633, 0.0218183858734, 0.0139436350809, -0.000684654971314, -0.0149097687302, -0.0306604197839, -0.0406022715147, -0.0468128179642, -0.0432623683601, -0.0334406989274, -0.0143890226248, 0.00558711901527, 0.0240338814196, 0.0313772357088, 0.0288551286613, 0.0119537593072, -0.0137695197232, -0.0487934292115, -0.0830489298052},
|
||||
0.0977
|
||||
},
|
||||
{
|
||||
32, /* superchamp */
|
||||
{0.564442248694, 0.417375378841, 0.328112930961, 0.184087902524, 0.0606877879374, -0.000888211396509, -0.0240417949471, -0.0386494407725, -0.0623924578122, -0.077697122496, -0.0771755477917, -0.0625887925073, -0.0567602691995, -0.0606788148043, -0.0653972735044, -0.0482177616776, -0.0134706312764, 0.0255178539984, 0.0454519306153, 0.0488386058553, 0.040370247527, 0.0309888915369, 0.0118591255626, -0.0166655766779, -0.0524886753799, -0.0735764853592, -0.0712539506456, -0.0409275497673, 2.56200623182e-05, 0.0407426819337, 0.0605288133085, 0.045387360314},
|
||||
{0.0, 0.58401876341, 0.301866612426, 0.0749234792796, -0.0512250579262, -0.0884380547633, -0.0859341509964, -0.0715039798048, -0.0533786975427, -0.0228940420774, 0.00895370138835, 0.029234699873, 0.0249642271923, 0.00815472752255, -0.00852123193886, -0.013874697166, -0.0177655062032, -0.0244009337209, -0.0348366549323, -0.0341041586519, -0.0199202543104, 0.0049040564053, 0.0228786117828, 0.0307412470467, 0.0270357914745, 0.0202102683028, 0.00600213627849, -0.0132416519396, -0.035306113292, -0.0400865958576, -0.0122081055945, 0.061547236583},
|
||||
0.0940
|
||||
},
|
||||
{
|
||||
32, /* fender_68 */
|
||||
{0.636561915308, 0.539655264394, 0.306940867236, -0.00798666364572, -0.2010016693, -0.196429989976, -0.0871390659769, 0.0058320328314, 0.0205797064122, -0.0137249327682, -0.0511542488948, -0.0559233911299, -0.0365269209833, -0.00933607201861, 0.00259528983031, 0.000820508580746, -0.014655020786, -0.0298656923381, -0.0363760565053, -0.0164103072662, 0.0180980103038, 0.0427307277871, 0.0289045601723, -0.00365819240342, -0.0221033761769, -0.00613002097262, 0.0137359639094, 0.0126374765575, -0.0109039821774, -0.022164851067, -0.00644276895272, 0.0406179316828},
|
||||
{0.0, 0.660098640191, 0.135995579965, -0.18643602906, -0.21362553946, -0.0765656086032, 0.0304158765248, 0.0317377501315, -0.0306547118834, -0.0742288333657, -0.0716640946732, -0.0400798411024, -0.016998894935, -0.0119106601837, -0.0209707717803, -0.0285105267284, -0.033043355156, -0.03016836978, -0.0235112391223, -0.0121431367424, -0.0083970652792, -0.0121227777881, -0.0179437299751, -0.0103936611338, 0.000810102779011, -0.000708784846704, -0.0234941025684, -0.0371015701952, -0.0180247391719, 0.0220761118738, 0.0243771530897, -0.0421517051891},
|
||||
0.2672
|
||||
},
|
||||
{
|
||||
32, /* marshall */
|
||||
{0.487781223472, 0.313482625917, 0.286350463893, 0.224656866466, 0.146402144474, 0.0763559834141, 0.0205530599391, -0.0145817074955, -0.0366424375139, -0.0445785898927, -0.0458160857045, -0.037336889106, -0.0251791786851, -0.00575399966305, 0.0148942739024, 0.0391750282507, 0.0589388969198, 0.0752812491289, 0.0811254049966, 0.0801917939348, 0.0685526132261, 0.0533549680139, 0.0342811257343, 0.0215399491933, 0.0147049499229, 0.0198301270011, 0.030982725155, 0.0503002628087, 0.0693130546132, 0.0867905978395, 0.0881891739024, 0.0641468491285},
|
||||
{0.0, 0.51943795847, 0.326729354403, 0.149229797985, 0.0109767104297, -0.0732768493116, -0.111088974509, -0.110789539541, -0.0898934114003, -0.0564578047856, -0.0231004313356, 0.0069673688738, 0.0254240918116, 0.0337510299271, 0.0282514883492, 0.0147089116391, -0.00647743824673, -0.0269028751263, -0.0446349197143, -0.0510564142456, -0.0478791675617, -0.0324832722564, -0.0121393859238, 0.0104982033447, 0.0241412382054, 0.026038551433, 0.00994372364326, -0.0158545375622, -0.0436236854665, -0.0537883431888, -0.032574614307, 0.0387767610956},
|
||||
0.0666
|
||||
},
|
||||
};
|
||||
|
||||
Model32
|
||||
CabinetII::models96000 [] = {
|
||||
{
|
||||
1, /* identity */
|
||||
{1},
|
||||
{0},
|
||||
0.2500
|
||||
},
|
||||
{
|
||||
32, /* matchless_off */
|
||||
{0.576442585125, 0.306361432085, 0.256653772545, 0.177316081395, 0.0989986029973, 0.0501811139283, 0.0263950297254, 0.0211066378234, 0.0164669956215, 0.0145939695187, 0.0131915301884, 0.0224302343035, 0.0359395096833, 0.0545608587271, 0.0665798797365, 0.0764638706987, 0.0822020713116, 0.0937583388117, 0.104705110174, 0.114731370205, 0.110211793209, 0.0934363192015, 0.0618719406527, 0.0288732783262, -0.00358352145982, -0.0259155247732, -0.0441021836484, -0.0555310772717, -0.0670712283056, -0.0677576234809, -0.0520883036287, -0.00170675690763},
|
||||
{0.0, 0.508669145362, 0.322479739387, 0.156892646838, 0.035020841423, -0.0347440829067, -0.0701806136041, -0.0825008530376, -0.0845801358275, -0.0733688333095, -0.0530323023958, -0.0234536559399, 0.00360324038712, 0.0244342060698, 0.0314240125922, 0.0309189326677, 0.0230090442585, 0.0145937492998, 0.00103582471628, -0.0152025378362, -0.0363464186106, -0.0511215757185, -0.0557855361088, -0.0408742372067, -0.0130066718085, 0.023938151261, 0.0530188010691, 0.0671220652663, 0.0540529792683, 0.0164681954699, -0.0469180610472, -0.125461903689},
|
||||
0.0494
|
||||
},
|
||||
{
|
||||
32, /* matchless_on */
|
||||
{0.941618036526, 0.239866043796, 0.218739659026, 0.1855624175, 0.143119285622, 0.098285134927, 0.049823345838, 0.00491072985196, -0.0372254815054, -0.0706502777402, -0.0969381684649, -0.109632530255, -0.11098328422, -0.0987132407502, -0.080379871629, -0.0559715185867, -0.0315381582245, -0.00496109501612, 0.0171690268626, 0.0357166271116, 0.0446464487104, 0.0469813895302, 0.0390401137056, 0.0262125456401, 0.00716840214371, -0.0108017316884, -0.028794724005, -0.0413800680682, -0.0514241182155, -0.0535943709963, -0.0501288491812, -0.0356807796594},
|
||||
{0.0, 0.436259688495, 0.303343311728, 0.180401443304, 0.0755768977826, -0.00298141418929, -0.057401860201, -0.0849229021135, -0.0921029201246, -0.0808710238831, -0.0601563297725, -0.031853887802, -0.00462566662184, 0.0189321520075, 0.0307568282097, 0.0327103981415, 0.0234112049746, 0.00941773902223, -0.00880302596543, -0.024628145492, -0.0377321989901, -0.0420727660837, -0.0390726798885, -0.0257996845469, -0.00726121684029, 0.0160981879938, 0.0352540092546, 0.0464046029779, 0.0397882340227, 0.0142875216435, -0.0354360590043, -0.105598440048},
|
||||
0.0651
|
||||
},
|
||||
{
|
||||
32, /* superchamp */
|
||||
{0.598483659576, 0.392119614921, 0.324128816827, 0.207253363884, 0.0944270102152, 0.0269672658419, -0.00338080597527, -0.0154386943775, -0.0337854523788, -0.0528375781544, -0.0668037964282, -0.0644824272507, -0.0581122839458, -0.053620685433, -0.05941095465, -0.0599621297144, -0.0476930600655, -0.0143047492128, 0.0237480623761, 0.0559779339589, 0.0689887990541, 0.0713731354487, 0.0647181254244, 0.0560812069922, 0.0357682629483, 0.00706245212017, -0.0286615791021, -0.052644819201, -0.0590210498647, -0.041747604451, -0.0168191702228, 0.00465326173164},
|
||||
{0.0, 0.555306548005, 0.304384349565, 0.0955876011242, -0.032790937176, -0.0803585769889, -0.0834509085546, -0.069736664388, -0.0558345347225, -0.0359974911327, -0.012046069248, 0.0128302949846, 0.0234882264814, 0.0187166685281, 0.00137741738003, -0.0128825824672, -0.0213054248788, -0.0224842024484, -0.0275110748888, -0.0335451251688, -0.0384673765875, -0.0306779974376, -0.0133415017904, 0.00900611383706, 0.0222626768741, 0.0253127037082, 0.0166771042914, 0.00577574428968, -0.00773567900765, -0.0175688399329, -0.021338142267, -0.00199213694503},
|
||||
0.0903
|
||||
},
|
||||
{
|
||||
32, /* fender_68 */
|
||||
{0.61042243584, 0.519167522444, 0.338455322638, 0.0598120788559, -0.155008295955, -0.209996385603, -0.142681005045, -0.0444570079209, 0.00529240289956, 7.6909429568e-05, -0.03354602127, -0.0535687744411, -0.049519403779, -0.0238846177015, -0.000920606029846, 0.010434338433, 0.002228774067, -0.0140907683377, -0.035872619499, -0.0481212880009, -0.0457673542097, -0.0191076772359, 0.0133771714316, 0.0322386165839, 0.0178556687427, -0.0095701287891, -0.0237842865664, -0.00484822472333, 0.0227424513401, 0.0316309750773, 0.00586735474858, -0.0235815475244},
|
||||
{0.0, 0.658865798836, 0.184872779539, -0.137135473027, -0.210003150161, -0.108221769211, 0.0110221508749, 0.0526622948184, 0.0145697157163, -0.0398151102571, -0.0659793146563, -0.0534131399862, -0.0284152189248, -0.0091286709165, -0.00636536651116, -0.00986403078301, -0.0155052371976, -0.0165973690878, -0.018011376701, -0.0154898840826, -0.0109104131649, -0.00195757926804, 0.00204116721073, 0.00157889259535, -0.00328499795407, -0.00244356007769, -0.00227606009504, -0.00603112779608, -0.0173439459505, -0.0176299504059, -0.00210293292278, 0.00864548631897},
|
||||
0.2359
|
||||
},
|
||||
{
|
||||
32, /* marshall */
|
||||
{0.519039714244, 0.28397066065, 0.263752501402, 0.216763224092, 0.153202060875, 0.093498887372, 0.0418092813984, 0.00649080672527, -0.0187685887985, -0.0313725205166, -0.0386046242494, -0.0368255569808, -0.0319398932261, -0.0190867195417, -0.00429792893597, 0.0171895051396, 0.038509421914, 0.0625518463058, 0.0812007261611, 0.0971807963934, 0.10334087256, 0.104223746243, 0.0947810421376, 0.0820175331544, 0.0638964900287, 0.049888405421, 0.0379912291508, 0.0353343445924, 0.036271348736, 0.0455456726476, 0.0571810093304, 0.0753869660867},
|
||||
{0.0, 0.495552580909, 0.326384725738, 0.167649233033, 0.0373913746446, -0.049802990613, -0.0971841927371, -0.108389008817, -0.0971430950292, -0.0702481334571, -0.0402478232447, -0.00995144228925, 0.0120995492915, 0.0263638891687, 0.0284733804008, 0.0226883648689, 0.00733748451124, -0.0103570201666, -0.0304762029918, -0.0447374261541, -0.0534169560389, -0.0509721172171, -0.0411315716449, -0.0225994268992, -0.00306083571223, 0.0162408742504, 0.0258967736277, 0.0250750690024, 0.00862389563333, -0.0164131934788, -0.0455336929843, -0.0629205840552},
|
||||
0.0663
|
||||
},
|
||||
};
|
||||
|
||||
314
plugins/ladspa_effect/caps/Cabinet.cc
Normal file
314
plugins/ladspa_effect/caps/Cabinet.cc
Normal file
@@ -0,0 +1,314 @@
|
||||
/*
|
||||
Cabinet.cc
|
||||
|
||||
Copyright 2002-5 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.
|
||||
|
||||
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
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Cabinet.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
Model16
|
||||
CabinetI::models [] =
|
||||
{
|
||||
{
|
||||
1, /* identity */
|
||||
{1},
|
||||
{0},
|
||||
1,
|
||||
}, {
|
||||
16, /* unmatched, off-axis */
|
||||
{0.44334744339382504, 0.49764265352620912, 0.19936863766114088, 0.0038388115609433826, -0.072080744430548876, -0.092589757815768933, -0.023760971045285254, 0.058929802988203807, 0.11073296313735595, 0.14389046518738619, 0.052981055774577353, -0.11817321919764193, -0.22957467728465422, -0.26301284181138151, -0.25586853638823448, -0.10768194462289554},
|
||||
{0.0, 0.71138736215182674, 0.19571088506350195, -0.086897678126924227, -0.18344238266155902, -0.13338660100611671, -0.017424587504494098, 0.062014975470330351, 0.077979014877680469, 0.039134631327482176, -0.046646061538403727, -0.040653480351542266, 0.068462230153713749, 0.14313162261479676, 0.058844200671679531, -0.17878548463526983},
|
||||
1 / 4.4,
|
||||
}, {
|
||||
16, /* unmatched */
|
||||
{0.58952373363852417, 0.43625942509584309, 0.235412203403113, 0.048252951521505258, -0.1002076253350956, -0.14467958356216026, -0.074304873528329402, 0.060945557247412331, 0.15959845551788171, 0.20970924189636411, 0.15361368007229703, 0.025339061869183478, -0.11824836967489599, -0.19384403813690479, -0.19295873693806628, -0.058904754435169508},
|
||||
{0.0, 0.6596380198994729, 0.20825670531468143, -0.10508784276271754, -0.24698905246649294, -0.21519418569376192, -0.10057489587096909, -0.006175810942624007, -0.0019249936836196989, -0.045827268144865707, -0.10184708094147235, -0.09177820187618313, -0.017740067693127175, 0.058828573780348989, 0.010559807576350673, -0.19412688465216324},
|
||||
1 / 5.7,
|
||||
}, {
|
||||
16, /* superchamp */
|
||||
{0.5335550129666069, 0.61768496153556829, 0.2080126894040209, -0.0067283013134491337, -0.10433152421155355, -0.16159936513841233, -0.10593018443866807, -0.091854930675998661, 0.0023550324496513643, 0.14327516190088724, 0.14688292534697539, 0.089539872443625601, -0.053854769352683005, -0.15693904535289377, -0.083502230074838577, 0.0090113128614708465},
|
||||
{0.0, 0.67745858591653696, 0.044802106922746734, -0.1932642251200547, -0.18922360327572652, -0.052980570047914469, 0.020446992577988904, -0.028951451474818618, -0.085212072485126716, -0.12241212382510525, -0.089259371449674357, 0.010469056928395087, 0.049019357277555603, 0.037212453438250505, -0.046374612934843573, -0.045133341919937828},
|
||||
1 / 4.0,
|
||||
}, {
|
||||
16, /* fender-vibrolux-68 */
|
||||
{0.68447985102464837, 0.61538710771230021, -0.28804707230137599, -0.23656583372846893, 0.083100874242250655, -0.027792816938813913, 0.055558334440593965, 0.044458161718059774, -0.25467542393376252, -0.33660492613760157, -0.024663941486403884, 0.1172751972420942, -0.021832135450802759, 0.21440383631745469, 0.20828506390107443, -0.10289957687018361},
|
||||
{0.0, 0.50968169360260451, -0.48159141882733714, -0.10856607456906017, -0.026802006374108955, -0.24967309940249552, -0.21422424792787859, 0.019271890369619571, 0.08065394481240884, -0.061665636719946543, 0.031613782215493547, 0.069574436103950893, -0.07180222507768147, -0.14447996563879059, 0.012044815820150268, -0.0073237976200291044},
|
||||
1 / 2.0,
|
||||
}, {
|
||||
16, /* marshall */
|
||||
{0.38455665328113242, 0.50304089890302783, 0.33653970418909934, 0.085604896315814846, -0.070239383452479598, -0.10479060878654689, -0.060150883776583335, 0.030121882977878822, 0.12441775056532201, 0.18287316824579156, 0.17035705141865287, 0.10315414401519916, 0.036357097566567576, 0.024474446155666255, 0.042359967009557103, 0.059946316626725109},
|
||||
{0.0, 0.68167571829534335, 0.16877527811114035, -0.17427551663276897, -0.25780056810728452, -0.16065744581310681, -0.032007062964857856, 0.033882840656718101, -0.0038880045892747792, -0.084876415098991506, -0.13865107122780057, -0.10073571899064113, -0.013199668806255366, 0.038170305284592504, -0.026492576852036546, -0.12667775510054707},
|
||||
1 / 4.2,
|
||||
}
|
||||
};
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
CabinetI::init (double fs)
|
||||
{
|
||||
h = 0;
|
||||
model = 0;
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
CabinetI::switch_model (int m)
|
||||
{
|
||||
if (m < 0) m = 0;
|
||||
else if (m > 5) m = 5;
|
||||
|
||||
model = m;
|
||||
|
||||
n = models[m].n;
|
||||
a = models[m].a;
|
||||
b = models[m].b;
|
||||
|
||||
gain = models[m].gain * DSP::db2lin (*ports[2]);
|
||||
|
||||
memset (x, 0, sizeof (x));
|
||||
memset (y, 0, sizeof (y));
|
||||
}
|
||||
|
||||
void
|
||||
CabinetI::activate()
|
||||
{
|
||||
switch_model ((int) *ports[1]);
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
CabinetI::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
int m = (int) *ports[1];
|
||||
if (m != model) switch_model (m);
|
||||
|
||||
d_sample g = models[model].gain * DSP::db2lin (*ports[2]);
|
||||
double gf = pow (g / gain, 1 / (double) frames);
|
||||
|
||||
d_sample * d = ports[3];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register cabinet_float out = s[i] + normal;
|
||||
|
||||
x[h] = out;
|
||||
|
||||
out *= a[0];
|
||||
|
||||
for (int j = 1, z = h - 1; j < n; --z, ++j)
|
||||
{
|
||||
z &= 15;
|
||||
out += a[j] * x[z];
|
||||
out += b[j] * y[z];
|
||||
}
|
||||
|
||||
y[h] = out;
|
||||
|
||||
h = (h + 1) & 15;
|
||||
|
||||
F (d, i, gain * out, adding_gain);
|
||||
gain *= gf;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
CabinetI::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{BOUNDED, -1, 1}
|
||||
}, {
|
||||
"model",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | INTEGER | DEFAULT_1, 0, 5}
|
||||
}, {
|
||||
"gain (dB)",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -24, 24}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
template <> void
|
||||
Descriptor<CabinetI>::setup()
|
||||
{
|
||||
UniqueID = 1766;
|
||||
Label = "CabinetI";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: CabinetI - Loudspeaker cabinet emulation";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* CabinetII ////////////////////////////////////////////////////////////// */
|
||||
|
||||
#include "Cabinet-Models32.h"
|
||||
|
||||
void
|
||||
CabinetII::init (double fs)
|
||||
{
|
||||
if (fs < 46000)
|
||||
models = models44100;
|
||||
else if (fs < 72000)
|
||||
models = models48000;
|
||||
else if (fs < 92000)
|
||||
models = models88200;
|
||||
else
|
||||
models = models96000;
|
||||
|
||||
h = 0;
|
||||
model = 0;
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
CabinetII::switch_model (int m)
|
||||
{
|
||||
if (m < 0) m = 0;
|
||||
else if (m > 5) m = 5;
|
||||
|
||||
model = m;
|
||||
|
||||
n = models[m].n;
|
||||
a = models[m].a;
|
||||
b = models[m].b;
|
||||
|
||||
gain = models[m].gain * DSP::db2lin (*ports[2]);
|
||||
|
||||
memset (x, 0, sizeof (x));
|
||||
memset (y, 0, sizeof (y));
|
||||
}
|
||||
|
||||
void
|
||||
CabinetII::activate()
|
||||
{
|
||||
switch_model ((int) *ports[1]);
|
||||
gain = models[model].gain * DSP::db2lin (*ports[2]);
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
CabinetII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
int m = (int) *ports[1];
|
||||
if (m != model) switch_model (m);
|
||||
|
||||
d_sample g = models[model].gain * DSP::db2lin (*ports[2]);
|
||||
double gf = pow (g / gain, 1 / (double) frames);
|
||||
|
||||
d_sample * d = ports[3];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register cabinet_float out = s[i] + normal;
|
||||
|
||||
x[h] = out;
|
||||
|
||||
out *= a[0];
|
||||
|
||||
for (int j = 1, z = h - 1; j < n; --z, ++j)
|
||||
{
|
||||
z &= 31;
|
||||
out += a[j] * x[z];
|
||||
out += b[j] * y[z];
|
||||
}
|
||||
|
||||
y[h] = out;
|
||||
|
||||
h = (h + 1) & 31;
|
||||
|
||||
F (d, i, gain * out, adding_gain);
|
||||
gain *= gf;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
CabinetII::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{BOUNDED, -1, 1}
|
||||
}, {
|
||||
"model",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | INTEGER | DEFAULT_1, 0, 5}
|
||||
}, {
|
||||
"gain (dB)",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -24, 24}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
template <> void
|
||||
Descriptor<CabinetII>::setup()
|
||||
{
|
||||
UniqueID = 2581;
|
||||
Label = "CabinetII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: CabinetII - Refined loudspeaker cabinet emulation";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
142
plugins/ladspa_effect/caps/Cabinet.h
Normal file
142
plugins/ladspa_effect/caps/Cabinet.h
Normal file
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
Cabinet.h
|
||||
|
||||
Copyright 2002-5 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.
|
||||
|
||||
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
|
||||
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 _CABINET_H_
|
||||
#define _CABINET_H_
|
||||
|
||||
#include "dsp/util.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;
|
||||
cabinet_float a[32], b[32];
|
||||
float gain;
|
||||
} Model32;
|
||||
|
||||
class CabinetI
|
||||
{
|
||||
public:
|
||||
d_sample gain;
|
||||
static Model16 models [];
|
||||
|
||||
int model;
|
||||
void switch_model (int m);
|
||||
|
||||
int n, h;
|
||||
cabinet_float * a, * b;
|
||||
cabinet_float x[16], y[16];
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void 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 */
|
||||
|
||||
class CabinetII
|
||||
{
|
||||
public:
|
||||
d_sample gain;
|
||||
|
||||
static Model32 models44100 [];
|
||||
static Model32 models48000 [];
|
||||
static Model32 models88200 [];
|
||||
static Model32 models96000 [];
|
||||
|
||||
Model32 * models;
|
||||
int model;
|
||||
void switch_model (int m);
|
||||
|
||||
int n, h;
|
||||
cabinet_float * a, * b;
|
||||
cabinet_float x[32], y[32];
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _CABINET_H_ */
|
||||
518
plugins/ladspa_effect/caps/Chorus.cc
Normal file
518
plugins/ladspa_effect/caps/Chorus.cc
Normal file
@@ -0,0 +1,518 @@
|
||||
/*
|
||||
Chorus.cc
|
||||
|
||||
Copyright 2004, 2005 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
mono and mono-to-stereo 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
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Chorus.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
ChorusI::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
double one_over_n = 1 / (double) frames;
|
||||
double ms = .001 * fs;
|
||||
|
||||
double t = time;
|
||||
time = *ports[1] * ms;
|
||||
double dt = (time - t) * one_over_n;
|
||||
|
||||
double w = width;
|
||||
width = *ports[2] * ms;
|
||||
/* clamp, or we need future samples from the delay line */
|
||||
if (width >= t - 3) width = t - 3;
|
||||
double dw = (width - w) * one_over_n;
|
||||
|
||||
if (rate != *ports[3])
|
||||
lfo.set_f (max (rate = *ports[3], .000001), fs, lfo.get_phase());
|
||||
|
||||
double blend = *ports[4];
|
||||
double ff = *ports[5];
|
||||
double fb = *ports[6];
|
||||
|
||||
d_sample * d = ports[7];
|
||||
|
||||
/* flip 'renormal' addition constant */
|
||||
normal = -normal;
|
||||
|
||||
DSP::FPTruncateMode truncate;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
d_sample 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;
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
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-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
StereoChorusI::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
double one_over_n = 1 / (double) frames;
|
||||
double ms = .001 * fs;
|
||||
|
||||
double t = time;
|
||||
time = *ports[1] * ms;
|
||||
double dt = (time - t) * one_over_n;
|
||||
|
||||
double w = width;
|
||||
width = *ports[2] * ms;
|
||||
/* clamp, or we need future samples from the delay line */
|
||||
if (width >= t - 1) width = t - 1;
|
||||
double dw = (width - w) * one_over_n;
|
||||
|
||||
if (rate != *ports[3] && phase != *ports[4])
|
||||
{
|
||||
rate = *ports[3];
|
||||
phase = *ports[4];
|
||||
double phi = left.lfo.get_phase();
|
||||
left.lfo.set_f (max (rate, .000001), fs, phi);
|
||||
right.lfo.set_f (max (rate, .000001), fs, phi + phase * M_PI);
|
||||
}
|
||||
|
||||
double blend = *ports[5];
|
||||
double ff = *ports[6];
|
||||
double fb = *ports[7];
|
||||
|
||||
d_sample * dl = ports[8];
|
||||
d_sample * dr = ports[9];
|
||||
|
||||
/* flip 'renormal' addition constant */
|
||||
normal = -normal;
|
||||
|
||||
/* to go sure (on i386) that the fistp instruction does the right thing
|
||||
* when looking up fractional sample indices */
|
||||
DSP::FPTruncateMode truncate;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
d_sample 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);
|
||||
|
||||
d_sample l = blend * x + ff * delay.get_cubic (t + w * left.lfo.get());
|
||||
d_sample 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 [] =
|
||||
{
|
||||
{
|
||||
"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-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
ChorusII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
double one_over_n = 1 / (double) frames;
|
||||
double ms = .001 * fs;
|
||||
|
||||
double t = time;
|
||||
time = *ports[1] * ms;
|
||||
double dt = (time - t) * one_over_n;
|
||||
|
||||
double w = width;
|
||||
width = *ports[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])
|
||||
set_rate (*ports[3]);
|
||||
|
||||
double blend = *ports[4];
|
||||
double ff = *ports[5];
|
||||
double fb = *ports[6];
|
||||
|
||||
d_sample * d = ports[7];
|
||||
|
||||
/* flip 'renormal' addition constant */
|
||||
normal = -normal;
|
||||
|
||||
DSP::FPTruncateMode truncate;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
d_sample x = s[i];
|
||||
|
||||
x -= fb * delay.get_cubic (t);
|
||||
|
||||
delay.put (filter.process (x + normal));
|
||||
|
||||
double a = 0;
|
||||
for (int j = 0; j < Taps; ++j)
|
||||
a += taps[j].get (delay, t, w);
|
||||
|
||||
x = blend * x + ff * a;
|
||||
|
||||
F (d, i, x, adding_gain);
|
||||
|
||||
t += dt;
|
||||
w += dw;
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
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-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
StereoChorusII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
double one_over_n = 1 / (double) frames;
|
||||
double ms = .001 * fs;
|
||||
|
||||
double t = time;
|
||||
time = *ports[1] * ms;
|
||||
double dt = (time - t) * one_over_n;
|
||||
|
||||
double w = width;
|
||||
width = *ports[2] * ms;
|
||||
/* clamp, or we need future samples from the delay line */
|
||||
if (width >= t - 1) width = t - 1;
|
||||
double dw = (width - w) * one_over_n;
|
||||
|
||||
set_rate (*ports[3]);
|
||||
|
||||
double blend = *ports[4];
|
||||
double ff = *ports[5];
|
||||
double fb = *ports[6];
|
||||
|
||||
d_sample * dl = ports[7];
|
||||
d_sample * dr = ports[8];
|
||||
|
||||
/* flip 'renormal' addition constant */
|
||||
normal = -normal;
|
||||
|
||||
/* to go sure (on i386) that the fistp instruction does the right thing
|
||||
* when looking up fractional sample indices */
|
||||
DSP::FPTruncateMode truncate;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
d_sample 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);
|
||||
|
||||
double m;
|
||||
m = left.lfo_lp.process (left.fractal.get());
|
||||
d_sample l = blend * x + ff * delay.get_cubic (t + w * m);
|
||||
m = right.lfo_lp.process (right.fractal.get());
|
||||
d_sample 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}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<StereoChorusII>::setup()
|
||||
{
|
||||
UniqueID = 2584;
|
||||
Label = "StereoChorusII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: StereoChorusII - Stereo chorus/flanger modulated by a fractal";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
|
||||
323
plugins/ladspa_effect/caps/Chorus.h
Normal file
323
plugins/ladspa_effect/caps/Chorus.h
Normal file
@@ -0,0 +1,323 @@
|
||||
/*
|
||||
Chorus.h
|
||||
|
||||
Copyright 2004-5 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
|
||||
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 _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/RBJ.h"
|
||||
|
||||
class ChorusStub
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample time, width, rate;
|
||||
d_sample normal; /* denormal protection */
|
||||
};
|
||||
|
||||
class ChorusI
|
||||
: public ChorusStub
|
||||
{
|
||||
public:
|
||||
DSP::Sine lfo;
|
||||
DSP::Delay delay;
|
||||
DSP::DelayTapA tap;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
d_sample * ports [8];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
rate = .15;
|
||||
delay.init ((int) (.040 * fs));
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
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:
|
||||
double fs;
|
||||
d_sample rate;
|
||||
d_sample phase;
|
||||
|
||||
DSP::Delay delay;
|
||||
|
||||
struct {
|
||||
DSP::Sine lfo;
|
||||
DSP::DelayTapA tap;
|
||||
} left, right;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
d_sample * ports [10];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
rate = .15;
|
||||
phase = .5; /* pi */
|
||||
|
||||
delay.init ((int) (.040 * fs));
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
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 (d_sample r)
|
||||
{
|
||||
f1.set_rate (r * FRACTAL_RATE);
|
||||
f2.set_rate (3.3 * r * FRACTAL_RATE);
|
||||
}
|
||||
|
||||
/* t = time, w = width, should inline nicely */
|
||||
d_sample 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:
|
||||
enum {
|
||||
Taps = 1
|
||||
};
|
||||
|
||||
FracTap taps[Taps];
|
||||
DSP::BiQuad filter;
|
||||
DSP::Delay delay;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
|
||||
void set_rate (d_sample 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:
|
||||
d_sample * ports [8];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
normal = NOISE_FLOOR;
|
||||
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);
|
||||
}
|
||||
|
||||
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:
|
||||
double fs;
|
||||
d_sample rate;
|
||||
d_sample phase;
|
||||
|
||||
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 set_rate (d_sample 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);
|
||||
}
|
||||
|
||||
public:
|
||||
d_sample * ports [10];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
phase = .5; /* pi */
|
||||
|
||||
delay.init ((int) (.040 * fs));
|
||||
normal = NOISE_FLOOR;
|
||||
|
||||
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]);
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _CHORUS_H_ */
|
||||
235
plugins/ladspa_effect/caps/Click.cc
Normal file
235
plugins/ladspa_effect/caps/Click.cc
Normal file
@@ -0,0 +1,235 @@
|
||||
/*
|
||||
Click.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
Plugins playing a sound snippet in regular intervals.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "click.h"
|
||||
#include "money.h"
|
||||
|
||||
#include "Click.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
ClickStub::init (double _fs, float * _wave, int _N)
|
||||
{
|
||||
fs = _fs;
|
||||
wave = _wave;
|
||||
N = _N;
|
||||
bpm = -1;
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
ClickStub::one_cycle (int frames)
|
||||
{
|
||||
bpm = *ports[0];
|
||||
d_sample gain = *ports[1] * *ports[1];
|
||||
lp.set (1 - *ports[2]);
|
||||
|
||||
d_sample * d = ports[3];
|
||||
|
||||
while (frames)
|
||||
{
|
||||
if (period == 0)
|
||||
{
|
||||
period = (int) (fs * 60 / bpm);
|
||||
played = 0;
|
||||
}
|
||||
|
||||
int n = min (frames, period);
|
||||
|
||||
if (played < N)
|
||||
{
|
||||
n = min (n, N - played);
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
d_sample x = gain * wave [played + i] + normal;
|
||||
F (d, i, lp.process (x), adding_gain);
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
played += n;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
F (d, i, lp.process (normal), adding_gain);
|
||||
normal = -normal;
|
||||
}
|
||||
}
|
||||
|
||||
period -= n;
|
||||
frames -= n;
|
||||
d += n;
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
ClickStub::port_info [] =
|
||||
{
|
||||
{
|
||||
"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}
|
||||
}
|
||||
};
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
#define LENGTH(W) ((int) (sizeof (W) / sizeof (float)))
|
||||
|
||||
void
|
||||
Click::init (double fs)
|
||||
{
|
||||
this->ClickStub::init (fs, click, LENGTH (click));
|
||||
}
|
||||
|
||||
template <> void
|
||||
Descriptor<Click>::setup()
|
||||
{
|
||||
UniqueID = 1769;
|
||||
Label = "Click";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Click - Metronome";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
CEO::port_info [] =
|
||||
{
|
||||
{
|
||||
"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}
|
||||
}
|
||||
};
|
||||
|
||||
void
|
||||
CEO::init (double fs)
|
||||
{
|
||||
this->ClickStub::init (fs, money, LENGTH (money));
|
||||
}
|
||||
|
||||
template <> void
|
||||
Descriptor<CEO>::setup()
|
||||
{
|
||||
UniqueID = 1770;
|
||||
Label = "CEO";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: CEO - Chief Executive Oscillator";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
float dirac [] = { 1, };
|
||||
|
||||
PortInfo
|
||||
Dirac::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}
|
||||
}
|
||||
};
|
||||
|
||||
void
|
||||
Dirac::init (double fs)
|
||||
{
|
||||
this->ClickStub::init (fs, dirac, LENGTH (dirac));
|
||||
}
|
||||
|
||||
template <> void
|
||||
Descriptor<Dirac>::setup()
|
||||
{
|
||||
UniqueID = 2585;
|
||||
Label = "Dirac";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Dirac - One-sample impulse generator";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
|
||||
104
plugins/ladspa_effect/caps/Click.h
Normal file
104
plugins/ladspa_effect/caps/Click.h
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
Click.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
units perpetually repeating a recorded sample.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _CLICK_H_
|
||||
#define _CLICK_H_
|
||||
|
||||
#include "dsp/OnePole.h"
|
||||
#include "dsp/util.h"
|
||||
|
||||
class ClickStub
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
|
||||
d_sample bpm;
|
||||
|
||||
float * wave;
|
||||
int N; /* number of samples in wave */
|
||||
|
||||
DSP::OnePoleLP lp;
|
||||
|
||||
int period; /* frames remaining in period */
|
||||
int played; /* frames played from sample */
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs, float * _wave, int _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);
|
||||
}
|
||||
};
|
||||
|
||||
class Click
|
||||
: public ClickStub
|
||||
{
|
||||
public:
|
||||
void init (double fs);
|
||||
};
|
||||
|
||||
class CEO
|
||||
: public ClickStub
|
||||
{
|
||||
public:
|
||||
void init (double fs);
|
||||
|
||||
static PortInfo port_info [];
|
||||
};
|
||||
|
||||
class Dirac
|
||||
: public ClickStub
|
||||
{
|
||||
public:
|
||||
void init (double fs);
|
||||
|
||||
static PortInfo port_info [];
|
||||
};
|
||||
|
||||
#endif /* _CLICK_H_ */
|
||||
148
plugins/ladspa_effect/caps/Clip.cc
Normal file
148
plugins/ladspa_effect/caps/Clip.cc
Normal file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
Clip.cc
|
||||
|
||||
Copyright 2003-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
simple oversampled hard clipper
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Clip.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Clip::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
gain = 1;
|
||||
|
||||
threshold[0] = -.9;
|
||||
threshold[1] = +.9;
|
||||
|
||||
/* going a bit lower than nominal with fc */
|
||||
double f = .5 * 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];
|
||||
|
||||
/* scale downsampler kernel for unity gain */
|
||||
s = 1 / s;
|
||||
for (int i = 0; i < down.n; ++i)
|
||||
down.c[i] *= s;
|
||||
|
||||
/* scale upsampler kernel for unity gain */
|
||||
s *= OVERSAMPLE;
|
||||
for (int i = 0; i < up.n; ++i)
|
||||
up.c[i] *= s;
|
||||
}
|
||||
|
||||
inline d_sample
|
||||
Clip::clip (d_sample a)
|
||||
{
|
||||
if (a < threshold[0])
|
||||
return threshold[0];
|
||||
if (a > threshold[1])
|
||||
return threshold[1];
|
||||
return a;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Clip::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
double gf;
|
||||
if (*ports[1] == gain_db)
|
||||
gf = 1;
|
||||
else
|
||||
{
|
||||
gain_db = *ports[1];
|
||||
d_sample g = DSP::db2lin (gain_db);
|
||||
gf = pow (g / gain, 1 / (double) frames);
|
||||
}
|
||||
|
||||
d_sample * d = ports[2];
|
||||
*ports[3] = OVERSAMPLE;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register d_sample a = gain * s[i];
|
||||
|
||||
a = down.process (clip (up.upsample (a)));
|
||||
|
||||
for (int o = 1; o < OVERSAMPLE; ++o)
|
||||
down.store (clip (up.pad (o)));
|
||||
|
||||
F (d, i, a, adding_gain);
|
||||
|
||||
gain *= gf;
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
Clip::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{BOUNDED, -1, 1}
|
||||
}, {
|
||||
"gain (dB)",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_1, -72, 72}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"latency",
|
||||
OUTPUT | CONTROL,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<Clip>::setup()
|
||||
{
|
||||
UniqueID = 1771;
|
||||
Label = "Clip";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Clip - Hard clipper, 8x oversampled";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2003-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
90
plugins/ladspa_effect/caps/Clip.h
Normal file
90
plugins/ladspa_effect/caps/Clip.h
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Clip.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
oversampled hard ('diode', 'transistor', sometimes 'op-amp') clipper.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _CLIP_H_
|
||||
#define _CLIP_H_
|
||||
|
||||
#include "dsp/util.h"
|
||||
#include "dsp/FIR.h"
|
||||
#include "dsp/sinc.h"
|
||||
#include "dsp/windows.h"
|
||||
|
||||
class Clip
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample gain, gain_db;
|
||||
|
||||
d_sample threshold[2];
|
||||
|
||||
enum {
|
||||
OVERSAMPLE = 8,
|
||||
FIR_SIZE = 64,
|
||||
};
|
||||
|
||||
/* antialias filters */
|
||||
DSP::FIRUpsampler up;
|
||||
DSP::FIR down;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
inline d_sample clip (d_sample x);
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
Clip()
|
||||
: up (FIR_SIZE, OVERSAMPLE),
|
||||
down (FIR_SIZE)
|
||||
{ }
|
||||
|
||||
void init (double fs);
|
||||
|
||||
void activate()
|
||||
{
|
||||
up.reset();
|
||||
down.reset();
|
||||
gain_db = *ports[1];
|
||||
gain = DSP::db2lin (gain_db);
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _CLIP_H_ */
|
||||
159
plugins/ladspa_effect/caps/Compress.cc
Normal file
159
plugins/ladspa_effect/caps/Compress.cc
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
Compress.cc
|
||||
|
||||
Copyright 2004-5 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
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Compress.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Compress::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Compress::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
d_sample range = DSP::db2lin (*ports[1]);
|
||||
d_sample ratio = (*ports[2] - 1) / *ports[2];
|
||||
|
||||
/* 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 * *ports[3]));
|
||||
double gr = exp (-1 / (fs * *ports[4]));
|
||||
|
||||
d_sample threshold = *ports[5];
|
||||
d_sample knee = *ports[6];
|
||||
|
||||
d_sample * d = ports[7];
|
||||
|
||||
d_sample knee0 = DSP::db2lin (threshold - knee);
|
||||
d_sample knee1 = DSP::db2lin (threshold + knee);
|
||||
|
||||
d_sample ef_a = ga * .25;
|
||||
d_sample ef_ai = 1 - ef_a;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
sum += s[i] * s[i];
|
||||
|
||||
if (amp > env)
|
||||
env = env * ga + amp * (1 - ga);
|
||||
else
|
||||
env = env * gr + amp * (1 - gr);
|
||||
|
||||
if ((count++ & 3) == 3)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
gain = gain * ef_a + gain_t * ef_ai;
|
||||
|
||||
F (d, i, s[i] * gain * range, adding_gain);
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
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}
|
||||
}
|
||||
};
|
||||
|
||||
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-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
81
plugins/ladspa_effect/caps/Compress.h
Normal file
81
plugins/ladspa_effect/caps/Compress.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Compress.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>, Steve Harris
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
mono compressor.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _COMPRESS_H_
|
||||
#define _COMPRESS_H_
|
||||
|
||||
#include "dsp/RMS.h"
|
||||
#include "dsp/util.h"
|
||||
|
||||
class Compress
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample f;
|
||||
|
||||
DSP::RMS rms;
|
||||
d_sample sum, amp, env, gain, gain_t;
|
||||
|
||||
int count;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [8];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{
|
||||
rms.reset();
|
||||
|
||||
sum = 0;
|
||||
count = 0;
|
||||
|
||||
amp = 0;
|
||||
env = 0;
|
||||
|
||||
gain = 0;
|
||||
gain_t = 0;
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _COMPRESS_H_ */
|
||||
163
plugins/ladspa_effect/caps/Descriptor.h
Normal file
163
plugins/ladspa_effect/caps/Descriptor.h
Normal file
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
Descriptor.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
creating a LADSPA_Descriptor for a caps plugin via a C++ template,
|
||||
saves us a virtual function call compared to the usual method used
|
||||
for C++ plugins in a C context.
|
||||
|
||||
Descriptor<P> expects P to declare some common methods, like init(),
|
||||
activate() etc, plus a static port_info[] and LADSPA_Data * ports[]
|
||||
and of course 'adding_gain'.
|
||||
|
||||
maintaining both port_info[] and ports[] is a bit of a bitch, but,
|
||||
hey, "you only do it once (tm)" .. and then you do it over and over
|
||||
again. particularly bothersome is also the necessary unrolling of our
|
||||
PortInfo array to fit into LADSPA_Descriptor's inconsequential way of
|
||||
port data structuring, which results in quite a bit of memory holding
|
||||
duplicated data. oh well.
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DESCRIPTOR_H_
|
||||
#define _DESCRIPTOR_H_
|
||||
|
||||
/* common stub for Descriptor makes it possible to delete() without special-
|
||||
* casing for every plugin class.
|
||||
*/
|
||||
class DescriptorStub
|
||||
: public LADSPA_Descriptor
|
||||
{
|
||||
public:
|
||||
DescriptorStub()
|
||||
{
|
||||
PortCount = 0;
|
||||
}
|
||||
|
||||
~DescriptorStub()
|
||||
{
|
||||
if (PortCount)
|
||||
{
|
||||
delete [] PortNames;
|
||||
delete [] PortDescriptors;
|
||||
delete [] PortRangeHints;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class Descriptor
|
||||
: public DescriptorStub
|
||||
{
|
||||
public:
|
||||
/* tom szilyagi reports that hosts exist which call activate() before
|
||||
* connect_port(). since caps' plugins expect ports to be valid we
|
||||
* need a safeguard: at instantiation, each port is connected to the
|
||||
* lower bound. When (If?) LADSPA default values are ever fixed, connecting
|
||||
* to the default will be preferred. */
|
||||
LADSPA_PortRangeHint * ranges;
|
||||
|
||||
public:
|
||||
Descriptor()
|
||||
{ setup(); }
|
||||
|
||||
void setup();
|
||||
|
||||
void autogen()
|
||||
{
|
||||
PortCount = (sizeof (T::port_info) / sizeof (PortInfo));
|
||||
|
||||
/* unroll PortInfo members */
|
||||
char ** names = new char * [PortCount];
|
||||
LADSPA_PortDescriptor * desc = new LADSPA_PortDescriptor [PortCount];
|
||||
ranges = new LADSPA_PortRangeHint [PortCount];
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
PortNames = names;
|
||||
PortDescriptors = desc;
|
||||
PortRangeHints = ranges;
|
||||
|
||||
/* LADSPA_Descriptor vtable entries */
|
||||
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;
|
||||
}
|
||||
|
||||
static LADSPA_Handle _instantiate (
|
||||
const struct _LADSPA_Descriptor * d, ulong fs)
|
||||
{
|
||||
T * plugin = new T();
|
||||
|
||||
/* see comment above at 'ranges' member */
|
||||
for (int i = 0; i < (int) d->PortCount; ++i)
|
||||
plugin->ports[i] = &((Descriptor *) d)->ranges[i].LowerBound;
|
||||
|
||||
plugin->init (fs);
|
||||
|
||||
return plugin;
|
||||
}
|
||||
|
||||
static void _connect_port (LADSPA_Handle h, ulong i, LADSPA_Data * p)
|
||||
{
|
||||
((T *) h)->ports[i] = p;
|
||||
}
|
||||
|
||||
static void _activate (LADSPA_Handle h)
|
||||
{
|
||||
((T *) h)->activate();
|
||||
}
|
||||
|
||||
static void _run (LADSPA_Handle h, ulong n)
|
||||
{
|
||||
/* cannot call template here (g++ 2.95), sigh. */
|
||||
((T *) h)->run (n);
|
||||
}
|
||||
|
||||
static void _run_adding (LADSPA_Handle h, ulong n)
|
||||
{
|
||||
/* cannot call a template here (g++ 2.95), sigh. */
|
||||
((T *) h)->run_adding (n);
|
||||
}
|
||||
|
||||
static void _set_run_adding_gain (LADSPA_Handle h, LADSPA_Data g)
|
||||
{
|
||||
((T *) h)->adding_gain = g;
|
||||
}
|
||||
|
||||
static void _cleanup (LADSPA_Handle h)
|
||||
{
|
||||
delete (T *) h;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _DESCRIPTOR_H_ */
|
||||
169
plugins/ladspa_effect/caps/Eq.cc
Normal file
169
plugins/ladspa_effect/caps/Eq.cc
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
Eq.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
10-band octave-spread equalizer.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Eq.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Eq::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
eq.init (fs, 1.2);
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
inline static double
|
||||
adjust_gain (int i, double g)
|
||||
{
|
||||
static float adjust[] = {
|
||||
0.69238604707174034, 0.67282771124180096,
|
||||
0.67215187672467813, 0.65768648447259315,
|
||||
0.65988083755898952, 0.66359580101701909,
|
||||
0.66485139160960427, 0.65890297086039662,
|
||||
0.6493229390740376, 0.82305724539749325
|
||||
};
|
||||
|
||||
return g * adjust[i];
|
||||
}
|
||||
|
||||
void
|
||||
Eq::activate()
|
||||
{
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
gain[i] = *ports [1 + i];
|
||||
eq.gain[i] = adjust_gain (i, DSP::db2lin (gain[i]));
|
||||
}
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Eq::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
/* evaluate band gain changes and compute recursion factor to prevent
|
||||
* zipper noise */
|
||||
double one_over_n = 1. / frames;
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
if (*ports [1 + i] == gain[i])
|
||||
{
|
||||
/* no gain factoring */
|
||||
eq.gf[i] = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
gain[i] = *ports [1 + i];
|
||||
|
||||
double want = adjust_gain (i, DSP::db2lin (gain[i]));
|
||||
eq.gf[i] = pow (want / eq.gain[i], one_over_n);
|
||||
}
|
||||
|
||||
d_sample * d = ports[11];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
F (d, i, eq.process (s[i] + normal), adding_gain);
|
||||
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
Eq::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{0, -1, 1}
|
||||
}, {
|
||||
"31 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"63 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"125 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"250 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"500 Hz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"1 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"2 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"4 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"8 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"16 kHz",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -48, 30}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<Eq>::setup()
|
||||
{
|
||||
UniqueID = 1773;
|
||||
Label = "Eq";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Eq - 10-band 'analogue' equalizer";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
67
plugins/ladspa_effect/caps/Eq.h
Normal file
67
plugins/ladspa_effect/caps/Eq.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
Eq.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
equalizer circuit using recursive filtering.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _EQ_H_
|
||||
#define _EQ_H_
|
||||
|
||||
#include "dsp/Eq.h"
|
||||
#include "dsp/util.h"
|
||||
|
||||
class Eq
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample gain[10];
|
||||
d_sample normal;
|
||||
|
||||
DSP::Eq<10,12> eq;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [12];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _EQ_H_ */
|
||||
151
plugins/ladspa_effect/caps/HRTF.cc
Normal file
151
plugins/ladspa_effect/caps/HRTF.cc
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
HRTF.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
high-order IIR filtering modeled after HRTF impulse responses
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "HRTF.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
#include "elev0.h"
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
HRTF::init (double fs)
|
||||
{
|
||||
normal = NOISE_FLOOR;
|
||||
h = 0;
|
||||
}
|
||||
|
||||
void
|
||||
HRTF::set_pan (int p)
|
||||
{
|
||||
n = 31;
|
||||
|
||||
pan = p;
|
||||
|
||||
if (p >= 0)
|
||||
{
|
||||
left.a = elev0[p].left.a;
|
||||
left.b = elev0[p].left.b;
|
||||
right.a = elev0[p].right.a;
|
||||
right.b = elev0[p].right.b;
|
||||
}
|
||||
else
|
||||
{
|
||||
p = -p;
|
||||
left.a = elev0[p].right.a;
|
||||
left.b = elev0[p].right.b;
|
||||
right.a = elev0[p].left.a;
|
||||
right.b = elev0[p].left.b;
|
||||
}
|
||||
|
||||
memset (left.y, 0, sizeof (left.y));
|
||||
memset (right.y, 0, sizeof (right.y));
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
HRTF::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
int p = (int) *ports[1];
|
||||
if (p != pan) set_pan (p);
|
||||
|
||||
d_sample * dl = ports[2];
|
||||
d_sample * dr = ports[3];
|
||||
|
||||
double l, r;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
x[h] = l = r = s[i] + normal;
|
||||
|
||||
l *= left.a[0];
|
||||
r *= right.a[0];
|
||||
|
||||
for (int j = 1, z = h - 1; j < n; --z, ++j)
|
||||
{
|
||||
z &= 31;
|
||||
l += left.a[j] * x[z];
|
||||
l += left.b[j] * left.y[z];
|
||||
r += right.a[j] * x[z];
|
||||
r += right.b[j] * right.y[z];
|
||||
}
|
||||
|
||||
left.y[h] = l;
|
||||
right.y[h] = r;
|
||||
|
||||
h = (h + 1) & 31;
|
||||
|
||||
F (dl, i, l, adding_gain);
|
||||
F (dr, i, r, adding_gain);
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
HRTF::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{BOUNDED, -1, 1}
|
||||
}, {
|
||||
"pan",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | INTEGER | DEFAULT_0, -36, 36}
|
||||
}, {
|
||||
"out:l",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"out:r",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<HRTF>::setup()
|
||||
{
|
||||
UniqueID = 1787;
|
||||
Label = "HRTF";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: HRTF - Head-related transfer function at elevation 0";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
77
plugins/ladspa_effect/caps/HRTF.h
Normal file
77
plugins/ladspa_effect/caps/HRTF.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
HRTF.h
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
IIR filtering based on HRTF data sets
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _HRTF_H_
|
||||
#define _HRTF_H_
|
||||
|
||||
#include "dsp/util.h"
|
||||
|
||||
class HRTF
|
||||
{
|
||||
public:
|
||||
int pan;
|
||||
int n, h;
|
||||
|
||||
double x[32];
|
||||
|
||||
struct {
|
||||
double * a, * b;
|
||||
double y[32];
|
||||
} left, right;
|
||||
|
||||
void set_pan (int p);
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [4];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{
|
||||
set_pan ((int) *ports[1]);
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _HRTF_H_ */
|
||||
115
plugins/ladspa_effect/caps/Lorenz.cc
Normal file
115
plugins/ladspa_effect/caps/Lorenz.cc
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
Lorenz.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
the sound of a Lorenz 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
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Lorenz.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Lorenz::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
lorenz.init (h = .001, 0.1 * frandom());
|
||||
gain = 0;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Lorenz::one_cycle (int frames)
|
||||
{
|
||||
lorenz.set_rate (*ports[0]);
|
||||
|
||||
double g = (gain == *ports[4]) ?
|
||||
1 : pow (*ports[4] / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[5];
|
||||
|
||||
d_sample x, sx = *ports[1], sy = *ports[2], sz = *ports[3];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
lorenz.step();
|
||||
|
||||
x = sx * lorenz.get_x() + sy * lorenz.get_y() + sz * lorenz.get_z();
|
||||
|
||||
F (d, i, gain * x, adding_gain);
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[4];
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
Lorenz::port_info [] =
|
||||
{
|
||||
{
|
||||
"h",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED, 0, 1}
|
||||
}, {
|
||||
"x",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_1, 0, 1}
|
||||
}, {
|
||||
"y",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"z",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"volume",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, MIN_GAIN, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<Lorenz>::setup()
|
||||
{
|
||||
UniqueID = 1774;
|
||||
Label = "Lorenz";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Lorenz - The sound of a Lorenz attractor";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
66
plugins/ladspa_effect/caps/Lorenz.h
Normal file
66
plugins/ladspa_effect/caps/Lorenz.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
Lorenz.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
turns the state of a Lorenz fractal into sound.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _LORENZ_H_
|
||||
#define _LORENZ_H_
|
||||
|
||||
#include "dsp/Lorenz.h"
|
||||
|
||||
class Lorenz
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample h, gain;
|
||||
|
||||
DSP::Lorenz lorenz;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [6];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{ }
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _LORENZ_H_ */
|
||||
162
plugins/ladspa_effect/caps/Pan.cc
Normal file
162
plugins/ladspa_effect/caps/Pan.cc
Normal file
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
Pan.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
panorama with width control
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Pan.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Pan::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
delay.init ((int) (.040 * fs));
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
Pan::activate()
|
||||
{
|
||||
delay.reset();
|
||||
tap.reset (400 / fs);
|
||||
set_pan (*ports[1]);
|
||||
}
|
||||
|
||||
inline void
|
||||
Pan::set_pan (d_sample p)
|
||||
{
|
||||
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)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
if (pan != *ports[1])
|
||||
set_pan (*ports[1]);
|
||||
|
||||
d_sample
|
||||
width_l = *ports[2] * gain_r,
|
||||
width_r = *ports[2] * gain_l;
|
||||
|
||||
tap.t = (int) (*ports[3] * fs * .001);
|
||||
|
||||
bool mono = *ports[4];
|
||||
|
||||
d_sample * dl = ports[5];
|
||||
d_sample * dr = ports[6];
|
||||
|
||||
d_sample x, xt;
|
||||
|
||||
if (mono) for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
x = s[i];
|
||||
|
||||
xt = tap.get (delay);
|
||||
|
||||
delay.put (x + normal);
|
||||
|
||||
x = (gain_l * x + gain_r * x + width_l * xt + width_r * xt) * .5;
|
||||
|
||||
F (dl, i, x, adding_gain);
|
||||
F (dr, i, x, adding_gain);
|
||||
|
||||
normal = -normal;
|
||||
}
|
||||
else for (int 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;
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
Pan::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}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<Pan>::setup()
|
||||
{
|
||||
UniqueID = 1788;
|
||||
Label = "Pan";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Pan - Pan and width";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
90
plugins/ladspa_effect/caps/Pan.h
Normal file
90
plugins/ladspa_effect/caps/Pan.h
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Pan.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
panorama with width control
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _PAN_H_
|
||||
#define _PAN_H_
|
||||
|
||||
#include "dsp/Delay.h"
|
||||
#include "dsp/OnePole.h"
|
||||
|
||||
class PanTap
|
||||
{
|
||||
public:
|
||||
int t;
|
||||
DSP::OnePoleLP damper;
|
||||
|
||||
d_sample get (DSP::Delay & delay)
|
||||
{
|
||||
return damper.process (delay[t]);
|
||||
}
|
||||
|
||||
void reset (double c)
|
||||
{
|
||||
damper.set_f (c);
|
||||
damper.reset();
|
||||
}
|
||||
};
|
||||
|
||||
class Pan
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample pan;
|
||||
|
||||
d_sample gain_l, gain_r;
|
||||
d_sample normal;
|
||||
|
||||
DSP::Delay delay;
|
||||
PanTap tap;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
inline void set_pan (d_sample);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [7];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _PAN_H_ */
|
||||
235
plugins/ladspa_effect/caps/Phaser.cc
Normal file
235
plugins/ladspa_effect/caps/Phaser.cc
Normal file
@@ -0,0 +1,235 @@
|
||||
/*
|
||||
Phaser.cc
|
||||
|
||||
Copyright 2002-5 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.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Phaser.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
PhaserI::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
if (rate != *ports[1])
|
||||
{
|
||||
rate = *ports[1];
|
||||
lfo.set_f (max (.001, rate * (double) blocksize), fs, lfo.get_phase());
|
||||
}
|
||||
|
||||
double depth = *ports[2];
|
||||
double spread = 1 + *ports[3];
|
||||
double fb = *ports[4];
|
||||
|
||||
d_sample * dst = ports[5];
|
||||
|
||||
normal = -normal;
|
||||
|
||||
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)
|
||||
{
|
||||
d_sample x = s[i];
|
||||
d_sample 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;
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
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-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
PhaserII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
lorenz.set_rate (*ports[1] * .08);
|
||||
|
||||
double depth = *ports[2];
|
||||
double spread = 1 + *ports[3];
|
||||
double fb = *ports[4];
|
||||
|
||||
d_sample * dst = ports[5];
|
||||
|
||||
normal = -normal;
|
||||
|
||||
while (frames)
|
||||
{
|
||||
if (remain == 0) remain = 32;
|
||||
|
||||
int n = min (remain, frames);
|
||||
|
||||
double d = delay.bottom + delay.range * (.3 * lorenz.get());
|
||||
|
||||
for (int j = 5; j >= 0; --j)
|
||||
{
|
||||
ap[j].set (d);
|
||||
d *= spread;
|
||||
}
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
d_sample x = s[i];
|
||||
d_sample 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;
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
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}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<PhaserII>::setup()
|
||||
{
|
||||
UniqueID = 2586;
|
||||
Label = "PhaserII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: PhaserII - Mono phaser modulated by a Lorenz fractal";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
176
plugins/ladspa_effect/caps/Phaser.h
Normal file
176
plugins/ladspa_effect/caps/Phaser.h
Normal file
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
Phaser.h
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
Standard and fractal-modulated phaser 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
|
||||
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 _PHASER_H_
|
||||
#define _PHASER_H_
|
||||
|
||||
#include "dsp/Sine.h"
|
||||
#include "dsp/Lorenz.h"
|
||||
#include "dsp/Delay.h"
|
||||
|
||||
/* all-pass as used by the phaser. */
|
||||
class PhaserAP
|
||||
{
|
||||
public:
|
||||
d_sample a, m;
|
||||
|
||||
PhaserAP()
|
||||
{
|
||||
a = m = 0.;
|
||||
}
|
||||
|
||||
void set (double delay)
|
||||
{
|
||||
a = (1 - delay) / (1 + delay);
|
||||
}
|
||||
|
||||
d_sample process (d_sample x)
|
||||
{
|
||||
register d_sample y = -a * x + m;
|
||||
m = a * y + x;
|
||||
|
||||
return y;
|
||||
}
|
||||
};
|
||||
|
||||
class PhaserI
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
|
||||
PhaserAP ap[6];
|
||||
DSP::Sine lfo;
|
||||
|
||||
d_sample rate;
|
||||
d_sample y0;
|
||||
d_sample normal;
|
||||
|
||||
struct {
|
||||
double bottom, range;
|
||||
} delay;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
|
||||
int blocksize, remain;
|
||||
|
||||
public:
|
||||
d_sample * ports [6];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
blocksize = 32;
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
/* same as above, but filter sweep is controlled by a Lorenz fractal */
|
||||
|
||||
class PhaserII
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
|
||||
PhaserAP ap[6];
|
||||
DSP::Lorenz lorenz;
|
||||
|
||||
d_sample rate;
|
||||
d_sample y0;
|
||||
d_sample normal;
|
||||
|
||||
struct {
|
||||
double bottom, range;
|
||||
} delay;
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
|
||||
int blocksize, remain;
|
||||
|
||||
public:
|
||||
d_sample * ports [6];
|
||||
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
blocksize = 32;
|
||||
normal = NOISE_FLOOR;
|
||||
lorenz.init();
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* _PHASER_H_ */
|
||||
247
plugins/ladspa_effect/caps/Preamp.cc
Normal file
247
plugins/ladspa_effect/caps/Preamp.cc
Normal file
@@ -0,0 +1,247 @@
|
||||
/*
|
||||
Preamp.cc
|
||||
|
||||
Copyright 2003-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
loosely 12AX7-based tube preamp model, 8x oversampling.
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Amp.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
PreampIII::init (double _fs)
|
||||
{
|
||||
this->AmpStub::init (_fs);
|
||||
|
||||
DSP::RBJ::LoShelve (200 / (_fs), .2, -6, filter.a, filter.b);
|
||||
}
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void
|
||||
PreampIII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
d_sample gain = *ports[1];
|
||||
d_sample temp = *ports[2] * tube.scale;
|
||||
d_sample * d = ports[3];
|
||||
*ports[4] = OVERSAMPLE;
|
||||
|
||||
double g = current.g;
|
||||
|
||||
current.g = max (gain < 1 ? gain : exp2 (gain - 1), .000001);
|
||||
/* correction for attenuated first transfer */
|
||||
current.g *= tube.scale / fabs (tube.transfer (temp));
|
||||
|
||||
if (g == 0) g = current.g;
|
||||
|
||||
/* recursive fade to prevent zipper noise from the 'gain' knob */
|
||||
double one_over_n = 1. / frames;
|
||||
double gf = pow (current.g / g, one_over_n);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register d_sample a = s[i] + normal;
|
||||
|
||||
a = g * tube.transfer (a * temp);
|
||||
a = filter.process (a);
|
||||
a = down.process (tube.transfer_clip (up.upsample (a)));
|
||||
|
||||
for (int o = 1; o < OVERSAMPLE; ++o)
|
||||
down.store (tube.transfer_clip (up.pad (o)));
|
||||
|
||||
F (d, i, dc_blocker.process (a), adding_gain);
|
||||
|
||||
g *= gf;
|
||||
}
|
||||
|
||||
current.g = g;
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
PreampIII::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{BOUNDED, -1, 1}
|
||||
}, {
|
||||
"gain",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_1, 0, 10}
|
||||
}, {
|
||||
"temperature",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_LOW, 0.005, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"latency",
|
||||
OUTPUT | CONTROL,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<PreampIII>::setup()
|
||||
{
|
||||
UniqueID = 1776;
|
||||
Label = "PreampIII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: PreampIII - Tube preamp emulation";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
PreampIV::init (double _fs)
|
||||
{
|
||||
this->AmpStub::init (_fs);
|
||||
|
||||
tone.init (_fs);
|
||||
}
|
||||
|
||||
void
|
||||
PreampIV::activate()
|
||||
{
|
||||
this->PreampIII::activate();
|
||||
|
||||
tone.activate (ports + 3);
|
||||
}
|
||||
|
||||
template <sample_func_t F, int OVERSAMPLE>
|
||||
void
|
||||
PreampIV::one_cycle (int frames)
|
||||
{
|
||||
double one_over_n = 1. / frames;
|
||||
|
||||
d_sample * s = ports[0];
|
||||
d_sample gain = *ports[1];
|
||||
d_sample temp = *ports[2] * tube.scale;
|
||||
|
||||
tone.start_cycle (ports + 3, one_over_n);
|
||||
|
||||
d_sample * d = ports[7];
|
||||
*ports[8] = OVERSAMPLE;
|
||||
|
||||
double g = current.g;
|
||||
|
||||
current.g = max (gain < 1 ? gain : exp2 (gain - 1), .000001);
|
||||
current.g *= tube.scale / fabs (tube.transfer (temp));
|
||||
|
||||
if (g == 0) g = current.g;
|
||||
|
||||
/* recursive fade to prevent zipper noise from the 'gain' knob */
|
||||
double gf = pow (current.g / g, one_over_n);
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
register d_sample a = tone.process (s[i] + normal);
|
||||
|
||||
a = g * tube.transfer (a * temp);
|
||||
|
||||
a = down.process (tube.transfer_clip (up.upsample (a)));
|
||||
|
||||
for (int o = 1; o < OVERSAMPLE; ++o)
|
||||
down.store (tube.transfer_clip (up.pad (o)));
|
||||
|
||||
F (d, i, dc_blocker.process (a), adding_gain);
|
||||
|
||||
g *= gf;
|
||||
}
|
||||
|
||||
current.g = g;
|
||||
normal = -normal;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
PreampIV::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}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"latency",
|
||||
OUTPUT | CONTROL,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<PreampIV>::setup()
|
||||
{
|
||||
UniqueID = 1777;
|
||||
Label = "PreampIV";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: PreampIV - Tube preamp emulation + tone controls";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2002-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
67
plugins/ladspa_effect/caps/README
Normal file
67
plugins/ladspa_effect/caps/README
Normal file
@@ -0,0 +1,67 @@
|
||||
This is caps, the C Audio Plugin Suite
|
||||
======================================
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de> and others.
|
||||
|
||||
|
||||
License information
|
||||
-------------------
|
||||
|
||||
See the file "COPYING" for licensing terms & conditions for usage,
|
||||
and a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
|
||||
What is this caps thing?
|
||||
------------------------
|
||||
|
||||
caps is a collection of refined realtime-capable LADSPA audio DSP
|
||||
plugins. It helps your computer sound better.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Please point your browser to the file 'caps.html' in this directory.
|
||||
|
||||
|
||||
Web site and latest version
|
||||
---------------------------
|
||||
|
||||
The latest information and package release reside at
|
||||
|
||||
http://quitte.de/dsp/caps.html
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
At the shell prompt, enter (without the '$' denoting the prompt itself):
|
||||
|
||||
$ make
|
||||
|
||||
then, as the superuser, enter:
|
||||
|
||||
# make install
|
||||
|
||||
and you're done. You can now use the plugins in any LADSPA-aware audio
|
||||
application.
|
||||
|
||||
Please note that the default installation path is /usr/local/lib/ladspa;
|
||||
if you prefer another place, you need to edit the makefile, or install
|
||||
manually.
|
||||
|
||||
|
||||
Bug reports
|
||||
-----------
|
||||
|
||||
Bug reports should be sent to <tim@quitte.de>. Please include a detailed
|
||||
description of the misbehaviour and instructions on how to reproduce the
|
||||
bug.
|
||||
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
caps is known to compile well with gnu make, gcc 2.95, 3.3 and 4.0.
|
||||
If you have trouble compiling it, please send mail containing the
|
||||
output of the 'make' command to <tim@quitte.de>.
|
||||
504
plugins/ladspa_effect/caps/Reverb.cc
Normal file
504
plugins/ladspa_effect/caps/Reverb.cc
Normal file
@@ -0,0 +1,504 @@
|
||||
/*
|
||||
Reverb.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
three reverb units: JVRev, Plate and Plate2x2.
|
||||
|
||||
the former is a rewrite of STK's JVRev, a traditional design.
|
||||
|
||||
original comment:
|
||||
|
||||
This is based on some of the famous
|
||||
Stanford CCRMA reverbs (NRev, KipRev)
|
||||
all based on the Chowning/Moorer/
|
||||
Schroeder reverberators, which use
|
||||
networks of simple allpass and comb
|
||||
delay filters.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "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
|
||||
};
|
||||
|
||||
void
|
||||
JVRev::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
normal = NOISE_FLOOR;
|
||||
|
||||
memcpy (length, default_length, sizeof (length));
|
||||
|
||||
if (fs != 44100)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
comb[i].init (length[i]);
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
allpass[i].init (length[i+4]);
|
||||
|
||||
left.init (length[7]);
|
||||
right.init (length[8]);
|
||||
|
||||
/* such a simple number, but i couldn't find a better one. */
|
||||
apc = .7;
|
||||
}
|
||||
|
||||
void
|
||||
JVRev::set_t60 (d_sample t)
|
||||
{
|
||||
t60 = t;
|
||||
|
||||
t = max (.00001, t);
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
comb[i].c = pow (10, (-3 * length[i] / (t * fs)));
|
||||
}
|
||||
|
||||
void
|
||||
JVRev::activate()
|
||||
{
|
||||
for (int i = 0; i < 3; ++i)
|
||||
allpass[i].reset();
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
comb[i].reset();
|
||||
|
||||
left.reset();
|
||||
right.reset();
|
||||
|
||||
set_t60 (*ports[1]);
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
JVRev::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
if (t60 != *ports[1])
|
||||
set_t60 (*ports[1]);
|
||||
|
||||
double wet = *ports[2], dry = 1 - wet;
|
||||
|
||||
d_sample * dl = ports[3];
|
||||
d_sample * dr = ports[4];
|
||||
|
||||
normal = -normal;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
d_sample x = s[i], a = x + normal;
|
||||
|
||||
x *= dry;
|
||||
|
||||
/* diffusors */
|
||||
a = allpass[0].process (a, -apc);
|
||||
a = allpass[1].process (a, -apc);
|
||||
a = allpass[2].process (a, -apc);
|
||||
|
||||
/* tank */
|
||||
d_sample t = 0;
|
||||
a -= normal;
|
||||
|
||||
for (int j = 0; j < 4; ++j)
|
||||
t += comb[j].process (a);
|
||||
|
||||
F (dl, i, x + wet * left.putget (t), adding_gain);
|
||||
F (dr, i, x + wet * right.putget (t), adding_gain);
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
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}
|
||||
}
|
||||
};
|
||||
|
||||
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-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
PlateStub::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
f_lfo = -1;
|
||||
|
||||
# define L(i) ((int) (l[i] * fs))
|
||||
static float l[] = {
|
||||
0.004771345048889486, 0.0035953092974026408,
|
||||
0.01273478713752898, 0.0093074829474816042,
|
||||
0.022579886428547427, 0.030509727495715868,
|
||||
0.14962534861059779, 0.060481838647894894, 0.12499579987231611,
|
||||
0.14169550754342933, 0.089244313027116023, 0.10628003091293972
|
||||
};
|
||||
|
||||
/* lh */
|
||||
input.lattice[0].init (L(0));
|
||||
input.lattice[1].init (L(1));
|
||||
|
||||
/* rh */
|
||||
input.lattice[2].init (L(2));
|
||||
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));
|
||||
|
||||
/* lh */
|
||||
tank.delay[0].init (L(6));
|
||||
tank.lattice[0].init (L(7));
|
||||
tank.delay[1].init (L(8));
|
||||
|
||||
/* rh */
|
||||
tank.delay[2].init (L(9));
|
||||
tank.lattice[1].init (L(10));
|
||||
tank.delay[3].init (L(11));
|
||||
# undef L
|
||||
|
||||
# define T(i) ((int) (t[i] * fs))
|
||||
static float t[] = {
|
||||
0.0089378717113000241, 0.099929437854910791, 0.064278754074123853,
|
||||
0.067067638856221232, 0.066866032727394914, 0.006283391015086859,
|
||||
0.01186116057928161, 0.12187090487550822, 0.041262054366452743,
|
||||
0.089815530392123921, 0.070931756325392295, 0.011256342192802662
|
||||
};
|
||||
|
||||
for (int i = 0; i < 12; ++i)
|
||||
tank.taps[i] = T(i);
|
||||
# undef T
|
||||
|
||||
/* tuned for soft attack, ambience */
|
||||
indiff1 = .742;
|
||||
indiff2 = .712;
|
||||
|
||||
dediff1 = .723;
|
||||
dediff2 = .729;
|
||||
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
inline void
|
||||
PlateStub::process (d_sample x, d_sample decay, d_sample * _xl, d_sample * _xr)
|
||||
{
|
||||
x = input.bandwidth.process (x);
|
||||
|
||||
/* lh */
|
||||
x = input.lattice[0].process (x, indiff1);
|
||||
x = input.lattice[1].process (x, indiff1);
|
||||
|
||||
/* rh */
|
||||
x = input.lattice[2].process (x, indiff2);
|
||||
x = input.lattice[3].process (x, indiff2);
|
||||
|
||||
/* summation point */
|
||||
register d_sample xl = x + decay * tank.delay[3].get();
|
||||
register d_sample xr = x + decay * tank.delay[1].get();
|
||||
|
||||
/* lh */
|
||||
xl = tank.mlattice[0].process (xl, dediff1);
|
||||
xl = tank.delay[0].putget (xl);
|
||||
xl = tank.damping[0].process (xl);
|
||||
xl *= decay;
|
||||
xl = tank.lattice[0].process (xl, dediff2);
|
||||
tank.delay[1].put (xl);
|
||||
|
||||
/* rh */
|
||||
xr = tank.mlattice[1].process (xr, dediff1);
|
||||
xr = tank.delay[2].putget (xr);
|
||||
xr = tank.damping[1].process (xr);
|
||||
xr *= decay;
|
||||
xr = tank.lattice[1].process (xr, dediff2);
|
||||
tank.delay[3].put (xr);
|
||||
|
||||
/* gather output */
|
||||
xl = .6 * tank.delay[2] [tank.taps[0]];
|
||||
xl += .6 * tank.delay[2] [tank.taps[1]];
|
||||
xl -= .6 * tank.lattice[1] [tank.taps[2]];
|
||||
xl += .6 * tank.delay[3] [tank.taps[3]];
|
||||
xl -= .6 * tank.delay[0] [tank.taps[4]];
|
||||
xl += .6 * tank.lattice[0] [tank.taps[5]];
|
||||
|
||||
xr = .6 * tank.delay[0] [tank.taps[6]];
|
||||
xr += .6 * tank.delay[0] [tank.taps[7]];
|
||||
xr -= .6 * tank.lattice[0] [tank.taps[8]];
|
||||
xr += .6 * tank.delay[1] [tank.taps[9]];
|
||||
xr -= .6 * tank.delay[2] [tank.taps[10]];
|
||||
xr += .6 * tank.lattice[1] [tank.taps[11]];
|
||||
|
||||
*_xl = xl;
|
||||
*_xr = xr;
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Plate::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
input.bandwidth.set (exp (-M_PI * (1. - *ports[1])));
|
||||
|
||||
d_sample decay = *ports[2];
|
||||
|
||||
double damp = exp (-M_PI * *ports[3]);
|
||||
tank.damping[0].set (damp);
|
||||
tank.damping[1].set (damp);
|
||||
|
||||
d_sample blend = *ports[4], dry = 1 - blend;
|
||||
|
||||
d_sample * dl = ports[5];
|
||||
d_sample * dr = ports[6];
|
||||
|
||||
/* the modulated lattices interpolate, which needs truncated float */
|
||||
DSP::FPTruncateMode _truncate;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
d_sample x = s[i] + normal;
|
||||
normal = -normal;
|
||||
|
||||
d_sample xl, xr;
|
||||
|
||||
PlateStub::process (x, decay, &xl, &xr);
|
||||
|
||||
x = dry * s[i];
|
||||
|
||||
F (dl, i, x + blend * xl, adding_gain);
|
||||
F (dr, i, x + blend * xr, adding_gain);
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
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}
|
||||
}
|
||||
};
|
||||
|
||||
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-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Plate2x2::one_cycle (int frames)
|
||||
{
|
||||
d_sample * sl = ports[0];
|
||||
d_sample * sr = ports[1];
|
||||
|
||||
input.bandwidth.set (exp (-M_PI * (1. - *ports[2])));
|
||||
|
||||
d_sample decay = *ports[3];
|
||||
|
||||
double damp = exp (-M_PI * *ports[4]);
|
||||
tank.damping[0].set (damp);
|
||||
tank.damping[1].set (damp);
|
||||
|
||||
d_sample blend = *ports[5], dry = 1 - blend;
|
||||
|
||||
d_sample * dl = ports[6];
|
||||
d_sample * dr = ports[7];
|
||||
|
||||
/* the modulated lattices interpolate, which needs truncated float */
|
||||
DSP::FPTruncateMode _truncate;
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
normal = -normal;
|
||||
|
||||
d_sample x = (sl[i] + sr[i] + normal) * .5;
|
||||
|
||||
d_sample 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);
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
Plate2x2::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}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<Plate2x2>::setup()
|
||||
{
|
||||
UniqueID = 1795;
|
||||
Label = "Plate2x2";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Plate2x2 - Versatile plate reverb, stereo inputs";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
|
||||
268
plugins/ladspa_effect/caps/Reverb.h
Normal file
268
plugins/ladspa_effect/caps/Reverb.h
Normal file
@@ -0,0 +1,268 @@
|
||||
/*
|
||||
Reverb.h
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
two reverb units: JVRev and Plate.
|
||||
|
||||
the former is a rewrite of STK's JVRev, a traditional design.
|
||||
|
||||
original comment:
|
||||
|
||||
This is based on some of the famous
|
||||
Stanford CCRMA reverbs (NRev, KipRev)
|
||||
all based on the Chowning/Moorer/
|
||||
Schroeder reverberators, which use
|
||||
networks of simple allpass and comb
|
||||
delay filters.
|
||||
|
||||
(STK is an effort of Gary Scavone).
|
||||
|
||||
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.
|
||||
|
||||
the Plate reverb is 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
|
||||
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 _REVERB_H_
|
||||
#define _REVERB_H_
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "dsp/Delay.h"
|
||||
#include "dsp/OnePole.h"
|
||||
#include "dsp/Sine.h"
|
||||
#include "dsp/util.h"
|
||||
|
||||
/* both reverbs use this */
|
||||
class Lattice
|
||||
: public DSP::Delay
|
||||
{
|
||||
public:
|
||||
inline d_sample
|
||||
process (d_sample x, double d)
|
||||
{
|
||||
d_sample y = get();
|
||||
x -= d * y;
|
||||
put (x);
|
||||
return d * x + y;
|
||||
}
|
||||
};
|
||||
|
||||
/* helper for JVRev */
|
||||
class JVComb
|
||||
: public DSP::Delay
|
||||
{
|
||||
public:
|
||||
float c;
|
||||
|
||||
inline d_sample
|
||||
process (d_sample x)
|
||||
{
|
||||
x += c * get();
|
||||
put (x);
|
||||
return x;
|
||||
}
|
||||
};
|
||||
|
||||
class JVRev
|
||||
{
|
||||
public:
|
||||
static int default_length[9];
|
||||
double fs;
|
||||
d_sample t60;
|
||||
|
||||
Lattice allpass [3];
|
||||
JVComb comb[4];
|
||||
|
||||
DSP::Delay left, right;
|
||||
|
||||
double apc;
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
int length [9];
|
||||
|
||||
void set_t60 (d_sample t);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [5];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
/* /////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
class ModLattice
|
||||
{
|
||||
public:
|
||||
float n0, width;
|
||||
|
||||
DSP::Delay delay;
|
||||
DSP::Sine lfo;
|
||||
DSP::DelayTapA tap;
|
||||
|
||||
void init (int n, int w)
|
||||
{
|
||||
n0 = n;
|
||||
width = w;
|
||||
delay.init (n + w);
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
delay.reset();
|
||||
tap.reset();
|
||||
}
|
||||
|
||||
inline d_sample
|
||||
process (d_sample x, double d)
|
||||
{
|
||||
/* TODO: try all-pass interpolation */
|
||||
d_sample y = delay.get_at (n0 + width * lfo.get());
|
||||
x += d * y;
|
||||
delay.put (x);
|
||||
return y - d * x; /* note sign */
|
||||
}
|
||||
};
|
||||
|
||||
class PlateStub
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample f_lfo;
|
||||
|
||||
d_sample indiff1, indiff2, dediff1, dediff2;
|
||||
|
||||
struct {
|
||||
DSP::OnePoleLP bandwidth;
|
||||
Lattice lattice[4];
|
||||
} input;
|
||||
|
||||
struct {
|
||||
ModLattice mlattice[2];
|
||||
Lattice lattice[2];
|
||||
DSP::Delay delay[4];
|
||||
DSP::OnePoleLP damping[2];
|
||||
int taps[12];
|
||||
} tank;
|
||||
|
||||
d_sample normal;
|
||||
|
||||
public:
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{
|
||||
input.bandwidth.reset();
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
input.lattice[i].reset();
|
||||
tank.delay[i].reset();
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
tank.mlattice[i].reset();
|
||||
tank.lattice[i].reset();
|
||||
tank.damping[i].reset();
|
||||
}
|
||||
|
||||
tank.mlattice[0].lfo.set_f (1.2, fs, 0);
|
||||
tank.mlattice[1].lfo.set_f (1.2, fs, .5 * M_PI);
|
||||
}
|
||||
|
||||
inline void process (d_sample x, d_sample decay,
|
||||
d_sample * xl, d_sample * xr);
|
||||
};
|
||||
|
||||
/* /////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
class Plate
|
||||
: public PlateStub
|
||||
{
|
||||
public:
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [7];
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
/* /////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
class Plate2x2
|
||||
: public PlateStub
|
||||
{
|
||||
public:
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [8];
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _REVERB_H_ */
|
||||
121
plugins/ladspa_effect/caps/Roessler.cc
Normal file
121
plugins/ladspa_effect/caps/Roessler.cc
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
Roessler.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
the sound of a 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
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Roessler.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Roessler::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
roessler.init (h = .001, frandom());
|
||||
gain = 0;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Roessler::one_cycle (int frames)
|
||||
{
|
||||
roessler.set_rate (*ports[0]);
|
||||
|
||||
double g = (gain == *ports[4]) ?
|
||||
1 : pow (*ports[4] / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[5];
|
||||
|
||||
d_sample x,
|
||||
sx = .043 * *ports[1],
|
||||
sy = .051 * *ports[2],
|
||||
sz = .018 * *ports[3];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
roessler.get();
|
||||
|
||||
x =
|
||||
sx * (roessler.get_x() - .515) +
|
||||
sy * (roessler.get_y() + 2.577) +
|
||||
sz * (roessler.get_z() - 2.578);
|
||||
|
||||
F (d, i, gain * x, adding_gain);
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[4];
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
Roessler::port_info [] =
|
||||
{
|
||||
{
|
||||
"h",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED, 0, 1}
|
||||
}, {
|
||||
"x",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_1, 0, 1}
|
||||
}, {
|
||||
"y",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"z",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"volume",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, MIN_GAIN, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<Roessler>::setup()
|
||||
{
|
||||
UniqueID = 1780;
|
||||
Label = "Roessler";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Roessler - The sound of a Roessler attractor";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
66
plugins/ladspa_effect/caps/Roessler.h
Normal file
66
plugins/ladspa_effect/caps/Roessler.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
Roessler.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
turns a Roessler fractal into sound.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _ROESSLER_H_
|
||||
#define _ROESSLER_H_
|
||||
|
||||
#include "dsp/Roessler.h"
|
||||
|
||||
class Roessler
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample h, gain;
|
||||
|
||||
DSP::Roessler roessler;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [6];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{ }
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _ROESSLER_H_ */
|
||||
203
plugins/ladspa_effect/caps/Scape.cc
Normal file
203
plugins/ladspa_effect/caps/Scape.cc
Normal file
@@ -0,0 +1,203 @@
|
||||
/*
|
||||
Scape.cc
|
||||
|
||||
Copyright 2004-6 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Scape.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Scape::activate()
|
||||
{
|
||||
time = 0;
|
||||
fb = 0;
|
||||
|
||||
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),
|
||||
|
||||
delay.reset();
|
||||
period = 0;
|
||||
}
|
||||
|
||||
static double
|
||||
dividers [] = {
|
||||
1 /* 0 sentinel */,
|
||||
1, 0.5, 0.66666666666666666667, 0.75
|
||||
};
|
||||
|
||||
float
|
||||
frandom2()
|
||||
{
|
||||
float f = frandom();
|
||||
return f * f * f;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Scape::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
// double one_over_n = 1 / (double) frames;
|
||||
|
||||
/* delay times */
|
||||
double t1 = fs * 60. / *ports[1];
|
||||
int div = (int) *ports[2];
|
||||
double t2 = t1 * dividers[div];
|
||||
|
||||
fb = *ports[3];
|
||||
|
||||
double dry = *ports[4];
|
||||
dry = dry * dry;
|
||||
double blend = *ports[5];
|
||||
|
||||
d_sample * dl = ports[6];
|
||||
d_sample * dr = ports[7];
|
||||
|
||||
DSP::FPTruncateMode truncate;
|
||||
|
||||
while (frames)
|
||||
{
|
||||
/* flip 'renormal' addition constant */
|
||||
normal = -normal;
|
||||
|
||||
/* retune filters */
|
||||
if (period <= 1)
|
||||
{
|
||||
period = t2 * .5;
|
||||
float f, q;
|
||||
|
||||
//fprintf (stderr, "%.3f: %d\n", period, (int) period);
|
||||
f = frandom2();
|
||||
svf[0].set_f_Q (300 + 300 * f / fs, .3);
|
||||
svf[3].set_f_Q (300 + 600 * 2 * f / fs, .6);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
int n = min ((int) period, frames);
|
||||
if (n < 1)
|
||||
{
|
||||
fprintf (stderr, "Scape: %d - %d/%d frames, t2 = %.3f?!?\n", (int) period, n, frames, t2);
|
||||
return;
|
||||
}
|
||||
|
||||
/* sample loop */
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
d_sample x = s[i] + normal;
|
||||
|
||||
d_sample x1 = delay.get_at (t1);
|
||||
d_sample x2 = delay.get_at (t2);
|
||||
|
||||
delay.put (x + fb * x1 + normal);
|
||||
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);
|
||||
|
||||
x1 = hipass[1].process (x1);
|
||||
x2 = hipass[2].process (x2);
|
||||
|
||||
d_sample x1l, x1r, x2l, x2r;
|
||||
x1l = fabs (lfo[0].get());
|
||||
x1r = 1 - x1l;
|
||||
x2r = fabs (lfo[1].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);
|
||||
}
|
||||
|
||||
frames -= n;
|
||||
period -= n;
|
||||
s += n;
|
||||
dl += n;
|
||||
dr += n;
|
||||
}
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
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}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<Scape>::setup()
|
||||
{
|
||||
UniqueID = 2588;
|
||||
Label = "Scape";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: Scape - Stereo delay + Filters";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-6";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
94
plugins/ladspa_effect/caps/Scape.h
Normal file
94
plugins/ladspa_effect/caps/Scape.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
Scape.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _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/RBJ.h"
|
||||
#include "dsp/SVF.h"
|
||||
|
||||
typedef DSP::SVF<1> SVF;
|
||||
|
||||
class Scape
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample time, fb;
|
||||
double period;
|
||||
d_sample normal; /* denormal protection */
|
||||
|
||||
DSP::Lorenz lfo[2];
|
||||
DSP::Delay delay;
|
||||
SVF svf[4];
|
||||
DSP::OnePoleHP hipass[4];
|
||||
|
||||
template <sample_func_t>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
d_sample * ports [8];
|
||||
/*
|
||||
* in
|
||||
* bpm
|
||||
* div
|
||||
* feedback
|
||||
* dry
|
||||
* blend
|
||||
* out:l
|
||||
* out:r
|
||||
*/
|
||||
static PortInfo port_info [];
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
delay.init ((int) (2.01 * fs)); /* two seconds = 30 bpm + */
|
||||
normal = NOISE_FLOOR;
|
||||
for (int i = 0; i < 2; ++i)
|
||||
lfo[i].init(),
|
||||
lfo[i].set_rate (.00000001 * fs);
|
||||
}
|
||||
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _SCAPE_H_ */
|
||||
96
plugins/ladspa_effect/caps/Sin.cc
Normal file
96
plugins/ladspa_effect/caps/Sin.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
Sin.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
simple sin() 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
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Sin.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
Sin::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
sin.set_f (f = .005, fs, 0);
|
||||
gain = 0;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
Sin::one_cycle (int frames)
|
||||
{
|
||||
if (f != *ports[0])
|
||||
sin.set_f (f = *ports[0], fs, sin.get_phase());
|
||||
|
||||
double g = (gain == *ports[1]) ?
|
||||
1 : pow (*ports[1] / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[2];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
F (d, i, gain * sin.get(), adding_gain);
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[1];
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
Sin::port_info [] =
|
||||
{
|
||||
{
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | LOG | DEFAULT_440, 0, .5}
|
||||
}, {
|
||||
"volume",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | 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-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
66
plugins/ladspa_effect/caps/Sin.h
Normal file
66
plugins/ladspa_effect/caps/Sin.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
Sin.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
sin() 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
|
||||
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 _SIN_H_
|
||||
#define _SIN_H_
|
||||
|
||||
#include "dsp/Sine.h"
|
||||
|
||||
class Sin
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample f, gain;
|
||||
|
||||
DSP::Sine sin;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [3];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{ }
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _SIN_H_ */
|
||||
331
plugins/ladspa_effect/caps/SweepVF.cc
Normal file
331
plugins/ladspa_effect/caps/SweepVF.cc
Normal file
@@ -0,0 +1,331 @@
|
||||
/*
|
||||
SweepVF.cc
|
||||
|
||||
Copyright 2002-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
SweepVFI, a lorenz fractal modulating the cutoff frequency of a
|
||||
state-variable (ladder) filter.
|
||||
|
||||
SweepVFII, the same with Q being modulated by a second fractal.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "SweepVF.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
SweepVFI::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
f = .1;
|
||||
Q = .1;
|
||||
lorenz.init();
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
SweepVFI::activate()
|
||||
{
|
||||
svf.reset();
|
||||
svf.set_f_Q (f = *ports[1] / fs, Q = *ports[2]);
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
SweepVFI::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
int blocks = frames / BLOCK_SIZE;
|
||||
if (frames & (BLOCK_SIZE - 1))
|
||||
++blocks;
|
||||
|
||||
double one_over_blocks = 1 / (double) blocks;
|
||||
/* cheesy linear interpolation for f, works well though. */
|
||||
double df = (*ports[1] / fs - f) * one_over_blocks;
|
||||
double dQ = (*ports[2] - Q) * one_over_blocks;
|
||||
|
||||
svf.set_out ((int) *ports[3]);
|
||||
|
||||
lorenz.set_rate (*ports[7]);
|
||||
|
||||
d_sample * d = ports[8];
|
||||
|
||||
while (frames)
|
||||
{
|
||||
lorenz.step();
|
||||
|
||||
double modulation =
|
||||
*ports[4] * lorenz.get_x() +
|
||||
*ports[5] * lorenz.get_y() +
|
||||
*ports[6] * lorenz.get_z();
|
||||
|
||||
double scale = *ports[4] + *ports[5] + *ports[6];
|
||||
|
||||
modulation *= scale * f;
|
||||
svf.set_f_Q (max (.001, f + modulation), Q);
|
||||
|
||||
int n = min (frames, BLOCK_SIZE);
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
F (d, i, svf.process (s[i] + normal), adding_gain);
|
||||
|
||||
s += n;
|
||||
d += n;
|
||||
frames -= n;
|
||||
|
||||
f += df;
|
||||
Q += dQ;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
|
||||
f = *ports[1] / fs;
|
||||
Q = *ports[2];
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
SweepVFI::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{0, 0, 0}
|
||||
}, {
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | DEFAULT_LOW, 0.002, 0.08}
|
||||
}, {
|
||||
"Q",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0.001, .999}
|
||||
}, {
|
||||
"mode",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_1 | INTEGER, 0, 1} /* only lo and band make sense */
|
||||
}, {
|
||||
"depth:x",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_LOW, 0, 1}
|
||||
}, {
|
||||
"depth:y",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"depth:z",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MAX, 0, 1}
|
||||
}, {
|
||||
"h",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_LOW, 0.001, 1} /* .039 */
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<SweepVFI>::setup()
|
||||
{
|
||||
UniqueID = 1782;
|
||||
Label = "SweepVFI";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: SweepVFI - Resonant filter, f swept by a Lorenz fractal";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
SweepVFII::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
f = .1;
|
||||
Q = .1;
|
||||
lorenz1.init();
|
||||
lorenz2.init();
|
||||
normal = NOISE_FLOOR;
|
||||
}
|
||||
|
||||
void
|
||||
SweepVFII::activate()
|
||||
{
|
||||
svf.reset();
|
||||
svf.set_f_Q (f = *ports[1] / fs, Q = *ports[2]);
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
SweepVFII::one_cycle (int frames)
|
||||
{
|
||||
d_sample * s = ports[0];
|
||||
|
||||
int blocks = frames / BLOCK_SIZE;
|
||||
if (frames & (BLOCK_SIZE - 1))
|
||||
++blocks;
|
||||
|
||||
double one_over_blocks = 1 / (double) blocks;
|
||||
/* cheesy linear interpolation for f, works well though. */
|
||||
double df = (*ports[1] / fs - f) * one_over_blocks;
|
||||
double dQ = (*ports[2] - Q) * one_over_blocks;
|
||||
|
||||
svf.set_out ((int) *ports[3]);
|
||||
|
||||
lorenz1.set_rate (*ports[7]);
|
||||
lorenz2.set_rate (*ports[11]);
|
||||
|
||||
d_sample * d = ports[12];
|
||||
|
||||
while (frames)
|
||||
{
|
||||
/* f modulation */
|
||||
lorenz1.step();
|
||||
|
||||
double modulation1 =
|
||||
*ports[4] * lorenz1.get_x() +
|
||||
*ports[5] * lorenz1.get_y() +
|
||||
*ports[6] * lorenz1.get_z();
|
||||
|
||||
double scale1 = *ports[4] + *ports[5] + *ports[6];
|
||||
|
||||
modulation1 *= scale1 * f;
|
||||
|
||||
/* Q modulation */
|
||||
lorenz2.step();
|
||||
|
||||
double modulation2 =
|
||||
*ports[8] * lorenz2.get_x() +
|
||||
*ports[9] * lorenz2.get_y() +
|
||||
*ports[10] * lorenz2.get_z();
|
||||
|
||||
double scale2 = *ports[8] + *ports[9] + *ports[10];
|
||||
|
||||
/* enforce Q limit */
|
||||
double q = Q + (modulation2 * scale2 * Q);
|
||||
q = min (0.96, max (q, 0));
|
||||
|
||||
svf.set_f_Q (max (.001, f + modulation1), q);
|
||||
|
||||
int n = min (frames, BLOCK_SIZE);
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
F (d, i, svf.process (s[i] + normal), adding_gain);
|
||||
|
||||
s += n;
|
||||
d += n;
|
||||
frames -= n;
|
||||
|
||||
f += df;
|
||||
Q += dQ;
|
||||
}
|
||||
|
||||
normal = -normal;
|
||||
|
||||
f = *ports[1] / fs;
|
||||
Q = *ports[2];
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
SweepVFII::port_info [] =
|
||||
{
|
||||
{
|
||||
"in",
|
||||
INPUT | AUDIO,
|
||||
{0, 0, 0}
|
||||
}, {
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | DEFAULT_LOW, 0.002, 0.08}
|
||||
}, {
|
||||
"Q",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0.001, .999}
|
||||
}, {
|
||||
"mode",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_1 | INTEGER, 0, 1} /* only lo and band make sense */
|
||||
}, {
|
||||
"f:depth:x",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_LOW, 0, 1}
|
||||
}, {
|
||||
"f:depth:y",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"f:depth:z",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MAX, 0, 1}
|
||||
}, {
|
||||
"f:h",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_LOW, 0.001, 1} /* .039 */
|
||||
}, {
|
||||
"Q:depth:x",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_LOW, 0, 1}
|
||||
}, {
|
||||
"Q:depth:y",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, 0, 1}
|
||||
}, {
|
||||
"Q:depth:z",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MAX, 0, 1}
|
||||
}, {
|
||||
"Q:h",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_LOW, 0.001, 1} /* .039 */
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<SweepVFII>::setup()
|
||||
{
|
||||
UniqueID = 2582;
|
||||
Label = "SweepVFII";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: SweepVFII - Resonant filter, f and Q swept by a Lorenz fractal";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
123
plugins/ladspa_effect/caps/SweepVF.h
Normal file
123
plugins/ladspa_effect/caps/SweepVF.h
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
SweepVF.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
SweepVFI, a lorenz fractal modulating the cutoff frequency of a
|
||||
state-variable (ladder) filter.
|
||||
|
||||
SweepVFII, the same with Q being modulated by a second fractal.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _SWEEP_VF_H_
|
||||
#define _SWEEP_VF_H_
|
||||
|
||||
#include "dsp/SVF.h"
|
||||
#include "dsp/Lorenz.h"
|
||||
#include "dsp/Roessler.h"
|
||||
|
||||
class SweepVFI
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
|
||||
/* svf parameters */
|
||||
d_sample f, Q;
|
||||
|
||||
/* needs to be a power of two */
|
||||
enum {
|
||||
BLOCK_SIZE = 32
|
||||
};
|
||||
|
||||
DSP::StackedSVF<1,2> svf;
|
||||
DSP::Lorenz lorenz;
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [9];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
class SweepVFII
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
|
||||
/* svf parameters */
|
||||
d_sample f, Q;
|
||||
|
||||
/* needs to be a power of two */
|
||||
enum {
|
||||
BLOCK_SIZE = 32
|
||||
};
|
||||
|
||||
DSP::StackedSVF<1,2> svf;
|
||||
DSP::Lorenz lorenz1;
|
||||
DSP::Lorenz lorenz2;
|
||||
|
||||
d_sample normal;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [13];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate();
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _SWEEP_VF_H_ */
|
||||
73
plugins/ladspa_effect/caps/ToneControls.cc
Normal file
73
plugins/ladspa_effect/caps/ToneControls.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
ToneControls.cc
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
4-way Eq for amplifier emulation 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
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Amp.h"
|
||||
|
||||
PreampBand
|
||||
ToneControls::bands[] =
|
||||
{
|
||||
/* f, Q, g */
|
||||
{ 80, 1.20, 1.61},
|
||||
{ 300, 1.10, 1.10},
|
||||
{1200, 1.14, 1.07},
|
||||
{4800, .80, 1.06}
|
||||
};
|
||||
|
||||
void
|
||||
ToneControls::init (double fs)
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
eq.init_band (i, 2 * bands[i].center * M_PI / fs, bands[i].Q);
|
||||
}
|
||||
|
||||
double
|
||||
ToneControls::get_band_gain (int i, double g)
|
||||
{
|
||||
return bands[i].adjust * DSP::db2lin (g);
|
||||
}
|
||||
|
||||
void
|
||||
ToneControls::set_band_gain (int i, float g)
|
||||
{
|
||||
/* sorry, _ != . but hardly readable -- the difference is between local
|
||||
* buffered value and actual Eq band gain */
|
||||
eq_gain[i] = g;
|
||||
eq.gain[i] = get_band_gain (i, g);
|
||||
}
|
||||
|
||||
void
|
||||
ToneControls::activate (d_sample ** ports)
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
set_band_gain (i, *ports[i]);
|
||||
|
||||
eq.reset();
|
||||
}
|
||||
|
||||
|
||||
252
plugins/ladspa_effect/caps/VCO.cc
Normal file
252
plugins/ladspa_effect/caps/VCO.cc
Normal file
@@ -0,0 +1,252 @@
|
||||
/*
|
||||
VCO.cc
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
an oversampled triangle/saw/square oscillator, and a combination of two
|
||||
such oscillators with hard sync.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "VCO.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
void
|
||||
VCOs::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
|
||||
/* going a fair bit lower than nominal with fc because the filter
|
||||
* rolloff is not as steep as we might like it to be. */
|
||||
double f = .5 * M_PI / OVERSAMPLE;
|
||||
|
||||
/* construct the downsampler filter kernel */
|
||||
DSP::sinc (f, down.c, FIR_SIZE);
|
||||
DSP::kaiser<DSP::apply_window> (down.c, FIR_SIZE, 6.4);
|
||||
|
||||
/* normalize downsampler filter gain */
|
||||
double s = 0;
|
||||
for (int i = 0; i < down.n; ++i)
|
||||
s += down.c[i];
|
||||
|
||||
/* scale downsampler kernel */
|
||||
s = 1 / s;
|
||||
for (int i = 0; i < down.n; ++i)
|
||||
down.c[i] *= s;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
VCOs::one_cycle (int frames)
|
||||
{
|
||||
vco.set_f (*ports[0], OVERSAMPLE * fs);
|
||||
vco.set_saw_square (*ports[1], *ports[2]);
|
||||
|
||||
double g = (gain == *ports[3]) ?
|
||||
1 : pow (*ports[3] / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[4];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
F (d, i, gain * down.process (vco.get()), adding_gain);
|
||||
|
||||
for (int o = 1; o < OVERSAMPLE; ++o)
|
||||
down.store (vco.get());
|
||||
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[3];
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
VCOs::port_info [] =
|
||||
{
|
||||
{
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | DEFAULT_440, 0, .1}
|
||||
}, {
|
||||
"tri .. saw",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"~ .. square",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"volume",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, MIN_GAIN, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"latency",
|
||||
OUTPUT | CONTROL,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<VCOs>::setup()
|
||||
{
|
||||
UniqueID = 1783;
|
||||
Label = "VCOs";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: VCOs - Virtual 'analogue' oscillator";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
void
|
||||
VCOd::init (double _fs)
|
||||
{
|
||||
fs = _fs;
|
||||
|
||||
/* going a fair bit lower than nominal with fc because the filter
|
||||
* rolloff is not as steep as we might like it to be. */
|
||||
double f = .5 * M_PI / OVERSAMPLE;
|
||||
|
||||
/* construct the downsampler filter kernel */
|
||||
DSP::sinc (f, down.c, FIR_SIZE);
|
||||
DSP::kaiser<DSP::apply_window> (down.c, FIR_SIZE, 6.4);
|
||||
|
||||
/* normalize downsampler filter gain */
|
||||
double s = 0;
|
||||
for (int i = 0; i < down.n; ++i)
|
||||
s += down.c[i];
|
||||
|
||||
/* scale downsampler kernel */
|
||||
s = 1 / s;
|
||||
for (int i = 0; i < down.n; ++i)
|
||||
down.c[i] *= s;
|
||||
}
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
VCOd::one_cycle (int frames)
|
||||
{
|
||||
vco.set_f (*ports[0], OVERSAMPLE * fs, *ports[5]);
|
||||
|
||||
vco.vco[0].set_saw_square (*ports[1], *ports[2]);
|
||||
vco.vco[1].set_saw_square (*ports[3], *ports[4]);
|
||||
|
||||
vco.set_sync (*ports[6]);
|
||||
vco.set_blend (*ports[7]);
|
||||
|
||||
double g = (gain == *ports[8]) ?
|
||||
1 : pow (*ports[8] / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[9];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
F (d, i, gain * down.process (vco.get()), adding_gain);
|
||||
|
||||
for (int o = 1; o < OVERSAMPLE; ++o)
|
||||
down.store (vco.get());
|
||||
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[8];
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
VCOd::port_info [] =
|
||||
{
|
||||
{
|
||||
"f",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | FS | DEFAULT_440, 0, .1}
|
||||
}, {
|
||||
"1: tri .. saw",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"1: ~ .. square",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"2: tri .. saw",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"2: ~ .. square",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"2: tune",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, -12, 12}
|
||||
}, {
|
||||
"sync",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_0, 0, 1}
|
||||
}, {
|
||||
"blend",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_HIGH, -1, 1}
|
||||
}, {
|
||||
"volume",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, MIN_GAIN, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}, {
|
||||
"latency",
|
||||
OUTPUT | CONTROL,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<VCOd>::setup()
|
||||
{
|
||||
UniqueID = 1784;
|
||||
Label = "VCOd";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: VCOd - Double VCO with detune and hard sync options";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
145
plugins/ladspa_effect/caps/VCO.h
Normal file
145
plugins/ladspa_effect/caps/VCO.h
Normal file
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
VCO.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
an oversampled triangle/saw/square oscillator, and a combination of two
|
||||
such oscillators with hard sync.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _VCO_H_
|
||||
#define _VCO_H_
|
||||
|
||||
#include "dsp/util.h"
|
||||
#include "dsp/VCO.h"
|
||||
|
||||
#include "dsp/FIR.h"
|
||||
#include "dsp/sinc.h"
|
||||
#include "dsp/windows.h"
|
||||
|
||||
class VCOs
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample f, gain;
|
||||
|
||||
/* ok to just change these as you please, 4/32 works ok, sortof. */
|
||||
enum {
|
||||
OVERSAMPLE = 8,
|
||||
FIR_SIZE = 64,
|
||||
};
|
||||
|
||||
DSP::TriSawSquare vco;
|
||||
|
||||
/* downsampling filter */
|
||||
DSP::FIR down;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [6];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
VCOs()
|
||||
: down (FIR_SIZE)
|
||||
{ }
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{
|
||||
gain = *ports[3];
|
||||
down.reset();
|
||||
vco.reset();
|
||||
/* latency */
|
||||
*ports[5] = OVERSAMPLE;
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
class VCOd
|
||||
{
|
||||
public:
|
||||
double fs;
|
||||
d_sample f, gain;
|
||||
|
||||
/* ok to just change these as you please, 4/32 works ok, sortof. */
|
||||
enum {
|
||||
OVERSAMPLE = 8,
|
||||
FIR_SIZE = 64,
|
||||
};
|
||||
|
||||
DSP::VCO2 vco;
|
||||
|
||||
/* downsampling filter */
|
||||
DSP::FIR down;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info[];
|
||||
d_sample * ports [11];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
VCOd()
|
||||
: down (FIR_SIZE)
|
||||
{ }
|
||||
|
||||
void init (double _fs);
|
||||
|
||||
void activate()
|
||||
{
|
||||
gain = *ports[8];
|
||||
down.reset();
|
||||
vco.reset();
|
||||
/* latency */
|
||||
*ports[10] = OVERSAMPLE;
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _VCO_H_ */
|
||||
81
plugins/ladspa_effect/caps/White.cc
Normal file
81
plugins/ladspa_effect/caps/White.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
White.cc
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
white noise 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
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "White.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
template <sample_func_t F>
|
||||
void
|
||||
White::one_cycle (int frames)
|
||||
{
|
||||
double g = (gain == *ports[0]) ?
|
||||
1 : pow (*ports[0] / gain, 1. / (double) frames);
|
||||
|
||||
d_sample * d = ports[1];
|
||||
|
||||
for (int i = 0; i < frames; ++i)
|
||||
{
|
||||
F (d, i, gain * white.get(), adding_gain);
|
||||
gain *= g;
|
||||
}
|
||||
|
||||
gain = *ports[0];
|
||||
}
|
||||
|
||||
/* //////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
PortInfo
|
||||
White::port_info [] =
|
||||
{
|
||||
{
|
||||
"volume",
|
||||
INPUT | CONTROL,
|
||||
{BOUNDED | DEFAULT_MID, MIN_GAIN, 1}
|
||||
}, {
|
||||
"out",
|
||||
OUTPUT | AUDIO,
|
||||
{0}
|
||||
}
|
||||
};
|
||||
|
||||
template <> void
|
||||
Descriptor<White>::setup()
|
||||
{
|
||||
UniqueID = 1785;
|
||||
Label = "White";
|
||||
Properties = HARD_RT;
|
||||
|
||||
Name = "CAPS: White - White noise generator";
|
||||
Maker = "Tim Goetze <tim@quitte.de>";
|
||||
Copyright = "GPL, 2004-5";
|
||||
|
||||
/* fill port info and vtable */
|
||||
autogen();
|
||||
}
|
||||
|
||||
68
plugins/ladspa_effect/caps/White.h
Normal file
68
plugins/ladspa_effect/caps/White.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
White.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
white 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
|
||||
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 _WHITE_H_
|
||||
#define _WHITE_H_
|
||||
|
||||
#include "dsp/White.h"
|
||||
|
||||
class White
|
||||
{
|
||||
public:
|
||||
d_sample gain;
|
||||
|
||||
DSP::White white;
|
||||
|
||||
template <sample_func_t F>
|
||||
void one_cycle (int frames);
|
||||
|
||||
public:
|
||||
static PortInfo port_info [];
|
||||
d_sample * ports [2];
|
||||
|
||||
d_sample adding_gain;
|
||||
|
||||
void init (double _fs)
|
||||
{ }
|
||||
|
||||
void activate()
|
||||
{
|
||||
gain = .5;
|
||||
}
|
||||
|
||||
void run (int n)
|
||||
{
|
||||
one_cycle<store_func> (n);
|
||||
}
|
||||
|
||||
void run_adding (int n)
|
||||
{
|
||||
one_cycle<adding_func> (n);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _WHITE_H_ */
|
||||
135
plugins/ladspa_effect/caps/basics.h
Normal file
135
plugins/ladspa_effect/caps/basics.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
basics.h
|
||||
|
||||
Copyright 2004-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
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
|
||||
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 _BASICS_H_
|
||||
#define _BASICS_H_
|
||||
|
||||
#define _GNU_SOURCE 1
|
||||
#define _USE_GNU 1
|
||||
|
||||
/* gcc protects a lot of standard math calls. */
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define _ISOC9X_SOURCE 1
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ladspa.h"
|
||||
|
||||
#define BOUNDED (LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE)
|
||||
#define INTEGER LADSPA_HINT_INTEGER
|
||||
#define FS LADSPA_HINT_SAMPLE_RATE
|
||||
#define 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
|
||||
|
||||
#define TEN_TO_THE_SIXTH 1000000
|
||||
|
||||
#define MIN_GAIN .000001 /* -120 dB */
|
||||
#define NOISE_FLOOR .00000000000005 /* -266 dB */
|
||||
|
||||
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 {
|
||||
char * name;
|
||||
LADSPA_PortDescriptor descriptor;
|
||||
LADSPA_PortRangeHint range;
|
||||
} PortInfo;
|
||||
|
||||
typedef LADSPA_Data d_sample;
|
||||
typedef double d_float;
|
||||
typedef unsigned long ulong;
|
||||
|
||||
/* flavours for sample store functions run() and run_adding() */
|
||||
typedef void (*sample_func_t) (d_sample *, int, d_sample, d_sample);
|
||||
|
||||
inline void
|
||||
store_func (d_sample * s, int i, d_sample x, d_sample gain)
|
||||
{
|
||||
s[i] = x;
|
||||
}
|
||||
|
||||
inline void
|
||||
adding_func (d_sample * s, int i, d_sample x, d_sample gain)
|
||||
{
|
||||
s[i] += gain * x;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#endif /* ! max */
|
||||
|
||||
static inline float
|
||||
frandom()
|
||||
{
|
||||
return (float) random() / (float) RAND_MAX;
|
||||
}
|
||||
|
||||
#endif /* _BASICS_H_ */
|
||||
520
plugins/ladspa_effect/caps/click.h
Normal file
520
plugins/ladspa_effect/caps/click.h
Normal file
@@ -0,0 +1,520 @@
|
||||
float click [] = {
|
||||
-0.013062, -0.013062, -0.012817, -0.011078, -0.031097, -0.266479,
|
||||
-0.610718, -0.255005, 0.698975, 0.999969, 0.505188, -0.724579,
|
||||
-1.000000, -0.493225, 0.532135, 0.789459, 0.131744, -0.270599,
|
||||
-0.080780, -0.065796, 0.584381, 0.718567, -0.355316, -0.760559,
|
||||
-0.649994, -0.039032, 0.442017, 0.700043, 0.434845, -0.556427,
|
||||
-1.000000, -0.400391, 0.590729, 0.999969, 0.999969, 0.592896,
|
||||
-0.248932, -0.662750, -0.074615, 0.424774, 0.274933, -0.416504,
|
||||
-0.772736, -0.359833, -0.218140, -0.254456, -0.379547, -0.768280,
|
||||
-0.707428, 0.108124, 0.755127, 0.680847, 0.429352, 0.126129,
|
||||
-0.424316, -0.451813, 0.197510, 0.862762, 0.964508, 0.263824,
|
||||
-0.383057, -0.753571, -0.848297, -0.491425, -0.042114, -0.222504,
|
||||
-0.664490, -0.690155, -0.227905, 0.286682, 0.742981, 0.812225,
|
||||
0.326691, 0.182770, 0.381195, 0.536194, 0.446930, 0.085754,
|
||||
-0.650604, -1.000000, -1.000000, -0.774658, -0.152191, -0.112122,
|
||||
-0.416290, -0.491547, -0.253235, 0.241760, 0.749847, 0.618042,
|
||||
0.338440, 0.431335, 0.773712, 0.936890, 0.752563, 0.291595,
|
||||
-0.206970, -0.552460, -0.447449, -0.152069, -0.315735, -0.891846,
|
||||
-1.000000, -1.000000, -0.682281, 0.066925, 0.477264, 0.447144,
|
||||
0.209167, 0.149994, 0.374176, 0.621185, 0.597046, 0.315826,
|
||||
0.034210, -0.004089, 0.084534, 0.127075, 0.060608, -0.134949,
|
||||
-0.275421, -0.347870, -0.505371, -0.618835, -0.443878, -0.217682,
|
||||
-0.157898, -0.241058, -0.424103, -0.494690, -0.286438, 0.111542,
|
||||
0.487793, 0.654907, 0.571869, 0.484650, 0.413208, 0.254089,
|
||||
0.136414, 0.021118, -0.223724, -0.366364, -0.290771, -0.126251,
|
||||
-0.080048, -0.175262, -0.290100, -0.281403, -0.071808, 0.078613,
|
||||
0.216339, 0.275787, 0.223938, 0.178131, 0.162659, 0.110779,
|
||||
0.104553, 0.158661, 0.208252, 0.271484, 0.256531, 0.153046,
|
||||
0.068054, -0.009003, -0.116119, -0.155304, -0.099213, 0.066589,
|
||||
0.293732, 0.392303, 0.313416, 0.196320, 0.123932, 0.145874,
|
||||
0.279053, 0.291016, 0.081818, -0.092133, -0.090363, 0.030029,
|
||||
0.099762, -0.021912, -0.133942, -0.025299, 0.257782, 0.466980,
|
||||
0.406006, 0.150085, -0.007385, -0.027588, 0.048920, 0.128998,
|
||||
0.058868, -0.066589, -0.146759, -0.168427, -0.119751, -0.087677,
|
||||
-0.082581, -0.029694, -0.041138, -0.139984, -0.156036, -0.033325,
|
||||
0.164612, 0.331726, 0.320435, 0.205811, 0.209717, 0.275909,
|
||||
0.240479, 0.081238, -0.104828, -0.239624, -0.286652, -0.254120,
|
||||
-0.304688, -0.428223, -0.479248, -0.534729, -0.453003, -0.144928,
|
||||
-0.001709, 0.059448, 0.016937, -0.127991, -0.186432, -0.122986,
|
||||
0.086090, 0.278351, 0.258026, 0.172882, -0.032043, -0.267242,
|
||||
-0.289276, -0.293365, -0.288971, -0.256073, -0.212250, -0.214783,
|
||||
-0.182709, -0.149170, -0.132599, -0.221649, -0.233063, 0.002472,
|
||||
0.208008, 0.119659, -0.018250, -0.182861, -0.267731, -0.164001,
|
||||
-0.052063, 0.009979, 0.058472, 0.147156, 0.111298, 0.017426,
|
||||
-0.067780, -0.049835, 0.002167, -0.028259, 0.003418, 0.023743,
|
||||
-0.056702, -0.074066, -0.070984, -0.075439, -0.056915, -0.189575,
|
||||
-0.324524, -0.241882, -0.051514, 0.075623, 0.160095, 0.094238,
|
||||
0.004425, 0.010193, 0.032898, 0.040222, 0.163605, 0.273682,
|
||||
0.192261, -0.019989, -0.217682, -0.327728, -0.337372, -0.227386,
|
||||
-0.043945, 0.107788, 0.244690, 0.226227, -0.034332, -0.252106,
|
||||
-0.364136, -0.377136, -0.246277, -0.021973, 0.194763, 0.300110,
|
||||
0.295532, 0.246246, 0.198425, 0.209991, 0.272064, 0.249451,
|
||||
0.078094, -0.143616, -0.276459, -0.257782, -0.228638, -0.161224,
|
||||
-0.006012, 0.169342, 0.267456, 0.246094, 0.232147, 0.290436,
|
||||
0.280670, 0.220886, 0.162811, 0.187286, 0.178223, 0.036804,
|
||||
-0.043304, -0.098694, -0.101990, 0.008698, 0.102844, 0.132050,
|
||||
0.142578, 0.152924, 0.058960, -0.074615, -0.079041, 0.026123,
|
||||
0.136322, 0.253510, 0.382782, 0.447357, 0.419800, 0.294952,
|
||||
0.129059, 0.004028, -0.119781, -0.257538, -0.320526, -0.211609,
|
||||
-0.054565, 0.012085, -0.016663, 0.006592, 0.144958, 0.193237,
|
||||
0.072174, -0.018951, 0.038483, 0.085175, -0.023407, -0.089661,
|
||||
-0.029999, -0.023956, -0.079498, -0.135223, -0.154205, -0.095276,
|
||||
-0.031830, -0.105988, -0.252563, -0.284424, -0.153198, 0.017273,
|
||||
0.073456, 0.072571, 0.175751, 0.222260, 0.105316, -0.053345,
|
||||
-0.180115, -0.192932, -0.185211, -0.167511, -0.079529, -0.070007,
|
||||
-0.151276, -0.215210, -0.206390, -0.133820, -0.099060, -0.082855,
|
||||
0.047852, 0.108429, 0.014099, -0.049377, -0.050751, -0.081207,
|
||||
-0.060944, -0.028564, -0.124420, -0.139526, -0.033508, 0.054108,
|
||||
0.042664, -0.004669, -0.069611, -0.105774, -0.090881, -0.128601,
|
||||
-0.090027, -0.012634, 0.004578, 0.046387, 0.085144, 0.055511,
|
||||
0.036469, 0.001770, -0.019867, 0.016998, 0.031891, 0.089935,
|
||||
0.066254, -0.069183, -0.020081, 0.046356, 0.005554, -0.023224,
|
||||
-0.042847, -0.133057, -0.104004, 0.065674, 0.146484, 0.145782,
|
||||
0.006897, -0.059509, 0.070923, 0.058319, -0.002655, 0.000641,
|
||||
-0.036011, 0.049988, 0.076752, 0.016998, 0.063049, 0.105835,
|
||||
0.041870, -0.092072, -0.154358, -0.081879, 0.089905, 0.090820,
|
||||
0.054047, -0.110565, -0.285980, -0.219116, -0.103058, 0.083405,
|
||||
0.192200, 0.124146, 0.080994, 0.118896, 0.231659, 0.259644,
|
||||
0.175018, 0.110840, 0.005096, -0.156128, -0.202209, -0.167572,
|
||||
-0.145050, -0.126068, -0.139221, -0.039856, 0.078674, 0.062866,
|
||||
-0.069672, -0.143311, -0.049530, 0.082611, 0.142487, 0.039612,
|
||||
-0.035736, -0.006287, 0.017181, 0.013580, -0.019043, -0.017303,
|
||||
0.007904, -0.073944, -0.121704, -0.065369, -0.098083, -0.063568,
|
||||
0.056885, 0.083984, 0.148987, 0.298431, 0.253815, 0.052643,
|
||||
-0.139740, -0.217743, -0.073181, 0.097351, 0.124786, 0.091156,
|
||||
0.056152, -0.007446, 0.048553, 0.129333, 0.021118, -0.003235,
|
||||
0.093872, 0.080658, 0.025482, -0.037598, -0.055481, -0.078796,
|
||||
-0.130676, -0.140930, -0.126770, -0.048004, 0.026093, 0.035767,
|
||||
0.049957, 0.009247, -0.076599, -0.066101, 0.002747, 0.076813,
|
||||
0.173492, 0.091949, -0.071960, -0.080902, -0.061157, -0.061066,
|
||||
-0.073029, -0.070251, -0.008545, 0.035187, -0.036194, -0.086456,
|
||||
-0.158691, -0.199036, -0.150177, -0.099030, -0.027802, -0.001465,
|
||||
0.003662, 0.089020, 0.056122, -0.108551, -0.125610, -0.056610,
|
||||
-0.053284, -0.128998, -0.166504, -0.124725, -0.095459, -0.088531,
|
||||
-0.087433, -0.065399, -0.084045, -0.053284, -0.006317, -0.008698,
|
||||
0.025879, -0.019714, -0.055511, -0.076874, -0.084442, -0.111450,
|
||||
-0.097198, -0.040924, -0.047729, 0.025604, 0.077301, 0.027100,
|
||||
-0.052612, -0.046265, 0.021271, 0.022186, -0.060669, -0.109283,
|
||||
-0.022858, 0.126740, 0.199036, 0.255798, 0.210114, 0.167450,
|
||||
0.034515, -0.140167, -0.106354, -0.056549, -0.016449, 0.092529,
|
||||
0.082977, 0.035645, 0.066132, 0.113098, 0.123657, 0.150513,
|
||||
0.123840, 0.125702, 0.146637, 0.131683, 0.114014, 0.019806,
|
||||
0.017670, 0.017914, -0.029480, 0.074280, 0.118622, 0.049805,
|
||||
0.057922, 0.033569, 0.028870, 0.095551, 0.030121, -0.080963,
|
||||
-0.042938, 0.091400, 0.075287, 0.011597, -0.023834, -0.035278,
|
||||
-0.009552, -0.030884, -0.058044, -0.038818, 0.016785, 0.037354,
|
||||
-0.004852, -0.048157, -0.051849, 0.014618, 0.067535, 0.060547,
|
||||
0.029022, -0.019257, -0.078705, -0.057495, 0.056549, -0.016022,
|
||||
-0.145416, -0.142548, -0.124207, -0.015961, 0.118011, 0.059906,
|
||||
-0.050842, -0.037537, -0.042084, -0.060059, -0.034454, -0.011414,
|
||||
0.040009, 0.084778, 0.039246, -0.029663, -0.059631, -0.023285,
|
||||
0.033173, 0.044617, -0.023254, -0.044983, -0.039337, -0.037506,
|
||||
0.024750, 0.034637, -0.024902, -0.007019, -0.006195, 0.021271,
|
||||
0.067657, 0.043182, 0.004089, -0.043091, -0.077576, -0.118225,
|
||||
-0.100006, -0.084015, -0.117065, -0.140533, -0.091675, 0.001709,
|
||||
0.019196, -0.053619, -0.090454, -0.007599, 0.064209, 0.048920,
|
||||
-0.077576, -0.158813, 0.000214, 0.086823, 0.027100, 0.065979,
|
||||
0.028351, -0.032745, -0.089844, -0.026672, 0.033234, -0.002045,
|
||||
-0.068665, -0.114441, -0.152344, -0.166840, -0.129181, -0.077667,
|
||||
-0.001678, 0.082428, 0.123138, 0.048737, -0.080750, -0.094452,
|
||||
-0.066895, -0.061401, -0.009613, -0.021729, 0.015442, 0.051270,
|
||||
-0.017273, -0.013519, 0.007172, -0.065338, -0.133209, -0.104095,
|
||||
-0.069153, -0.047638, -0.011871, -0.043182, -0.056427, 0.028900,
|
||||
0.031128, -0.004974, -0.057983, -0.129303, -0.086914, -0.039917,
|
||||
-0.016266, 0.033936, 0.017426, 0.021576, 0.037964, -0.003693,
|
||||
-0.009979, 0.064392, 0.022491, -0.075836, -0.030457, 0.040741,
|
||||
0.075745, 0.076447, 0.034851, -0.042816, -0.058960, -0.049591,
|
||||
-0.033905, -0.005127, -0.015778, -0.011963, 0.043091, 0.093231,
|
||||
0.070007, 0.060211, 0.045074, 0.039642, 0.041260, 0.015594,
|
||||
0.016663, 0.032867, 0.031250, 0.009583, -0.011230, 0.009247,
|
||||
0.050415, 0.087524, 0.040375, -0.017792, -0.023621, -0.033478,
|
||||
0.012543, 0.010864, 0.016724, 0.047638, 0.089905, 0.132141,
|
||||
0.089111, 0.045471, -0.019409, -0.041229, 0.011597, -0.053101,
|
||||
-0.105194, -0.104187, -0.087799, -0.061951, -0.055634, 0.003082,
|
||||
0.064270, 0.062744, 0.022552, 0.045837, 0.096985, 0.080139,
|
||||
0.028015, -0.003204, -0.035553, -0.006714, 0.071960, 0.052155,
|
||||
-0.085815, -0.133209, -0.086212, -0.063507, -0.040466, -0.048065,
|
||||
-0.071106, -0.006256, 0.013641, 0.026611, 0.101166, 0.072357,
|
||||
0.070557, 0.060333, -0.004028, -0.012787, -0.003387, 0.000793,
|
||||
-0.042328, -0.083740, -0.114532, -0.106598, 0.000183, 0.052155,
|
||||
-0.011536, -0.042480, 0.040649, 0.096161, 0.074463, 0.033417,
|
||||
-0.013824, 0.006500, 0.001068, 0.052094, 0.065125, 0.027496,
|
||||
-0.009613, -0.042542, -0.053436, -0.047607, -0.063080, -0.003693,
|
||||
0.001129, -0.113068, -0.136444, -0.046387, 0.056641, 0.095581,
|
||||
0.071533, 0.006836, 0.015869, 0.094147, 0.035950, -0.057190,
|
||||
0.013245, 0.040802, 0.020050, -0.008636, -0.041199, -0.051025,
|
||||
-0.049683, -0.065826, -0.073303, -0.081909, -0.105347, -0.019348,
|
||||
0.024902, 0.007904, 0.010712, -0.030792, -0.059875, -0.052521,
|
||||
-0.065125, -0.029419, 0.076965, 0.043243, 0.022247, 0.019684,
|
||||
-0.016968, 0.026611, 0.010071, -0.047852, -0.037903, -0.015839,
|
||||
-0.032013, -0.055054, -0.145294, -0.203003, -0.141785, -0.069946,
|
||||
-0.011261, 0.027435, -0.020538, -0.047455, -0.046051, -0.035400,
|
||||
-0.006287, 0.014496, 0.004425, 0.001251, 0.003479, 0.023132,
|
||||
0.102905, 0.105377, 0.013947, -0.088074, -0.138519, -0.089172,
|
||||
0.021210, 0.031830, -0.057739, -0.066895, -0.024292, 0.001801,
|
||||
-0.027924, -0.053284, -0.022003, 0.012726, 0.011047, -0.005920,
|
||||
-0.033295, -0.049042, -0.025055, 0.031738, 0.031097, 0.004059,
|
||||
0.008698, 0.054688, 0.046570, -0.022980, -0.080597, -0.092163,
|
||||
-0.052277, -0.003967, -0.026337, -0.039886, 0.025238, 0.037323,
|
||||
0.005829, -0.014282, 0.028442, 0.057098, 0.003662, -0.038483,
|
||||
-0.050537, -0.017151, 0.031555, -0.025391, -0.038452, -0.011871,
|
||||
-0.042664, 0.015411, 0.065277, 0.015594, -0.015778, -0.036652,
|
||||
-0.097076, -0.057983, 0.001434, 0.002991, -0.016724, -0.071564,
|
||||
-0.036926, 0.038452, 0.049683, 0.071075, 0.066925, 0.007935,
|
||||
-0.028351, -0.003754, 0.020569, -0.008881, -0.016998, -0.024841,
|
||||
-0.031677, 0.005615, 0.019470, -0.028290, -0.035645, -0.012756,
|
||||
-0.014191, -0.027496, -0.002411, -0.018066, 0.012177, 0.103668,
|
||||
0.134277, 0.056885, 0.027893, -0.002533, -0.008148, 0.018707,
|
||||
-0.005615, 0.004822, 0.055634, 0.054718, 0.003296, -0.046875,
|
||||
-0.058838, -0.034149, 0.031616, 0.020233, -0.014771, -0.005981,
|
||||
0.025391, 0.043091, 0.010376, 0.006866, 0.037842, 0.053589,
|
||||
0.037567, 0.042938, 0.063629, -0.000092, -0.056000, -0.045074,
|
||||
-0.034454, -0.006531, 0.004303, -0.034882, -0.026886, 0.056580,
|
||||
0.066437, 0.025757, 0.036255, 0.066376, 0.017395, -0.030701,
|
||||
-0.042419, -0.049744, -0.013733, 0.006653, -0.036713, -0.045166,
|
||||
-0.008270, 0.011841, 0.049622, 0.086792, 0.052460, 0.037872,
|
||||
-0.009338, -0.074890, -0.007385, 0.029053, 0.002991, -0.001862,
|
||||
-0.055817, -0.109833, -0.082581, -0.018097, -0.005829, -0.006561,
|
||||
-0.038422, -0.026855, 0.067139, 0.051575, -0.023956, 0.005768,
|
||||
0.032318, -0.009094, -0.031799, -0.019714, -0.075714, -0.137512,
|
||||
-0.110962, -0.081360, -0.014679, -0.015259, -0.067322, -0.077271,
|
||||
-0.073303, -0.035583, 0.033325, 0.059540, 0.034912, 0.015411,
|
||||
-0.013214, -0.019135, -0.013306, -0.024170, -0.043640, -0.067596,
|
||||
-0.077026, -0.050446, -0.039398, -0.074158, -0.079590, -0.077148,
|
||||
-0.119843, -0.070496, 0.023834, 0.030396, -0.002869, -0.011810,
|
||||
-0.001465, 0.025299, 0.031250, 0.045990, 0.034027, -0.058624,
|
||||
-0.070892, -0.031067, -0.025360, -0.042572, -0.063507, -0.054352,
|
||||
-0.028412, -0.001923, -0.037018, -0.048157, -0.007141, -0.003357,
|
||||
0.013916, 0.035767, 0.035034, 0.038391, 0.011749, -0.011780,
|
||||
-0.033905, -0.065521, -0.075470, -0.065491, -0.065125, -0.079376,
|
||||
-0.044281, -0.014130, -0.000458, 0.024017, 0.021973, -0.004120,
|
||||
0.026245, 0.043976, -0.009155, -0.035187, -0.030853, -0.042633,
|
||||
0.002563, 0.055603, 0.021820, -0.057800, -0.074646, -0.015411,
|
||||
0.045898, 0.007233, -0.055756, -0.016113, 0.035370, 0.023315,
|
||||
-0.017120, -0.024292, 0.004974, 0.041718, 0.045227, -0.000793,
|
||||
0.025970, 0.086670, 0.042450, -0.023834, -0.054077, -0.036926,
|
||||
0.028320, 0.006622, 0.005341, 0.059265, 0.049164, 0.011841,
|
||||
0.019470, 0.004242, -0.035248, -0.009949, 0.027069, 0.029419,
|
||||
0.042816, 0.043671, 0.012878, 0.023865, 0.027802, -0.000854,
|
||||
0.006348, 0.039337, 0.040802, -0.013275, -0.055634, -0.029480,
|
||||
-0.013092, -0.033936, -0.040649, -0.001404, 0.038910, 0.046722,
|
||||
0.033447, -0.020294, -0.040283, -0.014923, -0.003143, -0.001312,
|
||||
0.005493, 0.002899, 0.037140, 0.062469, 0.038696, 0.002747,
|
||||
-0.012482, -0.009827, -0.004486, -0.011780, -0.018097, -0.014862,
|
||||
-0.008057, -0.056702, -0.049561, 0.025269, 0.046844, 0.003296,
|
||||
0.014130, 0.043182, 0.018280, 0.007294, 0.008270, -0.004517,
|
||||
-0.014679, -0.026764, -0.019745, -0.041779, -0.027863, 0.028412,
|
||||
0.033722, 0.020264, 0.004913, -0.004578, -0.007935, -0.006226,
|
||||
-0.005737, -0.032074, -0.040955, -0.010468, -0.040863, -0.031433,
|
||||
-0.004547, -0.032654, -0.038239, 0.027496, 0.010681, -0.000702,
|
||||
0.020782, -0.010376, -0.005768, 0.013733, -0.007324, -0.027466,
|
||||
-0.018005, -0.033600, -0.028778, -0.036316, -0.073090, -0.050781,
|
||||
-0.029938, -0.037567, -0.035828, -0.036163, -0.035828, -0.005249,
|
||||
-0.005646, -0.002289, 0.011078, -0.014038, -0.035309, 0.000061,
|
||||
0.010101, -0.028961, -0.035950, -0.053802, -0.066620, -0.048981,
|
||||
-0.030823, -0.034515, 0.008972, 0.030731, -0.021942, -0.069214,
|
||||
-0.046722, -0.000854, 0.028656, -0.000580, -0.027313, -0.026886,
|
||||
-0.060364, -0.051880, -0.022766, -0.019531, -0.016418, -0.047089,
|
||||
-0.072510, -0.054871, -0.046570, -0.053772, -0.021820, 0.003204,
|
||||
0.010406, 0.000793, -0.037170, -0.023926, 0.025269, 0.054657,
|
||||
0.057159, 0.007996, -0.063232, -0.097137, -0.066803, -0.021606,
|
||||
-0.015015, -0.037842, -0.045776, -0.054840, -0.068481, -0.033081,
|
||||
0.026459, 0.048157, 0.017700, -0.011230, -0.020599, -0.040405,
|
||||
0.001526, 0.048492, 0.023407, -0.011658, 0.004059, 0.006165,
|
||||
-0.013245, 0.008118, 0.049591, 0.050262, 0.008606, -0.029175,
|
||||
-0.039368, 0.003937, 0.027863, -0.005646, -0.046082, -0.043152,
|
||||
-0.002838, 0.018341, 0.006012, -0.001282, 0.015137, 0.004425,
|
||||
-0.018524, -0.001343, 0.009308, 0.002350, -0.013306, -0.014832,
|
||||
-0.008759, 0.000671, 0.023254, 0.035645, 0.005646, -0.028717,
|
||||
-0.028931, -0.008484, -0.019043, -0.019928, 0.006042, 0.016083,
|
||||
0.023682, 0.034363, 0.020844, 0.016235, 0.008636, 0.003601,
|
||||
0.018646, 0.029480, 0.034088, 0.016327, 0.004761, -0.029022,
|
||||
-0.027893, -0.006836, -0.015350, -0.021820, -0.018250, -0.008026,
|
||||
-0.001343, 0.004669, -0.015900, -0.004303, 0.032898, 0.041046,
|
||||
0.023132, 0.020844, 0.032196, 0.020355, -0.002716, 0.003662,
|
||||
0.031433, 0.043213, 0.043304, -0.007507, -0.015747, 0.000916,
|
||||
-0.009094, 0.004852, 0.004272, 0.007507, 0.021088, 0.024017,
|
||||
0.010254, 0.023987, 0.035431, 0.006561, -0.015869, -0.004791,
|
||||
0.013885, 0.019440, -0.015106, -0.038666, -0.028625, -0.036438,
|
||||
-0.051361, -0.020905, -0.019531, -0.038666, -0.015747, -0.001587,
|
||||
0.006317, 0.024994, 0.022797, 0.012726, -0.004822, 0.001404,
|
||||
-0.006042, 0.000732, 0.008118, -0.024506, -0.045654, -0.037537,
|
||||
-0.024933, -0.026733, -0.038605, -0.051971, -0.050171, -0.031372,
|
||||
-0.041199, -0.012268, -0.006500, -0.038208, -0.053650, -0.021118,
|
||||
0.007324, 0.006561, -0.026459, -0.052338, -0.015717, -0.015106,
|
||||
-0.037018, -0.037720, -0.047852, -0.032562, -0.014557, -0.059265,
|
||||
-0.101318, -0.091644, -0.050659, -0.037628, -0.000763, 0.016144,
|
||||
-0.018799, -0.022827, -0.005707, -0.010712, -0.012054, -0.007019,
|
||||
-0.008881, -0.000702, -0.000427, -0.015594, -0.030426, -0.015778,
|
||||
-0.019501, -0.064423, -0.072540, -0.041229, -0.012177, -0.007294,
|
||||
-0.034027, -0.059723, -0.034729, -0.007629, 0.003418, -0.007751,
|
||||
-0.032043, -0.034149, -0.024170, 0.007233, 0.023834, 0.008575,
|
||||
0.004669, -0.008148, -0.037811, -0.033783, 0.007996, 0.016602,
|
||||
0.014038, 0.012238, -0.009979, -0.028748, -0.014862, 0.013000,
|
||||
0.000977, -0.049530, -0.061859, -0.022247, 0.006226, 0.009369,
|
||||
-0.029236, -0.031128, 0.006226, 0.009399, -0.006653, 0.001190,
|
||||
-0.011993, -0.000916, 0.011322, -0.002350, 0.004333, 0.004517,
|
||||
-0.014191, -0.012177, 0.010986, 0.011566, -0.000092, -0.010651,
|
||||
-0.014038, -0.005280, -0.000732, -0.007935, -0.017303, -0.019073,
|
||||
-0.009399, 0.007935, 0.015778, 0.019073, 0.004272, -0.012726,
|
||||
0.001434, 0.011963, 0.010162, 0.018555, 0.018036, 0.008789,
|
||||
0.000946, 0.009552, 0.014923, 0.033722, 0.048553, 0.019989,
|
||||
-0.010803, -0.026733, -0.012207, 0.012512, -0.003967, -0.018097,
|
||||
0.002289, 0.032410, 0.036804, 0.025970, 0.013550, 0.008301,
|
||||
0.011108, 0.012421, 0.010101, 0.001404, -0.010956, 0.010498,
|
||||
0.029999, 0.014221, 0.003937, 0.002563, -0.001709, -0.013428,
|
||||
-0.023102, -0.005188, 0.011780, 0.002655, -0.002045, 0.006348,
|
||||
0.005981, -0.011841, -0.016327, -0.004486, -0.004944, -0.030151,
|
||||
-0.029114, -0.023376, -0.024261, -0.009857, 0.008423, 0.016235,
|
||||
0.021606, 0.012054, -0.005432, -0.006744, -0.003937, -0.004974,
|
||||
-0.024506, -0.029541, -0.015839, -0.028381, -0.030823, -0.018036,
|
||||
-0.006104, -0.003998, -0.022858, -0.030975, -0.005798, -0.001709,
|
||||
-0.008850, -0.011780, -0.013031, -0.018921, -0.029480, -0.024689,
|
||||
-0.012909, -0.006104, -0.006042, -0.013763, -0.018188, -0.034576,
|
||||
-0.036713, -0.004517, 0.009583, -0.002106, -0.026093, -0.033875,
|
||||
-0.008575, 0.006226, -0.008148, -0.032654, -0.037842, -0.024811,
|
||||
-0.019714, -0.013062, -0.014771, -0.028992, -0.023376, -0.012695,
|
||||
-0.007690, -0.014343, -0.031708, -0.044586, -0.036865, -0.027985,
|
||||
-0.022552, -0.025208, -0.028168, -0.024933, -0.028717, -0.030212,
|
||||
-0.018066, -0.004547, 0.001282, -0.008148, -0.024200, -0.023834,
|
||||
-0.019623, -0.037048, -0.042877, -0.031952, -0.016998, -0.009338,
|
||||
-0.014893, -0.018280, -0.013550, -0.003418, 0.013306, 0.008606,
|
||||
-0.002991, -0.015350, -0.023102, -0.021118, -0.025269, -0.032654,
|
||||
-0.040375, -0.028992, -0.016357, -0.034027, -0.036011, -0.016022,
|
||||
-0.010284, -0.000793, 0.006805, 0.005096, 0.021973, 0.009796,
|
||||
-0.012207, -0.013489, -0.014648, -0.017120, -0.017578, -0.012329,
|
||||
-0.002472, 0.000397, -0.013031, -0.018890, -0.009338, -0.018280,
|
||||
-0.017670, -0.005920, -0.004944, -0.006073, -0.003479, 0.000610,
|
||||
0.009003, 0.010559, 0.011475, -0.003693, -0.016357, -0.006378,
|
||||
-0.007507, 0.000366, 0.011322, 0.012390, 0.004639, -0.002655,
|
||||
0.003754, 0.027283, 0.016052, -0.008575, -0.005615, 0.004303,
|
||||
0.013550, 0.018677, 0.003662, -0.022858, -0.028168, -0.017975,
|
||||
-0.002197, -0.012360, -0.022736, -0.016144, 0.003784, 0.018951,
|
||||
0.008270, -0.005707, -0.008514, 0.007446, 0.015717, 0.012177,
|
||||
0.011414, 0.010590, 0.013367, 0.008331, 0.002686, -0.003876,
|
||||
-0.009857, -0.024902, -0.021973, -0.014557, -0.012756, -0.001251,
|
||||
0.004303, 0.005402, 0.009460, 0.002960, -0.009003, -0.003784,
|
||||
0.009430, 0.008484, 0.006012, 0.014130, 0.008148, -0.002441,
|
||||
0.000397, 0.002686, -0.000214, -0.014557, -0.026489, -0.014587,
|
||||
-0.009918, -0.006805, -0.001221, -0.004089, -0.003601, -0.006226,
|
||||
-0.020142, -0.023315, -0.005341, 0.012421, 0.008545, -0.002472,
|
||||
-0.000366, 0.000580, -0.020508, -0.033752, -0.029205, 0.000031,
|
||||
0.017365, 0.012390, -0.008514, -0.017181, -0.018311, -0.016663,
|
||||
-0.008301, -0.013519, -0.010376, 0.011841, 0.002930, -0.016510,
|
||||
-0.025116, -0.029968, -0.015289, -0.003082, -0.007355, -0.010590,
|
||||
-0.012451, -0.021759, -0.028351, -0.040375, -0.041840, -0.027374,
|
||||
-0.014343, -0.018005, -0.024628, -0.018188, -0.009644, -0.003723,
|
||||
-0.009644, -0.005341, 0.003204, 0.002045, 0.007629, -0.003815,
|
||||
-0.013062, -0.010193, -0.003540, -0.012268, -0.019501, -0.025330,
|
||||
-0.040314, -0.039520, -0.035187, -0.034180, -0.032257, -0.036285,
|
||||
-0.029572, -0.008575, -0.002045, -0.012787, -0.010559, -0.006317,
|
||||
-0.005371, -0.003693, 0.000519, 0.000854, -0.010101, -0.017090,
|
||||
-0.023499, -0.034790, -0.033569, -0.025818, -0.007507, 0.004913,
|
||||
-0.004089, -0.011780, -0.008759, -0.004150, -0.002411, -0.004059,
|
||||
-0.002960, -0.007416, -0.012177, -0.015289, -0.024750, -0.033478,
|
||||
-0.035461, -0.029419, -0.022003, -0.013306, -0.006958, -0.007996,
|
||||
-0.011658, -0.013916, -0.017303, -0.011261, -0.000061, 0.009674,
|
||||
-0.001404, -0.013245, -0.006226, 0.010773, 0.012482, 0.002075,
|
||||
-0.006165, -0.007172, -0.014618, -0.021759, -0.029266, -0.024841,
|
||||
-0.018005, -0.015350, -0.010590, -0.002075, -0.000427, -0.009308,
|
||||
-0.007721, 0.007782, 0.010223, -0.001434, -0.007141, -0.005127,
|
||||
0.000458, 0.005920, -0.006500, -0.018921, -0.012726, -0.007416,
|
||||
-0.009033, -0.015900, -0.021088, -0.017761, -0.007172, 0.002289,
|
||||
0.004333, 0.003174, -0.000427, -0.001678, 0.002289, 0.004974,
|
||||
0.009552, 0.002380, -0.014374, -0.013824, -0.005890, 0.003998,
|
||||
-0.002014, -0.013367, -0.010315, -0.002380, 0.001129, -0.001160,
|
||||
-0.001404, -0.001190, -0.001526, 0.001007, 0.003082, 0.006836,
|
||||
0.008820, 0.000153, -0.008972, -0.013184, -0.014343, -0.009430,
|
||||
0.003571, 0.000214, -0.013214, -0.011261, -0.001312, 0.003754,
|
||||
0.002899, -0.000946, 0.000641, 0.006195, 0.011322, 0.013245,
|
||||
0.004120, -0.001862, 0.003448, -0.003998, -0.018250, -0.020447,
|
||||
-0.012054, -0.001129, 0.005615, 0.000366, -0.010773, -0.015564,
|
||||
-0.014343, -0.011566, -0.001862, 0.015198, 0.010162, -0.002991,
|
||||
-0.011261, -0.014008, -0.009399, -0.007416, -0.005219, -0.015411,
|
||||
-0.026123, -0.031647, -0.035095, -0.028290, -0.016052, -0.008423,
|
||||
0.005615, 0.007233, 0.001984, 0.000610, -0.002319, -0.006866,
|
||||
-0.002045, 0.008636, 0.003754, -0.008575, -0.016907, -0.011536,
|
||||
-0.000336, -0.003998, -0.022400, -0.038818, -0.039948, -0.029755,
|
||||
-0.016785, -0.009705, -0.006805, -0.004303, -0.004578, 0.000610,
|
||||
0.003265, 0.004669, 0.009857, 0.002899, -0.009552, -0.020294,
|
||||
-0.019928, -0.016083, -0.013214, -0.015503, -0.017700, -0.026581,
|
||||
-0.025879, -0.020721, -0.018066, -0.015503, -0.007690, -0.002258,
|
||||
-0.009827, -0.018951, -0.014099, 0.002808, -0.002075, -0.026947,
|
||||
-0.024506, -0.009277, -0.004822, -0.011108, -0.018372, -0.022125,
|
||||
-0.023804, -0.016144, -0.012726, -0.012939, -0.015900, -0.017456,
|
||||
-0.020294, -0.023834, -0.023499, -0.018311, -0.011108, -0.010162,
|
||||
-0.014404, -0.022705, -0.025330, -0.021057, -0.012543, -0.008575,
|
||||
-0.014557, -0.022614, -0.021637, -0.015259, -0.015778, -0.022156,
|
||||
-0.021210, -0.009552, -0.002014, -0.002991, -0.004242, -0.007141,
|
||||
-0.006256, 0.002106, 0.003235, -0.003021, -0.017426, -0.015259,
|
||||
-0.001312, -0.001801, -0.014191, -0.020935, -0.021057, -0.015533,
|
||||
-0.015717, -0.018311, -0.010223, -0.008209, -0.012451, -0.011780,
|
||||
-0.009735, -0.007355, -0.002075, -0.002441, -0.004578, -0.003204,
|
||||
-0.001556, 0.004944, 0.002563, -0.006073, -0.011993, -0.016632,
|
||||
-0.019226, -0.006805, -0.000183, -0.006500, -0.015717, -0.014038,
|
||||
-0.000397, 0.008484, 0.005920, -0.000946, -0.011963, -0.019440,
|
||||
-0.017731, -0.018921, -0.017548, -0.013885, -0.005188, -0.006653,
|
||||
-0.008759, -0.006958, -0.001801, 0.008545, 0.005371, -0.000854,
|
||||
0.009125, 0.016113, 0.010284, 0.000671, 0.000427, 0.001129,
|
||||
-0.002319, -0.002441, -0.004639, -0.016052, -0.027039, -0.020142,
|
||||
-0.014404, -0.010834, -0.014771, -0.016449, -0.005493, 0.006958,
|
||||
0.014160, 0.011536, 0.011383, 0.012939, 0.011261, 0.014923,
|
||||
0.015015, 0.006653, -0.001007, -0.004852, -0.007660, -0.005371,
|
||||
-0.011505, -0.018555, -0.018219, -0.016571, -0.016296, -0.012878,
|
||||
-0.010834, -0.004333, 0.006073, 0.015350, 0.016510, 0.006653,
|
||||
0.004761, 0.005463, 0.004578, 0.005615, -0.005066, -0.016602,
|
||||
-0.022308, -0.018890, -0.014191, -0.016937, -0.015198, -0.017548,
|
||||
-0.023987, -0.020905, -0.009735, 0.002838, 0.008484, 0.005280,
|
||||
0.002258, -0.002075, -0.007416, -0.008423, 0.001434, 0.002167,
|
||||
-0.007843, -0.008911, -0.010223, -0.019226, -0.026428, -0.023224,
|
||||
-0.016083, -0.008850, -0.007965, -0.013062, -0.014496, -0.011932,
|
||||
-0.012146, -0.006561, -0.003876, -0.009155, -0.013916, -0.009735,
|
||||
-0.004211, -0.001007, -0.003510, -0.014709, -0.022949, -0.021484,
|
||||
-0.018311, -0.014404, -0.010406, -0.010162, -0.011993, -0.018890,
|
||||
-0.022430, -0.016144, -0.008514, -0.009796, -0.012207, -0.007843,
|
||||
-0.007629, -0.009552, -0.012970, -0.012115, -0.012360, -0.016022,
|
||||
-0.018768, -0.015167, -0.009979, -0.018616, -0.029205, -0.025421,
|
||||
-0.019531, -0.024902, -0.026733, -0.019989, -0.008331, -0.004913,
|
||||
-0.007202, -0.002045, -0.007599, -0.011841, -0.006897, -0.009277,
|
||||
-0.016449, -0.015991, -0.009674, -0.008331, -0.008636, -0.023621,
|
||||
-0.036377, -0.031158, -0.025909, -0.023895, -0.022827, -0.025177,
|
||||
-0.027008, -0.023590, -0.016907, -0.007324, -0.000671, -0.000610,
|
||||
-0.002167, -0.003876, -0.002350, 0.000061, -0.001801, -0.008392,
|
||||
-0.008636, -0.007385, -0.014893, -0.015808, -0.013458, -0.015198,
|
||||
-0.015320, -0.011108, -0.010956, -0.016937, -0.018463, -0.015839,
|
||||
-0.013367, -0.010223, -0.006500, -0.000977, -0.001221, -0.005981,
|
||||
-0.010162, -0.005768, 0.003784, 0.003204, -0.008118, -0.015747,
|
||||
-0.014709, -0.012238, -0.012604, -0.008453, 0.000916, 0.003510,
|
||||
0.000305, -0.000305, 0.003998, 0.001526, 0.003571, 0.006500,
|
||||
0.003937, -0.001678, -0.004547, -0.003815, -0.001740, -0.007568,
|
||||
-0.011597, -0.011841, -0.015015, -0.013550, -0.012543, -0.006470,
|
||||
-0.002197, -0.006775, -0.002075, 0.008118, 0.005157, -0.002197,
|
||||
-0.004211, -0.000397, 0.005280, 0.001587, -0.003357, 0.001526,
|
||||
0.003876, 0.008209, 0.004669, -0.004700, -0.007050, -0.007294,
|
||||
-0.005280, -0.003357, -0.007416, -0.008423, -0.002808, -0.000336,
|
||||
-0.005280, -0.012787, -0.008026, 0.002869, 0.000336, -0.000580,
|
||||
-0.000488, -0.002960, 0.002380, 0.002991, -0.001526, -0.002197,
|
||||
-0.006226, -0.009552, -0.007568, -0.001160, 0.000153, 0.001923,
|
||||
-0.005798, -0.014557, -0.013367, -0.006805, -0.000610, 0.006104,
|
||||
0.003143, -0.001343, -0.000610, 0.001526, 0.005249, 0.000244,
|
||||
-0.009064, -0.010223, -0.010651, -0.012787, -0.010101, -0.012970,
|
||||
-0.016266, -0.014404, -0.009064, -0.006287, -0.005219, -0.004089,
|
||||
-0.007629, -0.009796, -0.011566, -0.007294, -0.001251, -0.005035,
|
||||
-0.015533, -0.016998, -0.011566, -0.005981, -0.007782, -0.008026,
|
||||
-0.007599, -0.011230, -0.014740, -0.016907, -0.019073, -0.020477,
|
||||
-0.016113, -0.012146, -0.009918, -0.009186, -0.020874, -0.031067,
|
||||
-0.026611, -0.017303, -0.009125, -0.004517, -0.008972, -0.015198,
|
||||
-0.019714, -0.022827, -0.020172, -0.020660, -0.021454, -0.022186,
|
||||
-0.023254, -0.018036, -0.010864, -0.016266, -0.027252, -0.028656,
|
||||
-0.022003, -0.016174, -0.017212, -0.020203, -0.025421, -0.025757,
|
||||
-0.021362, -0.015717, -0.008392, -0.006927, -0.019958, -0.031830,
|
||||
-0.027588, -0.021820, -0.019470, -0.021454, -0.024261, -0.020508,
|
||||
-0.019043, -0.015411, -0.010132, -0.007294, -0.004272, -0.002014,
|
||||
-0.003448, -0.009735, -0.011780, -0.013611, -0.019714, -0.020172,
|
||||
-0.016846, -0.018127, -0.017578, -0.018402, -0.018860, -0.013245,
|
||||
-0.007629, -0.010132, -0.009064, -0.005676, -0.004395, -0.006256,
|
||||
-0.011292, -0.013367, -0.003784, 0.003387, 0.001434, 0.000336,
|
||||
-0.004059, -0.006592, -0.003845, -0.003815, -0.002472, -0.004150,
|
||||
-0.012390, -0.016998, -0.015350, -0.013214, -0.012360, -0.016418,
|
||||
-0.014496, 0.000580, 0.008881, 0.005951, -0.000122, -0.006378,
|
||||
-0.008850, -0.005432, 0.001007, 0.002441, -0.002869, -0.007690,
|
||||
-0.006866, -0.001434, 0.000641, -0.004303, -0.006592, -0.005096,
|
||||
-0.005280, -0.002838, 0.000946, 0.001160, -0.001465, -0.004822,
|
||||
-0.006439, 0.003113, 0.008392, 0.001556, -0.005768, -0.010437,
|
||||
-0.009705, -0.006042, -0.000183, 0.002869, -0.003876, -0.012512,
|
||||
-0.007843, 0.003845, 0.009796, 0.009583, 0.005035, 0.005737,
|
||||
0.006104, 0.001007, 0.003143, 0.004791, 0.003143, 0.001068,
|
||||
-0.005798, -0.008423, -0.002563, 0.001678, -0.002747, -0.008911,
|
||||
-0.010468, -0.002808, 0.005646, 0.002075, -0.003235, -0.006866,
|
||||
-0.007019, -0.001160, 0.002167, 0.001343, -0.000519, -0.005615,
|
||||
-0.009399, -0.009613, -0.013336, -0.015533, -0.016418, -0.012970,
|
||||
-0.011078, -0.015320, -0.020721, -0.014709, -0.002625, -0.004547,
|
||||
-0.011932, -0.007599, -0.000671, 0.000336, -0.002747, -0.008148,
|
||||
-0.012939, -0.017944, -0.020538, -0.018494, -0.014221, -0.013824,
|
||||
-0.019470, -0.023163, -0.020203, -0.016968, -0.017578, -0.018372,
|
||||
-0.015533, -0.012726, -0.010101, -0.011017, -0.015533, -0.014130,
|
||||
-0.005890, -0.002625, -0.003693, -0.005676, -0.009369, -0.013184,
|
||||
-0.013855, -0.010925, -0.013184, -0.020294, -0.029968, -0.031219,
|
||||
-0.023285, -0.019897, -0.019623, -0.016327, -0.013855, -0.016724,
|
||||
-0.020813, -0.016602, -0.010651, -0.011505, -0.016449, -0.019623,
|
||||
-0.019440, -0.016449, -0.014465, -0.010742, -0.011658, -0.013184,
|
||||
-0.011017, -0.009277, -0.010284, -0.015991, -0.017731, -0.017487,
|
||||
-0.021362, -0.018799, -0.017151, -0.020599, -0.023529, -0.024567,
|
||||
-0.026733, -0.024414, -0.019440, -0.019257, -0.022400, -0.019501,
|
||||
-0.015320, -0.016235, -0.016815, -0.011505, -0.003601, -0.002014,
|
||||
-0.007141, -0.013214, -0.009186, -0.001862, -0.000214, -0.003784,
|
||||
-0.008972, -0.011871, -0.012512, -0.010986, -0.008789, -0.010010,
|
||||
-0.014496, -0.018829, -0.018005, -0.018677, -0.015625, -0.011108,
|
||||
-0.011902, -0.012970, -0.009338, -0.003265, -0.002136, -0.004608,
|
||||
-0.001556, 0.001312, -0.000580, -0.000793, -0.001526, -0.003998,
|
||||
-0.006653, -0.008698, -0.007599, -0.002319, -0.002045, -0.005280,
|
||||
-0.009521, -0.008911, -0.003693, -0.002594, -0.002319, 0.003296,
|
||||
0.004761, -0.001495, -0.008972, -0.011627, -0.002655, 0.006042,
|
||||
0.002441, -0.002960, -0.006226, -0.012512, -0.013763, -0.004333,
|
||||
0.002838, 0.004913, 0.000854, -0.008057, -0.007050, 0.005707,
|
||||
0.013733, 0.010284, 0.002319, 0.001495, 0.007111, 0.002594,
|
||||
-0.005615, -0.010315, -0.011383, -0.011566, -0.004608, 0.003754,
|
||||
0.001587, -0.008179, -0.013885, -0.005798, 0.004761, 0.004547,
|
||||
-0.000122, -0.002960, -0.001862, 0.002350, 0.002075, -0.000458,
|
||||
-0.002045, 0.000488, 0.003113, -0.000061, -0.005127, -0.008575,
|
||||
-0.013306, -0.017914, -0.019897, -0.016449, -0.010254, -0.004974,
|
||||
-0.003845, -0.003754, -0.007477, -0.011780, -0.007965, 0.001221,
|
||||
0.006195, 0.001282, -0.008453, -0.015778, -0.012177, -0.005676,
|
||||
-0.002319, -0.003021, -0.009064, -0.014832, -0.016693, -0.014740,
|
||||
-0.011658, -0.009583, -0.010559, -0.012421, -0.005920, -0.002563,
|
||||
-0.007324, -0.013000, -0.013031, -0.008057, -0.007965, -0.011230,
|
||||
-0.015594, -0.017822, -0.019257, -0.018280, -0.014008, -0.012604,
|
||||
-0.016388, -0.018280, -0.014099, -0.008820, -0.009674, -0.010742,
|
||||
-0.008087, -0.006287, -0.008667, -0.010742, -0.011505, -0.013489,
|
||||
-0.010864, -0.007874, -0.013336, -0.020386, -0.019928, -0.016479,
|
||||
-0.014038, -0.014313, -0.017303, -0.017822, -0.017761, -0.018524,
|
||||
-0.015137, -0.011749, -0.012238, -0.014832, -0.018097, -0.018616,
|
||||
-0.015564, -0.014252, -0.014923, -0.013306, -0.012817, -0.014618,
|
||||
-0.017059, -0.019623, -0.019012, -0.016052, -0.011261, -0.007538,
|
||||
-0.005249, -0.005554, -0.007416, -0.005096, -0.004547, -0.011108,
|
||||
-0.017639, -0.018829, -0.017639, -0.018921, -0.019073, -0.016968,
|
||||
-0.013031, -0.008179, -0.004395, -0.005066, -0.005341, -0.004059,
|
||||
-0.004120, -0.005463, -0.008698, -0.007538, -0.003723, -0.001068,
|
||||
-0.003448, -0.007507, -0.007477, -0.005096, -0.005493, -0.009277,
|
||||
-0.014526, -0.014587, -0.009613, -0.004333, -0.003082, -0.003845,
|
||||
-0.004089, -0.004730, -0.003082, 0.002167, 0.002960, -0.001587,
|
||||
-0.004944, -0.004333, 0.000336, 0.002686, -0.000610, -0.007721,
|
||||
-0.010895, -0.006561, -0.003143, 0.000214, 0.004242, 0.003082,
|
||||
-0.001221, -0.002747, -0.000305, 0.004822, 0.005341, 0.000702,
|
||||
-0.001343, -0.000519, -0.001678, -0.004944, -0.006104, -0.004913,
|
||||
-0.003998, -0.005066, -0.005188, -0.002289, -0.000214, -0.000061,
|
||||
-0.000031, 0.000732, 0.002563, 0.005432, 0.004272, 0.001160,
|
||||
0.000244, -0.000580, -0.001251, -0.002228, -0.003143, -0.001953,
|
||||
-0.001740, -0.004669, -0.006592, -0.006805, -0.005981, -0.004425,
|
||||
-0.005737, -0.005920, -0.004120, -0.001984, -0.000092, 0.000702,
|
||||
0.001282, 0.001068, 0.001862, 0.001923, 0.000763, -0.001038,
|
||||
-0.004578, -0.007111, -0.007355, -0.005035, -0.003113, -0.004395,
|
||||
-0.006500, -0.006958, -0.005951, -0.004181, -0.005341, -0.006348,
|
||||
-0.004761, -0.003723, -0.003235, -0.003510, -0.002869, -0.002136,
|
||||
-0.003784, -0.005585, -0.005463, -0.004761, -0.003998, -0.003876,
|
||||
-0.004700, -0.004578, -0.005066, -0.006714, -0.007812, -0.007568,
|
||||
-0.005737, -0.004028, -0.004517, -0.005341, -0.005981, -0.006317,
|
||||
-0.005310, -0.005066, -0.006348, -0.006989, -0.005737, -0.005005,
|
||||
-0.006042, -0.005920, -0.004150, -0.003784, -0.005127, -0.006653,
|
||||
-0.006500, -0.003906, -0.002594, -0.003967, -0.005798, -0.006927,
|
||||
-0.006927, -0.006836, -0.006378, -0.005188, -0.004059, -0.003906,
|
||||
-0.004944, -0.005371, -0.005066, -0.004639, -0.004578, -0.004608,
|
||||
-0.004150, -0.003815, -0.003326, -0.002777, -0.002686, -0.002991,
|
||||
-0.003082, -0.003540, -0.003998, -0.003906, -0.004517, -0.005280,
|
||||
-0.005371, -0.004730, -0.003723, -0.003693, -0.004028, -0.003845,
|
||||
-0.003082, -0.002655, -0.002991, -0.003754, -0.003479, -0.002808,
|
||||
-0.003174, -0.002991, -0.002563, -0.002136, -0.001678, -0.001526,
|
||||
-0.002350, -0.003021, -0.003540, -0.003845, -0.003052, -0.002106,
|
||||
-0.002258, -0.002869, -0.002838, -0.002777, -0.002319, -0.001434,
|
||||
-0.000977, -0.000793, -0.001007, -0.001129, -0.001343, -0.001526,
|
||||
-0.001892, -0.002441, -0.002960, -0.003021, -0.002197, -0.001587,
|
||||
-0.001526, -0.001373, -0.001282, -0.001007, -0.000549, 0.000366,
|
||||
0.000763, 0.000336, -0.000244, -0.000854, -0.001190, -0.000946,
|
||||
-0.000610, -0.000854, -0.001465, -0.001923, -0.001892, -0.001648,
|
||||
-0.001068, -0.000366, -0.000061, -0.000244, -0.000580, -0.000671,
|
||||
-0.000549, -0.000183, 0.000000, -0.000031, 0.000000, -0.000031,
|
||||
-0.000336, -0.000519, -0.000610, -0.000671, -0.000519, -0.000671,
|
||||
-0.000824, -0.000519, -0.000244, -0.000183, -0.000092, -0.000092,
|
||||
-0.000244, -0.000366, -0.000366, -0.000305, -0.000153, -0.000092
|
||||
};
|
||||
153
plugins/ladspa_effect/caps/dsp/BiQuad.h
Normal file
153
plugins/ladspa_effect/caps/dsp/BiQuad.h
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
dsp/BiQuad.h
|
||||
|
||||
Copyright 2003-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
bi-quad implementation.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_BI_QUAD_H_
|
||||
#define _DSP_BI_QUAD_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
class BiQuad
|
||||
{
|
||||
public:
|
||||
/* coefficients */
|
||||
d_sample a[3], b[3];
|
||||
|
||||
/* history */
|
||||
int h;
|
||||
d_sample x[2], y[2];
|
||||
|
||||
BiQuad()
|
||||
{
|
||||
a[0] = 1;
|
||||
a[1] = a[2] = b[0] = b[1] = b[2] = 0;
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
BiQuad (d_sample * _a, d_sample * _b)
|
||||
{
|
||||
for (int i = 0; i < 3; ++i)
|
||||
a[i] = _a[i],
|
||||
b[i] = _b[i];
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
h = 0;
|
||||
|
||||
x[0] = x[1] =
|
||||
y[0] = y[1] = 0.;
|
||||
}
|
||||
|
||||
inline d_sample process (d_sample s)
|
||||
{
|
||||
register int z = h;
|
||||
|
||||
register d_sample r = s * a[0];
|
||||
|
||||
r += a[1] * x[z];
|
||||
r += b[1] * y[z];
|
||||
|
||||
z ^= 1;
|
||||
r += a[2] * x[z];
|
||||
r += b[2] * y[z];
|
||||
|
||||
y[z] = r;
|
||||
x[z] = s;
|
||||
|
||||
h = z;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/* additional methods for using the biquad to upsample */
|
||||
inline d_sample process_0_1()
|
||||
{
|
||||
register int z = h;
|
||||
|
||||
register d_sample r = 0;
|
||||
|
||||
r += a[1] * x[z];
|
||||
r += b[1] * y[z];
|
||||
|
||||
z ^= 1;
|
||||
r += a[2] * x[z];
|
||||
r += b[2] * y[z];
|
||||
|
||||
y[z] = r;
|
||||
x[z] = 0;
|
||||
|
||||
h = z;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
inline d_sample process_0_2()
|
||||
{
|
||||
register int z = h;
|
||||
|
||||
register d_sample r = 0;
|
||||
|
||||
r += b[1] * y[z];
|
||||
|
||||
z ^= 1;
|
||||
r += a[2] * x[z];
|
||||
r += b[2] * y[z];
|
||||
|
||||
y[z] = r;
|
||||
x[z] = 0;
|
||||
|
||||
h = z;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
inline d_sample process_0_3()
|
||||
{
|
||||
register int z = h;
|
||||
|
||||
register d_sample r = 0;
|
||||
|
||||
r += b[1] * y[z];
|
||||
|
||||
z ^= 1;
|
||||
r += b[2] * y[z];
|
||||
|
||||
y[z] = r;
|
||||
x[z] = 0;
|
||||
|
||||
h = z;
|
||||
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_BI_QUAD_H_ */
|
||||
171
plugins/ladspa_effect/caps/dsp/Delay.h
Normal file
171
plugins/ladspa_effect/caps/dsp/Delay.h
Normal file
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
dsp/Delay.h
|
||||
|
||||
Copyright 2003-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
delay lines with fractional (linear or cubica interpolation) lookup
|
||||
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).
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_DELAY_H_
|
||||
#define _DSP_DELAY_H_
|
||||
|
||||
#include "util.h"
|
||||
#include "FPTruncateMode.h"
|
||||
|
||||
namespace DSP {
|
||||
|
||||
class Delay
|
||||
{
|
||||
public:
|
||||
int size;
|
||||
d_sample * data;
|
||||
int read, write;
|
||||
|
||||
Delay()
|
||||
{
|
||||
read = write = 0;
|
||||
data = 0;
|
||||
}
|
||||
|
||||
~Delay()
|
||||
{
|
||||
if (data) free (data);
|
||||
}
|
||||
|
||||
void init (int n)
|
||||
{
|
||||
size = next_power_of_2 (n);
|
||||
data = (d_sample *) calloc (sizeof (d_sample), size);
|
||||
size -= 1;
|
||||
write = n;
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
memset (data, 0, (size + 1) * sizeof (d_sample));
|
||||
}
|
||||
|
||||
d_sample &
|
||||
operator [] (int i)
|
||||
{
|
||||
return data [(write - i) & size];
|
||||
}
|
||||
|
||||
inline void
|
||||
put (d_sample x)
|
||||
{
|
||||
data [write] = x;
|
||||
write = (write + 1) & size;
|
||||
}
|
||||
|
||||
inline d_sample
|
||||
get()
|
||||
{
|
||||
d_sample x = data [read];
|
||||
read = (read + 1) & size;
|
||||
return x;
|
||||
}
|
||||
|
||||
inline d_sample
|
||||
putget (d_sample x)
|
||||
{
|
||||
put (x);
|
||||
return get();
|
||||
}
|
||||
|
||||
/* fractional lookup, linear interpolation */
|
||||
inline d_sample
|
||||
get_at (float f)
|
||||
{
|
||||
int n;
|
||||
fistp (f, n); /* read: i = (int) f; relies on FPTruncateMode */
|
||||
f -= n;
|
||||
|
||||
return (1 - f) * (*this) [n] + f * (*this) [n + 1];
|
||||
}
|
||||
|
||||
/* fractional lookup, cubic interpolation */
|
||||
inline d_sample
|
||||
get_cubic (float f)
|
||||
{
|
||||
int n;
|
||||
fistp (f, n); /* see FPTruncateMode */
|
||||
f -= n;
|
||||
|
||||
d_sample x_1 = (*this) [n - 1];
|
||||
d_sample x0 = (*this) [n];
|
||||
d_sample x1 = (*this) [n + 1];
|
||||
d_sample x2 = (*this) [n + 2];
|
||||
|
||||
/* d_sample (32bit) quicker than double here */
|
||||
register d_sample a =
|
||||
(3 * (x0 - x1) - x_1 + x2) * .5;
|
||||
register d_sample b =
|
||||
2 * x1 + x_1 - (5 * x0 + x2) * .5;
|
||||
register d_sample c =
|
||||
(x1 - x_1) * .5;
|
||||
|
||||
return x0 + (((a * f) + b) * f + c) * f;
|
||||
}
|
||||
};
|
||||
|
||||
/* allpass variant */
|
||||
|
||||
class DelayTapA
|
||||
{
|
||||
public:
|
||||
d_sample x1, y1;
|
||||
|
||||
DelayTapA()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
x1 = y1 = 0;
|
||||
}
|
||||
|
||||
d_sample get (Delay & d, float f)
|
||||
{
|
||||
int n;
|
||||
fistp (f, n); /* read: i = (int) f; relies on FPTruncateMode */
|
||||
f -= n;
|
||||
if (0 && f < .5)
|
||||
f += 1,
|
||||
n -= 1;
|
||||
|
||||
d_sample x = d[n];
|
||||
f = (1 - f) / (1 + f);
|
||||
y1 = x1 + f * x - f * y1;
|
||||
x1 = x;
|
||||
return y1;
|
||||
}
|
||||
};
|
||||
|
||||
}; /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_DELAY_H_ */
|
||||
175
plugins/ladspa_effect/caps/dsp/Eq.h
Normal file
175
plugins/ladspa_effect/caps/dsp/Eq.h
Normal file
@@ -0,0 +1,175 @@
|
||||
/*
|
||||
Eq.h
|
||||
|
||||
Copyright 2004 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.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_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, the filter works with a FIR coefficient of 0
|
||||
* for x[-1], so a generic biquad isn't the optimum implementation.
|
||||
*/
|
||||
class BP
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
/* BANDS must be a multiple of 4 to enable the use of SSE instructions.
|
||||
* however, the current SSE-enabled process() method fails to compile if
|
||||
* -funroll-loops is passed to gcc.
|
||||
*/
|
||||
template <int USE_BANDS, int BANDS>
|
||||
class Eq
|
||||
{
|
||||
public:
|
||||
/* over-size state buffer to allow alignment */
|
||||
float state [BANDS * 8 + 4 + 4];
|
||||
/* recursion coefficients, 3 per band */
|
||||
float * a, * b, * c;
|
||||
/* past outputs, 2 per band */
|
||||
float * y;
|
||||
/* current gain and recursion factor, each 1 per band = 2 */
|
||||
float * gain, * gf;
|
||||
/* aligned storage for output summation */
|
||||
float * temp;
|
||||
/* aligned storage for constants */
|
||||
float * two;
|
||||
/* input history */
|
||||
float x[2];
|
||||
/* history index */
|
||||
int h;
|
||||
|
||||
Eq()
|
||||
{
|
||||
/* take care of 128-bit alignment */
|
||||
long s = (long) (char *) state;
|
||||
s &= 0xF;
|
||||
if (s)
|
||||
s = 16 - s;
|
||||
|
||||
/* assign coefficients */
|
||||
a = (float *) (((char *) state) + s);
|
||||
b = a + BANDS;
|
||||
c = a + 2 * BANDS;
|
||||
|
||||
/* output history (input is common to all bands) */
|
||||
y = a + 3 * BANDS;
|
||||
gain = a + 5 * BANDS;
|
||||
gf = a + 6 * BANDS;
|
||||
temp = a + 7 * BANDS;
|
||||
two = temp + 4;
|
||||
two[0] = two[1] = two[2] = two[3] = 2;
|
||||
|
||||
h = 0;
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
for (int i = 0; i < 2 * BANDS; ++i)
|
||||
y[i] = 0;
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
x[i] = 0;
|
||||
}
|
||||
|
||||
void init (double fs, double Q)
|
||||
{
|
||||
double f = 31.25;
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; i < USE_BANDS && f < fs / 2; ++i, f *= 2)
|
||||
init_band (i, 2 * f * M_PI / fs, Q);
|
||||
for ( ; i < BANDS; ++i)
|
||||
zero_band (i);
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
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);
|
||||
gain[i] = 1;
|
||||
gf[i] = 1;
|
||||
}
|
||||
|
||||
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])
|
||||
*/
|
||||
d_sample process (d_sample s)
|
||||
{
|
||||
int z1 = h, z2 = h ^ 1;
|
||||
|
||||
float * y1 = y + z1 * BANDS;
|
||||
float * y2 = y + z2 * BANDS;
|
||||
|
||||
d_sample x_x2 = s - x[z2];
|
||||
d_sample r = 0;
|
||||
|
||||
for (int i = 0; i < USE_BANDS; ++i)
|
||||
{
|
||||
y2[i] = 2 * (a[i] * x_x2 + c[i] * y1[i] - b[i] * y2[i]);
|
||||
r += gain[i] * y2[i];
|
||||
gain[i] *= gf[i];
|
||||
}
|
||||
|
||||
x[z2] = s;
|
||||
h = z2;
|
||||
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_EQ_H_ */
|
||||
255
plugins/ladspa_effect/caps/dsp/FIR.h
Normal file
255
plugins/ladspa_effect/caps/dsp/FIR.h
Normal file
@@ -0,0 +1,255 @@
|
||||
/*
|
||||
dsp/FIR.h
|
||||
|
||||
Copyright 2003-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
finite impulse response filters, with options for up- and down-sampling.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _FIR_H_
|
||||
#define _FIR_H_
|
||||
|
||||
#include "util.h"
|
||||
|
||||
namespace DSP {
|
||||
|
||||
/* brute-force FIR filter with downsampling method.
|
||||
*
|
||||
* CAVEAT: constructing it from another FIR makes the filter use that very
|
||||
* kernel data set. IOW, the other FIR must be valid throughout the lifetime
|
||||
* of this instance.
|
||||
*/
|
||||
class FIR
|
||||
{
|
||||
public:
|
||||
/* kernel length, history length - 1 */
|
||||
int n, m;
|
||||
|
||||
/* coefficients, history */
|
||||
d_sample * 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, d_sample * kernel)
|
||||
{
|
||||
c = 0;
|
||||
init (n);
|
||||
memcpy (c, kernel, n * sizeof (*c));
|
||||
}
|
||||
|
||||
~FIR()
|
||||
{
|
||||
if (!borrowed_kernel)
|
||||
free (c);
|
||||
free (x);
|
||||
}
|
||||
|
||||
void init (int N)
|
||||
{
|
||||
n = N;
|
||||
|
||||
/* keeping history size a power of 2 makes it possible to wrap the
|
||||
* history pointer by binary & instead of %, saving huge amounts of
|
||||
* cpu cycles.
|
||||
*/
|
||||
m = next_power_of_2 (n);
|
||||
|
||||
if (c)
|
||||
borrowed_kernel = true;
|
||||
else
|
||||
borrowed_kernel = false,
|
||||
c = (d_sample *) malloc (n * sizeof (d_sample));
|
||||
|
||||
x = (d_sample *) malloc (m * sizeof (d_sample));
|
||||
|
||||
m -= 1;
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
h = 0;
|
||||
memset (x, 0, n * sizeof (d_sample));
|
||||
}
|
||||
|
||||
/* TODO: write an SSE-enabled version */
|
||||
inline d_sample process (d_sample s)
|
||||
{
|
||||
x[h] = s;
|
||||
|
||||
s *= c[0];
|
||||
|
||||
for (int Z = 1, z = h - 1; Z < n; --z, ++Z)
|
||||
s += c[Z] * x[z & m];
|
||||
|
||||
h = (h + 1) & m;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
/* Z is the time, in samples, since the last non-zero sample.
|
||||
* OVER is the oversampling factor. just here for documentation, use
|
||||
* a FIRUpsampler instead.
|
||||
*/
|
||||
template <int Z, int OVER>
|
||||
inline d_sample upsample (d_sample s)
|
||||
{
|
||||
x[h] = s;
|
||||
|
||||
s = 0;
|
||||
|
||||
/* 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)
|
||||
s += c[j] * x[z & m];
|
||||
|
||||
h = (h + 1) & m;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
/* used in downsampling */
|
||||
inline void store (d_sample s)
|
||||
{
|
||||
x[h] = s;
|
||||
h = (h + 1) & m;
|
||||
}
|
||||
};
|
||||
|
||||
/* 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.
|
||||
*/
|
||||
class FIRUpsampler
|
||||
{
|
||||
public:
|
||||
/* kernel length, history length - 1 */
|
||||
int n, m;
|
||||
|
||||
/* oversampling ratio */
|
||||
int over;
|
||||
|
||||
/* coefficients, history */
|
||||
d_sample * c, * x;
|
||||
|
||||
/* history index */
|
||||
int h;
|
||||
|
||||
FIRUpsampler (int _n, int _over)
|
||||
{
|
||||
c = x = 0;
|
||||
init (_n, _over);
|
||||
}
|
||||
|
||||
FIRUpsampler (FIR & fir, int _over)
|
||||
{
|
||||
c = x = 0;
|
||||
init (fir.n, _over);
|
||||
memcpy (c, fir.c, n * sizeof (d_sample));
|
||||
}
|
||||
|
||||
~FIRUpsampler()
|
||||
{
|
||||
if (c) free (c);
|
||||
if (x) free (x);
|
||||
}
|
||||
|
||||
void init (int _n, int _over)
|
||||
{
|
||||
/* oversampling ratio must be multiple of FIR kernel length */
|
||||
// assert (_n % _over == 0);
|
||||
|
||||
n = _n;
|
||||
over = _over;
|
||||
|
||||
/* 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);
|
||||
|
||||
c = (d_sample *) malloc (n * sizeof (d_sample));
|
||||
x = (d_sample *) malloc (m * sizeof (d_sample));
|
||||
|
||||
m -= 1;
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
h = 0;
|
||||
memset (x, 0, (m + 1) * sizeof (d_sample));
|
||||
}
|
||||
|
||||
/* upsample the given sample */
|
||||
inline d_sample upsample (d_sample s)
|
||||
{
|
||||
x[h] = s;
|
||||
|
||||
s = 0;
|
||||
|
||||
for (int Z = 0, z = h; Z < n; --z, Z += over)
|
||||
s += c[Z] * x[z & m];
|
||||
|
||||
h = (h + 1) & m;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
/* upsample a zero sample (interleaving), Z being the time, in samples,
|
||||
* since the last non-0 sample.
|
||||
*/
|
||||
inline d_sample pad (int Z)
|
||||
{
|
||||
d_sample s = 0;
|
||||
|
||||
for (int z = h - 1; Z < n; --z, Z += over)
|
||||
s += c[Z] * x[z & m];
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}; /* namespace DSP */
|
||||
|
||||
#endif /* _FIR_H_ */
|
||||
56
plugins/ladspa_effect/caps/dsp/FPTruncateMode.h
Normal file
56
plugins/ladspa_effect/caps/dsp/FPTruncateMode.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* Copyright 2001-4 tim goetze <tim@quitte.de> -- see 'COPYING'. */
|
||||
|
||||
/* class that sets the FP rounding mode to 'truncate' in the constructor
|
||||
* and loads the previous FP conrol word in the destructor.
|
||||
*
|
||||
* i386 implementation only, on other architectures this is a no-op.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_FP_TRUNCATE_MODE_H_
|
||||
#define _DSP_FP_TRUNCATE_MODE_H_
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
#define fstcw(i) \
|
||||
__asm__ __volatile__ ("fstcw %0" : "=m" (i))
|
||||
|
||||
#define fldcw(i) \
|
||||
__asm__ __volatile__ ("fldcw %0" : : "m" (i))
|
||||
|
||||
/* gcc chokes on __volatile__ sometimes. */
|
||||
#define fistp(f,i) \
|
||||
__asm__ ("fistpl %0" : "=m" (i) : "t" (f) : "st")
|
||||
|
||||
#else /* ! __i386__ */
|
||||
|
||||
#define fstcw(i)
|
||||
#define fldcw(i)
|
||||
|
||||
#define fistp(f,i) \
|
||||
i = (int) f
|
||||
|
||||
#endif
|
||||
|
||||
namespace DSP {
|
||||
|
||||
class FPTruncateMode
|
||||
{
|
||||
public:
|
||||
int cw0, cw1; /* fp control word */
|
||||
|
||||
FPTruncateMode()
|
||||
{
|
||||
fstcw (cw0);
|
||||
cw1 = cw0 | 0xC00;
|
||||
fldcw (cw1);
|
||||
}
|
||||
|
||||
~FPTruncateMode()
|
||||
{
|
||||
fldcw (cw0);
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_FP_TRUNCATE_MODE_H_ */
|
||||
108
plugins/ladspa_effect/caps/dsp/Lorenz.h
Normal file
108
plugins/ladspa_effect/caps/dsp/Lorenz.h
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
dsp/Lorenz.h
|
||||
|
||||
Copyright 2001-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
Lorenz fractal.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_LORENZ_H_
|
||||
#define _DSP_LORENZ_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
class Lorenz
|
||||
{
|
||||
public:
|
||||
double x[2], y[2], z[2];
|
||||
double h, a, b, c;
|
||||
int I;
|
||||
|
||||
public:
|
||||
Lorenz()
|
||||
{
|
||||
h = 0.001;
|
||||
a = 10.0;
|
||||
b = 28.0;
|
||||
c = 8.0 / 3.0;
|
||||
}
|
||||
|
||||
/* rate is normalized (0 .. 1) */
|
||||
void set_rate (double r)
|
||||
{
|
||||
h = max (.0000001, r * .015);
|
||||
}
|
||||
|
||||
void init (double _h = .001, double seed = .0)
|
||||
{
|
||||
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();
|
||||
|
||||
h = _h;
|
||||
}
|
||||
|
||||
d_sample get()
|
||||
{
|
||||
step();
|
||||
return .5 * get_y() + get_z();
|
||||
}
|
||||
|
||||
void step()
|
||||
{
|
||||
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]);
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_LORENZ_H_ */
|
||||
113
plugins/ladspa_effect/caps/dsp/OnePole.h
Normal file
113
plugins/ladspa_effect/caps/dsp/OnePole.h
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
dsp/OnePole.h
|
||||
|
||||
Copyright 2003-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
one pole (or one zero, or one zero, one pole) hi- and lo-pass 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
|
||||
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 _ONE_POLE_H_
|
||||
#define _ONE_POLE_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
class OnePoleLP
|
||||
{
|
||||
public:
|
||||
d_sample a0, b1, y1;
|
||||
|
||||
OnePoleLP (double d = 1.)
|
||||
{
|
||||
set (d);
|
||||
y1 = 0.;
|
||||
}
|
||||
|
||||
inline void reset()
|
||||
{
|
||||
y1 = 0.;
|
||||
}
|
||||
|
||||
inline void set_f (double fc)
|
||||
{
|
||||
set (exp (-2 * M_PI * fc));
|
||||
}
|
||||
|
||||
inline void set (double d)
|
||||
{
|
||||
a0 = (d_sample) d;
|
||||
b1 = (d_sample) 1. - d;
|
||||
}
|
||||
|
||||
inline d_sample process (d_sample x)
|
||||
{
|
||||
return y1 = a0 * x + b1 * y1;
|
||||
}
|
||||
|
||||
inline void decay (double d)
|
||||
{
|
||||
a0 *= d;
|
||||
b1 = 1. - a0;
|
||||
}
|
||||
};
|
||||
|
||||
class OnePoleHP
|
||||
{
|
||||
public:
|
||||
d_sample a0, a1, b1, x1, y1;
|
||||
double fc;
|
||||
|
||||
OnePoleHP (double d = 1.)
|
||||
{
|
||||
fc = 0;
|
||||
set (d);
|
||||
x1 = y1 = 0.;
|
||||
}
|
||||
|
||||
void set_f (double f)
|
||||
{
|
||||
fc = f;
|
||||
set (exp (-2 * M_PI * fc));
|
||||
}
|
||||
|
||||
inline void set (double d)
|
||||
{
|
||||
a0 = (d_sample) ((1. + d) / 2.);
|
||||
a1 = (d_sample) ((1. + d) / -2.);
|
||||
b1 = d;
|
||||
}
|
||||
|
||||
inline d_sample process (d_sample x)
|
||||
{
|
||||
y1 = a0 * x + a1 * x1 + b1 * y1;
|
||||
x1 = x;
|
||||
return y1;
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
x1 = y1 = 0;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _ONE_POLE_H_ */
|
||||
240
plugins/ladspa_effect/caps/dsp/RBJ.h
Normal file
240
plugins/ladspa_effect/caps/dsp/RBJ.h
Normal file
@@ -0,0 +1,240 @@
|
||||
/*
|
||||
dsp/RBJ.h
|
||||
|
||||
Copyright 2004 Tim Goetze <tim@quitte.de>, 1998 Robert Bristow-Johnson
|
||||
|
||||
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
|
||||
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_RBJ_H_
|
||||
#define _DSP_RBJ_H_
|
||||
|
||||
namespace DSP {
|
||||
namespace RBJ {
|
||||
|
||||
/* base class, prepares common parameters */
|
||||
class RBJ
|
||||
{
|
||||
public:
|
||||
double alpha, sin, cos;
|
||||
double a[3], b[3];
|
||||
|
||||
public:
|
||||
RBJ (double f, double Q)
|
||||
{
|
||||
double w = 2 * M_PI * f;
|
||||
|
||||
sin = ::sin (w);
|
||||
cos = ::cos (w);
|
||||
|
||||
alpha = sin / (2 * Q);
|
||||
}
|
||||
|
||||
/* templated so we can set double and float coefficients from the same
|
||||
* piece of code */
|
||||
template <class T>
|
||||
void make_direct_I (T * ca, T * cb)
|
||||
{
|
||||
double a0i = 1 / a[0];
|
||||
|
||||
ca[0] = b[0] * a0i;
|
||||
ca[1] = b[1] * a0i;
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
/* now the individual prototypes.
|
||||
* set-up is not optimal, i.e. does a lot of operations twice for readability.
|
||||
*/
|
||||
class LP
|
||||
: public RBJ
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
LP (double f, double Q, T * ca, T * cb)
|
||||
: RBJ (f, Q)
|
||||
{
|
||||
b[0] = (1 - cos) * .5;
|
||||
b[1] = (1 - cos);
|
||||
b[2] = (1 - cos) * .5;
|
||||
|
||||
a[0] = 1 + alpha;
|
||||
a[1] = -2 * cos;
|
||||
a[2] = 1 - alpha;
|
||||
|
||||
make_direct_I (ca, cb);
|
||||
}
|
||||
};
|
||||
|
||||
class BP
|
||||
: public RBJ
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
BP (double f, double Q, T * ca, T * cb)
|
||||
: RBJ (f, Q)
|
||||
{
|
||||
b[0] = Q * alpha;
|
||||
b[1] = 0;
|
||||
b[2] = -Q * alpha;
|
||||
|
||||
a[0] = 1 + alpha;
|
||||
a[1] = -2 * cos;
|
||||
a[2] = 1 - alpha;
|
||||
|
||||
make_direct_I (ca, cb);
|
||||
}
|
||||
};
|
||||
|
||||
class HP
|
||||
: public RBJ
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
HP (double f, double Q, T * ca, T * cb)
|
||||
: RBJ (f, Q)
|
||||
{
|
||||
b[0] = (1 + cos) * .5;
|
||||
b[1] = -(1 + cos);
|
||||
b[2] = (1 + cos) * .5;
|
||||
|
||||
a[0] = 1 + alpha;
|
||||
a[1] = -2 * cos;
|
||||
a[2] = 1 - alpha;
|
||||
|
||||
make_direct_I (ca, cb);
|
||||
}
|
||||
};
|
||||
|
||||
class Notch
|
||||
: public RBJ
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
Notch (double f, double Q, T * ca, T * cb)
|
||||
: RBJ (f, Q)
|
||||
{
|
||||
b[0] = 1;
|
||||
b[1] = -2 * cos;
|
||||
b[2] = 1;
|
||||
|
||||
a[0] = 1 + alpha;
|
||||
a[1] = -2 * cos;
|
||||
a[2] = 1 - alpha;
|
||||
|
||||
make_direct_I (ca, cb);
|
||||
}
|
||||
};
|
||||
|
||||
/* shelving and peaking dept. */
|
||||
|
||||
class PeakShelve
|
||||
: public RBJ
|
||||
{
|
||||
public:
|
||||
double A, beta;
|
||||
|
||||
public:
|
||||
PeakShelve (double f, double Q, double dB)
|
||||
: RBJ (f, Q)
|
||||
{
|
||||
A = pow (10, dB * .025);
|
||||
double S = Q; /* slope */
|
||||
beta = sqrt ((A * A + 1) / S - (A - 1) * (A - 1));
|
||||
}
|
||||
};
|
||||
|
||||
class LoShelve
|
||||
: public PeakShelve
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
LoShelve (double f, double Q, double dB, T * ca, T * cb)
|
||||
: PeakShelve (f, Q, dB)
|
||||
{
|
||||
double Ap1 = A + 1, Am1 = A - 1;
|
||||
double beta_sin = beta * sin;
|
||||
|
||||
b[0] = A * (Ap1 - Am1 * cos + beta_sin);
|
||||
b[1] = 2 * A * (Am1 - Ap1 * cos);
|
||||
b[2] = A * (Ap1 - Am1 * cos - beta_sin);
|
||||
|
||||
a[0] = Ap1 + Am1 * cos + beta_sin;
|
||||
a[1] = -2 * (Am1 + Ap1 * cos);
|
||||
a[2] = Ap1 + Am1 * cos - beta_sin;
|
||||
|
||||
make_direct_I (ca, cb);
|
||||
}
|
||||
};
|
||||
|
||||
class PeakingEQ
|
||||
: public PeakShelve
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
PeakingEQ (double f, double Q, double dB, T * ca, T * cb)
|
||||
: PeakShelve (f, Q, dB)
|
||||
{
|
||||
b[0] = 1 + alpha * A;
|
||||
b[1] = -2 * cos;
|
||||
b[2] = 1 - alpha * A;
|
||||
|
||||
a[0] = 1 + alpha / A;
|
||||
a[1] = -2 * cos;
|
||||
a[2] = 1 - alpha / A;
|
||||
|
||||
make_direct_I (ca, cb);
|
||||
}
|
||||
};
|
||||
|
||||
class HiShelve
|
||||
: public PeakShelve
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
HiShelve (double f, double Q, double dB, T * ca, T * cb)
|
||||
: PeakShelve (f, Q, dB)
|
||||
{
|
||||
double Ap1 = A + 1, Am1 = A - 1;
|
||||
double beta_sin = beta * sin;
|
||||
|
||||
b[0] = A * (Ap1 + Am1 * cos + beta_sin);
|
||||
b[1] = -2 * A * (Am1 + Ap1 * cos);
|
||||
b[2] = A * (Ap1 + Am1 * cos - beta_sin);
|
||||
|
||||
a[0] = Ap1 - Am1 * cos + beta_sin;
|
||||
a[1] = 2 * (Am1 - Ap1 * cos);
|
||||
a[2] = Ap1 - Am1 * cos - beta_sin;
|
||||
|
||||
make_direct_I (ca, cb);
|
||||
}
|
||||
};
|
||||
|
||||
} /* ~namespace RBJ */
|
||||
} /* ~namespace DSP */
|
||||
|
||||
#endif /* _DSP_RBJ_H_ */
|
||||
65
plugins/ladspa_effect/caps/dsp/RMS.h
Normal file
65
plugins/ladspa_effect/caps/dsp/RMS.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
dsp/RMS.h
|
||||
|
||||
Copyright 2004 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
root-mean-square accumulator.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_RMS_H_
|
||||
#define _DSP_RMS_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
class RMS
|
||||
{
|
||||
public:
|
||||
d_sample buffer[64];
|
||||
int write;
|
||||
double sum;
|
||||
|
||||
RMS()
|
||||
{
|
||||
write = 0;
|
||||
reset();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
sum = 0.;
|
||||
memset (buffer, 0, sizeof (buffer));
|
||||
}
|
||||
|
||||
/* needs the squared sample value to be passed in */
|
||||
d_sample process (d_sample x)
|
||||
{
|
||||
sum -= buffer[write];
|
||||
sum += x;
|
||||
write = (write + 1) & 63;
|
||||
|
||||
return sqrt (sum / 64);
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_RMS_H_ */
|
||||
100
plugins/ladspa_effect/caps/dsp/Roessler.h
Normal file
100
plugins/ladspa_effect/caps/dsp/Roessler.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
dsp/Roessler.h
|
||||
|
||||
Copyright 2003-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
Roessler fractal.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_ROESSLER_H_
|
||||
#define _DSP_ROESSLER_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
class Roessler
|
||||
{
|
||||
public:
|
||||
double x[2], y[2], z[2];
|
||||
double h, a, b, c;
|
||||
int I;
|
||||
|
||||
public:
|
||||
Roessler()
|
||||
{
|
||||
h = 0.001;
|
||||
a = .2;
|
||||
b = .2;
|
||||
c = 5.7;
|
||||
}
|
||||
|
||||
/* rate is normalized (0 .. 1) */
|
||||
void set_rate (double r)
|
||||
{
|
||||
h = max (.000001, r * .096);
|
||||
}
|
||||
|
||||
void init (double _h = .001, double seed = .0)
|
||||
{
|
||||
h = _h;
|
||||
|
||||
I = 0;
|
||||
|
||||
x[0] = .0001 + .0001 * seed;
|
||||
y[0] = .0001;
|
||||
z[0] = .0001;
|
||||
|
||||
for (int i = 0; i < 5000; ++i)
|
||||
get();
|
||||
}
|
||||
|
||||
d_sample get()
|
||||
{
|
||||
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));
|
||||
|
||||
I = J;
|
||||
|
||||
return x[I] * .01725 + z[I] * .015;
|
||||
}
|
||||
|
||||
double get_x()
|
||||
{
|
||||
return x[I];
|
||||
}
|
||||
|
||||
double get_y()
|
||||
{
|
||||
return y[I];
|
||||
}
|
||||
|
||||
double get_z()
|
||||
{
|
||||
return z[I];
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_ROESSLER_H_ */
|
||||
190
plugins/ladspa_effect/caps/dsp/SVF.h
Normal file
190
plugins/ladspa_effect/caps/dsp/SVF.h
Normal file
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
dsp/SVF.h
|
||||
|
||||
Copyright 2002-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
ladder filter in Chamberlin topology. supports largely independent
|
||||
f and Q adjustments and sweeps.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
/*
|
||||
inspired by this music-dsp entry:
|
||||
|
||||
State Variable Filter (Double Sampled, Stable)
|
||||
Type : 2 Pole Low, High, Band, Notch and Peaking
|
||||
References :Posted by Andrew Simper
|
||||
|
||||
Notes :
|
||||
Thanks to Laurent de Soras for the stability limit
|
||||
and Steffan Diedrichsen for the correct notch output.
|
||||
|
||||
Code :
|
||||
input = input buffer;
|
||||
output = output buffer;
|
||||
fs = sampling frequency;
|
||||
fc = cutoff frequency normally something like:
|
||||
440.0*pow(2.0, (midi_note - 69.0)/12.0);
|
||||
res = resonance 0 to 1;
|
||||
drive = internal distortion 0 to 0.1
|
||||
freq = MIN(0.25, 2.0*sin(PI*fc/(fs*2))); // the fs*2 is because it's double sampled
|
||||
damp = MIN(2.0*(1.0 - pow(res, 0.25)), MIN(2.0, 2.0/freq - freq*0.5));
|
||||
notch = notch output
|
||||
low = low pass output
|
||||
high = high pass output
|
||||
band = band pass output
|
||||
peak = peaking output = low - high
|
||||
--
|
||||
double sampled svf loop:
|
||||
for (i=0; i<numSamples; i++)
|
||||
{
|
||||
in = input[i];
|
||||
notch = in - damp*band;
|
||||
low = low + freq*band;
|
||||
high = notch - low;
|
||||
band = freq*high + band - drive*band*band*band;
|
||||
out = 0.5*(notch or low or high or band or peak);
|
||||
notch = in - damp*band;
|
||||
low = low + freq*band;
|
||||
high = notch - low;
|
||||
band = freq*high + band - drive*band*band*band;
|
||||
out += 0.5*(same out as above);
|
||||
output[i] = out;
|
||||
}
|
||||
*/
|
||||
|
||||
#ifndef _DSP_SVF_H_
|
||||
#define _DSP_SVF_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
template <int OVERSAMPLE>
|
||||
class SVF
|
||||
{
|
||||
protected:
|
||||
/* loop parameters */
|
||||
d_sample f, q, qnorm;
|
||||
|
||||
/* outputs (peak and notch left out) */
|
||||
d_sample lo, band, hi;
|
||||
d_sample * out;
|
||||
|
||||
public:
|
||||
/* the type of filtering to do. */
|
||||
enum {
|
||||
Low = 0,
|
||||
Band = 1,
|
||||
High = 2
|
||||
};
|
||||
|
||||
SVF()
|
||||
{
|
||||
set_out (Low);
|
||||
set_f_Q (.1, .1);
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
hi = band = lo = 0;
|
||||
}
|
||||
|
||||
void set_f_Q (double fc, double Q)
|
||||
{
|
||||
/* this is a very tight limit */
|
||||
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));
|
||||
qnorm = sqrt (fabs (q) / 2. + .001);
|
||||
}
|
||||
|
||||
void set_out (int o)
|
||||
{
|
||||
if (o == Low)
|
||||
out = &lo;
|
||||
else if (o == Band)
|
||||
out = &band;
|
||||
else
|
||||
out = &hi;
|
||||
}
|
||||
|
||||
void one_cycle (d_sample * s, int frames)
|
||||
{
|
||||
for (int i = 0; i < frames; ++i)
|
||||
s[i] = process (s[i]);
|
||||
}
|
||||
|
||||
d_sample process (d_sample x)
|
||||
{
|
||||
x = qnorm * x;
|
||||
|
||||
for (int pass = 0; pass < OVERSAMPLE; ++pass)
|
||||
{
|
||||
hi = x - lo - q * band;
|
||||
band += f * hi;
|
||||
lo += f * band;
|
||||
|
||||
/* zero-padding, not 0th order holding. */
|
||||
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>
|
||||
class StackedSVF
|
||||
{
|
||||
public:
|
||||
SVF<OVERSAMPLE> svf [STACKED];
|
||||
|
||||
void reset()
|
||||
{
|
||||
for (int i = 0; i < STACKED; ++i)
|
||||
svf[i].reset();
|
||||
}
|
||||
|
||||
void set_out (int out)
|
||||
{
|
||||
for (int i = 0; i < STACKED; ++i)
|
||||
svf[i].set_out (out);
|
||||
}
|
||||
|
||||
void set_f_Q (double f, double Q)
|
||||
{
|
||||
for (int i = 0; i < STACKED; ++i)
|
||||
svf[i].set_f_Q (f, Q);
|
||||
}
|
||||
|
||||
d_sample process (d_sample x)
|
||||
{
|
||||
for (int i = 0; i < STACKED; ++i)
|
||||
x = svf[i].process (x);
|
||||
|
||||
return x;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_SVF_H_ */
|
||||
95
plugins/ladspa_effect/caps/dsp/Sine.h
Normal file
95
plugins/ladspa_effect/caps/dsp/Sine.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
dsp/Sine.h
|
||||
|
||||
Copyright 2003-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
direct form I recursive sin() 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
|
||||
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_SINE_H_
|
||||
#define _DSP_SINE_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
class Sine
|
||||
{
|
||||
protected:
|
||||
int z;
|
||||
d_float y[2];
|
||||
d_float b;
|
||||
|
||||
public:
|
||||
Sine()
|
||||
{
|
||||
b = 0;
|
||||
y[0] = y[1] = 0;
|
||||
z = 0;
|
||||
}
|
||||
|
||||
Sine (double f, double fs, double phase)
|
||||
{
|
||||
set_f (f, fs, phase);
|
||||
}
|
||||
|
||||
Sine (double omega, double phase = 0.)
|
||||
{
|
||||
set_f (omega, phase);
|
||||
}
|
||||
|
||||
inline void set_f (double f, double fs, double phase)
|
||||
{
|
||||
set_f (f * M_PI / fs, phase);
|
||||
}
|
||||
|
||||
inline void set_f (double w, double phase)
|
||||
{
|
||||
b = 2 * cos (w);
|
||||
y[0] = sin (phase - w);
|
||||
y[1] = sin (phase - w * 2);
|
||||
z = 0;
|
||||
}
|
||||
|
||||
/* advance and return 1 sample */
|
||||
inline double get()
|
||||
{
|
||||
register double s = b * y[z];
|
||||
z ^= 1;
|
||||
s -= y[z];
|
||||
return y[z] = s;
|
||||
}
|
||||
|
||||
double get_phase()
|
||||
{
|
||||
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;
|
||||
|
||||
return phi;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_SINE_H_ */
|
||||
240
plugins/ladspa_effect/caps/dsp/TwelveAX7.h
Normal file
240
plugins/ladspa_effect/caps/dsp/TwelveAX7.h
Normal file
@@ -0,0 +1,240 @@
|
||||
/*
|
||||
dsp/TwelveAX7.h
|
||||
|
||||
Copyright 2003-6 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
collection of approximations of the 12AX7 voltage transfer function
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_TWELVE_AX_7_H_
|
||||
#define _DSP_TWELVE_AX_7_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
#include "r12ax7.h"
|
||||
|
||||
/* this is the original tube model from caps < 0.1.9 or preamp.so, put
|
||||
* back into use in 0.1.11; the replacement (below) is too strong in
|
||||
* odd-order harmonics at the expense of even-order. it has to sound
|
||||
* good: it took a good deal of fiddling to get the coefficients right.
|
||||
*/
|
||||
class TwelveAX7
|
||||
{
|
||||
public:
|
||||
d_sample b, c, d;
|
||||
|
||||
struct {
|
||||
d_sample threshold, value;
|
||||
} clip[2];
|
||||
|
||||
/* amplitude at which clipping starts */
|
||||
d_sample scale;
|
||||
|
||||
public:
|
||||
TwelveAX7()
|
||||
{
|
||||
/* transfer polynomial parameters */
|
||||
b = -0.79618574210627535;
|
||||
c = -0.21108555430962023;
|
||||
d = +0.38944033523200522;
|
||||
|
||||
set_clips();
|
||||
|
||||
scale = min (fabs (clip[0].threshold), fabs (clip[1].threshold));
|
||||
}
|
||||
|
||||
inline d_sample transfer (d_sample a)
|
||||
{
|
||||
return a * (b + a * (c + a * d));
|
||||
}
|
||||
|
||||
inline d_sample transfer_clip (d_sample a)
|
||||
{
|
||||
if (a <= clip[0].threshold)
|
||||
return clip[0].value;
|
||||
if (a >= clip[1].threshold)
|
||||
return clip[1].value;
|
||||
return transfer (a);
|
||||
}
|
||||
|
||||
inline double get_root (double sign)
|
||||
{
|
||||
/* only once, no need to optimize */
|
||||
return
|
||||
(-2*c + sign * sqrt ((2*c) * (2*c) - 4 * (3 * d * b))) / (6 * d);
|
||||
}
|
||||
|
||||
inline void set_clips()
|
||||
{
|
||||
/* find 0 crossings in the derived, this is where we'll clip */
|
||||
double x0 = get_root (-1);
|
||||
double x1 = get_root (+1);
|
||||
|
||||
clip[0].value = transfer (x0);
|
||||
clip[1].value = transfer (x1);
|
||||
|
||||
clip[0].threshold = x0;
|
||||
clip[1].threshold = x1;
|
||||
}
|
||||
};
|
||||
|
||||
/* reworked model. higher order (than 3) polynomials make little sense;
|
||||
* sonically the difference is minim, and the cycle count increases
|
||||
* dramatically.
|
||||
*/
|
||||
class TwelveAX7_2
|
||||
{
|
||||
public:
|
||||
d_sample b, c, d;
|
||||
|
||||
struct {
|
||||
d_sample threshold, value;
|
||||
} clip[2];
|
||||
|
||||
d_sample scale;
|
||||
|
||||
public:
|
||||
TwelveAX7_2()
|
||||
{
|
||||
/* transfer polynomial parameters, made with gnuplot::fit() */
|
||||
b = -1.08150605597883;
|
||||
c = -0.262760944760536;
|
||||
d = 0.445770802765903;
|
||||
|
||||
static double x[2] = {-.52, +.98};
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
clip[i].threshold = x[i],
|
||||
clip[i].value = transfer (x[i]);
|
||||
|
||||
scale = min (fabs (clip[0].threshold), fabs (clip[1].threshold));
|
||||
}
|
||||
|
||||
inline d_sample transfer (d_sample a)
|
||||
{
|
||||
return a * (b + a * (c + a * d));
|
||||
}
|
||||
|
||||
inline d_sample transfer_clip (d_sample a)
|
||||
{
|
||||
if (a <= clip[0].threshold)
|
||||
return clip[0].value;
|
||||
if (a >= clip[1].threshold)
|
||||
return clip[1].value;
|
||||
return transfer (a);
|
||||
}
|
||||
};
|
||||
|
||||
/* third model relies on linear interpolation based on the transfer function
|
||||
* as calculated from a spice model.
|
||||
*/
|
||||
class TwelveAX7_3
|
||||
{
|
||||
public:
|
||||
d_sample b, c, d;
|
||||
|
||||
struct {
|
||||
d_sample threshold, value;
|
||||
} clip[2];
|
||||
|
||||
d_sample scale;
|
||||
|
||||
public:
|
||||
TwelveAX7_3()
|
||||
{
|
||||
static double x[2] =
|
||||
{
|
||||
/* adjust for a slightly earlier clipping threshold in the
|
||||
* lower lobe */
|
||||
-0.96 * (double) r12AX7::Zero /
|
||||
((double) r12AX7::Samples - (double) r12AX7::Zero),
|
||||
1
|
||||
};
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
clip[i].threshold = x[i],
|
||||
clip[i].value = transfer (x[i]);
|
||||
|
||||
scale = min (fabs (clip[0].threshold), fabs (clip[1].threshold));
|
||||
}
|
||||
|
||||
inline d_sample transfer (d_sample a)
|
||||
{
|
||||
a = r12AX7::Zero + a * (r12AX7::Samples - r12AX7::Zero);
|
||||
if (a <= 0)
|
||||
return r12AX7::v2v[0];
|
||||
if (a >= r12AX7::Samples - 1)
|
||||
return r12AX7::v2v [r12AX7::Samples - 1];
|
||||
|
||||
/* linear interpolation from sampled function */
|
||||
register int i = lrintf (a);
|
||||
a -= i;
|
||||
|
||||
return (r12AX7::v2v [i] * (1.f - a) + r12AX7::v2v [i + 1] * a);
|
||||
}
|
||||
|
||||
inline d_sample transfer_clip (d_sample a)
|
||||
{
|
||||
return transfer (a);
|
||||
}
|
||||
};
|
||||
|
||||
/* experimental */
|
||||
class NoTwelveAX7
|
||||
{
|
||||
public:
|
||||
struct {
|
||||
d_sample threshold, value;
|
||||
} clip[2];
|
||||
|
||||
/* amplitude at which clipping starts */
|
||||
d_sample scale;
|
||||
|
||||
public:
|
||||
NoTwelveAX7()
|
||||
{
|
||||
static double x[2] = { -1, 1 };
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
clip[i].threshold = x[i],
|
||||
clip[i].value = transfer (x[i]);
|
||||
|
||||
scale = min (fabs (clip[0].threshold), fabs (clip[1].threshold));
|
||||
}
|
||||
|
||||
inline d_sample transfer (d_sample a)
|
||||
{
|
||||
return 0.5469181606780 * (pow (1 - a, 1.5) - 1);
|
||||
}
|
||||
|
||||
inline d_sample transfer_clip (d_sample a)
|
||||
{
|
||||
if (a <= clip[0].threshold)
|
||||
return clip[0].value;
|
||||
if (a >= clip[1].threshold)
|
||||
return clip[1].value;
|
||||
return transfer (a);
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_TWELVE_AX_7_H_ */
|
||||
224
plugins/ladspa_effect/caps/dsp/VCO.h
Normal file
224
plugins/ladspa_effect/caps/dsp/VCO.h
Normal file
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
dsp/VCO.h
|
||||
|
||||
Copyright 2004 Tim Goetze <tim@quitte.de>
|
||||
|
||||
oscillators for triangle/sawtooth/square waves, and a combination
|
||||
for detuning and hard sync.
|
||||
|
||||
NB: these oscillators are *not* bandlimited. oversample if needed.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _DSP_VCO_H_
|
||||
#define _DSP_VCO_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
/* variable triangle to sawtooth generator. you can use two of these to
|
||||
* generate a square, but we prefer the integrated solution below.
|
||||
*/
|
||||
class TriSaw
|
||||
{
|
||||
public:
|
||||
/* doubles for maximum stability */
|
||||
double phase, inc;
|
||||
|
||||
double tri, tri1, tri2;
|
||||
|
||||
public:
|
||||
TriSaw()
|
||||
{
|
||||
phase = 0;
|
||||
tri = .5;
|
||||
}
|
||||
|
||||
inline void set_f (double f, double fs)
|
||||
{
|
||||
set_inc (f / fs);
|
||||
}
|
||||
|
||||
inline void set_inc (double i)
|
||||
{
|
||||
inc = i;
|
||||
}
|
||||
|
||||
/* 0: triangle, 1: saw */
|
||||
inline void set_saw (double t)
|
||||
{
|
||||
tri = .5 + .5 * t;
|
||||
tri1 = 2. / tri;
|
||||
tri2 = 2. / (1 - tri);
|
||||
}
|
||||
|
||||
/* advance and return 1 sample.
|
||||
* many conditionals, but quicker than a solution based on fmod()
|
||||
*/
|
||||
inline float get()
|
||||
{
|
||||
phase += inc;
|
||||
|
||||
/* the good thing is that tri is always > .5, which implies
|
||||
* that this first conditional is true more often than not. */
|
||||
if (phase <= tri)
|
||||
return -1 + phase * tri1;
|
||||
if (phase < 1)
|
||||
return 1 - (phase - tri) * tri2;
|
||||
|
||||
phase -= 1;
|
||||
return -1 + phase * tri1;
|
||||
}
|
||||
};
|
||||
|
||||
/* variable triangle to sawtooth to square generator */
|
||||
class TriSawSquare
|
||||
{
|
||||
public:
|
||||
/* doubles for maximum stability, using floats here increases
|
||||
* cycle need on my athlon */
|
||||
double phase, inc;
|
||||
double * sync;
|
||||
|
||||
float sync_phase;
|
||||
|
||||
/* using doubles here increases cycle need significantly */
|
||||
float square_i;
|
||||
float tri, tri1, tri2;
|
||||
float st1, st2;
|
||||
|
||||
public:
|
||||
TriSawSquare()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
phase = 0;
|
||||
sync = &phase;
|
||||
sync_phase = 0;
|
||||
set_saw_square (.5, .5);
|
||||
}
|
||||
|
||||
inline void set_f (double f, double fs)
|
||||
{
|
||||
set_inc (f / fs);
|
||||
}
|
||||
|
||||
inline void set_inc (double i)
|
||||
{
|
||||
inc = i;
|
||||
}
|
||||
|
||||
inline void set_sync (TriSawSquare & tss, float p)
|
||||
{
|
||||
sync = &tss.phase;
|
||||
sync_phase = p;
|
||||
}
|
||||
|
||||
/* t = 0: tri - 1: saw,
|
||||
* s = 0: tri/saw - 1: square
|
||||
*/
|
||||
inline void set_saw_square (float t, float s)
|
||||
{
|
||||
tri = .5 + .5 * t;
|
||||
square_i = 1 - s;
|
||||
|
||||
float si2 = 2 * square_i;
|
||||
float one_m_t = 1 - tri;
|
||||
|
||||
tri1 = si2 / tri;
|
||||
tri2 = si2 / one_m_t;
|
||||
|
||||
st1 = s * one_m_t;
|
||||
st2 = s * tri;
|
||||
}
|
||||
|
||||
/* advance and return 1 sample. a pity we need so many conditionals,
|
||||
* seeing that this is run at 352 k.
|
||||
*/
|
||||
inline float get()
|
||||
{
|
||||
phase += inc;
|
||||
|
||||
if (phase <= tri)
|
||||
first_half:
|
||||
/* raw version:
|
||||
return (1 - square) * (-1 + phase * 2 / tri) - square * (1 - tri);
|
||||
*/
|
||||
return -square_i + phase * tri1 - st1;
|
||||
|
||||
if (phase < 1)
|
||||
/* raw version:
|
||||
return (1 - square) * (1 - (phase - tri) * 2 / (1 - tri)) + square * tri;
|
||||
*/
|
||||
return square_i - (phase - tri) * tri2 + st2;
|
||||
|
||||
phase -= 1;
|
||||
*sync = phase + sync_phase;
|
||||
goto first_half;
|
||||
}
|
||||
};
|
||||
|
||||
class VCO2
|
||||
{
|
||||
public:
|
||||
TriSawSquare vco[2];
|
||||
float blend, i_blend;
|
||||
|
||||
public:
|
||||
VCO2()
|
||||
{
|
||||
set_blend (.5);
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
set_blend (.5);
|
||||
vco[0].reset();
|
||||
vco[1].reset();
|
||||
}
|
||||
|
||||
void set_f (double f, double fs, double detune)
|
||||
{
|
||||
vco[0].set_f (f, fs);
|
||||
vco[1].set_f (f * pow (2, detune / 12.), fs);
|
||||
}
|
||||
|
||||
inline void set_blend (float b)
|
||||
{
|
||||
blend = b;
|
||||
i_blend = 1 - fabs (b);
|
||||
}
|
||||
|
||||
inline void set_sync (float sync)
|
||||
{
|
||||
vco[0].set_sync (sync ? vco[1] : vco[0], sync);
|
||||
}
|
||||
|
||||
inline float get()
|
||||
{
|
||||
return vco[0].get() * blend + vco[1].get() * i_blend;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_VCO_H_ */
|
||||
82
plugins/ladspa_effect/caps/dsp/White.h
Normal file
82
plugins/ladspa_effect/caps/dsp/White.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
dsp/White.h
|
||||
|
||||
Copyright 2004 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
|
||||
providing a decent binary shift operator. most of all, no random() calls.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_WHITE_H_
|
||||
#define _DSP_WHITE_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
/* after initializing, call either get() or get_31() to get a sample, don't
|
||||
* mix them. (get_31 output goes out of range if called after get()).
|
||||
*/
|
||||
class White
|
||||
{
|
||||
public:
|
||||
uint32 b;
|
||||
|
||||
White()
|
||||
{
|
||||
b = 0x1fff7777;
|
||||
}
|
||||
|
||||
void init (float f)
|
||||
{
|
||||
b = (uint32) (f * (float) 0x1fff7777);
|
||||
}
|
||||
|
||||
d_sample abs()
|
||||
{
|
||||
return fabs (get());
|
||||
}
|
||||
|
||||
/* 32-bit version */
|
||||
d_sample get()
|
||||
{
|
||||
# define BIT(y) ((b << (31 - y)) & 0x80000000)
|
||||
|
||||
b = ((BIT (28) ^ BIT (27) ^ BIT (1) ^ BIT (0))) | (b >> 1);
|
||||
return (4.6566128730773926e-10 * (d_sample) b) - 1;
|
||||
|
||||
# undef BIT
|
||||
}
|
||||
|
||||
/* 31-bit version, at least 6 instructions less / sample. probably only
|
||||
* pays off on a processor not providing a decent binary shift. */
|
||||
d_sample get_31()
|
||||
{
|
||||
# define BIT(y) ((b << (30 - y)) & 0x40000000)
|
||||
|
||||
b = ((BIT (3) ^ BIT (0))) | (b >> 1);
|
||||
return (9.3132257461547852e-10 * (d_sample) b) - 1;
|
||||
|
||||
# undef BIT
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_WHITE_H_ */
|
||||
459
plugins/ladspa_effect/caps/dsp/r12ax7.h
Normal file
459
plugins/ladspa_effect/caps/dsp/r12ax7.h
Normal file
@@ -0,0 +1,459 @@
|
||||
/*
|
||||
dsp/r12ax7.h
|
||||
|
||||
Copyright 2003-5 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
12AX7 voltage transfer function, sampled from a spice simulation
|
||||
running a simple preamp net with a 12ax7 model graciously provided
|
||||
by duncanamps.com .
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_R_12_AX_7_H_
|
||||
#define _DSP_R_12_AX_7_H_
|
||||
|
||||
namespace r12AX7 {
|
||||
|
||||
enum { Zero = 566, Samples = 1668, };
|
||||
|
||||
static float v2v[] = {
|
||||
0.277279436588, 0.277249097824, 0.277187168598, 0.277105689049,
|
||||
0.277008116245, 0.276897609234, 0.276775300503, 0.276642978191,
|
||||
0.276501119137, 0.276351094246, 0.276193082333, 0.276027917862,
|
||||
0.275855839252, 0.275678634644, 0.275495171547, 0.275305449963,
|
||||
0.275109887123, 0.274909138680, 0.274703323841, 0.274492740631,
|
||||
0.274277567863, 0.274058103561, 0.273834228516, 0.273606359959,
|
||||
0.273374497890, 0.273138821125, 0.272899389267, 0.272656440735,
|
||||
0.272409796715, 0.272159934044, 0.271906614304, 0.271650075912,
|
||||
0.271390438080, 0.271127700806, 0.270861923695, 0.270593225956,
|
||||
0.270321667194, 0.270047247410, 0.269770205021, 0.269490361214,
|
||||
0.269207894802, 0.268922865391, 0.268635272980, 0.268345177174,
|
||||
0.268052697182, 0.267757713795, 0.267460465431, 0.267160952091,
|
||||
0.266858994961, 0.266555011272, 0.266248643398, 0.265940189362,
|
||||
0.265629589558, 0.265316963196, 0.265002191067, 0.264685392380,
|
||||
0.264366567135, 0.264045774937, 0.263723075390, 0.263398468494,
|
||||
0.263071894646, 0.262743532658, 0.262413203716, 0.262081146240,
|
||||
0.261747241020, 0.261411607265, 0.261074185371, 0.260735154152,
|
||||
0.260394215584, 0.260051786900, 0.259707629681, 0.259361803532,
|
||||
0.259014308453, 0.258665204048, 0.258314549923, 0.257962286472,
|
||||
0.257608532906, 0.257253229618, 0.256896317005, 0.256537973881,
|
||||
0.256178140640, 0.255816757679, 0.255454003811, 0.255089759827,
|
||||
0.254724085331, 0.254356980324, 0.253988444805, 0.253618597984,
|
||||
0.253247320652, 0.252874732018, 0.252500772476, 0.252125442028,
|
||||
0.251748800278, 0.251370847225, 0.250991582870, 0.250611066818,
|
||||
0.250229299068, 0.249846160412, 0.249461889267, 0.249076247215,
|
||||
0.248689472675, 0.248301327229, 0.247912168503, 0.247521698475,
|
||||
0.247129976749, 0.246737182140, 0.246343135834, 0.245947897434,
|
||||
0.245551586151, 0.245154082775, 0.244755446911, 0.244355678558,
|
||||
0.243954837322, 0.243552863598, 0.243149697781, 0.242745578289,
|
||||
0.242340266705, 0.241933882236, 0.241526484489, 0.241117894650,
|
||||
0.240708351135, 0.240297734737, 0.239886105061, 0.239473402500,
|
||||
0.239059746265, 0.238644957542, 0.238229274750, 0.237812399864,
|
||||
0.237394690514, 0.236975908279, 0.236556172371, 0.236135542393,
|
||||
0.235713779926, 0.235291123390, 0.234867513180, 0.234442949295,
|
||||
0.234017431736, 0.233590960503, 0.233163535595, 0.232735216618,
|
||||
0.232305943966, 0.231875777245, 0.231444656849, 0.231012642384,
|
||||
0.230579853058, 0.230145990849, 0.229711294174, 0.229275703430,
|
||||
0.228839278221, 0.228401958942, 0.227963745594, 0.227524638176,
|
||||
0.227084696293, 0.226643919945, 0.226202249527, 0.225759744644,
|
||||
0.225316464901, 0.224872291088, 0.224427282810, 0.223981380463,
|
||||
0.223534762859, 0.223087251186, 0.222638964653, 0.222189962864,
|
||||
0.221740007401, 0.221289336681, 0.220837771893, 0.220385491848,
|
||||
0.219932436943, 0.219478607178, 0.219023883343, 0.218568444252,
|
||||
0.218112349510, 0.217655301094, 0.217197597027, 0.216739118099,
|
||||
0.216279804707, 0.215819895267, 0.215359091759, 0.214897632599,
|
||||
0.214435338974, 0.213972389698, 0.213508665562, 0.213044166565,
|
||||
0.212579071522, 0.212113201618, 0.211646556854, 0.211179137230,
|
||||
0.210711181164, 0.210242390633, 0.209772944450, 0.209302783012,
|
||||
0.208831906319, 0.208360373974, 0.207888066769, 0.207415163517,
|
||||
0.206941485405, 0.206467092037, 0.205992162228, 0.205516517162,
|
||||
0.205040097237, 0.204563021660, 0.204085409641, 0.203607022762,
|
||||
0.203128039837, 0.202648282051, 0.202167987823, 0.201686978340,
|
||||
0.201205253601, 0.200723052025, 0.200240015984, 0.199756443501,
|
||||
0.199272215366, 0.198787331581, 0.198301851749, 0.197815716267,
|
||||
0.197328925133, 0.196841537952, 0.196353554726, 0.195864915848,
|
||||
0.195375621319, 0.194885730743, 0.194395244122, 0.193904161453,
|
||||
0.193412423134, 0.192920088768, 0.192427158356, 0.191933691502,
|
||||
0.191439509392, 0.190944850445, 0.190449535847, 0.189953625202,
|
||||
0.189457118511, 0.188960015774, 0.188462376595, 0.187964081764,
|
||||
0.187465250492, 0.186965823174, 0.186465859413, 0.185965299606,
|
||||
0.185464143753, 0.184962451458, 0.184460222721, 0.183957397938,
|
||||
0.183453977108, 0.182949960232, 0.182445406914, 0.181940436363,
|
||||
0.181434750557, 0.180928587914, 0.180421829224, 0.179914534092,
|
||||
0.179406702518, 0.178898334503, 0.178389430046, 0.177879989147,
|
||||
0.177369952202, 0.176859438419, 0.176348328590, 0.175836741924,
|
||||
0.175324618816, 0.174811959267, 0.174298763275, 0.173785090446,
|
||||
0.173270881176, 0.172756135464, 0.172240853310, 0.171725094318,
|
||||
0.171208739281, 0.170691967010, 0.170174598694, 0.169656693935,
|
||||
0.169138371944, 0.168619513512, 0.168100118637, 0.167580246925,
|
||||
0.167059898376, 0.166539072990, 0.166017711163, 0.165495812893,
|
||||
0.164973437786, 0.164450585842, 0.163927257061, 0.163403451443,
|
||||
0.162879049778, 0.162354290485, 0.161828994751, 0.161303222179,
|
||||
0.160776913166, 0.160250246525, 0.159723043442, 0.159195303917,
|
||||
0.158667147160, 0.158138513565, 0.157609403133, 0.157079756260,
|
||||
0.156549692154, 0.156019270420, 0.155488193035, 0.154956758022,
|
||||
0.154424905777, 0.153892517090, 0.153359651566, 0.152826309204,
|
||||
0.152292609215, 0.151758432388, 0.151223719120, 0.150688648224,
|
||||
0.150153040886, 0.149617075920, 0.149080574512, 0.148543596268,
|
||||
0.148006320000, 0.147468507290, 0.146930217743, 0.146391570568,
|
||||
0.145852446556, 0.145312905312, 0.144772827625, 0.144232392311,
|
||||
0.143691599369, 0.143150269985, 0.142608463764, 0.142066359520,
|
||||
0.141523718834, 0.140980720520, 0.140437245369, 0.139893352985,
|
||||
0.139349043369, 0.138804316521, 0.138259172440, 0.137713611126,
|
||||
0.137167632580, 0.136621177197, 0.136074364185, 0.135527133942,
|
||||
0.134979486465, 0.134431421757, 0.133882939816, 0.133334040642,
|
||||
0.132784724236, 0.132234990597, 0.131684958935, 0.131134390831,
|
||||
0.130583465099, 0.130032181740, 0.129480421543, 0.128928303719,
|
||||
0.128375828266, 0.127822816372, 0.127269506454, 0.126715779305,
|
||||
0.126161694527, 0.125607132912, 0.125052213669, 0.124496996403,
|
||||
0.123941242695, 0.123385190964, 0.122828722000, 0.122271895409,
|
||||
0.121714651585, 0.121156990528, 0.120598971844, 0.120040595531,
|
||||
0.119481861591, 0.118922710419, 0.118363082409, 0.117803215981,
|
||||
0.117242932320, 0.116682231426, 0.116121232510, 0.115559816360,
|
||||
0.114997982979, 0.114435851574, 0.113873243332, 0.113310396671,
|
||||
0.112747073174, 0.112183392048, 0.111619412899, 0.111055016518,
|
||||
0.110490322113, 0.109925150871, 0.109359681606, 0.108793854713,
|
||||
0.108227670193, 0.107661128044, 0.107094168663, 0.106526911259,
|
||||
0.105959236622, 0.105391263962, 0.104822933674, 0.104254245758,
|
||||
0.103685200214, 0.103115737438, 0.102545976639, 0.101975917816,
|
||||
0.101405382156, 0.100834667683, 0.100263476372, 0.099691987038,
|
||||
0.099120140076, 0.098547875881, 0.097975373268, 0.097402453423,
|
||||
0.096829295158, 0.096255660057, 0.095681726933, 0.095107495785,
|
||||
0.094532907009, 0.093957960606, 0.093382716179, 0.092807114124,
|
||||
0.092231214046, 0.091654956341, 0.091078281403, 0.090501308441,
|
||||
0.089924037457, 0.089346468449, 0.088768541813, 0.088190257549,
|
||||
0.087611675262, 0.087032735348, 0.086453497410, 0.085873961449,
|
||||
0.085294008255, 0.084713757038, 0.084133267403, 0.083552420139,
|
||||
0.082971215248, 0.082389712334, 0.081807851791, 0.081225633621,
|
||||
0.080643236637, 0.080060362816, 0.079477250576, 0.078893840313,
|
||||
0.078310132027, 0.077726066113, 0.077141702175, 0.076556980610,
|
||||
0.075971961021, 0.075386703014, 0.074801087379, 0.074215173721,
|
||||
0.073628902435, 0.073042333126, 0.072455525398, 0.071868300438,
|
||||
0.071280896664, 0.070693075657, 0.070105016232, 0.069516658783,
|
||||
0.068927943707, 0.068338930607, 0.067749619484, 0.067160010338,
|
||||
0.066570162773, 0.065979957581, 0.065389454365, 0.064798653126,
|
||||
0.064207553864, 0.063616216183, 0.063024461269, 0.062432527542,
|
||||
0.061840236187, 0.061247646809, 0.060654759407, 0.060061693192,
|
||||
0.059468209743, 0.058874547482, 0.058280467987, 0.057686150074,
|
||||
0.057091534138, 0.056496620178, 0.055901467800, 0.055306017399,
|
||||
0.054710209370, 0.054114162922, 0.053517878056, 0.052921295166,
|
||||
0.052324414253, 0.051727175713, 0.051129758358, 0.050532042980,
|
||||
0.049934029579, 0.049335718155, 0.048737108707, 0.048138201237,
|
||||
0.047539114952, 0.046939730644, 0.046340048313, 0.045740067959,
|
||||
0.045139789581, 0.044539213181, 0.043938457966, 0.043337404728,
|
||||
0.042736113071, 0.042134463787, 0.041532635689, 0.040930390358,
|
||||
0.040328025818, 0.039725303650, 0.039122343063, 0.038519084454,
|
||||
0.037915587425, 0.037311792374, 0.036707758904, 0.036103487015,
|
||||
0.035498917103, 0.034894108772, 0.034289002419, 0.033683657646,
|
||||
0.033078014851, 0.032472133636, 0.031866014004, 0.031259536743,
|
||||
0.030652880669, 0.030045926571, 0.029438734055, 0.028831362724,
|
||||
0.028223633766, 0.027615666389, 0.027007460594, 0.026398956776,
|
||||
0.025790274143, 0.025181293488, 0.024572074413, 0.023962497711,
|
||||
0.023352801800, 0.022742748260, 0.022132515907, 0.021522045135,
|
||||
0.020911276340, 0.020300269127, 0.019689023495, 0.019077539444,
|
||||
0.018465697765, 0.017853736877, 0.017241477966, 0.016628980637,
|
||||
0.016016244888, 0.015403211117, 0.014789998531, 0.014176487923,
|
||||
0.013562798500, 0.012948811054, 0.012334585190, 0.011720120907,
|
||||
0.011105477810, 0.010490477085, 0.009875297546, 0.009259879589,
|
||||
0.008644223213, 0.008028268814, 0.007412135601, 0.006795823574,
|
||||
0.006179153919, 0.005562305450, 0.004945218563, 0.004327833652,
|
||||
0.003710269928, 0.003092467785, 0.002474486828, 0.001856148243,
|
||||
0.001237690449, 0.000618994236, 0.000000000000, -0.000619232655,
|
||||
-0.001238644123, -0.001858353615, -0.002478241920, -0.003098428249,
|
||||
-0.003718733788, -0.004339277744, -0.004960119724, -0.005581140518,
|
||||
-0.006202459335, -0.006823956966, -0.007445693016, -0.008067667484,
|
||||
-0.008689820766, -0.009312212467, -0.009934842587, -0.010557651520,
|
||||
-0.011180758476, -0.011804044247, -0.012427628040, -0.013051390648,
|
||||
-0.013675332069, -0.014299511909, -0.014923930168, -0.015548527241,
|
||||
-0.016173422337, -0.016798496246, -0.017423748970, -0.018049240112,
|
||||
-0.018674969673, -0.019300937653, -0.019927084446, -0.020553469658,
|
||||
-0.021180033684, -0.021806895733, -0.022433876991, -0.023061156273,
|
||||
-0.023688614368, -0.024316251278, -0.024944126606, -0.025572240353,
|
||||
-0.026200532913, -0.026829063892, -0.027457773685, -0.028086721897,
|
||||
-0.028715848923, -0.029345214367, -0.029974758625, -0.030604541302,
|
||||
-0.031234562397, -0.031864762306, -0.032495141029, -0.033125758171,
|
||||
-0.033756554127, -0.034387588501, -0.035018861294, -0.035650253296,
|
||||
-0.036281883717, -0.036913752556, -0.037545800209, -0.038178086281,
|
||||
-0.038810491562, -0.039443194866, -0.040076017380, -0.040709137917,
|
||||
-0.041342377663, -0.041975855827, -0.042609512806, -0.043243408203,
|
||||
-0.043877482414, -0.044511735439, -0.045146226883, -0.045780897141,
|
||||
-0.046415746212, -0.047050774097, -0.047686040401, -0.048321545124,
|
||||
-0.048957169056, -0.049593031406, -0.050229072571, -0.050865292549,
|
||||
-0.051501750946, -0.052138388157, -0.052775204182, -0.053412258625,
|
||||
-0.054049432278, -0.054686844349, -0.055324435234, -0.055962264538,
|
||||
-0.056600213051, -0.057238399982, -0.057876765728, -0.058515310287,
|
||||
-0.059154093266, -0.059792995453, -0.060432136059, -0.061071455479,
|
||||
-0.061710953712, -0.062350630760, -0.062990486622, -0.063630580902,
|
||||
-0.064270794392, -0.064911246300, -0.065551877022, -0.066192686558,
|
||||
-0.066833674908, -0.067474842072, -0.068116247654, -0.068757772446,
|
||||
-0.069399535656, -0.070041418076, -0.070683538914, -0.071325838566,
|
||||
-0.071968257427, -0.072610914707, -0.073253750801, -0.073896765709,
|
||||
-0.074539959431, -0.075183331966, -0.075826883316, -0.076470613480,
|
||||
-0.077114522457, -0.077758610249, -0.078402876854, -0.079047322273,
|
||||
-0.079691946507, -0.080336749554, -0.080981731415, -0.081626832485,
|
||||
-0.082272171974, -0.082917690277, -0.083563387394, -0.084209203720,
|
||||
-0.084855258465, -0.085501432419, -0.086147844791, -0.086794376373,
|
||||
-0.087441086769, -0.088088035583, -0.088735103607, -0.089382350445,
|
||||
-0.090029716492, -0.090677320957, -0.091325104237, -0.091973006725,
|
||||
-0.092621147633, -0.093269407749, -0.093917787075, -0.094566464424,
|
||||
-0.095215201378, -0.095864176750, -0.096513271332, -0.097162544727,
|
||||
-0.097811996937, -0.098461627960, -0.099111437798, -0.099761366844,
|
||||
-0.100411474705, -0.101061761379, -0.101712167263, -0.102362811565,
|
||||
-0.103013575077, -0.103664517403, -0.104315698147, -0.104966938496,
|
||||
-0.105618357658, -0.106269955635, -0.106921732426, -0.107573628426,
|
||||
-0.108225762844, -0.108877956867, -0.109530389309, -0.110182940960,
|
||||
-0.110835671425, -0.111488580704, -0.112141609192, -0.112794876099,
|
||||
-0.113448202610, -0.114101707935, -0.114755392075, -0.115409255028,
|
||||
-0.116063296795, -0.116717457771, -0.117371797562, -0.118026256561,
|
||||
-0.118680894375, -0.119335711002, -0.119990646839, -0.120645701885,
|
||||
-0.121300995350, -0.121956408024, -0.122611939907, -0.123267710209,
|
||||
-0.123923599720, -0.124579608440, -0.125235795975, -0.125892102718,
|
||||
-0.126548647881, -0.127205252647, -0.127862036228, -0.128518998623,
|
||||
-0.129176080227, -0.129833400249, -0.130490779877, -0.131148338318,
|
||||
-0.131806015968, -0.132463872433, -0.133121848106, -0.133780062199,
|
||||
-0.134438335896, -0.135096788406, -0.135755360126, -0.136414170265,
|
||||
-0.137073040009, -0.137732088566, -0.138391256332, -0.139050662518,
|
||||
-0.139710128307, -0.140369713306, -0.141029477119, -0.141689419746,
|
||||
-0.142349541187, -0.143009781837, -0.143670141697, -0.144330620766,
|
||||
-0.144991278648, -0.145652055740, -0.146312952042, -0.146974027157,
|
||||
-0.147635281086, -0.148296654224, -0.148958146572, -0.149619817734,
|
||||
-0.150281608105, -0.150943517685, -0.151605606079, -0.152267873287,
|
||||
-0.152930200100, -0.153592705727, -0.154255390167, -0.154918134212,
|
||||
-0.155581057072, -0.156244099140, -0.156907320023, -0.157570660114,
|
||||
-0.158234119415, -0.158897757530, -0.159561455250, -0.160225391388,
|
||||
-0.160889446735, -0.161553561687, -0.162217855453, -0.162882328033,
|
||||
-0.163546860218, -0.164211571217, -0.164876461029, -0.165541410446,
|
||||
-0.166206538677, -0.166871786118, -0.167537152767, -0.168202698231,
|
||||
-0.168868362904, -0.169534146786, -0.170200049877, -0.170866131783,
|
||||
-0.171532273293, -0.172198593616, -0.172865033150, -0.173531651497,
|
||||
-0.174198389053, -0.174865186214, -0.175532162189, -0.176199316978,
|
||||
-0.176866531372, -0.177533924580, -0.178201436996, -0.178869009018,
|
||||
-0.179536819458, -0.180204689503, -0.180872738361, -0.181540846825,
|
||||
-0.182209134102, -0.182877540588, -0.183546066284, -0.184214711189,
|
||||
-0.184883534908, -0.185552418232, -0.186221480370, -0.186890661716,
|
||||
-0.187559902668, -0.188229382038, -0.188898921013, -0.189568579197,
|
||||
-0.190238356590, -0.190908312798, -0.191578388214, -0.192248523235,
|
||||
-0.192918837070, -0.193589210510, -0.194259762764, -0.194930493832,
|
||||
-0.195601284504, -0.196272194386, -0.196943223476, -0.197614312172,
|
||||
-0.198285639286, -0.198957026005, -0.199628591537, -0.200300216675,
|
||||
-0.200972020626, -0.201643884182, -0.202315866947, -0.202988028526,
|
||||
-0.203660309315, -0.204332649708, -0.205005109310, -0.205677747726,
|
||||
-0.206350505352, -0.207023322582, -0.207696318626, -0.208369374275,
|
||||
-0.209042608738, -0.209715902805, -0.210389316082, -0.211062908173,
|
||||
-0.211736559868, -0.212410390377, -0.213084280491, -0.213758289814,
|
||||
-0.214432477951, -0.215106725693, -0.215781092644, -0.216455549002,
|
||||
-0.217130184174, -0.217804878950, -0.218479722738, -0.219154685736,
|
||||
-0.219829738140, -0.220504909754, -0.221180200577, -0.221855610609,
|
||||
-0.222531110048, -0.223206758499, -0.223882496357, -0.224558383226,
|
||||
-0.225234329700, -0.225910425186, -0.226586610079, -0.227262884378,
|
||||
-0.227939307690, -0.228615850210, -0.229292482138, -0.229969263077,
|
||||
-0.230646073818, -0.231323093176, -0.232000142336, -0.232677340508,
|
||||
-0.233354657888, -0.234032064676, -0.234709590673, -0.235387206078,
|
||||
-0.236064910889, -0.236742764711, -0.237420737743, -0.238098770380,
|
||||
-0.238776952028, -0.239455252886, -0.240133613348, -0.240812093019,
|
||||
-0.241490721703, -0.242169409990, -0.242848247290, -0.243527114391,
|
||||
-0.244206160307, -0.244885295630, -0.245564520359, -0.246243864298,
|
||||
-0.246923267841, -0.247602820396, -0.248282492161, -0.248962253332,
|
||||
-0.249642103910, -0.250322073698, -0.251002162695, -0.251682341099,
|
||||
-0.252362608910, -0.253042995930, -0.253723442554, -0.254404038191,
|
||||
-0.255084723234, -0.255765527487, -0.256446391344, -0.257127404213,
|
||||
-0.257808506489, -0.258489698172, -0.259170979261, -0.259852379560,
|
||||
-0.260533869267, -0.261215478182, -0.261897146702, -0.262578964233,
|
||||
-0.263260871172, -0.263942837715, -0.264624953270, -0.265307158232,
|
||||
-0.265989482403, -0.266671866179, -0.267354339361, -0.268036931753,
|
||||
-0.268719583750, -0.269402414560, -0.270085275173, -0.270768254995,
|
||||
-0.271451354027, -0.272134482861, -0.272817790508, -0.273501127958,
|
||||
-0.274184614420, -0.274868160486, -0.275552004576, -0.276246696711,
|
||||
-0.276955842972, -0.277676463127, -0.278406113386, -0.279142975807,
|
||||
-0.279885530472, -0.280632615089, -0.281383335590, -0.282136917114,
|
||||
-0.282892853022, -0.283650636673, -0.284409940243, -0.285170495510,
|
||||
-0.285932064056, -0.286694467068, -0.287457615137, -0.288221299648,
|
||||
-0.288985580206, -0.289750248194, -0.290515333414, -0.291280776262,
|
||||
-0.292046546936, -0.292812615633, -0.293578982353, -0.294345587492,
|
||||
-0.295112460852, -0.295879513025, -0.296646833420, -0.297414392233,
|
||||
-0.298182129860, -0.298950135708, -0.299718320370, -0.300486743450,
|
||||
-0.301255315542, -0.302024126053, -0.302793115377, -0.303562343121,
|
||||
-0.304331749678, -0.305101364851, -0.305871158838, -0.306641131639,
|
||||
-0.307411372662, -0.308181732893, -0.308952361345, -0.309723138809,
|
||||
-0.310494124889, -0.311265289783, -0.312036663294, -0.312808215618,
|
||||
-0.313580006361, -0.314351975918, -0.315124064684, -0.315896451473,
|
||||
-0.316668987274, -0.317441672087, -0.318214595318, -0.318987697363,
|
||||
-0.319761008024, -0.320534497499, -0.321308195591, -0.322082072496,
|
||||
-0.322856098413, -0.323630332947, -0.324404805899, -0.325179398060,
|
||||
-0.325954228640, -0.326729238033, -0.327504426241, -0.328279823065,
|
||||
-0.329055398703, -0.329831123352, -0.330607086420, -0.331383198500,
|
||||
-0.332159548998, -0.332936048508, -0.333712756634, -0.334489613771,
|
||||
-0.335266709328, -0.336043953896, -0.336821347475, -0.337598979473,
|
||||
-0.338376790285, -0.339154779911, -0.339932948351, -0.340703547001,
|
||||
-0.341460168362, -0.342204123735, -0.342936009169, -0.343656539917,
|
||||
-0.344366520643, -0.345066785812, -0.345758140087, -0.346441298723,
|
||||
-0.347117066383, -0.347785979509, -0.348448574543, -0.349105387926,
|
||||
-0.349756926298, -0.350403457880, -0.351045399904, -0.351682960987,
|
||||
-0.352316498756, -0.352946251631, -0.353572368622, -0.354195058346,
|
||||
-0.354814529419, -0.355430841446, -0.356044232845, -0.356654793024,
|
||||
-0.357262581587, -0.357867747545, -0.358470380306, -0.359070599079,
|
||||
-0.359668403864, -0.360263943672, -0.360857278109, -0.361448466778,
|
||||
-0.362037539482, -0.362624615431, -0.363209664822, -0.363792806864,
|
||||
-0.364374041557, -0.364953458309, -0.365531116724, -0.366106957197,
|
||||
-0.366681158543, -0.367253661156, -0.367824524641, -0.368393778801,
|
||||
-0.368961453438, -0.369527608156, -0.370092272758, -0.370655417442,
|
||||
-0.371217161417, -0.371777445078, -0.372336328030, -0.372893840075,
|
||||
-0.373450040817, -0.374004870653, -0.374558418989, -0.375110656023,
|
||||
-0.375661671162, -0.376211434603, -0.376759976149, -0.377307295799,
|
||||
-0.377853453159, -0.378398448229, -0.378942251205, -0.379484951496,
|
||||
-0.380026549101, -0.380567044020, -0.381106466055, -0.381644785404,
|
||||
-0.382182061672, -0.382718294859, -0.383253514767, -0.383787691593,
|
||||
-0.384320884943, -0.384853094816, -0.385384321213, -0.385914593935,
|
||||
-0.386443912983, -0.386972278357, -0.387499719858, -0.388026237488,
|
||||
-0.388551831245, -0.389076471329, -0.389600366354, -0.390123337507,
|
||||
-0.390645444393, -0.391166716814, -0.391687124968, -0.392206668854,
|
||||
-0.392725408077, -0.393243283033, -0.393760412931, -0.394276678562,
|
||||
-0.394792169333, -0.395306885242, -0.395820796490, -0.396333962679,
|
||||
-0.396846383810, -0.397358000278, -0.397868901491, -0.398379057646,
|
||||
-0.398888468742, -0.399397134781, -0.399905115366, -0.400412350893,
|
||||
-0.400918900967, -0.401424735785, -0.401929885149, -0.402434349060,
|
||||
-0.402938157320, -0.403441250324, -0.403943657875, -0.404445439577,
|
||||
-0.404946535826, -0.405447006226, -0.405946820974, -0.406445980072,
|
||||
-0.406944513321, -0.407442390919, -0.407939672470, -0.408436328173,
|
||||
-0.408932358027, -0.409427791834, -0.409922599792, -0.410416811705,
|
||||
-0.410910427570, -0.411403477192, -0.411895900965, -0.412387788296,
|
||||
-0.412879049778, -0.413369774818, -0.413859903812, -0.414349466562,
|
||||
-0.414838492870, -0.415326923132, -0.415814846754, -0.416302174330,
|
||||
-0.416788995266, -0.417275249958, -0.417760968208, -0.418246179819,
|
||||
-0.418730825186, -0.419214993715, -0.419698596001, -0.420181691647,
|
||||
-0.420664280653, -0.421146333218, -0.421627908945, -0.422108948231,
|
||||
-0.422589510679, -0.423069566488, -0.423549115658, -0.424028217793,
|
||||
-0.424506783485, -0.424984872341, -0.425462514162, -0.425939619541,
|
||||
-0.426416277885, -0.426892489195, -0.427368193865, -0.427843451500,
|
||||
-0.428318232298, -0.428792566061, -0.429266452789, -0.429739862680,
|
||||
-0.430212795734, -0.430685311556, -0.431157380342, -0.431629002094,
|
||||
-0.432100176811, -0.432570904493, -0.433041214943, -0.433511078358,
|
||||
-0.433980494738, -0.434449523687, -0.434918075800, -0.435386240482,
|
||||
-0.435853987932, -0.436321288347, -0.436788171530, -0.437254667282,
|
||||
-0.437720745802, -0.438186407089, -0.438651651144, -0.439116477966,
|
||||
-0.439580917358, -0.440044969320, -0.440508633852, -0.440971851349,
|
||||
-0.441434711218, -0.441897183657, -0.442359238863, -0.442820936441,
|
||||
-0.443282216787, -0.443743109703, -0.444203674793, -0.444663792849,
|
||||
-0.445123583078, -0.445582956076, -0.446041971445, -0.446500629187,
|
||||
-0.446958899498, -0.447416782379, -0.447874337435, -0.448331505060,
|
||||
-0.448788315058, -0.449244767427, -0.449700862169, -0.450156599283,
|
||||
-0.450611978769, -0.451067000628, -0.451521664858, -0.451975971460,
|
||||
-0.452429950237, -0.452883571386, -0.453336834908, -0.453789770603,
|
||||
-0.454242378473, -0.454694598913, -0.455146521330, -0.455598086119,
|
||||
-0.456049323082, -0.456500232220, -0.456950783730, -0.457401037216,
|
||||
-0.457850933075, -0.458300501108, -0.458749771118, -0.459198683500,
|
||||
-0.459647268057, -0.460095554590, -0.460543513298, -0.460991144180,
|
||||
-0.461438477039, -0.461885482073, -0.462332129478, -0.462778508663,
|
||||
-0.463224560022, -0.463670313358, -0.464115768671, -0.464560896158,
|
||||
-0.465005695820, -0.465450197458, -0.465894401073, -0.466338336468,
|
||||
-0.466781944036, -0.467225223780, -0.467668235302, -0.468110918999,
|
||||
-0.468553334475, -0.468995451927, -0.469437271357, -0.469878792763,
|
||||
-0.470320016146, -0.470760941505, -0.471201598644, -0.471641957760,
|
||||
-0.472082048655, -0.472521811724, -0.472961336374, -0.473400533199,
|
||||
-0.473839461803, -0.474278151989, -0.474716484547, -0.475154578686,
|
||||
-0.475592404604, -0.476029932499, -0.476467192173, -0.476904183626,
|
||||
-0.477340877056, -0.477777302265, -0.478213489056, -0.478649377823,
|
||||
-0.479084998369, -0.479520380497, -0.479955434799, -0.480390250683,
|
||||
-0.480824828148, -0.481259107590, -0.481693148613, -0.482126891613,
|
||||
-0.482560396194, -0.482993602753, -0.483426630497, -0.483859330416,
|
||||
-0.484291791916, -0.484723985195, -0.485155940056, -0.485587626696,
|
||||
-0.486019074917, -0.486450254917, -0.486881166697, -0.487311840057,
|
||||
-0.487742304802, -0.488172471523, -0.488602399826, -0.489032089710,
|
||||
-0.489461481571, -0.489890694618, -0.490319639444, -0.490748345852,
|
||||
-0.491176784039, -0.491604983807, -0.492032945156, -0.492460697889,
|
||||
-0.492888182402, -0.493315428495, -0.493742465973, -0.494169205427,
|
||||
-0.494595766068, -0.495022058487, -0.495448112488, -0.495873928070,
|
||||
-0.496299535036, -0.496724903584, -0.497150033712, -0.497574925423,
|
||||
-0.497999608517, -0.498424023390, -0.498848229647, -0.499272227287,
|
||||
-0.499695956707, -0.500119447708, -0.500542759895, -0.500965833664,
|
||||
-0.501388669014, -0.501811325550, -0.502233743668, -0.502655923367,
|
||||
-0.503077864647, -0.503499567509, -0.503921091557, -0.504342377186,
|
||||
-0.504763484001, -0.505184292793, -0.505604982376, -0.506025373936,
|
||||
-0.506445586681, -0.506865620613, -0.507285356522, -0.507704913616,
|
||||
-0.508124232292, -0.508543372154, -0.508962333202, -0.509381055832,
|
||||
-0.509799540043, -0.510217785835, -0.510635912418, -0.511053800583,
|
||||
-0.511471390724, -0.511888861656, -0.512306094170, -0.512723147869,
|
||||
-0.513139963150, -0.513556599617, -0.513972997665, -0.514389276505,
|
||||
-0.514805316925, -0.515221118927, -0.515636682510, -0.516052126884,
|
||||
-0.516467332840, -0.516882300377, -0.517297148705, -0.517711758614,
|
||||
-0.518126130104, -0.518540382385, -0.518954396248, -0.519368171692,
|
||||
-0.519781827927, -0.520195245743, -0.520608425140, -0.521021485329,
|
||||
-0.521434307098, -0.521846950054, -0.522259414196, -0.522671699524,
|
||||
-0.523083746433, -0.523495614529, -0.523907303810, -0.524318814278,
|
||||
-0.524730086327, -0.525141239166, -0.525552153587, -0.525962889194,
|
||||
-0.526373445988, -0.526783823967, -0.527194023132, -0.527603983879,
|
||||
-0.528013765812, -0.528423428535, -0.528832852840, -0.529242098331,
|
||||
-0.529651165009, -0.530060052872, -0.530468702316, -0.530877232552,
|
||||
-0.531285583973, -0.531693756580, -0.532101750374, -0.532509565353,
|
||||
-0.532917141914, -0.533324599266, -0.533731818199, -0.534138917923,
|
||||
-0.534545779228, -0.534952521324, -0.535359084606, -0.535765469074,
|
||||
-0.536171674728, -0.536577701569, -0.536983489990, -0.537389159203,
|
||||
-0.537794649601, -0.538200020790, -0.538605153561, -0.539010107517,
|
||||
-0.539414882660, -0.539819538593, -0.540224015713, -0.540628314018,
|
||||
-0.541032433510, -0.541436374187, -0.541840136051, -0.542243719101,
|
||||
-0.542647182941, -0.543050467968, -0.543453574181, -0.543856501579,
|
||||
-0.544259250164, -0.544661879539, -0.545064270496, -0.545466542244,
|
||||
-0.545868635178, -0.546270608902, -0.546672344208, -0.547073960304,
|
||||
-0.547475457191, -0.547876715660, -0.548277854919, -0.548678755760,
|
||||
-0.549079537392, -0.549480199814, -0.549880683422, -0.550280988216,
|
||||
-0.550681114197, -0.551081120968, -0.551480948925, -0.551880598068,
|
||||
-0.552280128002, -0.552679419518, -0.553078651428, -0.553477704525,
|
||||
-0.553876519203, -0.554275274277, -0.554673850536, -0.555072247982,
|
||||
-0.555470466614, -0.555868566036, -0.556266546249, -0.556664288044,
|
||||
-0.557061910629, -0.557459414005, -0.557856678963, -0.558253884315,
|
||||
-0.558650851250, -0.559047758579, -0.559444427490, -0.559840977192,
|
||||
-0.560237407684, -0.560633659363, -0.561029732227, -0.561425685883,
|
||||
-0.561821460724, -0.562217116356, -0.562612652779, -0.563007950783,
|
||||
-0.563403189182, -0.563798189163, -0.564193129539, -0.564587831497,
|
||||
-0.564982473850, -0.565376937389, -0.565771222115, -0.566165387630,
|
||||
-0.566559433937, -0.566953301430, -0.567346990108, -0.567740559578,
|
||||
-0.568134009838, -0.568527281284, -0.568920433521, -0.569313466549,
|
||||
-0.569706320763, -0.570098996162, -0.570491552353, -0.570883989334,
|
||||
-0.571276307106, -0.571668446064, -0.572060406208, -0.572452306747,
|
||||
-0.572843968868, -0.573235571384, -0.573626995087, -0.574018299580,
|
||||
-0.574409425259, -0.574800431728, -0.575191318989, -0.575582027435,
|
||||
-0.575972676277, -0.576363086700, -0.576753377914, -0.577143609524,
|
||||
-0.577533602715, -0.577923536301, -0.578313291073, -0.578702926636,
|
||||
-0.579092383385, -0.579481780529, -0.579870998859, -0.580260038376,
|
||||
-0.580649018288, -0.581037819386, -0.581426501274, -0.581815004349,
|
||||
-0.582203447819, -0.582591712475, -0.582979857922, -0.583367824554,
|
||||
-0.583755731583, -0.584143459797, -0.584531068802, -0.584918558598,
|
||||
-0.585305869579, -0.585693120956, -0.586080193520, -0.586467146873,
|
||||
-0.586853921413, -0.587240576744, -0.587627172470, -0.588013589382,
|
||||
-0.588399887085, -0.588786005974, -0.589172065258, -0.589557945728,
|
||||
-0.589943766594, -0.590329408646, -0.590714871883, -0.591100275517,
|
||||
-0.591485500336, -0.591870665550, -0.592255651951, -0.592640519142,
|
||||
-0.593025267124, -0.593409895897, -0.593794405460, -0.594178795815,
|
||||
-0.594563007355, -0.594947099686, -0.595331132412, -0.595714986324,
|
||||
-0.596098721027, -0.596482336521, -0.596865832806, -0.597249209881,
|
||||
-0.597632408142, -0.598015546799, -0.598398566246, -0.598781406879,
|
||||
-0.599164128304, -0.599546790123, -0.599929273129, -0.600311636925,
|
||||
-0.600693881512, -0.601076066494, -0.601458072662, -0.601839959621,
|
||||
-0.602221727371, -0.602603375912, -0.602984905243, -0.603366315365,
|
||||
-0.603747546673, -0.604128718376, -0.604509770870, -0.604890704155,
|
||||
-0.605271518230, -0.605652213097, -0.606032729149, -0.606413185596,
|
||||
-0.606793522835, -0.607173740864, -0.607553839684, -0.607933819294,
|
||||
-0.608313679695, -0.608693420887, -0.609073042870, -0.609452545643,
|
||||
};
|
||||
|
||||
} /* namespace r12AX7 */
|
||||
|
||||
#endif /* _DSP_R_12_AX_7_H_ */
|
||||
58
plugins/ladspa_effect/caps/dsp/sinc.h
Normal file
58
plugins/ladspa_effect/caps/dsp/sinc.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
dsp/sinc.h
|
||||
|
||||
Copyright 2003-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
computes the sinc function: sin (x * pi) / (x * pi).
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _SINC_H_
|
||||
#define _SINC_H_
|
||||
|
||||
#include "Sine.h"
|
||||
|
||||
namespace DSP {
|
||||
|
||||
/* sample sinc() with step size omega into s[], centered around s + n / 2 */
|
||||
|
||||
inline void
|
||||
sinc (double omega, d_sample * s, int n)
|
||||
{
|
||||
/* initial phase */
|
||||
double phi = (n / 2) * -omega;
|
||||
|
||||
Sine sine (omega, phi);
|
||||
|
||||
for (int i = 0; i < n; ++i, phi += omega)
|
||||
{
|
||||
double sin_phi = sine.get();
|
||||
|
||||
if (fabs (phi) < 0.000000001)
|
||||
s[i] = 1.;
|
||||
else
|
||||
s[i] = sin_phi / phi;
|
||||
}
|
||||
}
|
||||
|
||||
}; /* namespace DSP */
|
||||
|
||||
#endif /* _SINC_H_ */
|
||||
75
plugins/ladspa_effect/caps/dsp/util.h
Normal file
75
plugins/ladspa_effect/caps/dsp/util.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
dsp/util.h
|
||||
|
||||
Copyright 2002-4 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
common math utility 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
|
||||
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_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;
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
inline bool
|
||||
isprime (int v)
|
||||
{
|
||||
if (v <= 3)
|
||||
return true;
|
||||
|
||||
if (!(v & 1))
|
||||
return false;
|
||||
|
||||
for (int i = 3; i < (int) sqrt (v) + 1; i += 2)
|
||||
if ((v % i) == 0)
|
||||
return false;
|
||||
|
||||
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_ */
|
||||
163
plugins/ladspa_effect/caps/dsp/windows.h
Normal file
163
plugins/ladspa_effect/caps/dsp/windows.h
Normal file
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
dsp/windows.h
|
||||
|
||||
Copyright 2004 Tim Goetze <tim@quitte.de>
|
||||
|
||||
http://quitte.de/dsp/
|
||||
|
||||
select few common windowing algorithms.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#ifndef _DSP_WINDOWS_H_
|
||||
#define _DSP_WINDOWS_H_
|
||||
|
||||
namespace DSP {
|
||||
|
||||
/* prototypes for window value application ... */
|
||||
typedef void (*window_sample_func_t) (d_sample &, d_sample);
|
||||
|
||||
/* ... which go as template parameters for the window calculation below */
|
||||
inline void
|
||||
store_sample (d_sample & d, d_sample s)
|
||||
{
|
||||
d = s;
|
||||
}
|
||||
|
||||
inline void
|
||||
apply_window (d_sample &d, d_sample s)
|
||||
{
|
||||
d *= s;
|
||||
}
|
||||
|
||||
template <window_sample_func_t F>
|
||||
void
|
||||
hanning (d_sample * s, int n)
|
||||
{
|
||||
/* TODO: speed up by using DSP::Sine */
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
register double f = (double) i / n - 1;
|
||||
F (s[i], .5 - .5 * cos (2 * M_PI * f));
|
||||
}
|
||||
}
|
||||
|
||||
template <window_sample_func_t F>
|
||||
void
|
||||
blackman (d_sample * s, int n)
|
||||
{
|
||||
register float w = 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);
|
||||
|
||||
F (s[i], b);
|
||||
}
|
||||
}
|
||||
|
||||
template <window_sample_func_t F>
|
||||
void
|
||||
blackman_harris (d_sample * s, int n)
|
||||
{
|
||||
register double w1 = 2.f * M_PI / (n - 1);
|
||||
register double w2 = 2.f * w1;
|
||||
register double w3 = 3.f * w1;
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
register double f = (double) i;
|
||||
|
||||
register double bh = .35875f -
|
||||
.48829f * cos (w1 * f) +
|
||||
.14128f * cos (w2 * f) -
|
||||
.01168f * cos (w3 * f);
|
||||
|
||||
bh *= .761f;
|
||||
|
||||
F (s[i], bh);
|
||||
}
|
||||
}
|
||||
|
||||
/* helper for the kaiser window, courtesy of R. Dobson, courtesy of csound */
|
||||
inline double
|
||||
besseli (double x)
|
||||
{
|
||||
double ax, ans;
|
||||
double y;
|
||||
|
||||
if ((ax = fabs (x)) < 3.75)
|
||||
{
|
||||
y = x / 3.75;
|
||||
y *= y;
|
||||
ans = (1.0 + y * (3.5156229 +
|
||||
y * (3.0899424 +
|
||||
y * (1.2067492 +
|
||||
y * (0.2659732 +
|
||||
y * (0.360768e-1 +
|
||||
y * 0.45813e-2))))));
|
||||
}
|
||||
else
|
||||
{
|
||||
y = 3.75 / ax;
|
||||
ans = ((exp (ax) / sqrt (ax))
|
||||
* (0.39894228 +
|
||||
y * (0.1328592e-1 +
|
||||
y * (0.225319e-2 +
|
||||
y * (-0.157565e-2 +
|
||||
y * (0.916281e-2 +
|
||||
y * (-0.2057706e-1 +
|
||||
y * (0.2635537e-1 +
|
||||
y * (-0.1647633e-1 +
|
||||
y * 0.392377e-2)))))))));
|
||||
}
|
||||
|
||||
return ans;
|
||||
}
|
||||
|
||||
template <window_sample_func_t F>
|
||||
void
|
||||
kaiser (d_sample * s, int n, double beta)
|
||||
{
|
||||
double bb = besseli (beta);
|
||||
int si = 0;
|
||||
|
||||
for (double i = -n / 2 + .1; si < n; ++si, ++i)
|
||||
{
|
||||
double k = besseli ((beta * sqrt (1 - pow ((2 * i / (n - 1)), 2)))) / bb;
|
||||
|
||||
/* can you spell hack */
|
||||
if (!finite (k))
|
||||
k = 0;
|
||||
|
||||
F (s[si], k);
|
||||
}
|
||||
/* assymetrical hack: sort out first value!
|
||||
win[0] = win[len-1];
|
||||
*/
|
||||
}
|
||||
|
||||
}; /* namespace DSP */
|
||||
|
||||
#endif /* _DSP_WINDOWS_H_ */
|
||||
344
plugins/ladspa_effect/caps/elev0.h
Normal file
344
plugins/ladspa_effect/caps/elev0.h
Normal file
@@ -0,0 +1,344 @@
|
||||
#ifndef _ELEV_0_H_
|
||||
#define _ELEV_0_H_
|
||||
|
||||
static struct {
|
||||
struct {double a[31], b[31];} left, right;
|
||||
}
|
||||
elev0 [] =
|
||||
{
|
||||
{ /* 0 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 0.00016115992608954982025, -0.00010768917854458648288, -0.00063346856180946037665, 0.00046347742029473120925, -0.0015439852840736303929, 0.002322097197441415177, -0.0030171705384801628114, 0.0040049622633845857744, -0.0061951205789184497774, 0.007477237413920645448, -0.0077387794749934207816, 0.011064070674173843989, -0.0039638879209113325741, 0.18900346994412650647, 0.11180546019300675875, -0.30157903765100790849, 0.1347944936894422685, -0.11208456287521188777, -0.10407312479763883295, 0.36646565042846751536, -0.03021948747062653054, 0.12118534476775748299, 0.38955804570991658942, 0.10541328915312503378, -0.3230797648386828369, -0.047446774889543630316, 0.074881148756352045037, -0.35284433955617594547, -0.17940547664191497379, -0.031687898661414630463, -0.079669760381518725523},
|
||||
{ /* b */ 0, 0.060872553612196914075, 0.028134109258271672305, 0.19714624090581839289, 0.080867126093135940912, 0.015075818698181541605, 0.09631379420052403606, 0.10062956273363155013, 0.078554087002350780899, -0.015526584402269706653, -0.046159578846992205259, 0.08942137063482573367, -0.0031327716162594778163, 0.044707285945433258845, 0.019012234566775400302, 0.023245822417901004786, 0.099133288024720767062, -0.016901102476781122708, -0.0080432755625650560749, -0.059588888105196691214, 0.025493274350173785597, 0.052825597092033604874, 0.052130256044543292482, 0.014949928868884798661, -0.015431476841200410938, -0.0083606347897418296922, 0.019454219693235737937, 0.0028516212312724819981, -0.044967056642177052894, -0.03421366827611452277, -0.063356553650132305111},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.00016115992608954982025, -0.00010768917854458648288, -0.00063346856180946037665, 0.00046347742029473120925, -0.0015439852840736303929, 0.002322097197441415177, -0.0030171705384801628114, 0.0040049622633845857744, -0.0061951205789184497774, 0.007477237413920645448, -0.0077387794749934207816, 0.011064070674173843989, -0.0039638879209113325741, 0.18900346994412650647, 0.11180546019300675875, -0.30157903765100790849, 0.1347944936894422685, -0.11208456287521188777, -0.10407312479763883295, 0.36646565042846751536, -0.03021948747062653054, 0.12118534476775748299, 0.38955804570991658942, 0.10541328915312503378, -0.3230797648386828369, -0.047446774889543630316, 0.074881148756352045037, -0.35284433955617594547, -0.17940547664191497379, -0.031687898661414630463, -0.079669760381518725523},
|
||||
{ /* b */ 0, 0.060872553612196914075, 0.028134109258271672305, 0.19714624090581839289, 0.080867126093135940912, 0.015075818698181541605, 0.09631379420052403606, 0.10062956273363155013, 0.078554087002350780899, -0.015526584402269706653, -0.046159578846992205259, 0.08942137063482573367, -0.0031327716162594778163, 0.044707285945433258845, 0.019012234566775400302, 0.023245822417901004786, 0.099133288024720767062, -0.016901102476781122708, -0.0080432755625650560749, -0.059588888105196691214, 0.025493274350173785597, 0.052825597092033604874, 0.052130256044543292482, 0.014949928868884798661, -0.015431476841200410938, -0.0083606347897418296922, 0.019454219693235737937, 0.0028516212312724819981, -0.044967056642177052894, -0.03421366827611452277, -0.063356553650132305111},
|
||||
},
|
||||
},
|
||||
{ /* 5 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -0.00017696253206769471666, 0.00021107918665545769466, -2.0620763396513567709e-05, -0.00018186803582760145237, 8.373679531671252463e-05, -0.0011082651235009427504, 0.0013814999459888562677, -0.0022305356427783796375, 0.0034326663959655806524, -0.0048009305045435424902, 0.0056349419483249160723, -0.0071918462710358118523, 0.0095052705275961314052, 0.0007448483104648476183, 0.17757056636691290197, 0.080751512987945209265, -0.25584565078920767922, 0.11313029183314063375, -0.11130775557262871656, -0.068744404280904225502, 0.30732662377751773786, -0.027707718907452515145, 0.12364106832536264635, 0.35026569867066370545, 0.07471421608637314471, -0.25776067100019012246, -0.055371338162804373262, -0.012256460040568777775, -0.25866536683473279057, -0.17782894990620184972, -0.064670654485651041243},
|
||||
{ /* b */ 0, 0.055090796937088862273, 0.055437560430932439348, 0.22990052867708210549, 0.099428824021023237689, -0.0027769955961815754458, 0.10085574251165992099, 0.16312061234767347151, 0.039470376556444738969, -0.041848049583603372237, -0.032542858026161185225, 0.02139343730159100343, 0.048098231701239960167, 0.037733893377851102091, 0.019373785721910955632, 0.061746578342221650204, 0.035488211745084013993, -0.01806919754088130714, -0.027128260233510496924, -0.042503705793375312627, 0.051926493757134692397, 0.07069393657400141473, 0.019673226352204746525, -0.00012103498389409196589, -0.027627741515316259213, 0.009635983304503818736, 0.018631749546224596337, -0.016615904545286074023, -0.044341341793715960407, -0.030215378264473007064, -0.041358753534985123745},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.00021674611259610464188, -0.0010589548271123022313, 0.0010969447757948318917, -0.0021209537250143142839, 0.0028729385414139746446, -0.0035972033027254976534, 0.0044402795492401794797, -0.006073245440653581885, 0.0067101547727077218847, -0.0060717874211108089147, 0.0086287155143119700917, -0.0062948148262572563294, 0.16059210095363563031, 0.20386616350646591389, -0.35114984389089032302, 0.086216963151213521499, -0.024061119790435951671, -0.22331071743275801578, 0.43099142324044042995, 0.031472736270457199459, 0.027458263182878438202, 0.45513707401194097857, 0.15478327645377623623, -0.42059874974912558887, -0.063648009970495300625, 0.14751824494855145242, -0.3619823099623888929, -0.19283311769574695838, -0.011882636463899330648, -0.089521111340056691574, -0.026022800212665765651},
|
||||
{ /* b */ 0, 0.079572218898552926625, 0.053165668189737030902, 0.17176014787903778891, 0.086820173277007889334, 0.060694063956346300248, 0.029633229388448603658, 0.084867011888823756793, 0.042640077616905060209, -0.029035195885816392214, 0.029653473189723660031, 0.085308978346717134755, 0.0048636815673216080014, 0.01605369931437055156, -0.015454426947098148445, 0.042357713858054937828, 0.097316348725284551602, 0.0052640081186572720839, -0.0050867430431700277893, -0.058963722940593224497, 0.01239314631939524014, 0.049900557159985092781, 0.043026255599535281893, 0.035562415292306887027, -0.020192113930755928308, 0.00095028634658748944997, 0.027622002386662635603, 0.0053820468586939663319, -0.050497180968884017305, -0.041024391020222893134, -0.067588730417863646105},
|
||||
},
|
||||
},
|
||||
{ /* 10 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -7.1010261369361740713e-05, -2.5406000913078783136e-05, 0.00026759211721569383866, -8.4826521543719497699e-05, -6.8403155187606121818e-05, 9.9131511745002002427e-05, -0.001071700570934656406, 0.001098798497419818665, -0.0016933689074365935318, 0.0027481963651477848976, -0.0036606743705400422717, 0.0042060653153788429837, -0.0062821160138389776223, 0.0076862441225774222331, 0.0058233041551466677155, 0.16799390464336699802, 0.041851271057766162298, -0.22290193556303047884, 0.10546865511928886494, -0.106571152734197927, -0.05232811055746418305, 0.26763450404808436511, -0.00068426453713908361176, 0.10572562194246151734, 0.30292254127254580887, 0.047280029708680913758, -0.26546206167345709481, -0.050352179118358361687, -0.0083467693297659146384, -0.25140273187294914781, -0.13705105321611377178},
|
||||
{ /* b */ 0, 0.085263325112734211775, 0.12395856358757566251, 0.21451203553535497237, 0.11368862237752869193, 0.045975440610246019746, 0.083841885720174272323, 0.10819905319188556636, 0.017486735496958213942, -0.05191158900020079181, -0.028267552250675329062, 0.051676694820251889428, 0.024780584746461171985, 0.045146936514918814543, 0.035293885693133908443, 0.023177674056059194285, 0.026807353374273618085, -0.049021533124109263613, 0.0011432617002724524552, -0.014547714109382908765, 0.058036283161763971283, 0.045635673184493387444, -0.0059891149151256751343, -0.0012376581991289520301, -0.019638054713496739395, 0.011740972931786674421, 0.0070604429584699562872, -0.017821868007230894093, -0.043622648597657895375, -0.015285888173058835571, -0.030656316135630173186},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0011216376818203241394, 0.0014367662570877876016, -0.0025198357459085482524, 0.0025096953781399834564, -0.0032299692564715168364, 0.0035089721995293712831, -0.0040294036972093535964, 0.0036878989368056844592, -0.0019541662377772078818, 0.0022472517084747394012, -0.0005003840012913342121, 0.11928409575778700646, 0.29902193960400280659, -0.33871176061436253368, -0.029905872073465733507, 0.049693450022043894609, -0.28970435882155598506, 0.45366820402683577518, 0.09535253759394757278, 0.0024675934431721262968, 0.49110597895532337454, 0.19050822857905158614, -0.41285791290153855959, -0.18341018858515711898, 0.13888828001019423719, -0.2208057176764740559, -0.23909434820313357761, -0.060380123254846998493, -0.033071856447566480575, -0.071881204823059763331, -0.036764849742506287844},
|
||||
{ /* b */ 0, 0.048428266517714681216, 0.029860695413591771541, 0.23466227365818198569, 0.085941189405338319629, 0.044706680082991917535, 0.020668341355824411398, 0.080504621225128858431, -0.053243345596708929746, 0.014347828952276237002, 0.057257699183194593617, 0.10270797432433603769, 0.075890406819505484837, -0.061027205690788143, -0.022290009665058146959, 0.026499148640187108333, 0.08706458016097509689, 0.047083089686696284748, 0.019236465222853896262, -0.071824516859942622027, 0.016260258014978885843, 0.013562271183576411759, 0.05466513346106918747, 0.041512450833693780028, -0.0083719999989691172571, 0.021910246791019868939, 0.021244709892120912376, -0.0015736893779544000593, -0.057791902480916139406, -0.053290959980646299132, -0.056723042022796543726},
|
||||
},
|
||||
},
|
||||
{ /* 15 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -2.3034189992013315946e-05, 0.00024731908682368210911, -0.00021574284523261577293, 0.00051389676229479305802, -0.00040052734994627293714, 0.00015362020114751537476, -9.7371630267258237708e-05, -0.00037603622009404547629, 0.0002572275934744837041, -0.0015722688641566645584, 0.0018871578089975343112, -0.0026390305604912303594, 0.0044552306132121174964, -0.0051638664595472089092, 0.0058601946919547252823, 0.0062588950906924088746, 0.15092144486019995475, 0.0099448016942541832969, -0.18453753620347421172, 0.1114543447477359811, -0.14402726113297464883, -0.024507724738784635726, 0.25757743305304819925, -0.013476042841332157296, 0.11613418986197675264, 0.25394558785192672401, -0.016719111244215333761, -0.27302452491092155107, -0.018530595274781173909, -0.055725585873423050254, -0.21319498722583413164},
|
||||
{ /* b */ 0, 0.22058127507023964076, 0.066638548713839174109, 0.24589498965493170046, 0.22418170335686704586, 0.066699912495684771097, 0.017692407245350268152, -0.0085239509346052289018, 0.020142743144099965746, -0.12941267987335691725, 0.051998998636554896735, 0.073490792657822143208, 0.023168188775066381885, 0.11108377267495579688, -0.084872666928730286506, -0.0042479536929002342099, -0.0070616745589371816838, 0.019184876108773011444, 0.054142940329746425121, -0.0041972999708067126184, -0.017760334508399627101, 0.00029087332720613727141, 0.0015107269032326241069, 0.045117303832109524608, 0.00061607549538982876725, -0.01586494033253469868, -0.017623046137960902968, -0.015727943013500934183, -0.027390319948145405715, 0.011098882581240697084, -0.037335305543559987873},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.0013800413829036378699, -0.0015945865447638749024, 0.001441061774076768387, -0.0018400002827411929274, 0.00081415159166025458104, -3.6541798449987185869e-06, -0.0023947168327270382249, 0.0060372912386117555394, -0.0079721892125425228293, 0.011425654544714239358, 0.061862177923783547018, 0.36620909077115043617, -0.25889177344254588053, -0.18653313956236422522, 0.16218219769577690847, -0.37467524215994219006, 0.40581752873141435645, 0.22834841562013005745, -0.06840666565317407577, 0.49400293320883370551, 0.27528320440222048271, -0.3919047384840718129, -0.31990047663825482704, 0.21386477926686497941, -0.20486652355001294668, -0.31035711367531787497, 0.023166421866086150255, -0.085451721164105515216, -0.12985289364082702734, -0.017432175610271501143, 0.035672848704699881839},
|
||||
{ /* b */ 0, 0.073725628815923066606, 0.015390993798134605663, 0.2124990748692205389, 0.10259839572077958381, 0.065254899181072217873, 0.030885702765035875916, 0.0059236228567302942616, -0.015551106356376763473, 0.045129370224812268009, 0.040489463356448152087, 0.1405222487957555888, 0.021308824891246722771, -0.052224936798331650367, -0.03569736412508371648, -0.0011315094965852479092, 0.10462683156774776894, 0.0707489055921939336, 0.035186628731939326165, -0.082713931987719563343, -0.013492902896563435666, 0.0074634101167011038247, 0.063222517807061034967, 0.061186927189146173012, 0.011493852096039973432, 0.0030603490119027530574, 0.011353160845064234896, -0.0052093273690718977509, -0.056452439121564002011, -0.044554455604682921543, -0.065044801859899914476},
|
||||
},
|
||||
},
|
||||
{ /* 20 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -1.280464119543479537e-05, 5.0847061283666207532e-05, -0.00010881943401930269165, -9.3295295100479555105e-06, 0.00018214684718853571478, -0.00016714467226952578471, 3.8897084095323997133e-05, -8.6690768452699420998e-06, -0.00023930660994486751061, 0.00071371038218304150291, -0.0010748950257655209839, 0.0014994882018698474369, -0.0025345205104804202634, 0.0029200474736118531283, -0.0032896042424790383762, 0.0051489509612229200641, 0.008226002461003689703, 0.13635910042254784091, 0.040811705554130717211, -0.12913078637682984251, 0.08933326884147385627, -0.073730698277943429453, 0.014957473944005039712, 0.2228220708940659156, 0.013110312729186501812, 0.1325955850479260123, 0.27241754762964698333, 0.1078490562880785042, -0.050076992741537873499, 0.062667886178355280968, 0.091717117197270825457},
|
||||
{ /* b */ 0, -0.025158955952384043364, -0.062687203468275720653, 0.10856821347889067386, -0.031139900499438377679, -0.26394215694752753976, -0.20012513910774853976, 0.014278312291601813477, -0.074773034303560192981, -0.077797089910458527839, -0.077518931664924406455, -0.048200302791706617356, 0.013312597278228310849, -0.060823018845704290847, -0.12047847469359718175, -0.080758707132477791646, 0.014496285603640690631, 0.024176297966430060349, 0.030498046991178640042, -0.097021462282728676563, -0.072063053678794730672, -0.030360872356541279693, 0.036410577287371292954, 0.060757926768420511543, 0.0026579726669639916134, -0.046553056477285914561, -0.024262156919224731055, -0.01133193016360223293, 0.0053419247464381305543, 0.017221495934721664511, -0.017836842867227642451},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.00036599626872854673643, -0.0002460058195520581489, 0.001771055531804219263, -0.0025798946401336259049, 0.004338330896903190223, -0.0083341804897000444641, 0.012345621434499756686, -0.015540479481844504672, 0.021682746444567913002, 0.011508763580149114492, 0.37385080964059264064, -0.067135215764081365708, -0.36356326706210229105, 0.18127847719926099002, -0.35357578125112620882, 0.24597069823393058474, 0.39826579050225030532, -0.061438050383000319954, 0.42367882073686397026, 0.37232726266096677348, -0.31491476121032047075, -0.45397206381806498587, 0.22065950816309298776, -0.17315503013207861338, -0.33798287901752616103, 0.015306755417106993056, -0.14347429792658547565, -0.12428129176521134081, -0.06877797614801214876, 0.078433037183928827618, 0.054698817074467706578},
|
||||
{ /* b */ 0, 0.048889005590125461653, -0.016041040104873907635, 0.24226714422677714245, 0.13214897408713416338, 0.11581965776929874223, -0.026343158066582245125, -0.043469803567581372095, 0.050182432390893233487, 0.059005150016260693446, 0.11712934066232007224, 0.10913298414466296449, -0.052970566889378595254, -0.041796521766095801054, -0.085321521280405307475, 0.051627174717985155339, 0.10872628148092013112, 0.07994668585422151641, 0.016498059996527050797, -0.087325778447147950345, -0.034046925974987041208, 0.036057834351442899501, 0.047799563959215543574, 0.099378425802562272984, -0.0093373522400217665029, 0.0010294654363175760603, -0.0028328873103410090462, -0.0010957144530761298018, -0.04991883841052625892, -0.057430845556592433065, -0.065998025744829283412},
|
||||
},
|
||||
},
|
||||
{ /* 25 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 5.4851695726303682787e-05, -6.9900108687348527781e-05, 0.00020257180634308816149, -6.0375831348324806962e-05, 4.7622701199179218179e-05, 4.3511237113325919312e-05, -1.8460715942027545235e-05, 8.4488357907084823311e-05, 0.00036921527953037713843, -0.00026485096144002531759, 0.00055643892715728825518, -0.0012241930933548604565, 0.0014098272716617245813, -0.0018170794729988060112, 0.0030765460808102034623, -0.002557592370458494635, 0.0040626938255239365694, 0.0062155450463591277455, 0.11813763723118875237, 0.036915229743791910799, -0.10863854615301982154, 0.071427932468587362891, -0.090269999915917886746, 0.0041725637770634281531, 0.20269035461810414045, 0.014055537838481013679, 0.12304199409125804454, 0.24661633430483886897, 0.050829375524627518068, -0.058588412423787872285, 0.026858601453252917146},
|
||||
{ /* b */ 0, 0.030312183511849170175, -0.095541000844981405216, 0.1892261747966222929, 0.12808694865439063104, -0.1294162586626401712, -0.23340276657783654013, 0.070083589599131967951, -0.16393473066693420304, -0.038721197898189396724, -0.0071446294807459009846, -0.078586084721193882885, 0.1042302939213007873, -0.057276855840310281209, -0.10131559666906597705, -0.068958661479864846733, 0.0053298328402118233527, 0.034128981517000944734, 0.084083984187854898806, -0.1060379653611276396, -0.056291907571809352007, -0.035088677719993799364, 0.033487980128643624056, 0.083839894129689174207, 0.0064468873873374521466, -0.040191723771829113154, -0.021859064198159749992, -0.0074521605177013672261, 0.0068960510733739877054, 0.020068191506558696879, -0.032594931639526314449},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0021078233190400252894, 0.0033911920282320151543, -0.0050816297403333265947, 0.0070429241880685944377, -0.010690185705680699257, 0.013587756297721298449, -0.015591114736097921867, 0.020843633502798386559, -0.012948727955118533028, 0.29853930777651016548, 0.16678964803161847041, -0.46891720194919617182, 0.10671347466639086177, -0.19485400919129133857, 0.020296222080044834524, 0.50175032885310333342, -0.062426652745247585008, 0.35287342243971148159, 0.46181252928104832289, -0.21215736966683634845, -0.39772241165672927998, 0.11779767228724952188, -0.11684806370437089695, -0.34157516678375399177, -0.12471035998072588225, -0.083290919299407184528, -0.03285571473570295109, -0.18135912101915549477, 0.17043289762173896573, 0.094838956789539824443, -0.1597664824630647129},
|
||||
{ /* b */ 0, 0.073618220206590062604, -0.0022034661454478632336, 0.18948155049250750559, 0.10488342872512837478, 0.1018566136577053749, -0.031429803589201610325, -0.036141501734993780603, 0.06141191135917295485, 0.13766930493647536182, 0.064430777704134467587, -0.04979451200932960564, 0.025701316421090220077, -0.059124346167005459307, -0.02257216690736835174, 0.16212608510750292634, 0.036696102518347234467, 0.055920596136981026714, -0.041643049307846922991, -0.096430747652202081222, 0.041209812920335597841, 0.037813250066461717713, 0.098343702773055763355, 0.048742335630406335989, -0.045791237814445107102, 0.023916124844060998589, 0.0008038992096136357568, 0.019401014685008904914, -0.063873397769254047773, -0.070877111835333100887, -0.048087413353891522716},
|
||||
},
|
||||
},
|
||||
{ /* 30 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -5.5564638593561861978e-06, 9.3852107960201930706e-05, -3.1084894380750682785e-06, 0.00028840725196932481822, 6.4946293412693228324e-05, 0.000155365044510191757, 5.7003061507132635199e-05, 2.4933508036006904319e-06, -0.00013672519873220156938, 0.00028540432156498596328, -0.0003096984341893760373, 0.00059548038278123185257, -0.00076294144120414401911, 0.0011346642860010636156, -0.0015290288656044648263, 0.0025263433554162384453, -0.0018363250559039192775, 0.003292358995918287512, 0.0044893145683538842466, 0.099393432492281275081, 0.044378238408873671439, -0.099042449494685103062, 0.046096231459888392656, -0.069686141489361252965, -0.0044478077054072029384, 0.18077959408453747603, 0.026777358766022496539, 0.09446026603660007126, 0.20126013716523227792, 0.055686081012890069342, -0.061474581435280728492},
|
||||
{ /* b */ 0, 0.025180167786686968867, -0.040991063065334842896, 0.26971809175449501517, 0.19181840837760588681, -0.15250762307253418193, -0.24123727501546010643, 0.037160259659663186227, -0.11575978546930765223, -0.0019633931924722958229, -0.0063613286760411114074, -0.080834549709765668446, 0.10457219077671109364, -0.041267150275581254704, -0.073405901137024720526, -0.038209215752968428426, -0.008657436421921627101, 0.04235425265723680166, 0.058400869357641549406, -0.092083706177692459249, -0.024897575410173788946, -0.015314459922213807808, 0.025318966408588439165, 0.066904667133937945067, -0.017951122045153925649, -0.019282834278142035878, 0.012661929285409656565, -0.0046187674564157621404, -0.00082718411884008524737, -0.012980776141549577041, -0.049460302773279840594},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.0033885300294439271718, -0.0048613774544705584679, 0.005302865794605711447, -0.0070892003638982695191, 0.0070361738768297960034, -0.0063941087232333854162, 0.0081928188122495221313, -0.0089060004377240070683, 0.17020867472563366851, 0.35789768856113390871, -0.39521414506180546633, -0.12407235017989748371, -0.0089740119029986867294, -0.14021003585508545752, 0.50678090343772674853, 0.01377337314436687804, 0.17528644143745444883, 0.56933646082806399491, -0.072240746769574454289, -0.35931102012550142355, 0.013416561081202801886, -0.033982538129653794279, -0.36652241223536613512, -0.19744384675815446206, -0.091076149317218135781, -0.10323197357604668722, -0.054589396278610473334, 0.14291346832079576679, 0.044643159462969331241, -0.11546406559509028722, -0.012902913224164223871},
|
||||
{ /* b */ 0, 0.10605423311031529632, 0.014864888313219706828, 0.15043223924465926045, 0.11450889378892231685, 0.041507161879618739708, -0.03674693254257770797, 0.040977443315154751802, 0.10157898434947321142, 0.15279684507974583552, -0.061822560485326125135, 0.004772237741598212013, -0.016819258489976333937, -0.066786210621604474857, 0.1081005394898459232, 0.093086116443072242088, 0.048463595010632236348, -0.0058250974846723452272, -0.081800519183662989686, -0.032885530861031207761, 0.052918311400137335587, 0.073362721889048077006, 0.065072441811087039509, 0.0058499565193945515795, -0.029018687889527036705, 0.034235417789990618687, 0.014857609548302522229, -0.011971843220984736827, -0.076724286436182287385, -0.040299204163377760901, -0.048631300045695255441},
|
||||
},
|
||||
},
|
||||
{ /* 35 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 2.2246319549504983693e-05, -1.7981306166259231711e-05, 0.00013168464332857961196, 9.9034379204276934416e-05, 0.0003615243665544558456, 0.00041192910880949624997, 0.00055513530303891254342, 0.0004627765871206843476, 0.00030127446919159267145, -8.1061927205416939302e-05, 0.00023778236973165040101, -0.00033298576951335152885, 0.00084825840306751616737, -0.00069129572830007104955, 0.001420559255088660322, -0.0012973704223082083153, 0.0019848520281529093146, -0.0013496792289693941222, 0.0019496759876003223744, 0.0035721438084931889101, 0.079964526305924266136, 0.060786211180906268847, -0.072227985409185901933, 0.033541081923930959885, -0.047731446357855700224, -0.020688550877619171775, 0.15226630594781381811, 0.031397312903122531758, 0.092806103290377084392, 0.19568936619800136878, 0.096992123180227041157},
|
||||
{ /* b */ 0, -0.056091597445684371337, -0.12532019980467795639, 0.21619816714720657691, 0.24292246036838882617, -0.18441540976129461304, -0.16877038135500177507, 0.046285230921004616444, -0.12996636591072752154, 0.0011975693127094788615, -0.086536047550177241927, -0.082626417097879378826, 0.12612621449737543289, -0.0067070476921643473744, -0.031313081347780769015, -0.054627413082521114607, -0.050072452026928004898, 0.043095265048753716997, 0.061391567137795977072, -0.031588886056574394523, -0.015918232628454875854, -0.039366355925538054628, -0.015517509680679220097, 0.059049611165241933097, 0.0093687542665824019572, 0.030141503283322157447, 0.0095184589911020967001, -0.023527488786957706512, -0.040401343824290891771, -0.038667213391636867659, -0.059674745198669276736},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0013714152522657646616, 0.0006273793896546808746, 0.00043122457778210776524, -0.0021922389323563579167, 0.0055708395088355927571, -0.0075242460363320051719, 0.010591462743974114358, 0.048398020978598910169, 0.41619284829983088647, -0.14382476555407414098, -0.35882374610701062156, 0.039668989509555538375, -0.1620882671571429734, 0.38019200426458643616, 0.14583130894703361102, 0.06383703585639832756, 0.5445344840782336826, 0.12599765399910417552, -0.28518956246040627622, -0.11700115479775820282, 0.0039966079479203386882, -0.38531175783483723185, -0.22423262908750918321, -0.10515959452829688747, -0.1399597004266011635, 0.043707663783861684659, 0.04139732538284597585, 0.015522465146040196476, -0.052820550344454333946, 0.0032102282042194285605, 0.015984710792678324953},
|
||||
{ /* b */ 0, 0.13427337041599388123, 0.0048139154348175727804, 0.1572444113827342338, 0.10908352866460453712, 0.025770956456642665766, -0.0050018096122567134998, 0.055807560734215735931, 0.21187737349172824919, 0.011038836686726512248, -0.080848400150794128005, 0.042421610143179855346, -0.075470694051683537285, 0.066863221023921726172, 0.13083208495369075264, 0.033121454529102395403, -0.050277280289135257985, -0.039128620222435295251, -0.012052262736315584243, 0.010345718716008728277, 0.087596569448757793941, 0.022997773874034593833, -0.025031434367365004712, 0.052202915093862989337, -0.0089830303802527350365, 0.068664492264150847611, -0.028446270625478303762, -0.049388113445691245174, -0.0848237667824044278, -0.0093243400765309625289, -0.022253412473574249453},
|
||||
},
|
||||
},
|
||||
{ /* 40 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 2.1793835894011746233e-06, -0.00027154751197633331117, 0.0005671281328931141244, 9.0822337706075701542e-05, 0.00099206136663226862638, 0.00073251131878920849871, 0.00067401960485158330088, 0.0010339520481461583756, 0.001261491156673288927, 0.00081585154267788454179, 0.0013721862622898001877, 0.00056652749939184432991, 0.00017514670911517038476, 0.0018149465347977447247, -0.0009629098705887795262, 0.0021172863388929652473, -0.0012859543649379467922, 0.0012650418609871942523, -0.00080761000567641804977, 0.002045207774387101593, 0.00012780165967174808572, 0.059086023985258084856, 0.044267535707145921897, -0.085465943991669401925, 0.052769026021581844077, -0.039779355975461117012, -0.042237528407387814333, 0.1643077306221277234, -0.02446083998811077187, 0.061938320602659968639, 0.16384587098797892546},
|
||||
{ /* b */ 0, 0.33422749822261538233, -0.11487095431066823847, 0.16644427691021174143, 0.38071775606933477842, -0.39012462081940146863, -0.053576722369511053934, 0.068011811522050713563, -0.22451887863150776781, 0.19746958958965360464, -0.065277732785341824329, -0.017461553695752307647, 0.089348993440457880055, -0.075603194818196772786, -0.019483190216752765966, 0.046489056814216778157, 0.014291576027163077622, 0.030426427107856091059, 0.019112163865651898842, -0.091943596894211720993, 0.00084339433090163673512, 0.025779716876124514346, 0.02709668019695160579, 0.04270873769130628661, -0.04509487662892469606, -0.037299422899345069382, 0.0029375173199799875512, -0.0014709831565318243207, -0.033163954348824908891, -0.029644025426878162222, -0.082647976311391035953},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0039789246353439718801, 0.006133535092132241795, -0.009010367649220363262, 0.012938576527919687376, -0.01631979618553144884, 0.02221570561540889277, -0.017115080265671555465, 0.32623476405816531631, 0.17063411234871997402, -0.45850444292681674652, -0.044599086886291765264, -0.072363693609748216962, 0.1893440694816350689, 0.21226201381446715977, -0.0040666736535709159528, 0.54388239423168593945, 0.29842581082375013724, -0.23242339948278389894, -0.14737358160892799486, 0.032063708780309327362, -0.34195980604076975373, -0.26555148095350827875, -0.14613400600363329884, -0.18983946477948737686, 0.074588566864848854232, -0.024440181328726912069, -0.019429265748025642546, -0.0080576389074145035596, 0.074790705429606918475, 0.019974100701055860774, -0.067154806391257426679},
|
||||
{ /* b */ 0, 0.16460431381272111473, 0.0027972040284951842602, 0.10698578598074351409, 0.04041523264294942519, 0.087410249710898862974, 0.028702626391889109886, 0.10146221100793439973, 0.18156553983888379378, -0.071713879295784793699, -0.039211217036441703421, 0.030793778252199113105, -0.01910649119353687031, 0.053438277835419004114, 0.12370544227754264044, 0.0047416582382763319825, -0.10684133284608565706, 0.037659786684316430561, 0.0088382827167620553466, 0.043525054958149130002, 0.044306391668120712057, -0.049406157896095606596, 0.010671084977429030893, 0.067328644708557622289, 0.030307410623826858131, 0.044862049177331157768, -0.085971974419243063492, -0.028695458295538260607, -0.08142448996261655858, 0.026977203326033163955, -0.035164209142325708601},
|
||||
},
|
||||
},
|
||||
{ /* 45 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 0.00016150711548268382404, -0.0019440537467503571367, 0.00060534014269947300762, 0.0029997960951551327913, 0.0017473438424821241544, -0.0034913008790417314649, -0.0013297336088485822714, 0.0029546740437647045496, 0.0017854343836894155488, -0.0023195419721240544825, 0.0038098928129871867387, 0.005714340667335032764, -0.0043362884876059493156, -0.0076623794658531325236, 0.0071344829064012849074, 0.0085652865194213445577, -0.0065424164318386712758, -0.0076128530448159315025, 0.011673780507467923506, 0.0042333848121640909462, -0.016075536998505498415, -0.00062319470183272093755, 0.067045896686504513617, 0.05542911650422560621, -0.11456365746859847876, -0.017773627792316837315, 0.043664478116614557912, -0.026494992388624571955, 0.071614826367208395119, 0.069981694853296638748, 0.05410009876933435935},
|
||||
{ /* b */ 0, 0.32113328027076204485, 0.29373423297325218506, 0.38933482938681784891, -0.090586007813944074973, -0.21987920577531960831, -0.057359431636112151454, -0.22344633226157803452, -0.12363438135674920115, 0.33827945463841063711, 0.23367396812070881373, -0.20292402709079504497, -0.13842849880823723807, 0.11751149999315868566, 0.081481066321800049712, -0.12070609368596690869, -0.037213914143678639146, 0.13644485314354831695, 0.031379917151685976506, -0.14910167035159932469, 0.037218743909137735892, 0.12517705391255906644, -0.059856545310699865725, -0.055103064822512731746, 0.00172123115449798747, 0.0095876042228992819361, -0.05475981256181788881, -0.045525117256077496375, 0.045296337271901604415, 0.042633212967158051754, -0.11473134600864867694},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.004417449235734144386, -0.00620600649388087372, 0.0063726741346805185207, -0.0066460159533262442438, 0.0072749496685510887939, -0.010562132644713340124, 0.1412531184820029484, 0.41189149595716445518, -0.29560082071015386651, -0.31284630781385347476, 0.013791284580906559842, 0.073780292975883843276, 0.27143177757182124221, -0.049788461825507793201, 0.43780067747246809162, 0.52900554641297115044, -0.18903325950267421685, -0.18045978026173392639, 0.053681675569795278546, -0.20352403802022145385, -0.27235779954244454526, -0.19356389785279901061, -0.28417610303460733023, 0.025695652746474118011, -0.026884398969355405296, -0.055587273835120548648, 0.07687468227252683417, 0.063709559864257719886, 0.046913219828460112071, -0.10119045335950105358, -0.073455519061875987341},
|
||||
{ /* b */ 0, 0.12523694267447316175, 0.030106660207185158284, 0.091163028595100129015, 0.010834765787190100972, 0.071592206550095252582, 0.058714390304081230665, 0.12465362164220200603, 0.090861745203670657434, -0.003444280655042625261, -0.03959819336804993456, 0.020380346085020425301, -0.01277437795050694741, 0.0098684267116778273676, 0.095808865982682456242, 0.010206453529616223153, -0.027353704550592272682, 0.051750464218872256617, 0.0434786225811953711, 0.015354926024562126283, -0.010280446025986642034, -0.043444088830705065996, 0.03676543185066136199, 0.077987256491148446158, 0.029809860226468615219, 0.0077312126460418045815, -0.082362130505542030523, -0.018751972524978961776, -0.052424431011004364589, 0.010904743472919462, -0.038141478777217741047},
|
||||
},
|
||||
},
|
||||
{ /* 50 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -7.0597622706974894058e-05, -0.0014187129521170413829, -0.0041973382672311210229, -0.0058731709218912131476, -0.0051930623767848516081, -0.0029746939450570053509, 0.00074269907814061798465, 0.0068509220603474299191, 0.008540351205538199153, 0.0052652735571534492465, 0.0044591066482302394586, 0.011150738290360839855, 0.012062318974492836077, 0.0022383464427094819198, -0.005308597948033844105, -0.0029183510540098378527, -0.0091992071743485243768, -0.021803415056753649992, -0.017754068490916097289, -0.0019571380532878990266, -0.0032260693465929746182, -0.012139060934640566458, 0.0086345886406852256911, 0.066564554163928146835, 0.09702719796146619391, -0.034108301861165979396, -0.013453636385357681249, 0.051139938249747385335, -0.037622455357141926235, 0.037629351289369949995, 0.053611444630619065066},
|
||||
{ /* b */ 0, 0.13449444518795483638, 0.16598922760596712678, 0.28643099415512351946, 0.061039639002585799332, -0.14318519554738784461, 0.030355409185375825665, 0.018292234915534555384, -0.010792444827129044072, 0.29406308138177350564, 0.16978117316310270546, -0.19761376468752089863, -0.14479296715406986262, 0.028158686575310842848, -0.014840610429028844308, -0.13835806041959108903, -0.12487480125847327805, 0.060761864553032784997, 0.078122467536342887762, -0.071426222519668791655, 0.059574263595527081339, 0.1423682842825041428, 0.024943297676841003074, -0.0088567426092395207249, 0.047857365474066049238, 0.064262716563054378405, -0.0040174613885612941999, -0.10083010619624244164, -0.1174901659180965785, -0.035432070135468785033, -0.10903701903458573597},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.0035403829431335867572, -0.0063994790363381941906, 0.0094807609668512426992, -0.01338496440375386981, 0.017607435620764499973, -0.00054243706903381967363, 0.38819394139654789244, 0.11542622008901651243, -0.50122674108308362673, -0.063632383809830370125, 0.037142079636945900256, 0.21196427083662505719, 0.047035520659341988059, 0.19612761644393400529, 0.7247137348377837851, 8.1468708675903889205e-05, -0.25420295892867450505, 0.06339404868670878157, -0.12628198942908777647, -0.25323361607423072739, -0.22324934898687293083, -0.30038007421886431247, -0.061813695789816359982, -0.022059680251655836708, -0.1396998528962117847, 0.049196289436822214503, 0.069781770804478920889, 0.0099113580072232934648, -0.10035101637286514276, -0.022883120806838075367, 0.045852482443127853817},
|
||||
{ /* b */ 0, 0.10359200124467059234, 0.0052610111223993366592, 0.068536565964016221697, 0.036899271175761486075, 0.054564604864992288791, 0.099686898476871774188, 0.12172863702120204077, 0.041674938768762603836, 0.069604512032048732051, -0.059011297680986070369, 0.051313382834683098077, -0.023223897932292923707, 0.02582365530437620571, 0.13896725418573549482, -0.036231211028676588159, -0.015840360248773124874, 0.050522971645401183738, 0.033836980910442043813, -0.002528124984245084389, -0.0011833207609092404218, -0.028868936378292221756, 0.053324252075556168029, 0.04659001444153997723, 0.013013853236939522395, -0.043392750016090636533, -0.042388805764409162591, -0.016981208463182597551, -0.037989579387181005021, -0.004257499909570035268, -0.024568667484287445846},
|
||||
},
|
||||
},
|
||||
{ /* 55 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 1.1578368860037852297e-05, -0.00011816999108404946384, 0.00087640537979605248609, -0.0020280251725873776891, -0.0021068047360156549885, 0.00027187084084001611473, 0.0031304327319237042031, 0.00089292948111940884104, 0.00045933324546720832871, 0.0051687820153134556023, 0.0065643674857646105991, -0.00055561873747722589911, -0.0032679994507733844955, 0.0015441048749342829293, -0.0029191626319674530803, -0.014514898701023515315, -0.012984473763688608727, -0.0046561391591620759911, -0.0083716584381443581719, -0.01356103312845358122, 0.0018988103912126463868, 0.020432107407306054903, 0.012447960186859341469, 0.013390889061007382743, 0.050401262412999581208, 0.1024391092795812197, 0.0076396060180033975584, -0.011690786411236442355, 0.05990382429044149859, -0.036577009552216099841, -0.021380778457980031959},
|
||||
{ /* b */ 0, 0.10623619191692246222, -0.0067788270131929895257, 0.18852906559209403614, -0.049206343541163821698, -0.01126637043082079348, 0.24317483738434120255, 0.096263757482575873503, 0.05760214667596685878, 0.33866109073667216567, 0.2547586839746901477, -0.059317376256765030895, -0.013459832727269471775, 0.075663009614992948748, -0.035307654850449954331, -0.1798777472163115565, -0.15813077589243995646, -0.049518167965986736867, -0.14129805415867557894, -0.2164595138297309429, -0.022427379978498529489, 0.031400080641869054787, -0.061226279240850223218, 0.010520714239237172194, 0.1198982523673702838, 0.092899746554145345989, 0.025864164006697554221, 0.010682328837122168075, 0.035779475401134797075, 0.023278286305425388569, -0.11316441404674026927},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0048765805688135432927, 0.0053151709295158611202, -0.0056105185624460915395, 0.0058353469265925300702, -0.0095124904947408925326, 0.1474736271262454268, 0.45015598574916032559, -0.31617058194011959937, -0.37500561058249115565, 0.1024040461535024038, 0.09880224296723426336, 0.13507025371908992772, -0.0076921438847904824443, 0.70384742117252319105, 0.39354022432035029588, -0.35987631054416541199, -0.016295617248206911709, 0.0037069899110325136952, -0.18230754888878106246, -0.25574618730660003685, -0.22473349359278305126, -0.086128208326026980957, -0.066843673532245156954, -0.2811472454940759369, -0.071489158758016368989, 0.12593590396064910375, -0.084427226536140737023, -0.075750225784808708496, 0.078348230738386523409, 0.075996002542261575918, -0.0088596280720283637766},
|
||||
{ /* b */ 0, 0.10992763307071229395, -0.031950991955910876263, 0.067764336110112510791, 0.011642549958236145247, 0.065471901287065897845, 0.1673034870980578126, 0.028095206047705489905, 0.027267773057104531531, 0.084579867348890197531, 0.0099220485684850534547, 0.088989181038956643999, -0.021794892683911493148, 0.11813758800985002528, 0.054176192981242488056, -0.10363299382656462888, -0.018662590133854996266, 0.070475304695992779802, 0.051096625691584955653, -0.027165719683553204988, 0.048772571120754747154, -0.0011836521868419450088, 0.026143533279308905914, 0.010018324394546467004, -0.027326001794422516422, -0.054777896142175867833, -0.013206742436717121281, -0.0049659044408859077946, -0.041443238983922443819, -0.01206157172231516958, -0.0033435101275689320388},
|
||||
},
|
||||
},
|
||||
{ /* 60 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -7.7511870492402576904e-05, 0.0016441118738663718091, -0.0014490512186687842799, 0.0013291594554154519906, -0.0033660169662663719237, -0.0035405112611824867547, -0.0018534540596054638328, 0.0026523822617419146042, 0.0035696953020608597311, 0.0010309818936765626982, 0.0015555973072872710753, 0.0069861562371903440649, 0.005884164429037497257, 0.0020504561617368248679, 0.0051656079144007938098, 0.0018480741443421826349, -0.0098740636215316479607, -0.015193873352109532604, -0.010129356530011455681, -0.011786926255030749644, -0.017737538763468174707, -0.013045360977154141224, 0.007715513063652479353, 0.0077814785513774520354, 0.0056104852005217642485, 0.032549948194363076404, 0.095042192724825724781, 0.041711508438485589423, -0.0079170798496924765786, 0.06418245741109107616, -0.014766641064020702423},
|
||||
{ /* b */ 0, 0.13754721824368876248, -0.063493641654088772697, 0.22830296737448574351, -0.06090628577308521141, -0.046004693137549623749, 0.21580730819120708119, 0.12307782917671261647, 0.089740574449950760716, 0.32648577436567016719, 0.24035205934268277783, -0.072543872172078915916, -0.012821880001484542433, 0.061865137137434578207, -0.05044571494396132838, -0.20687345392352007867, -0.19352544602058152634, -0.081534524324355928115, -0.11527908326446067999, -0.19205089159229915552, -0.014435573776200305574, 0.091578567882680261825, -0.016821578118150770642, 0.022722319119941603027, 0.083369554422021985296, 0.059078833427872456951, 0.062862807790400876407, 0.050723340750263856691, 0.021365973798814774653, 0.0016529181815633231523, -0.15764243352166251722},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0082355372166692739078, 0.011221317614100445592, -0.015398602139821311596, 0.019928042385439565659, -0.016098624365389231639, 0.35687158954924280696, 0.25056043621692913881, -0.58374093063797949377, -0.096587696990415444764, 0.1417547393039359227, 0.12297834557525599841, 0.022570043259149269455, 0.33375919715316915148, 0.760382535490139011, -0.16254361373105752353, -0.19917812853966368469, 0.070067615832109297891, -0.10829091532814275056, -0.18484059920915038577, -0.1432702217603286643, -0.12124479647419947326, -0.15236845595713283119, -0.18674136242612379699, -0.25923778948833559044, 0.0083936426743206477008, -0.099921477749484607922, -0.11575635007653031772, 0.11489835825258340463, 0.05190968921625193494, 0.041271947034530499787, 0.031437997309678028524},
|
||||
{ /* b */ 0, 0.10868828192197363403, -0.074118270899444116395, 0.090777214578766446396, -0.013578916722286824004, 0.070883676521874855458, 0.11959741347631475117, -0.01478983329482146114, 0.072627013198334366972, 0.061154270063062954321, 0.053538843911089990801, 0.10606045726597232437, 0.084565973879056371976, 0.12939459925111462812, -0.071073677257657563722, -0.045887381062256933639, -0.032179006816211025432, 0.040614594623645042248, 0.051338232550410083099, -0.0046888299313390183198, 0.08651005715390544526, -0.012422527402296091453, 0.036899877754051693679, -0.022144609442510329589, -0.063400842038184745952, -0.026440060318911294546, -0.023673563205560410605, 0.0010511162089202694819, -0.047472031235924229409, -0.0013554914729107421512, -0.0048621235097193868033},
|
||||
},
|
||||
},
|
||||
{ /* 65 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 0.00021209643066757990983, -0.00031257144469942722484, 0.0016441805216621534387, -0.00081058611586804288351, -4.3648113456917552941e-05, -0.0012284241081988998053, -0.0013372660613575335694, -0.0012448771791878643356, 0.0011663351290325252307, 0.0042197117786080262647, 0.0023254717276821601502, 0.00025887355412090818849, 0.0052097013800850300314, 0.0068133846221896101833, 0.0012296601063083159242, -0.0012431805547497014504, -8.8048805399475269656e-05, -0.0038129513141305082513, -0.013960404317975294575, -0.014560488715287256412, -0.010102471322895321612, -0.012002486002929415101, -0.016113745186924210984, 0.0018967118588925058718, 0.013449767355400155111, 0.012584539113361103979, 0.020867824729736694778, 0.073836201193860917513, 0.067122965072344276116, -0.0018477671601818679292, 0.05223682330510182048},
|
||||
{ /* b */ 0, 0.13309668338776226015, -0.034796214140597747644, 0.20259809733892686356, -0.074229467116257441539, -0.033589853999302365928, 0.17194460518329957033, 0.14053069634131776233, 0.10398223014011775955, 0.28622058494381930061, 0.25553069116036886133, -0.033340385994645727052, 0.0493901404229751817, 0.065507437268241819339, -0.14259732883797893166, -0.22103298760553502511, -0.14786809695042923973, -0.12633674696810315297, -0.12873024948879818741, -0.1027909150680406114, 0.0014565313397746360025, 0.023432772310455485254, -0.066093717438972521272, 0.043814867214386765681, 0.11896612672430972868, 0.044357594944782752222, 0.040347747146118884132, 0.077413706726509046163, 0.040768513366040703971, -0.045448434075889831973, -0.11511235099577465935},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0043138529817596110716, 0.0075413039075933347571, -0.011521651041039235319, 0.013325571083565648789, 0.041007771396277606368, 0.5053361523397409405, -0.094698397193346620093, -0.61958974147486567396, 0.13570958419739470591, 0.14441422292394201499, 0.085033815695051417904, 0.092603593314331822395, 0.6701887476182314396, 0.36261635455576279874, -0.3621843326644283434, 0.0042299442428242461922, -0.002366041054087388365, -0.12368382816733622387, -0.088272849346890044919, -0.049419563996561458041, -0.2125426294795428328, -0.1586871870165506293, -0.190927188977616763, -0.17006683683656526052, -0.060741253294065850055, -0.19496219647700138711, 0.036515091593278953264, 0.06314691771158037481, -0.015262096579524153661, 0.048691056102282553875, 0.021226484220801533631},
|
||||
{ /* b */ 0, 0.089542514489504565489, -0.058716409615418296841, 0.10736888709090598726, -0.02331315160544743248, 0.091213288884433446624, 0.017298834005556238541, -0.016589287472655936395, 0.079801817869399827021, 0.035479049186560793205, 0.068019632837512306045, 0.11886793181633235894, 0.13836077542754027236, 0.070163159715686679307, -0.079640800716906573475, -0.0062391578820996523858, -0.024478254830942465514, 0.038586029342448785462, 0.042690244877749763952, 0.0082479014534321548613, 0.096996213193910676975, -0.013540957110730333923, 0.043726799693584783579, -0.050859473091123888477, -0.051383908254952481709, -0.018315577251619419297, -0.026445801315291839195, -0.0068531948455192986253, -0.042271390394759897347, 0.0064541724220136438561, -0.012350604079308658001},
|
||||
},
|
||||
},
|
||||
{ /* 70 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -5.1811224841032703294e-07, 0.0001195077510562910048, 0.00054565132884265522481, 0.00036921285875846077389, 0.00033238357281806241161, 0.0012172851626690581531, 0.00026386278322021471977, 0.00076749530397712774007, 0.0027338096357520935697, 0.0016283443813464026917, -0.00062622425994751651501, 0.00012757274674146668048, -0.0011569955119666852639, -0.0045294448897115202612, -0.0047029865648390289934, -0.0036212338211383254816, -0.0092852833147305524619, -0.014348328680399702328, -0.0074853254233148147634, -0.0050769693650531966256, -0.0098573400794665921865, -0.0040309461902393595167, 0.010067145221129281119, 0.004994392654444901325, 0.0063956208098958633457, 0.026055905177485572111, 0.030774492283322522207, 0.020200953112017860924, 0.051526075933797099715, 0.081379623049979143978, 0.0023131432713013877489},
|
||||
{ /* b */ 0, 0.10894635247324369054, 0.08226281338868934867, 0.13188409788832122782, -0.10259859632821832776, -0.036453212321138628305, 0.053734255601595171115, -0.0047133499977286552607, 0.12938685340448119465, 0.34471458269645649519, 0.23193048383982062255, 0.031865410002815397483, 0.15000719272233176138, 0.11166707115740914791, -0.12525365639212693303, -0.12533914392043321584, -0.013940020445260548065, -0.076263219169064866421, -0.13523188830209809108, -0.12570995087821112968, -0.12364896750882703458, -0.11644943785832362337, -0.057756822422969089637, 0.02441554646979982035, 0.0003564445640730218301, -0.021530279351658632159, 0.034706834490041971186, 0.056194495670694455391, 0.033570314935671419221, 0.042081857466388927769, 0.021545695715191603981},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.0035836200210229286582, -0.0031072734051323207261, 0.0019421304212324103089, -0.0058643234854055224792, 0.15128443576764849521, 0.52834049315792519508, -0.43710112538159973106, -0.47925878830830015431, 0.29492476075622842124, 0.11155941490950406492, 0.042356073563245243141, 0.29913230770566656691, 0.71528723603458332914, -0.047873961502792675149, -0.27559532028674138537, 0.072072004801736505586, -0.052072379004377590539, -0.039855623428972607181, 0.015994912410223841026, -0.16099078872106220572, -0.2483811542539591799, -0.061804120649365870688, -0.23081587273945508576, -0.14671726044973676384, -0.13359308987310225536, -0.11866357264318513898, 0.057726807929955707699, -0.052300350854971928982, 0.0070598896143025946515, 0.040982578067495951946, 0.010737637321303616922},
|
||||
{ /* b */ 0, 0.085990202435275248094, -0.045241177450963329654, 0.10617869357694004195, -0.027274277623547289739, 0.081604490424743256205, -0.044586295972629322315, -3.5857159416154138487e-05, 0.065533207614784261263, 0.013976222370463801947, 0.081284503898977275571, 0.15219632615988584745, 0.14536894803318561875, -0.0047486841226037877772, -0.028328518717180534159, 0.012226862885177103291, -0.023973643258740594264, 0.052947342934830943229, 0.027989269883246792325, 0.019243641513648143682, 0.081454590263969284258, -0.00708365997103155981, 0.048979713260849030987, -0.060966803987036639889, -0.028789221111322378654, -0.032056881092154890234, -0.013506612710420529133, -0.019305102195920839647, -0.036637922409973010252, 0.0051001653031878674271, -0.012499719609549049537},
|
||||
},
|
||||
},
|
||||
{ /* 75 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -6.5923442983146108426e-05, 0.0011271001093549047091, 0.00025601249190043554645, 0.0018847194721560711628, 5.0876901303009702815e-06, 0.00012011933336886215784, 0.00083171514300706128608, 0.00052309243540882353722, 0.0011673413852220091477, 0.0026861263670296948829, 0.0010904448629472929255, -0.0025833300498073752394, -0.0036355509377972161644, -0.0054094004553473240549, -0.0060745633297804024764, -0.005798110979324255787, -0.0058363766689689677847, -0.0064945304305980000592, -0.0096925802501451885362, -0.0107794127797433692, -0.0055240783044391283951, -0.00062055389930815163524, 0.00099273240065922419006, 0.011862141140531190509, 0.012128941204794796427, 0.007469531601092538331, 0.019089850497380767003, 0.027868375799752764799, 0.02564535563215342151, 0.040200335544512966202, 0.075140591824576774549},
|
||||
{ /* b */ 0, 0.16821546891768179854, 0.052070955596089651962, 0.15059408780382366189, -0.034484929464922986497, -0.09681834645926257199, 0.038993096989556330634, 0.025165602614909965418, 0.068217434327291756602, 0.28588626697426122725, 0.25322530989441149885, 0.023257670143314590483, 0.084631528479706119583, 0.087623863125815826258, -0.063289424224385881779, -0.04111210934180931087, 0.0062099315267100108073, -0.086630674442783606182, -0.14520617328789287015, -0.11845477998956299714, -0.09507741318859341817, -0.067074376130724089329, -0.049297931923528159892, -0.032629951249585342765, -0.032322618598035202098, -0.028774768976724818259, 0.0050862628908632245839, 0.030059867262149930767, 0.03619620949003865551, 0.040048636948536442404, 0.074784483329731754608},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.011019275525695253204, -0.013849992827126740569, 0.016917266614222860321, -0.024593574280674067312, 0.2755979158975589427, 0.45173428558416955925, -0.65405270132110782111, -0.27540548350881166595, 0.32271395364772170744, 0.050144850607296634348, 0.097796546761367855738, 0.52489190531289731112, 0.53222901585795523438, -0.28672062269614356778, -0.099921138514967006161, 0.074086470897411355052, -0.054510924206991988317, 0.037202647828410775888, 0.01654229015551119536, -0.26427705887042252098, -0.17851612488609874818, -0.087535243016548386352, -0.25308108532219603104, -0.11270654329725227072, -0.19911311611538287658, -0.087208381822291847207, 0.041575970333826602066, -0.046835263936002749507, -0.0031789718109168432769, 0.017733383501500332713, 0.022284914124549512482},
|
||||
{ /* b */ 0, 0.063654984772485573297, -0.072258235141275717339, 0.11143147791531111956, 0.0087840137916747988711, 0.064463015400774259511, -0.11346145969663629094, 0.02100129439068075532, 0.064648989334362388925, 0.038270361198741026376, 0.071675930769700912926, 0.15879780912824276173, 0.14156427256304554563, 0.0029008342249592002776, 0.013453795811311022868, -0.031978426252195213397, -0.0047055545557023736869, 0.057295800200696245241, 0.019880527866045910601, 0.023882626203728003766, 0.0816614286701679154, -0.011451559711870597236, 0.036329458605499818924, -0.041088532580567209418, -0.023652412022372691636, -0.026671112082336280447, -0.024258466376539916665, -0.018453252246660931113, -0.03518859123466042127, 2.2642044285488299076e-05, -0.017197498276247558113},
|
||||
},
|
||||
},
|
||||
{ /* 80 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 1.7418901153948339409e-05, 0.0024829349213467679855, 0.00080662799356590042521, -0.0040748995594475090343, -0.0043772687331744553063, -0.0045817695894234677922, -0.0026921600358026384972, 0.0020317311486689479741, 0.0021593746597770016246, 0.00066712085501630102868, -9.5710687916805595003e-05, -0.0060753720715345238546, -0.015743200903750587116, -0.01434605846804826168, -0.0073507314333337570034, -0.0062768288260767191034, -0.00052040153811216960378, 0.0089624149056388713319, 0.0087255307387040792477, 0.0041380932427198535706, 0.0025873059441433587935, -0.00056427236265477176674, -0.00042937015477806351159, 0.0051603085642754065177, 0.013367090647350976518, 0.026507895717620133524, 0.03763876907939001093, 0.037489388889297425855, 0.028338574035793876599, 0.023157443746341099811, 0.018735089226257217732},
|
||||
{ /* b */ 0, 0.14534882996838915936, 0.14803175382258060289, 0.094844719201528371322, 0.067106074548503591437, 0.0076561274135744650238, -0.045065770755345346821, -0.048916309039123695435, -0.065139716880976972213, -0.040503460437060767596, 0.061896597042185308446, 0.14430131906391363561, 0.12502812778689142981, 0.13307255907833714925, 0.15846438120380168524, 0.072443959380358302624, -0.022362089126953810236, -0.045059346560211155364, -0.054526658792158899658, -0.054612633246867159365, -0.023133071334960342291, 0.0073895288997538610687, 0.024334450270876994971, 0.010667863612340289237, -0.044504676902160089647, -0.098200245560384202825, -0.11766865822868122216, -0.11382238342308448331, -0.093681436951140173441, -0.019605847884629490352, 0.090021698045603115723},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.015512396634440192567, -0.020391464096575218079, 0.024050195860016859717, -0.029979857909256946158, 0.36905414956375964808, 0.35065405180331060686, -0.82070459684360974606, -0.17294854510044505025, 0.5091349998282543865, 0.070519733383666086124, -0.077559956631959026119, 0.61125406796720882507, 0.52623629698317675452, -0.46897902004352903793, -0.1714417829200720611, 0.26948853777138070953, 0.097069492238713306342, -0.14707004524472033768, -0.096403658302783926115, -0.13634031166999754925, -0.098303552232116911402, -0.18241456272988593179, -0.21530248155336156879, -0.11279416724501584168, -0.23690606176759601564, -0.056911240660061090946, 0.037438849309527962028, -0.04578389942453200967, 0.0046264186300080251124, 0.042007640021230613359, 0.022151274334351871154},
|
||||
{ /* b */ 0, 0.041982195862818455501, 0.08254722741980052847, 0.072664427252597960094, -0.11829377132001502038, 0.070236617743524298874, -0.011901997620548596113, 0.0077893227590393396276, -0.0089008987991332638723, 0.090522189974536967916, 0.095324643530981037487, 0.11754453832870694063, 0.13654235503493533654, 0.034013562766714577901, 0.02340727949840144817, -0.040713847604418457182, 0.015732261217336895864, 0.023791283777080396433, -0.0028896805095383198969, 0.0169974431277371274, 0.072837038118719221735, 0.0039342201881270161268, 0.012312494370343705571, -0.021651764233942757953, -0.021179489185238833948, -0.0081668579190747464525, -0.03054195555383248939, -0.019423375638861345438, -0.04295726081561708487, 0.0067010462456371100437, -0.019120058380112447266},
|
||||
},
|
||||
},
|
||||
{ /* 85 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 5.4207905774400502404e-05, 7.5793917808653077373e-05, -0.00036713129453191939433, -0.0015618904773695430066, -0.0024990267563640422566, -0.0026372051095679980084, -0.0019537977059835842653, -0.00080050034712009221494, -0.0018979737133328900001, -0.003172980689997162429, -0.0025624502986154595874, -0.0049276394160913117304, -0.0082707509296842118829, -0.007992069046836025592, -0.0092253530901975633327, -0.0105164612737573826, -0.0039970754482643311434, 0.0015139378144179982399, 0.00047514063947207141325, 0.0032575344298402253429, 0.006201190368149145371, 0.0016213095890837969648, 0.0040644636932485322944, 0.016439269262674693906, 0.02129002660264389668, 0.027932376313460904882, 0.040271769366495568931, 0.039282525111511423788, 0.029202236994929631209, 0.023979121666767300169, 0.012741959251327816816},
|
||||
{ /* b */ 0, 0.058008692718908294594, 0.077001205963933561094, 0.095079889668447936657, 0.05750192471398740679, 0.055385520693063128306, 0.068756639874378855382, 0.023913171111333841878, -0.0029203640386499252202, -0.0029721632491264138309, -0.03824664324664217574, -0.035867937897005042203, 0.053236292890807002109, 0.097727381831724802197, 0.10594328185259405117, 0.15491145954144025509, 0.13646633487365833481, 0.042836349739144852222, 0.005589485785606473911, -0.018748615375624444468, -0.082901956566933110437, -0.080797429955759003661, -0.039435179337715675629, -0.046340158566526845618, -0.048427734634648444967, -0.034067592635106391796, -0.060826253589774115227, -0.084456034839947013992, -0.06411890376520346102, -0.041638553569395275744, -0.011361247130581286768},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.017637404019566080282, -0.023146976510304839714, 0.026545048936775856446, -0.030274109689290909508, 0.41203671504139649517, 0.29639804351685683503, -0.89791623818012644698, -0.10535778408185016153, 0.60757898399007725931, 0.024978129788012087831, -0.14743139188086634705, 0.71873064564674038479, 0.49418969158774794792, -0.62062564666938124791, -0.1537079765276824217, 0.45739395065715737765, 0.073932804114116082439, -0.32371044784339197964, -0.039912490742135750543, -0.012636479730003882804, -0.14847117245701110799, -0.20037727215219974797, -0.12919185722683890205, -0.16960876451316783675, -0.27984633351919496747, -0.037881302318437670706, 0.011410078671189247124, -0.083369129763727345406, 0.026709242074499095487, 0.075985860814370073668, 0.021280055718898502337},
|
||||
{ /* b */ 0, 0.012410399428397497074, 0.15419767583516708065, 0.044336732203144324505, -0.16155512807170341327, 0.097794779635425668762, 0.028450550355408124603, -0.021886728378568004461, -0.053240842936555163312, 0.12024645298295937035, 0.089631044274977519914, 0.072930089746372356307, 0.15639732412983112231, 0.088433184541984732885, 0.024345740863166279166, -0.020881518480592164977, 0.036574638166480696877, -0.0095547481038585346802, -0.014256673297645752752, -0.011645669012270293274, 0.059601517433541598145, -0.0071614952672649674625, 0.02250688614354422884, -0.010717105567844815647, -0.013790642205040518076, 0.0052048230799340358677, -0.034950820363846904493, -0.013621506644743638925, -0.033005877849209136476, -0.011242747822229337551, -0.018391922098279223086},
|
||||
},
|
||||
},
|
||||
{ /* 90 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -0.00021027350211119634135, -0.00076954670552575963477, -0.0011207516659172984258, -0.00042666875046948500583, -0.00054082018030587875046, -0.00081260628920221122939, -0.00090837626309792085522, -0.0019174726827164700893, -0.0023521897586642470657, -0.0023920627754969734161, -0.0025815123637362704864, -0.0025258929374494254461, -0.0058967493983541618974, -0.012319825143519702593, -0.014053078285086728627, -0.0091114297819105960485, -0.00068447180839870114255, 0.0067545738888230566488, 0.0060516706282265353423, -0.00056778821963532344341, -0.0024491019702532765626, -0.0015151936721968795041, -0.00056192173400471156011, 0.0046321597563236949213, 0.010342522776957130404, 0.015535668206057007268, 0.02835261129333077959, 0.042384537828482615751, 0.048529210478764905901, 0.049409287418838987449, 0.033861063585272077603},
|
||||
{ /* b */ 0, 0.11751352912328649758, 0.066881041690391995758, 0.011611767165436992499, 0.03294226308819814264, 0.025103883935645443515, 0.029312215250876239026, 0.067710098670265006504, 0.042243824341647862042, 0.0026960360979821906824, -0.047575363222307487376, -0.093041097951607198979, 0.00046041687407072373617, 0.17926292561601386844, 0.21698522719396096115, 0.15024545135314260058, 0.11181873055793323246, 0.058785092002106020814, -0.015643363836109758225, -0.056250849052585927268, -0.088323964511638486385, -0.1180599631592227361, -0.098079574614301501256, -0.054691967391884421801, -0.0042877756914472264782, 0.02967474956150351062, 0.0041033038782056774352, -0.052367108693135433484, -0.096005862271902886462, -0.097642108675688454866, -0.049513994578587183781},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.018150091886578817446, -0.023845130864017311662, 0.02775998848373803507, -0.033769769876715663437, 0.40491345429583497362, 0.30159629298977624901, -0.91025359983279008347, -0.081343437060522535975, 0.6034854052168470151, -0.016960078838921387179, -0.10269926345311472526, 0.76352954683775542399, 0.40219093258717791839, -0.67920968317533791936, -0.056851256921459925042, 0.50905276924295583818, -0.026665421050103131628, -0.34920467562186752186, 0.0904739783458112512, -0.036397887595374447955, -0.23393069424555568148, -0.091199150924403324381, -0.08447542487670205158, -0.2564507423497264238, -0.25721831617591872643, -0.002125597952633978549, -0.023743067912420159904, -0.14477973281574843534, 0.022873577043523718455, 0.10671418109207270186, 0.019985873195510830969},
|
||||
{ /* b */ 0, 0.022491626840903319873, 0.14018081549356001259, 0.036298385305407951384, -0.12830863123070554432, 0.1263510274922885479, 7.3727942596565898548e-05, -0.040013158347134217263, -0.040805047872806074483, 0.10760179031267538829, 0.050746002994671302044, 0.056791978592174836848, 0.19465630967095987058, 0.090536167472289943992, 0.012593323203309580993, 0.023442724816696527967, 0.052788767871281977451, -0.02033437245395515458, -0.013196282948289839165, -0.03588112911393463722, 0.045571940713064196249, -0.036429356549544406052, 0.012429019951958051801, 0.015175738110519865209, -0.005163890233013043729, 0.0095466567671172869458, -0.024098419125345715841, -0.0027907433619838569946, -0.029257612807875116312, -0.017229223565869491996, -0.027034952156425318126},
|
||||
},
|
||||
},
|
||||
{ /* 95 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 4.3144119567767368149e-05, 0.0021302951028895344976, -0.00072025735438352445072, -0.00013430419547322269835, 0.0021619131040928616164, 0.0029562742718397547539, 0.00096759804273094471988, -0.00066731916388562597525, 0.0019554424952883397992, 0.0010573150741738377226, -0.0057630517610873779541, -0.0042654429244920457828, 0.0015852209983568954499, -0.00080285248435507682897, -0.0069895806820152728278, -0.0091754745607658394491, -0.0046974684961287316298, -0.0031730985117911503224, -0.0059280793673899268015, -0.0064032724680918038165, -0.006423050928003326554, -0.0070405610571450116808, -0.0077339430447354029496, -0.0014087955666625129325, 0.011971743844804705326, 0.013240980043030536883, 0.0092823699160415884535, 0.015909933135591081133, 0.035265748517532280459, 0.056161277110985952099, 0.062561299477500997845},
|
||||
{ /* b */ 0, 0.20709919017362909965, 0.0098618492626323384087, -0.022612805280972092525, 0.084165341115993719256, 0.16295141133805535194, 0.13525992009599807631, 0.076210698016637712371, 0.13542574322733536007, 0.12770426112175548017, -0.15277262657230339382, -0.19301078065525612004, 0.030943661178395309719, 0.16248284197585560751, 0.21971897027288356252, 0.07839165727906161063, -0.06874609237615680879, -0.016754077436093028908, 0.029805198816373890125, -0.077448460786694317548, -0.15288485929854100931, -0.15750109847730009438, -0.14646534862002014155, -0.085980202811780648275, -0.012868257388554127374, 0.047737443159209802523, 0.026936777247771326316, -0.030203923302996038558, -0.015646012142198073569, 0.051186183679524654977, 0.1190345000479098303},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.01692233902813708446, -0.022198608990108524563, 0.028099027819879392187, -0.039354076304459403857, 0.34863248838263793949, 0.37030810409398823291, -0.81202423172712479005, -0.10771914287425415901, 0.38881054615390941986, -0.0028186697992533052415, 0.15279498696206239572, 0.64893570506150766164, 0.24152380950455987207, -0.46843371022348617716, 0.040251807388405093369, 0.22185368445738418153, 0.026645189291616723504, -0.039489443724228558141, -0.030196096577209466383, -0.28276446496745261117, -0.10981838965732558522, -0.014211428795898178867, -0.23828445961990032953, -0.20240959014934223337, -0.14479536848323548703, -0.09799054788940303462, -0.05841732980083247373, -0.079964546967404639966, -0.019575448765071085111, 0.084889554289851065771, 0.056574151995427736372},
|
||||
{ /* b */ 0, 0.044253003048792295682, -0.058688959402343476857, 0.11139315219106762922, 0.017428467999755184459, 0.079856031028604626543, -0.094212947161441934485, 0.047957245507034521048, 0.0050481755695976071596, 0.035439933418202063109, 0.084984660605178799497, 0.13136657987866395825, 0.12922176951737388007, 0.037151492684652648313, 0.060936255183892382159, 0.019033300477288780939, 0.046573677877307567696, 0.011154648339030230619, -0.020788905402422175328, -0.029532534082383869734, 0.017164554652654588629, -0.046263076050861294541, -0.0079167598297791019757, 0.022379966080907434667, -0.0091716797912888906041, 0.022277703175120792262, -0.02238749197036766711, 0.0071438113455552301745, -0.036059010862666412978, -0.0043682279381737978974, -0.028520125641734627581},
|
||||
},
|
||||
},
|
||||
{ /* 100 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 3.8678007732439994838e-06, 0.00036880559217689068419, -0.00071422931596787375425, 0.0015315462861820172691, 0.0013974373520159177886, 0.0013013753347168579774, 0.0025956690450495995687, 0.0032526644595798348547, 0.0036340130423612171384, 0.0031337673469383755739, -0.0031445933911661283489, -0.006291570253877387664, -0.0031212408654196499569, -0.0059143209433371035644, -0.0094436593248842237713, -0.010033109807058848695, -0.0091828205094068859893, -0.0050242048843518460899, 0.00022635591977182570257, 0.0026831373144825532151, -0.0025832568337907928398, -0.011199233881722947537, -0.0090800117833605975548, 0.0047504101117340491456, 0.0074455714467458466999, 0.005686961780868027283, 0.012409919323344564823, 0.017226539487935621509, 0.028654026888730310674, 0.068762734723379348445, 0.072600415099710602362},
|
||||
{ /* b */ 0, 0.1413129266600310352, -0.0073914337867658774783, 0.022834191067966358446, 0.050140980169949278533, 0.049027788577155062555, 0.11641762768903329839, 0.16322290968165398262, 0.19894767328013096552, 0.22894987291049995193, -0.027045810778655865469, -0.26571378944677259692, -0.047611977908035285623, 0.11705887087903876775, 0.065492599011507390827, 0.080517969516941123587, 0.064856092412760024679, -0.02627393330616178968, 0.0076090381427584841134, 0.078206132751237888989, -0.053194635189005023967, -0.20185179645061668285, -0.21971235027985758226, -0.16978804320735840783, -0.09891850269103108495, -0.02115339760265511071, 0.025780282346676841598, 0.022902251530926287515, 0.020839531242738962291, 0.074518988234795191516, 0.14546865989319146539},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.011966198050782757278, -0.01496833593309099264, 0.016450527454028689156, -0.025926850401778410438, 0.23555114438391683285, 0.4722188962311174576, -0.75234591910942427706, -0.27801732081729912949, 0.53915520795346294491, 0.058085551110777060291, -0.058566576042035599359, 0.51853021102951979415, 0.48054627214607975594, -0.48585026237959572093, -0.15351342024705222356, 0.31670886696633759883, 0.16315084986006778145, -0.10738911933637247664, -0.11149882163329602469, -0.17039061038015274052, 0.0042422902277487392619, -0.0078028915498091350189, -0.36061792668445225019, -0.15431112049922079965, 0.0056192329624029507817, -0.161735335935920016, -0.16088938293551427461, -0.014354427764549752833, 0.062287468304296059185, 0.024598150199371844604, -0.029702161103367999417},
|
||||
{ /* b */ 0, 0.11504375649924208913, 0.021651963885253810993, 0.10021424308853918439, -0.10065297428003720792, 0.095000281296097124906, 0.023494773330606733008, -0.016304743455830727344, -0.084119092396599648431, -0.0018681129193348286477, 0.16086967464476359391, 0.1547736184561407935, 0.035506119840447707137, 0.0021680979266731487121, 0.14736967829420749565, 0.032388603988108173592, -0.014040054102954644538, -0.0074069314810135834098, -0.0068700930707776136641, 0.0046630860661743883319, 0.0017586704099742042628, -0.032198686096395617851, 0.0050750934625035867831, 0.02081839662318105133, -0.029219757397332818405, 0.029697584116748429461, -0.03943419296503075655, 0.032075243587325115435, -0.035072374385213510306, 0.0035978369066023275884, -0.031802406372611821683},
|
||||
},
|
||||
},
|
||||
{ /* 105 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 9.4464175203451297529e-05, -0.00034244421284745647348, 0.0026178336597765267807, 0.002987633016607316172, 0.0018853869852841764754, 0.00045206286006238376174, -0.001268446398333677571, 0.0020279656421512415321, 0.0030288385766130687671, -0.0038811095125906858172, -0.0075575813094502786171, -0.010229789842788883369, -0.011581592352233327503, -0.0073160070666877796697, -0.004986785201444021709, -0.0045074024905555898357, -0.0032919373525036607978, -0.0014195923712934097657, 0.0015888908617284211791, 0.0045270852556261731436, 0.0061991054128851530436, 0.0029025465434623365368, 0.0019189911238531860531, 0.0066606047902095788515, 0.0079475207345747200804, 0.0057883047890894302745, 0.011572011089297510461, 0.018921730568569050668, 0.042937813008875336251, 0.071911292230178447404, 0.025067402116066284101},
|
||||
{ /* b */ 0, 0.08696686852271984236, 0.01578577589152196925, 0.080596070642993677957, 0.078967631586684960965, 0.027571309059240545203, -0.017849018280266526482, 0.03678492740549765827, 0.26450544155613708863, 0.28130387428208780687, 0.028682499716783937949, -0.083076202529522302775, -0.11054641272073562064, -0.070511572391532273407, 0.072697528049545101503, 0.08803285558675599809, 0.060692369318604555417, 0.091712773311602990844, 0.056769837322862004569, -0.029069460460717788663, -0.053468190293962103432, -0.049532799916429670617, -0.097734676907518247546, -0.1433145927644957629, -0.12552474600482921296, -0.10327250824185285616, -0.097065348691610653376, -0.057873120256762833336, -0.0013652695425581118371, 0.081695758853764233187, 0.15936741351876837491},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.0015668016976515403149, 0.00045427934985357160125, -0.0040624383178386076765, 0.0033630907472987142323, 0.090224127649338028978, 0.55691589500825799952, -0.45046585761131857639, -0.51700272135909752791, 0.40994229687848926513, 0.12186291752863150084, -0.017702323542065183382, 0.3852700380226054544, 0.60735360287334350105, -0.34406050321392755986, -0.25331881626544316966, 0.32373118512070442332, 0.17009464975948093701, -0.11799552026600904076, -0.053982922896562278436, -0.10496289068836175962, -0.17613957317129758096, -0.010978053477058748177, -0.22407543854546807527, -0.22678697091639107852, -0.099112038357802939581, -0.10828770800024090093, -0.096155268437089880251, -0.071548024391486636508, 0.0031216356084383112268, 0.055150743162330623237, 0.0020468437013712518883},
|
||||
{ /* b */ 0, 0.074935774006172503614, -0.082168941655711369432, 0.13844432786310970074, -0.058480690143646735235, 0.11667134772661268138, 0.041131301620027371779, -0.059720708901109774425, -0.015459233266758992675, 0.014607460522074285775, 0.11341577404696766285, 0.14390743799855879037, 0.10101969001017635508, 0.018064679750528361835, 0.093985627682125455484, 0.023710957272608974844, 0.020682315887456118736, -0.0082715441267720846152, -0.023816672842006357536, 0.016464978742749061813, -0.010626858727223569001, -0.029205347423567375176, -0.025576540012752640996, 0.023889155526357452874, -0.028413243782442719476, 0.035434099354063164355, -0.041507684576278999766, 0.044291022458608879375, -0.043082373704919282864, 0.015778813708729882981, -0.0355929261714078779},
|
||||
},
|
||||
},
|
||||
{ /* 110 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -1.309667384352426468e-05, -0.00061238318339873476503, -0.0016670731304430086439, -0.0014611074396903012129, -0.0013514815526416419471, -0.0014923048672482728313, -0.0047851932726689083708, -0.0084144403305480564015, -0.0081578614171545771327, -0.0071634186354224693716, -0.0048760878632037041314, -0.0019702122355108563079, -0.00039475779929631568677, 0.0013245241139991958176, 0.0013479559485968274635, 0.0020580642721979014453, 0.0056999761501724810486, 0.0090073449320743348423, 0.010529556221730573817, 0.01158655953362175417, 0.01127516438069464666, 0.0077818288692077519642, 0.0073530654720599386565, 0.011622573802480551386, 0.014405918050339194814, 0.016984436818426318361, 0.021012748511878287516, 0.030158607004018844755, 0.061966094625845451194, 0.027403379903104263526, -0.023880726698483067949},
|
||||
{ /* b */ 0, 0.053318079201170043291, 0.011064278072347999426, 0.054140974536862063182, 0.031002934313129060229, -0.053491157458798725688, -0.13046741982040976904, -0.029661942213682346292, 0.22939319402809354997, 0.24193695175984963885, 0.15020956842450028379, 0.131262422400565959, 0.066188955555809836362, 0.05079161501511664234, -0.01867327535411134054, -0.069402381644226296409, 0.022429179740643401253, 0.024520253971427319328, 0.0085418548669696815756, 0.059209236950297228219, 0.022315975949510624687, -0.061762492375855293503, -0.047355749546590386601, -0.0008467798533889903112, -0.0042025996453004532682, -0.014104953056232050201, -0.024569466304663611922, -0.052179779108096902007, -0.088391765753551010398, -0.11757297369387187391, -0.11682440156687845523},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0097350431312497598402, 0.015482519303677139133, -0.0236709560834293814, 0.032716952161958127998, -0.021186002237671280879, 0.49063496764359487701, -0.053611641899699476188, -0.69339229561045856443, 0.2531354733319123862, 0.19514698973700089768, -0.0034329576007472231702, 0.19370032104909776227, 0.61944910438216083115, -0.023758962855663715019, -0.39063671190927723442, 0.24685431267866464466, 0.24316308284436491394, -0.071477629128430184013, -0.12323689128967714457, -0.025006304592077414906, -0.18000479907094349419, -0.085949375769707014872, -0.15130158860041317825, -0.24225203164662723054, -0.13477995139787868339, -0.10915578320838900672, -0.052342989122419747439, -0.088876098193230390621, -0.030830002652761610837, 0.073681981632048226816, 0.00916070516668136825},
|
||||
{ /* b */ 0, 0.093839709295710768688, -0.13940626207778822332, 0.14604782141311858923, -0.030637347776664262955, 0.089197237289730460508, 0.12447339357294055773, -0.08808459118423306311, -0.0030632245232508556465, 0.023143885267244691112, 0.088977747081065997059, 0.15688125838616676089, 0.10509645690274375951, 0.031561154657990669881, 0.056260543647721261706, 0.028330076578537782828, 0.017823918696284149488, -0.015781512822110599359, -0.029762747061987809838, 0.031778403531169951979, -0.012599544304873165623, -0.027143550201066436733, -0.033725115150895837446, 0.007539852218147596874, -0.022102951250232635849, 0.025737829876023434611, -0.039906391082608280718, 0.051619486429567776331, -0.03681355675302314806, 0.021735208940261083188, -0.032249935928698944543},
|
||||
},
|
||||
},
|
||||
{ /* 115 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 0.00013942449105569176761, -0.00029118390563326237291, 0.00022469527204138639576, 0.00037784487202235927938, 6.8148422981140210908e-05, -0.00055012036023760306491, -0.00017107817051886797799, 0.00086004933896877133748, 0.0017649907087941008044, 0.0024257156893206510695, 0.0017981001016950659555, -0.000523941382189748589, -0.0035758145046360621799, -0.0045305571148845889817, -0.0047015341152548094372, -0.0071128570323930641328, -0.0084398977100511064775, -0.0080221088034210207007, -0.0097193916145238423709, -0.0095620836841614487156, -0.0047173685237961171524, 0.0029446533543128765482, 0.011042163645669234029, 0.018131401262645729933, 0.019064528837507699333, 0.022336489023215555516, 0.030683382765510358592, 0.072432990680347530965, 0.05566116299669798817, -0.022451281695354263768, -0.0016246083237719845249},
|
||||
{ /* b */ 0, 0.10160865983710465343, -0.0084893985911882463569, 0.098656925751963719939, 0.11538695058401632343, 0.0029827292803707994295, -0.1115621224458476779, 0.00024371850308735343305, 0.29946499607094723139, 0.25129923915422069935, 0.085404819556295086258, 0.10125239327595653149, 0.13313095025790228076, 0.12516283172010755909, 0.033605136931132151279, -0.072097613554103490152, -0.14633661861489233313, -0.17418014311789548065, -0.098961418529240618991, -0.061263955812435044734, -0.085098411928968831219, -0.04496168292497659813, -0.032656829860241987085, -0.088768874276570763904, -0.039613918116597479635, 0.037358619477956267474, 0.026565492379435062809, 0.040526936886213504874, 0.053534521469930651527, 0.014505389111275910838, -0.024861739940824911788},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.011093287405129442433, 0.014294408261423564854, -0.018378514697486338092, 0.022532777726584116151, -0.030699638831704033348, 0.25907586376942981499, 0.35366673996007236269, -0.66341804511645396936, -0.10190680423687648037, 0.39806769439849831738, -0.074577292316266766137, 0.058450823929609249663, 0.57243656900714623426, 0.22754131074863476192, -0.43903162085690844441, 0.16412776225961495102, 0.3403615484415121184, -0.049543018421195975098, -0.14402901381840427231, -0.038975851083568324729, -0.13613905270452761331, -0.12963800935446376239, -0.086825198761480759657, -0.24036202841746270864, -0.17799756582542053396, -0.14065958789134627716, -0.10391730580476109258, 0.0086228976871197474119, -0.016981458250357045481, 0.0026454871184357700575, 0.045309008599547596907},
|
||||
{ /* b */ 0, 0.068192103314683172322, -0.061669001785108826241, 0.01395546386205766265, 0.068994778020183222811, 0.092885954115612900939, 0.087322007906250234677, -0.05372210536269423492, 0.029172058847717546176, 0.044405376757425570056, 0.057849167924908816152, 0.14699406690442545775, 0.089944467205095551821, 0.075583888107812677304, 0.052866776009121915769, 0.0029402623440057946806, -0.0042458379854006314535, -0.023984315872921900537, -0.035880772482231246268, 0.019422392492089886329, 0.030931664043963580379, -0.013971230482688265506, -0.054088307483422283506, 0.015147931433324643424, -0.060471716411530249125, 0.02539520388936124598, -0.036192334006072787722, 0.038136007919063227845, -0.0023172886767179011469, 0.013993189017700267962, -0.016096950709648318034},
|
||||
},
|
||||
},
|
||||
{ /* 120 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -7.2262671827473773205e-06, 0.00021137481615723910833, 0.00047060124644393683431, 7.9837206741482360725e-05, -0.0015860829008507160154, -0.003324635078419402312, -0.0020038651385792527471, 0.0010743732347523477638, 0.0035367302569574987636, 0.0037129599008908767063, 0.0033303416441948785476, 0.0034552064656981351654, 0.0031470039602021766638, 0.0032199891907003226448, 0.0011094837919917166502, -0.0045865829201990893083, -0.010334055626989857579, -0.013081917360317774079, -0.011671678229047133257, -0.0095789163916809583199, -0.0042091261113694211637, -0.00031535904488483312846, 0.0016833268137381174334, 0.004271428691686451895, 0.015849235636376801661, 0.023900184131717128189, 0.064088261183432859713, 0.073371531546864710016, -0.020243074718567788395, -0.01291555641776132024, 0.027781266974009899418},
|
||||
{ /* b */ 0, 0.1153786319833122187, 0.033470230237989118116, 0.065880011802729732118, 0.14410401144287349195, 0.073978442038033498385, -0.073173764431264110009, 0.10942576385807034622, 0.36433920385721407786, 0.1935859346975654649, 0.043272615446177102594, 0.036373710836958006443, -0.040599685044405420253, 0.01509110368821953152, 0.040262603654243889206, -0.073363608563761784076, -0.10625240212336350965, -0.13942337976260987809, -0.18241885025176846069, -0.11843255686854597952, -0.069344142937972919061, -0.044163662314966600775, 0.019034985302424090037, 0.059005661138498977092, 0.066810227270786004539, 0.050514892022991697562, 0.069291521255163135429, 0.072269225925743196814, -0.020010108109196067527, -0.050848664101162122098, -0.054208314001352730926},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.00042043829732560378254, -0.0026942172581595124833, 0.0059841555066471631419, -0.01070625760087127315, 0.013960005139680710731, 0.033288064213549649339, 0.46415670738615477653, -0.23584123219842412222, -0.49742803604778829119, 0.32618315423010030285, 0.10695757597020510987, -0.024407046527426604077, 0.25862288808148653496, 0.43593051408603211705, -0.097845318288349691915, -0.12989829461206447991, 0.24916628389953562883, 0.20835511501327691475, -0.084299476675381068702, -0.21365480676733850096, -0.052461013067177722502, -0.047057771811738306755, -0.16149470478124788864, -0.21587916625733602483, -0.15596401194622733222, -0.13849896023468763473, -0.14956880244593814822, -0.039030618517181710214, -0.021206352760830340931, -0.0088528002070362155074, 0.048871936650565078741},
|
||||
{ /* b */ 0, 0.085351109527296825652, -0.11590278249875042571, 0.053546767390562494127, 0.074919546368423864391, -0.0035077009333294197069, 0.16797329487910725443, 0.022317478922057387009, -0.11473244788613998213, 0.11005313665454834193, 0.06016798586990554365, 0.13623473513239403587, 0.091448580907950410834, 0.072340642627592710578, 0.047742713236860995218, 0.020330236324720904473, 0.00068758880059690413722, -0.037753658176874725638, -0.018234949665778960037, 0.00050008863222792548919, 0.043357848545674641805, -0.021018098479127021727, -0.043587923975502325391, -0.0027822357407097236814, -0.046056280136991777086, 0.0099491877322529023719, -0.02693354394970193938, 0.025567960137179608637, 0.013183576335847914385, 0.015280040867320272835, -0.01665173962277395614},
|
||||
},
|
||||
},
|
||||
{ /* 125 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -5.7581132945960734806e-05, 0.00064948927000485490169, -0.00030281755231814709399, -0.0016139543534271494352, -0.0028540076139893510998, -0.00069932054189147940804, 0.00040557645956951215993, 0.002287262538813731455, 0.0052463534689142811429, 0.0032526905361166011214, 0.0023591679716716863757, 0.0036377204579163299573, 0.00069868315931420968412, -0.0028582077860397868407, -0.0034227549605345165828, -0.0052880765379764750611, -0.0091447628576893404129, -0.0091561620299898671682, -0.0099534071835646886761, -0.0072195747947978450298, 0.0004740145097964497704, 0.0054870306801999002566, 0.0052488173069020760408, 0.012925204477994001184, 0.018778806908058276459, 0.053969855680208178583, 0.093038142662399403449, -0.0068153728441378014224, -0.034268778804982802377, 0.026583882200004183005, -0.0024075520452249143943},
|
||||
{ /* b */ 0, 0.099092019363866690185, 0.0087517440291312587064, 0.096491267048796902639, 0.16342077613768629663, 0.041201858055478490783, -0.1175707893002683746, 0.15420751412906219535, 0.43588039982098147895, 0.18642586019690376986, 0.056413400277011138684, 0.031866802650444558953, -0.077302578875594607499, 0.029927363015720687134, 0.0017402496533050482164, -0.13997630338099392722, -0.113035329772255555, -0.13352392733995827045, -0.10298695693605752766, -0.04326825474416928774, -0.11393581492328413995, -0.06559839813850137924, 0.038815055255700385561, 0.030781327476601946097, 0.056987065056787744588, 0.098012456777943346431, 0.068958606987759574203, 0.011201442200667321991, 0.0026327055667116350257, -0.013589254772850001274, -0.095569145918267262019},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.0075183561421753863918, -0.010436048359461352897, 0.012740024716386723347, -0.016114742188342266738, 0.020025116608144918895, -0.027263264945716000898, 0.24753853818150456378, 0.27118531986500399311, -0.58866565184274277645, -0.071171008282390368915, 0.44792919886633941751, -0.068263227306014959139, -0.09652718239072137496, 0.52032593224742407223, 0.1901601808898969459, -0.3318782249512020055, 0.23531611286604497968, 0.350087143838723025, -0.096030647934270838006, -0.1960682593386528505, -0.01274418685537088633, -0.099505400015498790545, -0.12575831107495658023, -0.12198877743594112311, -0.21599050364756824938, -0.17300979780852390744, -0.084674809326234362628, -0.093016237510280097567, -0.081152149354491581734, 0.020578498556179242174, 0.059782309145633115433},
|
||||
{ /* b */ 0, 0.079288650579058719825, 0.039894740617003009164, -0.052060688524599788018, -0.0054613514197847726206, 0.11873078078229983012, 0.062957485088546372154, 0.048153345581620175808, -0.041180981923197274019, 0.076072955387394947113, 0.054709085033151534649, 0.15295131928289695811, 0.10385187848640624331, 0.0068785110194377954707, 0.063340427332151699735, 0.041550837520348653242, -0.02648256370923682268, -0.042126265048679154002, -0.010657528361768279709, -0.0061631088717119877907, 0.039875390696639083365, 0.0095109303333137593106, -0.050126654616640571593, -0.0049517103930521097488, -0.042935357546479424595, -0.024702225965536787206, -0.0089685459519865708133, 0.015917359637452496018, 0.014042791065134972717, 0.035103098473886019948, -0.015108788392181160543},
|
||||
},
|
||||
},
|
||||
{ /* 130 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 1.1812758242913043642e-05, -5.5901626799801859558e-05, -0.00051669836013956975569, -0.0012710223678408238968, -0.00071126548338573680752, 0.00059890656135819231309, 0.0015958964632439842646, 0.0024059881895133194973, 0.0025038508332658748756, 0.0018244612608186998488, 0.0013785031645341394579, 0.0008901754070672653063, -0.00044113225364239214144, -0.0016912166763555190607, -0.0035638006112836927153, -0.0082546755705153983251, -0.0099357213378253837754, -0.010172744588574086227, -0.0066835498931799852684, 0.0024028444645801672053, 0.0052078603414440483022, 0.0042555749380640550683, 0.013549694026088188181, 0.021317888175206856083, 0.046844200248669087827, 0.10684921842064876163, 0.011220217490531814164, -0.054044667341171526154, 0.029068939411819316732, 0.0053611345657289533051, -0.01814694018408002929},
|
||||
{ /* b */ 0, 0.12251311485703131332, -0.0048966409354339601734, 0.043225474417180054232, 0.13288643283357326474, 0.0024753584727116306752, -0.13493550284474076228, 0.25001905995872264477, 0.46116198007706277195, 0.16767002957919496797, 0.12022113801239686648, 0.035092266079117528932, -0.082874925052406345216, 0.09299057500647411878, -0.010335927920560039617, -0.22303158437285419691, -0.17736799351152077175, -0.15576870378924967397, -0.09553559118941068462, -0.010527352803241241119, -0.039461536134599572989, -0.04397576750678200419, 0.0022546490695968257612, 0.045224075152991427551, 0.070264909304215694696, 0.061617087093734923542, 0.035144339289305825957, 0.023098222545966939911, -0.016722037124855537726, -0.041553072690561632108, -0.040322919942353818712},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0003954638475309746326, 0.0016802147026744734815, -0.0041307781481307566732, 0.0069268081880503179493, -0.011149805097107265417, 0.014711395451955620872, 0.012661300819154924779, 0.376705963309491354, -0.091160582263321632279, -0.49515815498233545222, 0.23973469451584847323, 0.25725972791418044716, -0.1364809441059457451, 0.097772769740633494462, 0.46604942100162649599, -0.076037106709709686991, -0.041141158584846390656, 0.35232917095899790594, 0.13782727738610198176, -0.13520175195935402179, -0.150874719704523097, -0.083235944983574144951, -0.078215007079862383654, -0.064032710649359989019, -0.22784168154062375833, -0.1887778082459686535, -0.054015447047816439463, -0.098555610973257296026, -0.12211294722235141452, -0.043146183514660048364, 0.0049622785846126921117},
|
||||
{ /* b */ 0, 0.068255698670396408589, -0.019626044183932569304, 0.027022734233770818318, -0.029199728361064755666, 0.053847894874170493251, 0.074286951068278456178, 0.093327301540100923716, 0.0046883292136945808881, -0.014905365299500671072, 0.077121161747451066892, 0.098097439175047873583, 0.078872250090676374046, 0.022649650580929860111, 0.10118989200943753759, 0.032708378546854668945, 0.018610044422722078761, 0.013278570298379081815, -0.018196151545185959564, -0.028528768151272497489, 0.0049331955231501209078, -0.015694823528042758931, -0.045042267051635491437, 0.022953317535046903475, -0.049253424540020296352, 0.01848907971264186767, -0.013561713523798677589, 0.017034870128463178163, -5.9926623485577479311e-05, 0.01361690711632057571, -0.014890291483199591394},
|
||||
},
|
||||
},
|
||||
{ /* 135 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 0.00010640586492385905107, -0.0020863220798889004458, -0.0027546738669975696749, -0.00057689734912769186082, 0.00066419501364156662872, 0.0020730048205103157599, 0.0042753920946603241049, 0.0024273015306053302709, 0.0041430994752317245461, 0.0090535447899720046527, 0.006478835994985780028, 0.0019980716855355629136, 3.7437150879338076948e-05, -0.0060434387033625469599, -0.010258699474491317361, -0.010462940875158310838, -0.017758528357350589211, -0.019186225865344685992, -0.0056492490439069530106, -0.0015221615476401738343, 0.00065944081514835188249, 0.01116663625060076992, 0.019168392713514448289, 0.041054080523461600194, 0.12181615837242310008, 0.041202139539203708196, -0.067452937283843383831, 0.024205569470678308525, 0.018561269636285793183, -0.014617104953928983235, 0.012766910383738006018},
|
||||
{ /* b */ 0, 0.15611339107442223639, 0.016778431063749214142, 0.081041717545221603203, 0.16997935467485958405, -0.064237394333324648876, -0.1467946458799662679, 0.31367196839646172002, 0.41053110185970687063, 0.092442334293230121745, 0.054708062922834144182, -0.05471108079559138665, -0.10471127127917312372, 0.12256479566694067351, -0.041264754456551977491, -0.26877304811281921282, -0.15682178410143798875, -0.12960269481887554122, -0.074410637441665872238, 0.040540669179120469856, -0.011041781803264316686, -0.0015913537167872027212, 0.11404907080604653746, 0.089380662718768766339, 0.040644184712002040527, 0.057264541138690727706, 0.03605762351477359573, 0.002108751488011373354, -0.036946082845115690851, -0.027051392492011272495, -0.14859598965757947475},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.0039158275946397091971, 0.0045651814713915106481, -0.0053509730125501937109, 0.0060881631249679723367, -0.0069729162432800844557, 0.0074547800273452868858, -0.010667169556234295386, 0.12038098870040858657, 0.32619730270482744094, -0.33417848277127332191, -0.25402146762454541618, 0.31913744062667975809, 0.096220172381067059497, -0.12010643039258775411, 0.23997327133401527566, 0.32270779230925061842, -0.14215569908666408905, 0.164853962412100985, 0.32719285053214147707, -0.029655260724431586894, -0.17571807629752189683, -0.095723928936843727389, -0.090418165187601373667, -0.10250068810447621193, -0.07679258050520215706, -0.21946952455217211275, -0.15779039960212257188, -0.0097222428803184907098, -0.085743480977948399735, -0.10062298804902622407, -0.039130299227052925404},
|
||||
{ /* b */ 0, 0.060566366555303216557, -0.033585461857244328088, 0.097375755251810053315, -0.0057979207029488586539, -0.013037187911631165083, 0.099547705230398603193, 0.065450202271855356662, 0.079607690447289047864, -0.016594043229971669473, 0.0039141099964726949745, 0.11239923309603364054, 0.060828670912557031292, 0.037661575031187194407, 0.067372873971643737478, 0.06127743996696152079, 0.00425967189704272442, 0.049933361264478656749, -0.011891207176021113476, -0.043937700071649057887, -0.01454360809969700713, -0.036771014605774601791, -0.031196266083756418741, 0.03340208106078057515, -0.037511987641784816372, 0.021432249770140368583, 0.00047072404577540305493, -0.0042222493704937736486, 0.0066621020424406339477, -0.0071434454623851111055, -0.0015815756864876948096},
|
||||
},
|
||||
},
|
||||
{ /* 140 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -2.8322500534026556936e-06, -0.00053066106186355809296, 0.00082483518027906630593, -0.00042863322878908282666, -1.1879332136033315948e-05, -0.00066783173309145670363, 7.7773664591825947327e-06, 0.00214109388265923406, 0.00019600041728518038876, -0.00012057335090423157431, -0.00083007319325381981323, -0.0016636900295081960208, 0.0032933505128562882633, 0.0011374034858575837043, -0.0017964573410626802699, -1.5318938721698739658e-05, -0.0039285770478056369903, 0.0026668064562369859886, 0.0064403246606559161336, -0.0039511678598391775097, -0.0042266883104082053624, 0.0068954789365915933677, -0.0011256836162168446305, 0.085086384090781591594, 0.0044761479967535267033, -0.13405338016282686286, 0.049965532002184398497, 0.048763835001040811701, -0.050795157665751294873, 0.066932538639891819843, 0.12590629103302261593},
|
||||
{ /* b */ 0, 0.58045527243727446098, 0.11532640933909973913, -0.070294737643389337833, 0.181548564083585523, -0.018736087559288044924, -0.40284097321803180591, 0.14967265663310205803, 0.13808262017332012528, -0.14681980457335874757, 0.095308802128581115998, -0.090946576570358900193, -0.070282983278130428673, 0.16869505144689184162, -0.0056995287795943982978, -0.11145719903146375507, 0.010645899981859968664, -0.029949005576172804677, 0.020448635869082382177, 0.062096271982760298247, -0.061559281084502120995, -0.010155868739088885766, 0.022991411353021073971, 0.032517242832784398754, 0.053763405399084168712, -0.044022531706967849008, -0.056791172460615713113, -0.010048509774783498383, -0.011135553684340354641, 0.012392231463938252478, -0.028022778311032753296},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.0018361282853110241775, -0.0033872857336473410905, 0.0046059858721698987427, -0.0065776919334296218844, 0.0083542195671026941994, -0.011143260589185560033, 0.014031371980195189719, -0.015337968677412404384, 0.21316430420635706922, 0.18207602262459615661, -0.41531887067146328052, -0.031187790338876170138, 0.29269849220073268503, -0.054235962098389371711, -0.042109054573871707028, 0.3423878607439811983, 0.16665370514435465243, -0.12828009228750011927, 0.26039154286775512137, 0.25358554767330221402, -0.13060052607320907225, -0.16234915440849845281, -0.060712808823515200529, -0.11670474881265904821, -0.13121958987003162767, -0.11982151889132144906, -0.18541725949783305349, -0.10845374594194448492, -0.032077652783813255521, -0.071363329167328279357, -0.023880378233289735468},
|
||||
{ /* b */ 0, 0.063936342454143688108, -0.009966133409831066936, 0.11085760377685827116, 0.044677819807104057759, -0.034361268819236949479, 0.062743239678210147026, 0.062943407025382550057, 0.083058071853022163999, 0.13134064665964562124, -0.009268611908543576694, 0.065924378272914974097, 0.031868980523838338903, 4.2139580657379909672e-05, 0.069306867166024632709, 0.015998377618240203213, 0.023748490644913237968, 0.040251817749930099422, 0.012188030292016073519, -0.042057852935031489472, -0.0057086301428208377495, -0.043725723377226709265, -0.041252225482777717114, 0.02142720307404984148, -0.048367296921177430069, 0.032738401870443196995, 0.011597842342267461468, -0.0043165727307750041686, 0.014759019374048845674, -0.012598826880840656092, 0.0059455537992827295346},
|
||||
},
|
||||
},
|
||||
{ /* 145 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 2.3996799380029271154e-05, -3.6983924603382553609e-05, -0.00010885427087492863252, 9.4027203384472457515e-06, 2.4325316760817870956e-06, 0.00013631801319691230442, 0.0003569147487281192771, -0.00021825674274833503706, 0.00049352887651621379916, -0.00034778795489354185147, 0.00010764262883821917806, -0.00013369431908771822748, 0.0001612257009148132796, -0.00082230832962326520785, 0.00098596277656181480209, -0.00076071996507610234461, 0.00048347716170849507067, 0.00024596005544775048635, 0.001122381176055228108, -0.0020218050363063327229, 0.0057335193050928046077, 0.00098351229257942485162, 0.07911624124667948621, 0.046474585830846848467, -0.10163739703000773673, -0.0031500376619642000975, 0.02685673447709591502, -0.0098010597263803456158, 0.019079556105860977222, 0.13571862275116308716, 0.16518685852055792207},
|
||||
{ /* b */ 0, 0.29209289431744722698, -0.088683859083907301546, 0.19870288442330741319, 0.056117942729694281212, 0.0055233992313913349292, -0.034417842552231237008, -0.18642029961095374357, 0.03188050946213716319, -0.12215473870355597619, 0.058564694857057841837, 0.027133066872742084286, -0.098321742115492494207, 0.10165847932147586974, -0.036326745038034458091, -0.081706909303494446029, 0.05666085919578400798, -0.065230034060614894287, -0.023126302295464751246, 0.034088858653635867313, -0.054637137087559795035, -0.0062919689342716411673, 0.00337558118006231608, 0.0067879138795912119519, 0.032772559692278990795, 0.064759985108769901885, -0.015975298047754549202, -0.027683987494919737316, -0.037109281432953777902, -0.033246283187224334732, -0.0065407641535591941329},
|
||||
}, { /* right */
|
||||
{ /* a */ -5.9295322625916386996e-05, 0.00025361030688269420308, -0.0014975462105494886413, 0.0023321644056564800468, -0.0040143723665109903864, 0.0056496033224969280373, -0.0083177157733822781882, 0.010418731344547307871, 0.0037317150503252466062, 0.25774726845881812398, 0.03548555282497853347, -0.37577294565440211294, 0.13177411199254401852, 0.18278456868343551101, -0.13825278210365615772, 0.072251944089277819749, 0.37727001604717619321, 0.061230184483984304022, -0.046667811543061286927, 0.29825638920078673122, 0.11633725609713846394, -0.14742657162931566139, -0.078501906429860102143, -0.054583903007854664424, -0.14088563291174288628, -0.12188196573843396164, -0.16632804680378696083, -0.16103868772087179262, -0.062667853368376519319, -0.090920878374582722592, -0.067120396724383718512},
|
||||
{ /* b */ 0, 0.058538717682757313021, -0.0067235800765147457625, 0.10061999071942813455, 0.032009963128213844707, -0.0085750658654045221196, 0.0016715560854918543043, 0.051641640912733315083, 0.08213774559567066369, 0.14615828567515251613, 0.069892761402653755254, 0.03775384784469610483, 0.035962486104601509851, -0.0038619656431799556651, 0.07389376333252321849, -0.016166609451647752371, 0.048384225398525639028, 0.041847242283617011593, -0.0053303041007467626133, -0.03351417438249727071, -0.025366513586497739519, -0.0029940071307734909128, -0.035054287279749976602, 0.020758025097121490798, -0.060317252944543611748, 0.034924170228588589937, -0.010758538361728933047, 0.019019207899853916854, -0.0063627382651402011882, 0.0041195717837743143705, -0.0023809626018564782057},
|
||||
},
|
||||
},
|
||||
{ /* 150 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -5.7808969703442882049e-06, 7.859375997232387963e-05, -0.00020195202801720404245, 0.00031595442082088791985, -0.00038697247538299443803, 0.00034207817356524117258, -0.00014974415749047315853, -0.00011228781855721113939, 0.0001483494695142529012, -7.6482351424324215156e-05, -0.00039344251322182000052, 0.00074616616850542438755, -0.00077416060895174783341, 0.00073700183421399230455, -0.00013666060560968244786, 0.00021771677245763058905, -0.00032895946806832474657, 0.0019676944930380199997, -0.002446887221799197952, 0.004275371799714045018, 0.0014554996183996360415, 0.077215344536710195378, 0.093552337016925002366, -0.077496570637172745855, -0.054258581771438052499, 0.015401699340680807815, 0.0022501846647787751218, 0.019689311409679107617, 0.14642282391945371511, 0.23487005904862523487, 0.086820381211688557599},
|
||||
{ /* b */ 0, -0.033799469500717105319, -0.096279236524443589929, 0.22091500173217204495, 0.12148875439946250909, -0.0076572573475680583144, -0.030131378491796145802, -0.14024308381335726104, -0.11888930525678909067, -0.099487028630620977232, 0.022130821356672325528, -0.0073011246190524126121, -0.024081928838987076702, 0.039823506357977711545, -0.040895948917110680476, -0.04829093947618379179, 0.022019905220257984801, -0.074358003629357294351, -0.0014864981615070327337, -0.015010722241373675168, -0.078612975309214072617, 0.019454143961178393951, -0.038257495985904999003, -0.017326638979547892561, 0.036913624998496930019, 0.03219274391251525369, 0.0068989239107586364241, 0.046842982808978361753, -0.060166361891406117124, 0.0039340002654791907111, -0.04171936477739834892},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.00074478344217444522601, 0.0007511785498183834453, -0.00095975582467544540664, 0.0003837616212743652196, 2.7485100289465424443e-05, -0.0013624965539919126067, 0.0023531580862221406977, -0.0042316079678110102291, 0.004840207769030158147, 0.031003830564175528794, 0.25958893247698433537, -0.084294597014668987134, -0.26906499788472909573, 0.1985279390908638586, 0.031028247903159594107, -0.11486513800822001352, 0.15741827212653530799, 0.34498012878014588933, 0.025665866484748771359, 0.018993532817268739266, 0.24502951514964954605, 0.0052309987987704175891, -0.12440272003277369484, -0.038543594725226788811, -0.06620071414478256866, -0.13099098239792078546, -0.13456166221842535968, -0.19553646171913985352, -0.097051768685255085378, -0.057685786296096837333, -0.10554790331524466218},
|
||||
{ /* b */ 0, 0.10296905720001520157, -0.031916632292636540336, 0.1371772093303840756, 0.025581835101807365307, 0.0037329793989293587157, 0.017041252381062854671, 0.0096940844390236771688, 0.083133380807689172265, 0.15137376358411169797, 0.08291163369970458441, 0.04345817582482400937, 0.032173172324003081191, 0.018586719340587219695, 0.028174870867589581203, -0.060814479048063550815, 0.047343284532777578366, 0.090803696340692977018, -0.024400418685635583138, 0.01192035672426071044, -0.076481246590415954967, -0.0051987080044437958271, -0.030485298389941462016, 0.01697330043399884747, -0.014962470605548762459, 0.029782567270843045282, -0.02811451573473626106, 0.015568336049018999256, -0.019634447613083035045, 0.018551872579303414768, -0.0031451728171741702433},
|
||||
},
|
||||
},
|
||||
{ /* 155 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -7.846684997090895401e-06, -1.1967299512471996081e-05, 1.7571946397955742758e-05, 2.3839611326683177173e-05, -9.8824770589072309798e-06, 0.00012370376389902930999, -0.0001906069247575863275, 3.6766283073585981356e-05, 9.5089872087506020857e-05, -0.00012925669250207598437, 0.00029605806355082007336, -0.00021290917223693115595, 0.00046180190858835512557, -0.00039533474840980353804, 0.0008719665658268871411, -0.0011835970670920365616, 0.0020615578255611666236, -0.0020408909146701903481, 0.0033778563048036955654, 0.00052249169449347654393, 0.075086891007103417905, 0.10799162756168489974, -0.090613576457787559093, -0.086873763159647787724, 0.027096272833398993285, 0.021638942594090493365, 0.015445631834157258488, 0.1481240784572540603, 0.25527186229550025143, 0.056256086679792871585, -0.054761228196753553021},
|
||||
{ /* b */ 0, 0.015162328826992532704, 0.051460910327205677817, 0.25159007800437671598, 0.089044318617378936942, -0.071396716489688372143, -0.027379932088927860789, -0.13151821887623371676, -0.12205488260252916888, -0.034882323086196653783, -0.023718234665251469728, 0.031729017745465992739, -0.0024102467378883662974, -0.0018285683795610241376, -0.0028123056431544890543, -0.070871822570248155237, 0.010888903779204817113, -0.02650154579134089694, -0.0091602423032965951677, -0.022468559707222723887, -0.075005627228411086982, 0.011826150009136560115, -0.032163875408469655426, 0.0060877235611572766416, 0.0060017553941277279606, 0.0012837575007196289079, 0.0098048556126939523381, 0.017781482509124372365, -0.027803873140497255972, 0.016507726800299438175, -0.027745125743341980673},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.00075439313840242397391, -0.0009466484373081228941, 0.001117362672074795121, -0.0014999605847621955319, 0.0016130037250750729055, -0.0010427407160298850231, 0.00018687770332505987403, -0.00077652318897052118908, -0.00090588186742266568752, 0.0015874841468015831597, 0.056834941265862526372, 0.24021804398403312497, -0.13156983644280922929, -0.18774733377208435714, 0.15910464303583024548, -0.029387909936760131524, -0.066336326890658964262, 0.17600750420838770505, 0.31933440250999356458, 0.058621487908495764629, 0.053661208389622384873, 0.15542385504150191267, -0.078959879496191764936, -0.074108004601744492668, -0.0063690900763265986817, -0.17126990566013439166, -0.14328044992083904807, -0.099481795226936550747, -0.15814941178761987572, -0.10715729861463489658, -0.05079474350469341537},
|
||||
{ /* b */ 0, 0.041837716966783983219, 0.043280733016035598248, 0.1618483912770071198, 0.047340245106636258399, 0.0031153111105684458404, 0.05045513278414959224, 0.056800988297829903273, 0.083928671198514714913, 0.091601980773403729463, 0.014031960039830905507, 0.15350077616926702251, 0.012928372237460199548, -0.083614777794745298589, 0.02619391224583256933, -0.035909758683057992068, 0.13051397315322144088, -0.016959957605281961168, 0.014304710495411342153, 0.0039130715491280873564, -0.054039861922456668142, -0.036287732663882986406, -0.078426592983126514058, 0.056537939498906356062, 0.031549020181593882828, 0.039827905272487272581, -0.038563172179047200405, -0.021165137341089962364, -0.025250491764430491037, 0.036724720661475938888, 0.0033189175586024327602},
|
||||
},
|
||||
},
|
||||
{ /* 160 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -3.7149558527515245954e-05, 4.1919578780416459629e-05, -5.8159129318057683003e-05, 0.00011254862958276544514, -7.3107186415732666393e-05, 6.5512044955529091794e-05, -7.4440959507706197518e-05, 0.00013568662041163210424, -0.00010189252337700028736, 0.00033243663814797042022, -0.000401587946230464116, 0.00067368910020015838544, -0.00083517900248408728434, 0.0011976710675293275946, -0.0013152957472478687961, 0.0021443953957672734489, -0.0018815142202588393087, 0.0037106122421914911058, -0.00017044498791529661633, 0.073961320379498096678, 0.12068648584967478499, -0.085907113320793371258, -0.073179540880097260214, 0.039265139187560915701, -0.00064392313717242903592, 0.0031548102298606384153, 0.16699928175344103121, 0.27331661117895034163, 0.055941628567326984189, -0.00013439361352951534464, 0.063545655250157873084},
|
||||
{ /* b */ 0, 0.077243387544764785524, -0.062916283022906860367, 0.07204284067405253289, 0.091071494507100059224, -0.063047357928280867156, -0.0051944896203165447091, -0.110764290783549324, -0.10636944939058923243, -0.049625576369546897659, -0.064948907208470241237, 0.013479571139007884284, -0.040799955185258363066, 0.024249363108699850677, -0.013429698593608874191, -0.058369924720511057181, -0.0036411935396690742195, -0.03473734107251047476, -0.0089189182392312993386, -0.028110515997228913143, -0.063925976663548045309, -0.012325351390687910857, -0.035356944142472812587, -0.013074194403078776006, -0.0054812757612626716863, -0.0065053700493838961805, 0.0022551694686678835922, -0.012557569879015349421, -0.014525072829715823808, -0.022243763452348130905, 0.014447532142719543558},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.00044383087323665549543, 0.00075264275358963295126, -0.0011084317211133842829, 0.0015064296893978550932, -0.001913399413399143132, 0.0020827856229543167954, -0.00262639912518378843, 0.0020921307683496870311, -0.0025292965287471158575, 0.0027619283838892921823, -0.0027051536817968725029, 0.074579262764962267473, 0.20716610339513352734, -0.15270625867165765754, -0.11899492661092578305, 0.11041565204819833723, -0.066124249006130147999, -0.028881576291817784297, 0.20122834414620333066, 0.29345582399218328451, 0.046628516668419800473, 0.062649396769284729225, 0.080578444427042511533, -0.096966963434950134704, -0.034589843090214629495, -0.044983954419234792321, -0.19708491210074569056, -0.12473633591782173902, -0.075757846912942697348, -0.13561377678227309884, -0.070620516137197747453},
|
||||
{ /* b */ 0, 0.076700172241986136479, 0.097031324089486045703, 0.12607736701479729802, 0.054803947831198004947, 0.056108645304260573727, 0.031710589549764807427, 0.071202750919399010465, 0.11568453878672926849, 0.0081356648562588493312, 0.025496606300130612854, 0.13118928657870976284, -0.0039962511106262504912, -0.10255093474432377953, 0.017731740670247349984, 0.05153480708222722001, 0.086564962476945131464, -0.0029973253242322056566, -0.027265078521871571882, -0.028460734340868612535, -0.03770221949125473343, 0.0030526263578587176095, -0.049991694319084956089, 0.038639510098717640141, 0.0075666518905073698598, 0.034827489302385362946, -0.0081345578607739943422, -0.0078819762681881996857, -0.031609262095906760781, 0.012555574735251609497, 0.0037631991324808475308},
|
||||
},
|
||||
},
|
||||
{ /* 165 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 1.6032358884032509494e-05, -2.0618572127428181555e-05, 7.6373596474832493395e-05, -1.3536907012001353945e-05, 3.4933854420335863443e-06, 1.6362994709193858786e-05, 0.00020972907258109840952, -2.5256253477489408465e-05, 0.00039309818927746298899, -0.00027020741019678816766, 0.0008771638958238181516, -0.00079800995589351941817, 0.0014095308371875328243, -0.00099036352715908696279, 0.0021987588748328948038, -0.0012523736038494441732, 0.0036145935512765792197, 0.00026645679829240243551, 0.073071940605157204018, 0.13836674623374234372, -0.077092070428358416834, -0.09434908569569411263, 0.057399978942024310058, 0.028636249922858736383, -0.021592044304602486804, 0.15781165319680989789, 0.31786629420146872427, 0.064473943994503013499, -0.0062786139784498616601, 0.12491529823840941127, 0.061071277870083928718},
|
||||
{ /* b */ 0, 0.027214061265740108198, -0.0086497991384770767098, -3.2940689898009319026e-05, -0.075158699224670000305, -0.055577653949451244486, -0.0047999396921016845852, -0.08780777413688878319, -0.080424568475456759131, -0.060754304003485248842, -0.072840781644434304809, -0.018781093659853143052, -0.051867299993568760641, -0.024221852314987302179, 0.024312080425248350224, -0.06347898491576575708, -0.021541957671705747046, -0.025194329854871799768, -0.030851700042189289519, -0.02876187536651752738, -0.051425569297935957991, -0.025301806133859461312, -0.060655013523758238847, 0.0016406946004576816733, -0.035637107960312386368, 0.0017071477050045746893, -0.0080116049747114212454, -0.041229325803970866271, -0.031203173601196398934, -0.010422760565592659177, -0.013613842045900881317},
|
||||
}, { /* right */
|
||||
{ /* a */ 0.00024507018937369750601, -0.00036103168107003104012, 0.00062721293653169446491, -0.00099399394534738227946, 0.0015420607719094162058, -0.0022155908981774663502, 0.0021943216735754306201, -0.0030760841178596731726, 0.0032577844373072109563, -0.0036687244225159718058, 0.0043774992430477971395, -0.0046297866164099477082, 0.084871246778502398844, 0.17731062929576502096, -0.1375195862328166263, -0.085910592216953435285, 0.042853910962566479914, -0.054304062404994177249, 0.0029573622616291647854, 0.17139734238236412067, 0.30171044478694875046, 0.076820024231594938313, 0.0069952166036318236264, 0.053998326361680282215, -0.042834848103449722767, -0.068257583462445384215, -0.12962925817370279935, -0.16877151750987853807, -0.096130845080358684474, -0.11173355687788871782, -0.084937499051003145789},
|
||||
{ /* b */ 0, 0.10156275271398867988, 0.077185566288041296268, 0.13282149838280954413, 0.08171816697032448229, 0.065019220953049655654, 0.10019105873802339191, 0.072012868194281015599, 0.055492568684905457799, 0.064212004771331043784, 0.010854841299193750126, 0.014918743122863641071, -0.045033301591780941497, -0.031706095040356062353, 0.089564090825565129128, 0.022024871724492765812, 0.070052222587587240077, -0.030671518055237073641, -0.031950765902958457032, -0.0033956392862712764247, -0.055116051972375207368, 0.020522665861114758323, -0.053010372439558396673, 0.039559117300537981199, 0.008336639543545999731, 0.031089458806289597959, 0.0058377015975212484533, -0.0083504315081823349276, -0.015804329272896613934, -0.010019162080842670959, 0.0015402341953458034696},
|
||||
},
|
||||
},
|
||||
{ /* 170 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 3.1302173760794381822e-06, 9.0499071014882737779e-05, 4.1432883721159718959e-05, 9.3300330586410179859e-05, 3.0958006921876900924e-05, 0.00030591771116306133368, 3.4937743809137188078e-05, 0.0005286897953454814704, -7.7097293896266627655e-05, 0.0010526264265092732941, -0.00059039595483312257672, 0.0016554385683792412036, -0.00081576048305276229605, 0.0024720344257711523994, -0.0010712973259885414171, 0.0038707551676397940026, 0.00035560747645158063447, 0.073630880141617449652, 0.14661407056075492772, -0.078085169269020981986, -0.1085137050343965015, 0.047500582381204692339, 0.017874880158738615243, -0.02261152729082782642, 0.17893430052470793434, 0.34360192665262856426, 0.053606962467575569597, -0.026329075153777581342, 0.11186902796209152733, 0.01673664825244114418, -0.032569655570580113846},
|
||||
{ /* b */ 0, 0.053914155213885539553, 0.015830023390450698173, 0.020072501148854504649, 0.012655482483289737239, 0.020659117037705176934, -0.036430595746206329011, -0.092725103952862042433, -0.087702484986157402957, -0.071331118872211551896, -0.055194423238813516974, 0.0030397885680127911812, -0.037054498365218790923, -0.00066159090580941715132, 0.03453582545144551208, -0.079728062440387326149, -0.016901163871901880853, -0.031621694144279288707, -0.010376069900994155937, -0.020804253498749036844, -0.062761266384006586527, -0.03055738570310884139, -0.034919971965419183135, 0.0067210583352961261738, -0.018044902997532696887, -0.012390824741873029957, -0.034925941218427729307, 0.0019679796761651324744, -0.046916920430073449921, -0.001926393056322917019, -0.043422184307362332589},
|
||||
}, { /* right */
|
||||
{ /* a */ -0.00012554898192080455157, 0.00017247319621539056113, -0.00052640243619356957838, 0.00078473489119584155516, -0.0010021108972691795957, 0.0013892594930291386757, -0.0019935503377168503278, 0.0019212312861796600715, -0.0028198965807725573374, 0.0034947162689657335077, -0.0040898955417896856734, 0.0051162537699099217003, -0.004885681522894154416, 0.08688474323844917746, 0.15813922660799484277, -0.11585092003650954151, -0.095210034436674195746, 0.0056687868211797304285, -0.027443531844821480309, 0.004389007744525982857, 0.16430947455392352907, 0.31363566378326407369, 0.056519924958118465674, -0.014416914733167852242, 0.059496911787165755736, -0.067927300887186875533, -0.10596882274465810325, -0.14491118769143784828, -0.16207943488078788152, -0.10543191067505575109, -0.061618897190486243698},
|
||||
{ /* b */ 0, 0.12235116841116192021, 0.085685636739992132593, 0.15071367068084445817, 0.11999752191271674528, 0.096732633326932923601, 0.097546664174340963482, 0.044232293409446080124, 0.1363900499191263993, 0.017644008448738056349, -0.14868778347587457977, 0.045368560833557475265, -0.046122428467992582224, 0.01830430837505836808, 0.13364735242459227504, 0.014238310704218614527, 0.036885293430335579223, -0.087165827746189125658, -0.0012216042663201753804, -0.0089679957372733667964, -0.014654928771533435455, -0.0018582758058304105903, -0.053026415433481702277, 0.032246281499307472007, 0.023017491024904506575, 0.039495641088039872002, -0.0061943089637748680043, 0.0029509240232947725295, -0.047081833601529801681, 0.026892462378347564006, -0.011464508826155780929},
|
||||
},
|
||||
},
|
||||
{ /* 175 deg */
|
||||
{ /* left */
|
||||
{ /* a */ 0.00014791617587631145092, 0.000285910551379997492, 0.00012692619729554049804, 0.00040438895197725276999, 0.00029066876152533671629, 0.00016507225739092941949, 0.00040071421306131515833, 0.00027735693519659234546, 0.00081157671666387543041, -0.00048502720052107117267, 0.0016187447863386097632, -0.00064023663697010402274, 0.0026127689616017857333, -0.001428850716564400436, 0.0036199114237731029424, -0.00021464509485785707231, 0.075591000634582516948, 0.14738894320017598139, -0.090538848975703356547, -0.13055765949530895309, 0.032117835465639288373, 0.016143228745123250345, -0.038226437773861143832, 0.17392064687423575142, 0.37274723141852289521, 0.040910440487311454383, -0.08476188187521438433, 0.062153593309993704352, -0.044583141086268485154, -0.12590025666951026873, -0.067260170498982529974},
|
||||
{ /* b */ 0, 0.11842983119354777433, 0.099103374896943041694, 0.12024966287153826539, 0.063220438431613179553, 0.14988272645351241597, 0.07228893489249349491, -0.10464217060759950506, -0.082634139336214273985, -0.10798282870583958415, -0.043442174670269007031, 0.039613032465045383557, 0.022400956780355141262, 0.040843572178851650367, 0.038353247796031608718, -0.04998345091756367653, -0.049227045004901492931, 0.0015240723438836312198, 0.0055340797093517135607, -0.035845162634114136058, -0.04118472436785008961, -0.016152787545783975354, -0.015680433024141404719, 0.041462862682487000576, -0.042056545545322843171, 0.008567650860054343287, -0.00230326459824820029, 0.003062478046954308919, -0.045793547300658488108, -0.0049872007967452502974, -0.034906317380872797784},
|
||||
}, { /* right */
|
||||
{ /* a */ -2.6286289642291852525e-06, -0.00017077534716653690935, 7.4272678877389209859e-05, -0.00013287330160411834831, 0.00040045161805264337107, -0.00056894292294095219487, 0.00088913424170587013716, -0.0015036768604738406322, 0.0015723919800491449432, -0.0020893795767270781361, 0.0025485069730176064529, -0.0033080076535896112133, 0.0042371007784964762055, -0.0032218224161424321994, 0.083844912285675393671, 0.1496127653714211525, -0.10289831272694256736, -0.12129415487574513044, 0.0028921886841243122854, -0.0016166957512390297755, -0.0042121147670812217681, 0.16185108144442361677, 0.31174473329193308491, 0.052425807425518416993, -0.040640843909603860395, 0.036208208063514615849, -0.0729609243242863581, -0.12242990870115746938, -0.13585684803994743652, -0.15817574423506386427, -0.085508421111451085594},
|
||||
{ /* b */ 0, 0.13055355297732951225, 0.12756246882044364188, 0.15909574579012766837, 0.1369194323142817471, 0.10740926008837287098, 0.049654510518590780355, 0.1251822474353236625, 0.10966935207374262085, -0.12088604357909142617, -0.085642514571738492801, 0.035567864082081318555, -0.032137217958537335483, 0.052516747987079649695, 0.11296002551350671494, 0.02020028482228879152, -0.0074679857903648533268, -0.047169535066008072555, -0.036124457824004196915, -0.0028072058675244863923, 0.015793363116794936069, -0.013593318103706682198, -0.052801939558321624169, 0.036735233879708145688, 0.018116300454979784862, 0.033374630253686560222, 0.012518645296619081847, -0.021356743399605047917, -0.026839107781398245656, 0.0027055497416701361317, 0.0080514686745915622912},
|
||||
},
|
||||
},
|
||||
{ /* 180 deg */
|
||||
{ /* left */
|
||||
{ /* a */ -3.7346135617535164419e-06, -8.984158843630088865e-05, -6.4019064466941996011e-05, 0.00017983139599295761544, -0.00036096701588926875717, 0.00041559948135705469634, -0.00073226175846888372917, 0.0010489358635856500107, -0.0014871849499012005681, 0.0015217921538472787765, -0.0020253943033149424124, 0.0024041410881373882769, -0.0027338250369914052218, 0.003546028232389620248, -0.0017319271452512392806, 0.078317721315781116398, 0.1456521503947636742, -0.10293337788602949234, -0.1375738668682491006, 0.0081216237324363959454, 0.013184690158497477941, -0.014014253666613232449, 0.14577791035449927382, 0.33195957443370960327, 0.054534511669034113623, -0.086101008923252425609, 0.0092129082075557977571, -0.084077471088312816239, -0.13684081102824682818, -0.15318119974974245268, -0.11230157584427044593},
|
||||
{ /* b */ 0, 0.1666384464706137658, 0.13608019535398821476, 0.20224660094906901642, 0.14926961513838893358, 0.073384972730091965754, 0.15686389072040762827, 0.096143170518754386689, -0.056347703479486407896, -0.1152601897366377498, -0.085029587197256589759, 0.060132780117322551239, 0.0069822793384761733942, 0.094093296548866611761, 0.081554016876462839813, -0.054404436604773884212, 0.021259701144760105584, -0.061703475341862205894, 0.012044605759416269347, -0.0013065382791313008559, -0.038045451921514553129, 0.00033388944627459234138, -0.0034356779476680393559, 0.021952832657257385918, 0.0026729239074668119901, 0.029827744301169373947, -0.0043862222358814935419, 0.0099212081615504717214, -0.020663956459189152665, -0.0088133274362810903879, 0.0044341780491049653107},
|
||||
}, { /* right */
|
||||
{ /* a */ -3.7346135617535164419e-06, -8.984158843630088865e-05, -6.4019064466941996011e-05, 0.00017983139599295761544, -0.00036096701588926875717, 0.00041559948135705469634, -0.00073226175846888372917, 0.0010489358635856500107, -0.0014871849499012005681, 0.0015217921538472787765, -0.0020253943033149424124, 0.0024041410881373882769, -0.0027338250369914052218, 0.003546028232389620248, -0.0017319271452512392806, 0.078317721315781116398, 0.1456521503947636742, -0.10293337788602949234, -0.1375738668682491006, 0.0081216237324363959454, 0.013184690158497477941, -0.014014253666613232449, 0.14577791035449927382, 0.33195957443370960327, 0.054534511669034113623, -0.086101008923252425609, 0.0092129082075557977571, -0.084077471088312816239, -0.13684081102824682818, -0.15318119974974245268, -0.11230157584427044593},
|
||||
{ /* b */ 0, 0.1666384464706137658, 0.13608019535398821476, 0.20224660094906901642, 0.14926961513838893358, 0.073384972730091965754, 0.15686389072040762827, 0.096143170518754386689, -0.056347703479486407896, -0.1152601897366377498, -0.085029587197256589759, 0.060132780117322551239, 0.0069822793384761733942, 0.094093296548866611761, 0.081554016876462839813, -0.054404436604773884212, 0.021259701144760105584, -0.061703475341862205894, 0.012044605759416269347, -0.0013065382791313008559, -0.038045451921514553129, 0.00033388944627459234138, -0.0034356779476680393559, 0.021952832657257385918, 0.0026729239074668119901, 0.029827744301169373947, -0.0043862222358814935419, 0.0099212081615504717214, -0.020663956459189152665, -0.0088133274362810903879, 0.0044341780491049653107},
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
126
plugins/ladspa_effect/caps/interface.cc
Normal file
126
plugins/ladspa_effect/caps/interface.cc
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
interface.cc
|
||||
|
||||
LADSPA descriptor factory, host interface.
|
||||
|
||||
*/
|
||||
/*
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "Cabinet.h"
|
||||
#include "Chorus.h"
|
||||
#include "Phaser.h"
|
||||
#include "Sin.h"
|
||||
#include "Lorenz.h"
|
||||
#include "Roessler.h"
|
||||
#include "Reverb.h"
|
||||
#include "Compress.h"
|
||||
#include "Click.h"
|
||||
#include "Eq.h"
|
||||
#include "Clip.h"
|
||||
#include "White.h"
|
||||
#include "SweepVF.h"
|
||||
#include "VCO.h"
|
||||
#include "Amp.h"
|
||||
#include "HRTF.h"
|
||||
#include "Pan.h"
|
||||
#include "Scape.h"
|
||||
|
||||
#include "Descriptor.h"
|
||||
|
||||
#define N 33
|
||||
static DescriptorStub * descriptors [N];
|
||||
|
||||
static inline void
|
||||
seed()
|
||||
{
|
||||
static struct timeval tv;
|
||||
gettimeofday (&tv, 0);
|
||||
|
||||
srandom (tv.tv_sec ^ tv.tv_usec);
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
void _init()
|
||||
{
|
||||
DescriptorStub ** d = descriptors;
|
||||
|
||||
*d++ = new Descriptor<Eq>();
|
||||
*d++ = new Descriptor<Compress>();
|
||||
*d++ = new Descriptor<Pan>();
|
||||
|
||||
*d++ = new Descriptor<PreampIII>();
|
||||
*d++ = new Descriptor<PreampIV>();
|
||||
*d++ = new Descriptor<AmpIII>();
|
||||
*d++ = new Descriptor<AmpIV>();
|
||||
*d++ = new Descriptor<AmpV>();
|
||||
*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<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>();
|
||||
|
||||
seed();
|
||||
}
|
||||
|
||||
void _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;
|
||||
}
|
||||
|
||||
}; /* extern "C" */
|
||||
2715
plugins/ladspa_effect/caps/money.h
Normal file
2715
plugins/ladspa_effect/caps/money.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -58,11 +58,6 @@ vstControlDialog::vstControlDialog( QWidget * _parent,
|
||||
|
||||
vstControlDialog::~vstControlDialog()
|
||||
{
|
||||
QWidget * pw = m_effect->m_plugin->pluginWidget();
|
||||
if( pw )
|
||||
{
|
||||
pw->reparent( parentWidget(), QPoint( 0, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ bool multimediaProject::writeFile( const QString & _fn, bool _overwrite_check )
|
||||
}
|
||||
QString xml = "<?xml version=\"1.0\"?>\n" + toString(
|
||||
#if QT_VERSION >= 0x030100
|
||||
2
|
||||
0
|
||||
#endif
|
||||
);
|
||||
#ifdef QT4
|
||||
|
||||
Reference in New Issue
Block a user