aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LV2/src/BassDrive/BassDrive.cpp
blob: 325962bf0de1604b76385054141fb0dfade174f9 (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
#include "BassDrive.h"
#include <iostream>
#include <lv2wrapper.h>

BassDrive::BassDrive(double rate)
    : LV2Plugin(rate)
{
}

void BassDrive::activate()
{
	for (int fcount = 0; fcount < 7; fcount++)
	{
		presenceInAL[fcount] = 0.0;
		presenceOutAL[fcount] = 0.0;
		highInAL[fcount] = 0.0;
		highOutAL[fcount] = 0.0;
		midInAL[fcount] = 0.0;
		midOutAL[fcount] = 0.0;
		lowInAL[fcount] = 0.0;
		lowOutAL[fcount] = 0.0;
		presenceInBL[fcount] = 0.0;
		presenceOutBL[fcount] = 0.0;
		highInBL[fcount] = 0.0;
		highOutBL[fcount] = 0.0;
		midInBL[fcount] = 0.0;
		midOutBL[fcount] = 0.0;
		lowInBL[fcount] = 0.0;
		lowOutBL[fcount] = 0.0;

		presenceInAR[fcount] = 0.0;
		presenceOutAR[fcount] = 0.0;
		highInAR[fcount] = 0.0;
		highOutAR[fcount] = 0.0;
		midInAR[fcount] = 0.0;
		midOutAR[fcount] = 0.0;
		lowInAR[fcount] = 0.0;
		lowOutAR[fcount] = 0.0;
		presenceInBR[fcount] = 0.0;
		presenceOutBR[fcount] = 0.0;
		highInBR[fcount] = 0.0;
		highOutBR[fcount] = 0.0;
		midInBR[fcount] = 0.0;
		midOutBR[fcount] = 0.0;
		lowInBR[fcount] = 0.0;
		lowOutBR[fcount] = 0.0;
	}

	flip = false;
	fpd = 17;
}

void BassDrive::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/BassDrive/BassDriveProc.cpp"

// Create the LV2Wrapper and register the plugin
LV2Wrapper<BassDrive> plugin;