kopia lustrzana https://github.com/jameshball/osci-render
35 wiersze
1.2 KiB
C++
35 wiersze
1.2 KiB
C++
#pragma once
|
|
#include "../shape/Vector2.h"
|
|
#include <JuceHeader.h>
|
|
#include "EffectApplication.h"
|
|
|
|
class Effect {
|
|
public:
|
|
Effect(std::shared_ptr<EffectApplication> effectApplication, std::vector<EffectDetails> details);
|
|
Effect(std::shared_ptr<EffectApplication> effectApplication, EffectDetails details);
|
|
Effect(std::function<Vector2(int, Vector2, const std::vector<double>&, double)> application, std::vector<EffectDetails> details);
|
|
Effect(std::function<Vector2(int, Vector2, const std::vector<double>&, double)> application, EffectDetails details);
|
|
|
|
Vector2 apply(int index, Vector2 input);
|
|
void apply();
|
|
double getValue(int index);
|
|
double getValue();
|
|
void setValue(int index, double value);
|
|
void setValue(double value);
|
|
int getPrecedence();
|
|
void setPrecedence(int precedence);
|
|
juce::String getId();
|
|
juce::String getName();
|
|
|
|
std::vector<EffectDetails> details;
|
|
|
|
private:
|
|
|
|
std::vector<double> smoothValues;
|
|
double frequency = 1.0;
|
|
int precedence = -1;
|
|
int sampleRate = 192000;
|
|
std::function<Vector2(int, Vector2, const std::vector<double>&, double)> application;
|
|
|
|
std::shared_ptr<EffectApplication> effectApplication;
|
|
}; |