xybrid/xybrid/nodes/effect/svf.h

56 lines
1.2 KiB
C
Raw Normal View History

/*
* Filename: svf.h
*
* Description:
*
*
2022-03-15 20:32:45 -04:00
* Version:
* Created: Fri Nov 1 23:34:34 2019
* Revision: None
* Author: Rachel Fae Fox (foxiepaws),fox@foxiepa.ws
*
*/
#pragma once
#include "data/node.h"
#include "data/audioframe.h"
2022-03-16 00:34:08 -04:00
#include "nodelib/svfilter.h"
2022-03-25 02:25:14 -04:00
#include "nodelib/param.h"
2022-03-16 00:34:08 -04:00
namespace Xybrid::Effects {
class SVF : public Data::Node {
2022-03-16 00:34:08 -04:00
NodeLib::SVFilter filter;
2022-03-25 02:25:14 -04:00
//double cutoff = 6440.0;
NodeLib::Param cutoff = {"Cutoff", 0, 16000, 0};
2022-03-16 00:34:08 -04:00
double resonance = 0.0;
public:
2022-03-16 00:34:08 -04:00
enum FilterMode : uchar { Off, Low, High, Band, Notch };
FilterMode mode = Low;
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;
};
}