File moogladder.h¶
File List > DaisySP > DaisySP-LGPL > Source > Filters > moogladder.h
Go to the documentation of this file
Source Code¶
/*
Copyright (c) 2023 Electrosmith, Corp, Victor Lazzarini, John ffitch (fast tanh), Bob Moog
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_MOOGLADDER_H
#define DSY_MOOGLADDER_H
#include <stdint.h>
#ifdef __cplusplus
namespace daisysp
{
class MoogLadder
{
public:
MoogLadder() {}
~MoogLadder() {}
void Init(float sample_rate);
float Process(float in);
inline void SetFreq(float freq) { freq_ = freq; }
inline void SetRes(float res) { res_ = res; }
private:
float istor_, res_, freq_, delay_[6], tanhstg_[3], old_freq_, old_res_,
sample_rate_, old_acr_, old_tune_;
float my_tanh(float x);
};
} // namespace daisysp
#endif
#endif