mirror of
https://codeberg.org/armin/pascalcompressor.git
synced 2026-10-11 16:51:56 +02:00
Add compressor plugin source with build files
This commit is contained in:
parent
b0fef386ee
commit
ef5739546f
10 changed files with 925 additions and 0 deletions
37
Source/Compressor.h
Normal file
37
Source/Compressor.h
Normal 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;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue