ADSR Question

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

ADSR Question

Post by creart »

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
Request for Music
creart
Posts: 59
Joined: Sat Dec 19, 2020 12:13 pm
Location: Netherlands
Contact:

Re: ADSR Question

Post by creart »

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!
Request for Music
bcgreen24
Posts: 13
Joined: Mon Oct 04, 2021 9:25 pm

Re: ADSR Question

Post by bcgreen24 »

Hi, creart-- can you share some code snippets on how you're using ADSR envelopes? My main problem is trying to figure out how to use a gate input to trigger the envelope, how to deal with sustain, etc. (sooo, basically everything :) )

Bryan
Post Reply

Return to “Module Designer”