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()) {
env.Trigger();
}
if (*state == DropletState::kFull) {
//DrawSolidRect(patch, 30,30,40,40, true);
attack = attack_param.Process();
decay = decay_param.Process();
curve = curve_param.Process();
@ -108,11 +110,11 @@ ADDroplet::ADDroplet(DaisyPatch* m_patch,
SetAnimationRate(10);
ad[0].Init(Patch(),
sample_rate,
&m_state);
State());
if (m_state == DropletState::kFull) {
ad[1].Init(Patch(),
sample_rate,
&m_state);
State());
}
CreateTitleGraph();
}
@ -201,6 +203,7 @@ void ADDroplet::Draw() {
title_graph->SetPixelPercentage(ad[0].GetSignal());
title_graph->Draw(Patch(), GetScreenMin(), 0);
DrawName("AD");
AnimationInc();
}

View File

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