ADSR Question

Post Reply
creart
Posts: 31
Joined: Sat Dec 19, 2020 12:13 pm
Location: Netherlands
Contact:

ADSR Question

Post by creart » Mon Dec 28, 2020 5:35 pm

Hi, I don't think I get exactly how to operate ADSREnvelope.... When I do SetGate(true), do I need to start a timer which will fire a a SetGate(false)?
The SetGate starts the attack, decay and sustain phase with the time and levels settings I have set, but then remains in that sustain phase until the SetGate(false) is received...
But when I immediately give a SetGate(false) it's not entering the sustain phase at all...

I actually would have expected that Notify would have cases for the stages (like ADSR_Stage_Attack etc), and I tried adding those stages as case within the Notify section, but no luck there...

Can someone enlighten me?

cheers Hans

creart
Posts: 31
Joined: Sat Dec 19, 2020 12:13 pm
Location: Netherlands
Contact:

Re: ADSR Question

Post by creart » Wed Dec 30, 2020 4:37 pm

Btw, I was attempting to set a gate using a button and then you just have the option of setting the gate to true at that point....
In the meantime I have been able to start a NamedTimer to test and that works while testing...
I assume that normally you set the gate to true on NoteOn and to false on NoteOff...

But just using a button to start a gate manually is trickier than expected :-)

Anyway - getting there!

Post Reply