blob: a04e75040958270d4a5a6807f4c7ff2e8778a00b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#include "StudioTan.h"
#include <iostream>
#include <lv2wrapper.h>
StudioTan::StudioTan(double rate)
: LV2Plugin(rate)
{
}
void StudioTan::activate()
{
A = 0.0;
bynL[0] = 1000.0;
bynL[1] = 301.0;
bynL[2] = 176.0;
bynL[3] = 125.0;
bynL[4] = 97.0;
bynL[5] = 79.0;
bynL[6] = 67.0;
bynL[7] = 58.0;
bynL[8] = 51.0;
bynL[9] = 46.0;
bynL[10] = 1000.0;
noiseShapingL = 0.0;
lastSampleL = 0.0;
lastSample2L = 0.0;
bynR[0] = 1000.0;
bynR[1] = 301.0;
bynR[2] = 176.0;
bynR[3] = 125.0;
bynR[4] = 97.0;
bynR[5] = 79.0;
bynR[6] = 67.0;
bynR[7] = 58.0;
bynR[8] = 51.0;
bynR[9] = 46.0;
bynR[10] = 1000.0;
noiseShapingR = 0.0;
lastSampleR = 0.0;
lastSample2R = 0.0;
//this is reset: values being initialized only once. Startup values, whatever they are.
}
void StudioTan::run(uint32_t num_samples)
{
A = *params[0];
processReplacing(const_cast<float **>(in), out, num_samples);
}
//
// Include the processing code from the VST version.
//
#include <cmath>
#include "../../../LinuxVST/src/StudioTan/StudioTanProc.cpp"
// Create the LV2Wrapper and register the plugin
LV2Wrapper<StudioTan> plugin;
|