Proper way to do EG triggers

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Suppose you're making a sample player and you're using midi to [re]trigger samples.

Typically you would want a very short decay/fade out of the currently playing sound before triggering the next one to avoid nasty clicks. But if you do this after a midi-trigger is detected it adds some milliseconds to the latency.

Is there a more sensible way to [re]trigger envelopes in real-time applications?

Post

why not just fade-out the tail only
then you won't introduce latency on the new note
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

brambos wrote:Suppose you're making a sample player and you're using midi to [re]trigger samples.

Typically you would want a very short decay/fade out of the currently playing sound before triggering the next one to avoid nasty clicks. But if you do this after a midi-trigger is detected it adds some milliseconds to the latency.

Is there a more sensible way to [re]trigger envelopes in real-time applications?
Overlap multiple voices, so you can do the fade out at the same time you're playing the new note.

Post

there are satisfactory low intensity solutions, perhaps some better suited for if it's the sample or the envelope you're trying to fix..

one way to remove clicks from audio is to send the truncated value to an exponential decay timed for a few ms and sum the exponential decay with the audio. this might give it a different bump from a clean attack when it goes through compression but effectively removes clicks.

for envelopes, a traditional mono mode performance is to start the attack at the interrupted position. if you want a solid attack time, sum like above, crossfade..
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

xoxos wrote: one way to remove clicks from audio is to send the truncated value to an exponential decay timed for a few ms and sum the exponential decay with the audio. this might give it a different bump from a clean attack when it goes through compression but effectively removes clicks.
Well, yeah sort of. It doesn't really completely remove the click, but since most of the high frequencies components of the click come from the waveform discontinuity (jump from last value to the zero) you'll eliminate those. You'll still end up with all the "click" from each of the derivatives, but since the spectra for those decay with 6dB/oct per derivative, the clicks are a bit less obvious.

While actually fading out the killed voice is a cleaner strategy, this is certainly a good "backup plan" in case you have a fixed maximum number of voices (typical situation) and all of those are in use already.

But yeah, as you say, for "true" monophonic mode, one usually just sets the envelope back to attack stage (with the current value, whatever that might be) and then keeps going. Works well with leads and such, less so with slow-attack sounds (but those tend to work better as polyphonic anyway).

Post

more :hihi:

if your voices are classic analog percussion, a "fade out before retrigger" period may be a good choice as eg. kick and snare architectures are triggered by a ~2ms pulse which "drains" the previous voice..

back in old days used to say "pull your hats ahead" i wonder if this is because of accustomisation to 808/909.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

Great. That helps me a lot guys. Thanks!

Post

I hope this means you'll be making some more music software for PCs and laptops. I really miss your Tuareg site and the old yahoogroup. If you are working on anything, will it be freeware or shareware? I love the system you used with Tuareg, and it was worth every penny.

Post Reply

Return to “DSP and Plugin Development”