feat(gui): add GUI components and displays
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <JuceHeader.h>
|
||||
#include "../Resources.h"
|
||||
#include "../Params.h"
|
||||
|
||||
namespace serum
|
||||
{
|
||||
|
||||
// ===========================================================================
|
||||
// Filter frequency-response view (magnitude vs log frequency).
|
||||
// ===========================================================================
|
||||
class FilterDisplay : public juce::Component
|
||||
{
|
||||
public:
|
||||
void setParams (int type, float cutoff, float res, float drive, int slope);
|
||||
void setEnabled (bool e) { enabled = e; }
|
||||
|
||||
void paint (juce::Graphics& g) override;
|
||||
|
||||
static float magnitude (float freqHz, float cutoffHz, float res, int type);
|
||||
|
||||
private:
|
||||
int type = 0;
|
||||
float cutoff = 0.5f, res = 0.0f, drive = 0.0f;
|
||||
int slope = 2;
|
||||
bool enabled = true;
|
||||
};
|
||||
|
||||
} // namespace serum
|
||||
Reference in New Issue
Block a user