blob: 167e198ff3eba3e152b809755985156fdb6919ee (
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
#include "Logical4.h"
#include <iostream>
#include <lv2wrapper.h>
Logical4::Logical4(double rate)
: LV2Plugin(rate)
{
}
void Logical4::activate()
{
A = 0.5;
B = 0.2;
C = 0.19202020202020202;
D = 0.5;
E = 1.0;
//begin ButterComps
controlAposL = 1.0;
controlAnegL = 1.0;
controlBposL = 1.0;
controlBnegL = 1.0;
targetposL = 1.0;
targetnegL = 1.0;
controlAposBL = 1.0;
controlAnegBL = 1.0;
controlBposBL = 1.0;
controlBnegBL = 1.0;
targetposBL = 1.0;
targetnegBL = 1.0;
controlAposCL = 1.0;
controlAnegCL = 1.0;
controlBposCL = 1.0;
controlBnegCL = 1.0;
targetposCL = 1.0;
targetnegCL = 1.0;
avgAL = avgBL = avgCL = avgDL = avgEL = avgFL = 0.0;
nvgAL = nvgBL = nvgCL = nvgDL = nvgEL = nvgFL = 0.0;
//end ButterComps
//begin ButterComps
controlAposR = 1.0;
controlAnegR = 1.0;
controlBposR = 1.0;
controlBnegR = 1.0;
targetposR = 1.0;
targetnegR = 1.0;
controlAposBR = 1.0;
controlAnegBR = 1.0;
controlBposBR = 1.0;
controlBnegBR = 1.0;
targetposBR = 1.0;
targetnegBR = 1.0;
controlAposCR = 1.0;
controlAnegCR = 1.0;
controlBposCR = 1.0;
controlBnegCR = 1.0;
targetposCR = 1.0;
targetnegCR = 1.0;
avgAR = avgBR = avgCR = avgDR = avgER = avgFR = 0.0;
nvgAR = nvgBR = nvgCR = nvgDR = nvgER = nvgFR = 0.0;
//end ButterComps
//begin Power Sags
for(int count = 0; count < 999; count++) {dL[count] = 0; bL[count] = 0; cL[count] = 0; dR[count] = 0; bR[count] = 0; cR[count] = 0;}
controlL = 0; controlBL = 0; controlCL = 0;
controlR = 0; controlBR = 0; controlCR = 0;
gcount = 0;
//end Power Sags
fpFlip = true;
fpNShapeL = 0.0;
fpNShapeR = 0.0;
//this is reset: values being initialized only once. Startup values, whatever they are.
}
void Logical4::run(uint32_t num_samples)
{
A = *params[0];
B = *params[1];
C = *params[2];
D = *params[3];
E = *params[4];
processReplacing(const_cast<float **>(in), out, num_samples);
}
//
// Include the processing code from the VST version.
//
#include <cmath>
#include "../../../LinuxVST/src/Logical4/Logical4Proc.cpp"
// Create the LV2Wrapper and register the plugin
LV2Wrapper<Logical4> plugin;
|