mirror of
https://codeberg.org/armin/ambivalence.git
synced 2026-09-01 12:20:48 +02:00
init
This commit is contained in:
parent
29c860587e
commit
42cf8432bf
57 changed files with 5782 additions and 0 deletions
32
Source/DSP/EarlyReflections.h
Normal file
32
Source/DSP/EarlyReflections.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
#include <JuceHeader.h>
|
||||
#include "DSPConstants.h"
|
||||
#include "BiquadFilters.h"
|
||||
|
||||
namespace FDNReverb {
|
||||
|
||||
struct ERTap {
|
||||
float delaySamples{ 0.f };
|
||||
float gainL{ 0.f };
|
||||
float gainR{ 0.f };
|
||||
};
|
||||
|
||||
class EarlyReflections {
|
||||
public:
|
||||
void prepare(const juce::dsp::ProcessSpec& spec);
|
||||
void buildTaps(const AlgorithmPreset& preset, float roomSizeScale, double sampleRate);
|
||||
void setPreDelay(float ms, double sampleRate) noexcept;
|
||||
|
||||
std::pair<float, float> tick(float mono) noexcept;
|
||||
void reset() noexcept;
|
||||
|
||||
private:
|
||||
juce::dsp::DelayLine<float, juce::dsp::DelayLineInterpolationTypes::Lagrange3rd> buf;
|
||||
std::array<ERTap, ER_TAPS> taps;
|
||||
int preDelaySamples{ 0 };
|
||||
|
||||
BiquadCoeffs erHPCoeffs, erLPCoeffs;
|
||||
BiquadState erHPL, erHPR, erLPL, erLPR;
|
||||
};
|
||||
|
||||
} // namespace FDNReverb
|
||||
Loading…
Add table
Add a link
Reference in a new issue