wip: filter gui
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "Filter.h"
|
||||
#include "ADSR.h"
|
||||
#include "Synth.h"
|
||||
#include "SynthGuiState.h"
|
||||
@@ -19,7 +20,8 @@ class Renderer {
|
||||
void draw_signal(Synth& synth, SynthGuiState& synth_gui);
|
||||
void draw_adsr_panel(ADSR* adsr, ADSRGuiState& gui_adsr,
|
||||
const Rectangle& panel_bounds, float panel_y_offset);
|
||||
|
||||
void draw_second_panel(Rectangle& bounds);
|
||||
float draw_filter_panel(Filter* filter, FilterGuiState& gui_filter, const Rectangle& panel_bounds);
|
||||
public:
|
||||
Renderer(/* args */);
|
||||
~Renderer();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ADSR.h"
|
||||
#include "Filter.h"
|
||||
#include "Adder.h"
|
||||
#include "Effect.h"
|
||||
#include "Note.h"
|
||||
@@ -32,4 +33,5 @@ class Synth {
|
||||
const std::vector<Oscillator*>& GetOscillators() { return m_oscillators; }
|
||||
const bool& GetIsNoteTriggered() { return is_note_triggered; }
|
||||
ADSR* GetADSR() { return (ADSR*)m_effects[0]; }
|
||||
Filter* GetFilter() { return (Filter*)m_effects[1]; }
|
||||
};
|
||||
@@ -18,7 +18,14 @@ struct ADSRGuiState {
|
||||
float release;
|
||||
};
|
||||
|
||||
struct FilterGuiState {
|
||||
float freq;
|
||||
float res;
|
||||
//todo: type
|
||||
};
|
||||
|
||||
struct SynthGuiState {
|
||||
std::vector<OscillatorGuiState*> oscillators;
|
||||
ADSRGuiState adsr;
|
||||
FilterGuiState filter;
|
||||
};
|
||||
Reference in New Issue
Block a user