variable decay

Algorithm development and general DSP issues

Moderator: frank

Post Reply
shahin
Posts: 13
Joined: Tue Sep 18, 2007 11:07 am

variable decay

Post 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.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post 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
Frank Thomson
Experimental Noize
Post Reply