Add compressor plugin source with build files

This commit is contained in:
Armin 2026-09-09 12:35:16 +02:00
commit ef5739546f
10 changed files with 925 additions and 0 deletions

37
Source/Compressor.h Normal file
View file

@ -0,0 +1,37 @@
#pragma once
#include <juce_audio_utils/juce_audio_utils.h>
#include <juce_dsp/juce_dsp.h>
namespace pascal
{
class GlueCompressor final
{
public:
void prepare (const juce::dsp::ProcessSpec& spec);
void reset();
void setInputDb (float v) { inputDb = v; }
void setThresholdDb (float v) { thresholdDb = v; }
void setRatio (float v) { ratio = v; }
void setAttackMs (float v) { attackMs = v; }
void setReleaseMs (float v) { releaseMs = v; }
void setMakeupDb (float v) { makeupDb = v; }
void setDryWet (float v) { dryWet = v; }
void processBlock (juce::AudioBuffer<float>& buffer);
private:
float inputDb = 0.0f;
float thresholdDb = -18.0f;
float ratio = 2.0f;
float attackMs = 10.0f;
float releaseMs = 250.0f;
float makeupDb = 0.0f;
float dryWet = 1.0f;
double sampleRate = 44100.0;
float detectorLevel = 0.0f;
};
}