You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
485 B
28 lines
485 B
#ifndef __SAP_H__
|
|
#define __SAP_H__
|
|
|
|
// Schroeder All-Pass (delay w/feedback)
|
|
|
|
#include <cstddef>
|
|
|
|
#include "stereodelayline.h"
|
|
|
|
template <size_t CAPACITY>
|
|
class StereoSAP {
|
|
private:
|
|
const size_t size;
|
|
StereoDelayLine<CAPACITY> dl;
|
|
|
|
public:
|
|
float gain = 0.7;
|
|
|
|
StereoSAP(size_t size = CAPACITY) : size(size) {}
|
|
|
|
inline frame tick(frame in) {
|
|
frame fb = in + dl.tap(0) * gain;
|
|
frame out = dl.tick(fb) + fb * -gain;
|
|
return out;
|
|
}
|
|
};
|
|
|
|
#endif |