61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
/*
|
|
* Filename: svf.h
|
|
*
|
|
* Description:
|
|
*
|
|
*
|
|
* Version:
|
|
* Created: Fri Nov 1 23:34:34 2019
|
|
* Revision: None
|
|
* Author: Rachel Fae Fox (foxiepaws),fox@foxiepa.ws
|
|
*
|
|
*/
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QContiguousCache>
|
|
|
|
#include "data/node.h"
|
|
#include "data/audioframe.h"
|
|
|
|
namespace Xybrid::Effects {
|
|
class SVF : public Data::Node {
|
|
enum FilterMode {_off, _low, _band, _high, _notch };
|
|
double frequency= 0.5;
|
|
double resonance = 0.0;
|
|
|
|
Xybrid::Data::AudioFrame low = 0.0;
|
|
Xybrid::Data::AudioFrame band = 0.0;
|
|
Xybrid::Data::AudioFrame high = 0.0;
|
|
Xybrid::Data::AudioFrame notch = 0.0;
|
|
FilterMode fm = _off;
|
|
|
|
// solve these in cons.
|
|
double max_freq;
|
|
double freq;
|
|
double q;
|
|
|
|
public:
|
|
SVF();
|
|
~SVF() override = default;
|
|
|
|
void init() override;
|
|
void reset() override;
|
|
void release() override;
|
|
void process() override;
|
|
|
|
//void onRename() override;
|
|
|
|
void saveData(QCborMap&) const override;
|
|
void loadData(const QCborMap&) override;
|
|
|
|
//void onUnparent(std::shared_ptr<Data::Graph>) override;
|
|
//void onParent(std::shared_ptr<Data::Graph>) override;
|
|
|
|
void onGadgetCreated() override;
|
|
|
|
//void drawCustomChrome(QPainter*, const QStyleOptionGraphicsItem*) override;
|
|
};
|
|
}
|