blob: d5530b9f128fddddd775d03393fa99a87ce22cb0 (
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
|
#include "DustBunny.h"
#include <iostream>
#include <lv2wrapper.h>
DustBunny::DustBunny(double rate)
: LV2Plugin(rate)
{
}
void DustBunny::activate()
{
A = 0.0;
LataLast3Sample = LataLast2Sample = LataLast1Sample = 0.0;
LataHalfwaySample = LataHalfDrySample = LataHalfDiffSample = 0.0;
LataA = LataB = LataC = LataDrySample = LataDiffSample = LataPrevDiffSample = 0.0;
LataUpsampleHighTweak = 0.0414213562373095048801688; //more adds treble to upsampling
LataDecay = 0.915965594177219015; //Catalan's constant, more adds focus and clarity
RataLast3Sample = RataLast2Sample = RataLast1Sample = 0.0;
RataHalfwaySample = RataHalfDrySample = RataHalfDiffSample = 0.0;
RataA = RataB = RataC = RataDrySample = RataDiffSample = RataPrevDiffSample = 0.0;
RataUpsampleHighTweak = 0.0414213562373095048801688; //more adds treble to upsampling
RataDecay = 0.915965594177219015; //CRatalan's constant, more adds focus and clarity
LataFlip = false; //end reset of antialias parameters
RataFlip = false; //end reset of antialias parameters
//this is reset: values being initialized only once. Startup values, whatever they are.
}
void DustBunny::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/DustBunny/DustBunnyProc.cpp"
// Create the LV2Wrapper and register the plugin
LV2Wrapper<DustBunny> plugin;
|