Transient handling algorithm?
-
Danijel.Domazet Danijel.Domazet https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=204563
- KVRist
- 201 posts since 3 Apr, 2009
Hi,
How does one implement a transient handling algorithm? (Something similar to Voxengo's TransGainer or SPL's Transient Designer.) How to detect transients?
Transient Designer uses a “differential envelope”. There is some info in the tech-talk section of their manual (spl.info/fileadmin/user_upload/anleitungen/english/TransientDesigner4_9842_OM_E.pdf).
Could someone elaborate on this concept of level-independent envelope processing which doesn't need conventional compressor “threshold” control.
Thanks!
Danijel
How does one implement a transient handling algorithm? (Something similar to Voxengo's TransGainer or SPL's Transient Designer.) How to detect transients?
Transient Designer uses a “differential envelope”. There is some info in the tech-talk section of their manual (spl.info/fileadmin/user_upload/anleitungen/english/TransientDesigner4_9842_OM_E.pdf).
Could someone elaborate on this concept of level-independent envelope processing which doesn't need conventional compressor “threshold” control.
Thanks!
Danijel
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
You can have a look at my post: http://blog.audio-tk.com/2015/06/30/aud ... nt-shaper/
- KVRAF
- 4030 posts since 7 Sep, 2002
The basics are simple: use fast attack and slow attack envelope followers in parallel and estimate difference between the two. However, in practice you'll need some peculiar envelope followers that have a special shape, or otherwise "rectification" process won't be precise leading to over-reaction (stuttering) or under-reaction (skipping of obvious transients). I personally have never achieved to have a good detection quality in a broad-band setting (song or mix), you'll need several bands at least or otherwise higher-frequency transients may become masked by low-frequency signals.
-
Danijel.Domazet Danijel.Domazet https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=204563
- KVRist
- Topic Starter
- 201 posts since 3 Apr, 2009
Thanks Aleksey.Aleksey Vaneev wrote:The basics are simple: use fast attack and slow attack envelope followers in parallel and estimate difference between the two. However, in practice you'll need some peculiar envelope followers that have a special shape, or otherwise "rectification" process won't be precise leading to over-reaction (stuttering) or under-reaction (skipping of obvious transients). I personally have never achieved to have a good detection quality in a broad-band setting (song or mix), you'll need several bands at least or otherwise higher-frequency transients may become masked by low-frequency signals.
When I calculate "normal" envelopes,
Code: Select all
for i=1:size
if(envelope(i-1) < samples(i))
envelope(i) = envelope(i-1) * attack + (1-attack) * samples(i);
else
envelope(i) = envelope(i-1) * release + (1-release) * samples(i);
end
end

Is that the over-reaction that you were talking about?
-
Danijel.Domazet Danijel.Domazet https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=204563
- KVRist
- Topic Starter
- 201 posts since 3 Apr, 2009
I changed attack and release times, and managed to have a much cleaner envelope:

Does that look usable for some simple transient shaper?
Thanks for any advice.

Does that look usable for some simple transient shaper?
Thanks for any advice.
-
- KVRist
- 128 posts since 15 Aug, 2012 from Western Australia
I believe this means it looks for particular a rate of change (a 'differential' or 'derivative' in calculus) as the transient trigger.Danijel.Domazet wrote:differential envelope
-
Danijel.Domazet Danijel.Domazet https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=204563
- KVRist
- Topic Starter
- 201 posts since 3 Apr, 2009
Have a look at manual for SPLs Transient Designer, they call it "Differential Envelope Technology" and state that this is env1 - env2. So I'm pretty sure it isn't a derivative.Ninja_Edit wrote:I believe this means it looks for particular a rate of change (a 'differential' or 'derivative' in calculus) as the transient trigger.Danijel.Domazet wrote:differential envelope
- KVRAF
- 4030 posts since 7 Sep, 2002
Yes, it is. You managed to get a cleaner version below, but it will probably work with plain drum tracks only. Try it on a full mix and you'll get incorrect events. I've got good results only when I tweaked envelope shapes of the envelopes (S-curve vs log curve) beside attack/release times.Danijel.Domazet wrote:
Is that the over-reaction that you were talking about?
- KVRAF
- 4030 posts since 7 Sep, 2002
- u-he
- 30192 posts since 8 Aug, 2002 from Berlin
Hmmm, I tried the SPL plug-in for UAD and it does get some false positives, and a lot of misses when some longer tail / reverb was added. Somehow it sounds as if the actual transient envelope always has the same shape. It also leaks a lot of initial transient material, i.e. one can clearly hear an Attack before the envelope kicks in. I wonder if that is what it's supposed to sound like...?
In any case, the false positives (or over-reaction, as you put it) in my own attempts have always put me off, while material that I'd typically use it for (drums...) was served as well with a normal compressor/expander.
I might check out Transgainer.
In any case, the false positives (or over-reaction, as you put it) in my own attempts have always put me off, while material that I'd typically use it for (drums...) was served as well with a normal compressor/expander.
I might check out Transgainer.
- KVRAF
- 4030 posts since 7 Sep, 2002
-
- KVRAF
- 7578 posts since 17 Feb, 2005
It helps to have a definition in mind as to what a transient is. It could be a form of spurious noise for example. SPL's definition is a time-differentiated change in wideband magnitude.
-
- KVRAF
- 2256 posts since 29 May, 2012
Lets make a list of possible meanings then.It helps to have a definition in mind as to what a transient is. It could be a form of spurious noise for example. SPL's definition is a time-differentiated change in wideband magnitude.
1) spurious noise
2) a time-differentiated change in wideband magnitude.
3) decaying exponentials before a steady state is reached (in the context of 'steady state sinusoidal analysis')
4) ?
~stratum~
-
- KVRAF
- 3080 posts since 17 Apr, 2005 from S.E. TN
A bunch of my old electronic instrumental music from the 1980's and the only convenient copies are stereo mixes recorded at the time to PCM 501 and beta tape as mixdown deck. Transferred fresh copies to computer last year from the old tapes.Urs wrote:Somehow it sounds as if the actual transient envelope always has the same shape.
The audio fidelity, noise and mix are not stupidly bad, but I wish they were punchier sounding. Maybe the electronic instruments of the time were too "smooth". Or maybe I programmed the patches too smooth. Or perhaps excessively compressed.
I tried multiband expansion which did not work so good on full mixes because expansion tended to only expand loud transients in the mixes. Transients below threshold don't get expanded. So it made the mixes more ragged-sounding rather than "punchier".
Was thinking sometime to try making some kind of multiband transient tool. Sure I could try plugins already available, but whats the fun in that?
Maybe creating the transient enhancement envelopes from overlapped envelope followers (as discussed in this thread) would be "best". However it is difficult to make fast envelope followers with low ripple. Unless brilliantly done, I'd expect some intermodulation distortion if punching up transients with control signals directly-derived by doing math on envelope followers.
Was thinking triggered AR envelopes might have a "cleaner sound". An antialiased triggered AR envelope shouldn't add so much IMD, because the AR envelope wouldn't contain residue of audio ripple from the envelope followers. For instance if wanting to punch up transients in a certain frequency band by 2 dB, and the detection is good and level-insensitive, then it could be set to enhance loud transients by the 2 dB, and it would also enhance the quiet transients by the same 2 dB in that band.
If some transient plugin authors might have followed the same reasoning, then maybe that is why the transient envelopes in some plugins seem to always have the same shape?
I had fairly good multiband transient detection in an old app which was intended to detect tempo maps in full mixes (among other things), but it was non-realtime. Never tried to do it realtime that I can recall. I used the "envelope difference" method as the first phase of detection. That old program would scan the entire song to create a long timestamped list of broadband transients plus extra timestamped lists of band-limited transients.
Each element in the lists also saved the "relative amplitude" of the transient. In other words, regardless whether the transient might peak at -24 dB or -3 db in the song, it would save the difference in amplitude between the transient peak versus the level right before the transient occurred. Then the program did a "pruning loop" to discard redundant detected "beats". After pruning, each "detected beat" in the song was only represented by a single transient event in the lists-- Rather than one individual song transient possibly being duplicated in several lists, with each redundant copy possibly "not quite the same timestamp".
Maybe for audio processing the pruning would be a bad thing, or maybe should be done differently. I just wanted a map of accurate timestamped transients for tempo detection and such.
SPL was IMO real innovative inventing the first analog version. A unique clever use of the "envelope difference" method.
The "envelope difference" technique was a "fairly common" analog trick decades before SPL made that transient designer analog device. It was a good way to convert noisy periodic signals into a pulse train. So you can feed the cleaned-up pulse train into a PLL or whatever. Maybe SPL was the first to think up the transient-enhancement use of the trick? Dunno.
