File allpass.h¶
File List > DaisySP > DaisySP-LGPL > Source > Filters > allpass.h
Go to the documentation of this file
Source Code¶
/*
Copyright (c) 2023 Electrosmith, Corp, Barry Vercoe, John ffitch
Use of this source code is governed by the LGPL V2.1
license that can be found in the LICENSE file or at
https://opensource.org/license/lgpl-2-1/
*/
#pragma once
#ifndef DSY_ALLPASS_H
#define DSY_ALLPASS_H
#include <stdint.h>
#ifdef __cplusplus
#include <math.h>
namespace daisysp
{
class Allpass
{
public:
Allpass() {}
~Allpass() {}
void Init(float sample_rate, float* buff, size_t size);
float Process(float in);
void SetFreq(float looptime);
inline void SetRevTime(float revtime) { rev_time_ = revtime; }
private:
float sample_rate_, rev_time_, loop_time_, prvt_, coef_, max_loop_time_;
float* buf_;
int buf_pos_, mod_;
};
} // namespace daisysp
#endif
#endif