Program "curves" for realtime use.

Status
Not open for further replies.

frankzappa

Well-known member
Hello!

I'm working on an electronic drum brain and I'm wondering what the best way is to implement curves for use as moving thresholds, velocity calculations and whatnot.

For example, after a drum is struck, the signal will take maybe 30 milliseconds to decay below the threshold. I can't wait that long because I want it to be as fast as possible. I need to adapt the threshold so it's just above the decaying signal so if the drum is struck again it can be detected if it's above the new adaptive threshold.

My initial thought is to just set the threshold to the peak value after the drum is struck, wait a few milliseconds and then do a (threshold x 0.8) every millisecond or so to get a decaying curve until it goes back down to the regular threshold.

Is there any other, better way to do this that is maybe less processor intensive?
 
Status
Not open for further replies.
Back
Top