Fixed knobs not working on AD

This commit is contained in:
Christian Colglazier 2022-01-20 22:03:19 -05:00
parent ce3e89872e
commit 796092e4ee
2 changed files with 6 additions and 3 deletions

View File

@ -18,7 +18,9 @@ void AD::Process(DacHandle::Channel chn,
if(patch->gate_input[gate].Trig()) { if(patch->gate_input[gate].Trig()) {
env.Trigger(); env.Trigger();
} }
if (*state == DropletState::kFull) { if (*state == DropletState::kFull) {
//DrawSolidRect(patch, 30,30,40,40, true);
attack = attack_param.Process(); attack = attack_param.Process();
decay = decay_param.Process(); decay = decay_param.Process();
curve = curve_param.Process(); curve = curve_param.Process();
@ -108,11 +110,11 @@ ADDroplet::ADDroplet(DaisyPatch* m_patch,
SetAnimationRate(10); SetAnimationRate(10);
ad[0].Init(Patch(), ad[0].Init(Patch(),
sample_rate, sample_rate,
&m_state); State());
if (m_state == DropletState::kFull) { if (m_state == DropletState::kFull) {
ad[1].Init(Patch(), ad[1].Init(Patch(),
sample_rate, sample_rate,
&m_state); State());
} }
CreateTitleGraph(); CreateTitleGraph();
} }
@ -200,6 +202,7 @@ void ADDroplet::Draw() {
} }
title_graph->SetPixelPercentage(ad[0].GetSignal()); title_graph->SetPixelPercentage(ad[0].GetSignal());
title_graph->Draw(Patch(), GetScreenMin(), 0); title_graph->Draw(Patch(), GetScreenMin(), 0);
DrawName("AD"); DrawName("AD");
AnimationInc(); AnimationInc();

View File

@ -114,11 +114,11 @@ static void AudioThrough(AudioHandle::InputBuffer in,
Droplet* GetDroplet(DropletState state) { Droplet* GetDroplet(DropletState state) {
switch(selected_menu->GetState()) { switch(selected_menu->GetState()) {
default:
case MenuState::kAD: case MenuState::kAD:
return new ADDroplet(&patch, return new ADDroplet(&patch,
state, state,
sample_rate); sample_rate);
default:
case MenuState::kLFO: case MenuState::kLFO:
return new LFODroplet(&patch, return new LFODroplet(&patch,
state, state,