ViPERFX_RE/src/viper/effects/FETCompressor.h

73 lines
1.4 KiB
C
Raw Normal View History

#pragma once
#include <cstdint>
class FETCompressor {
public:
2022-10-17 00:48:32 +02:00
enum Parameter {
ENABLE = 0,
THRESHOLD,
RATIO,
KNEE,
AUTO_KNEE,
GAIN,
AUTO_GAIN,
ATTACK,
AUTO_ATTACK,
RELEASE,
AUTO_RELEASE,
KNEE_MULTI,
MAX_ATTACK,
MAX_RELEASE,
CREST,
ADAPT,
NO_CLIP
};
FETCompressor();
2022-10-16 16:54:32 +02:00
float GetMeter(int param_1);
2022-10-17 00:48:32 +02:00
float GetParameter(FETCompressor::Parameter parameter);
float GetParameterDefault(FETCompressor::Parameter parameter);
2022-09-06 17:57:23 +02:00
void Process(float *samples, uint32_t size);
2022-10-16 16:54:32 +02:00
double ProcessSidechain(double in);
void Reset();
2022-10-17 00:48:32 +02:00
void SetParameter(FETCompressor::Parameter parameter, float value);
void SetSamplingRate(uint32_t samplingRate);
2022-10-16 16:54:32 +02:00
private:
uint32_t samplingRate;
float parameters[17];
float unk22;
2022-10-17 00:48:32 +02:00
bool enable;
bool autoKnee;
bool autoGain;
bool autoAttack;
bool autoRelease;
2022-10-16 16:54:32 +02:00
float unk27;
float unk28;
float unk29;
float unk23;
2022-10-17 00:48:32 +02:00
float threshold;
float knee;
2022-10-16 16:54:32 +02:00
float unk24;
2022-10-17 00:48:32 +02:00
float gain;
float ratio;
2022-10-16 16:54:32 +02:00
float unk25;
float unk26;
2022-10-17 00:48:32 +02:00
float attack1;
float attack2;
float release1;
float release2;
float kneeMulti;
float maxAttack;
float maxRelease;
float crest1;
float crest2;
float adapt1;
float adapt2;
float noClip;
};