mirror of
https://codeberg.org/armin/ambivalence.git
synced 2026-09-01 04:10:48 +02:00
init
This commit is contained in:
parent
29c860587e
commit
42cf8432bf
57 changed files with 5782 additions and 0 deletions
21
Source/DSP/SAPFStage.cpp
Normal file
21
Source/DSP/SAPFStage.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include "SAPFStage.h"
|
||||
|
||||
namespace FDNReverb {
|
||||
|
||||
void SAPFStage::prepare(const juce::dsp::ProcessSpec& spec, int delayTargetSamples) {
|
||||
M = delayTargetSamples;
|
||||
dl.prepare(spec);
|
||||
dl.setMaximumDelayInSamples(M + 4);
|
||||
dl.setDelay(static_cast<float>(M));
|
||||
}
|
||||
|
||||
float SAPFStage::tick(float x) noexcept {
|
||||
float d = dl.popSample(0);
|
||||
float w = x + gain * d;
|
||||
dl.pushSample(0, w);
|
||||
return d - gain * w;
|
||||
}
|
||||
|
||||
void SAPFStage::reset() noexcept { dl.reset(); }
|
||||
|
||||
} // namespace FDNReverb
|
||||
Loading…
Add table
Add a link
Reference in a new issue