blob: 9e796b491b2b9698768dc56df4b8baa4980973ee (
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
|
#include "Smooth.h"
#include <iostream>
#include <lv2wrapper.h>
Smooth::Smooth(double rate)
: LV2Plugin(rate)
{
}
void Smooth::activate()
{
A = 0.0;
B = 1.0;
C = 1.0;
lastSampleAL = 0.0;
gainAL = 1.0;
lastSampleBL = 0.0;
gainBL = 1.0;
lastSampleCL = 0.0;
gainCL = 1.0;
lastSampleDL = 0.0;
gainDL = 1.0;
lastSampleEL = 0.0;
gainEL = 1.0;
lastSampleAR = 0.0;
gainAR = 1.0;
lastSampleBR = 0.0;
gainBR = 1.0;
lastSampleCR = 0.0;
gainCR = 1.0;
lastSampleDR = 0.0;
gainDR = 1.0;
lastSampleER = 0.0;
gainER = 1.0;
fpd = 17;
//this is reset: values being initialized only once. Startup values, whatever they are.
}
void Smooth::run(uint32_t num_samples)
{
A = *params[0];
B = *params[1];
C = *params[2];
processReplacing(const_cast<float **>(in), out, num_samples);
}
//
// Include the processing code from the VST version.
//
#include <cmath>
#include "../../../LinuxVST/src/Smooth/SmoothProc.cpp"
// Create the LV2Wrapper and register the plugin
LV2Wrapper<Smooth> plugin;
|