Page 1 of 1

variable decay

Posted: Thu Mar 27, 2008 1:55 pm
by shahin
I'm a little stuck. Can anyone help me? I have a signal that is either 0.0 or 1.0. I'd like to add variable decay to its falling edge (between 20 ms and 500 ms) without affecting the quick attack of the signal's rising edge.

Posted: Fri Mar 28, 2008 10:18 am
by frank
Simple answer is to check the signal level and jump according to the level.

Have an output register.
If the input is 1.0, load output register with input input.
If input is 0, decay output register.
Send output register to DAC output

Use something like a "SKP ZRO,N" to check if the input is zero and skip over the fast attack if it is. If it is not zero then it must be one and do the fast attack.

-Frank