Why is transient shaping a black-art ?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

I liked the name of this thread :hihi:

Well, I have tried countless times to develop successfully a transient shaper, inspired by the documentations from SPL about their transient designer, and messages on musicdsp newsletter, and intensive googling etc. At the end, I have not been able to get something which sounds right, from the fast/slow enveloppes needed for attack/release controls, and I only got crappy open source transient shaper implementations...

I'm not looking for some ready-to-copy-and-paste code, but I'm trying to understand how that works, as a solid basis for further improvements. I'm even looking for electronic schematics from transient shaper gear that I would be able to simulate with SPICE...

Any tips about this subject ?

Thanks in advance !

Post

I guess it takes an artist to know why it is necessary, so it's not a surprise that the implementation is a black art as the number of developers that had the chance to talk to the artists who think it is necessary are low in number.

Probably that wasn't the answer that you wanted to hear, but chances are high that it's the case.
~stratum~

Post

Wolfen666 wrote: I'm even looking for electronic schematics from transient shaper gear that I would be able to simulate with SPICE...
Shematic
Whole page, description

note, this is TD and gate with voltage control on top.

Post

I guess it takes an artist to know why it is necessary, so it's not a surprise that the implementation is a black art as the number of developers that had the chance to talk to the artists who think it is necessary are low in number.
I personally think that transient shapers are awesome to shape drums sound :D

Urosh > thanks for the link, although I have read it yet :wink: It's a little difficult to simulate it with SPICE, but I will be able to understand everything about very soon I hope...

Post

Mhhh.. I remember playing around with the idea when SPL explained how they did it somewhere in a music mag. I had really good results with the first tries.

The idea is simple, it's about an envelope follower being subtracted by another envelope follower (different attack and zero release for attack shaping, zero attack and different release timing for release shaping) and use the result to amplify the signal. I suppose you found that out already.

The naive implementation works surprisingly well, but there are a few things to consider:

- It's not a good idea to accurately follow the waveform. You need to find a good compromise between smoothness and accuracy in order to control and reduce severe distortion when the CV starts riding on every cycle (same problem compressors face).

- However, there's a serious problem as soon you try high-pass or damp the "sidechain" without care. Phase distortion matters in such fast time-domain dynamics processing.

- At some point, you will multiply the original signal with a derived DC version of the same original. Both have a huge bandwidth, so aliasing problems will appear (at least at 44.1kHz).

Good luck with the next tries, don't give up! ;)
Fabien from Tokyo Dawn Records

Check out my audio processors over at the Tokyo Dawn Labs!

Post

Hello FabienTDR !

Thanks for the advices ! Anyway, what do you mean by "derived DC version" ?

Post

Let's look at a basic "attack" shaper to keep it simple:

It consists of two attack/release envelope followers (AC to DC converters), with idealized settings as follows:

follower_1: instant attack, instant release.
follower_2: slow attack, instant release.

You connect them in such a way:

controlVoltage = follower_1.process( in ) - follower_2.process( in );

Now, as soon the "circuit" faces a rising event, controlVoltage will grow. On the other hand, as soon the signal decays, controlVoltage quickly jumps back to zero.

Finally, you do something like this:

in = in * controlVoltage * amount;

The above is the multiplication you asked for. Multiplying two signals will extend the bandwidth and alias if not oversampled (or bandwidth limited before multiplication).


Please note that this is just a very simple model, but it works. In practice, it's much more accurate to do all the job in the dB "domain". The "instant" timings I mentioned above tend to distort quickly - and that's where things get more complicated.
Fabien from Tokyo Dawn Records

Check out my audio processors over at the Tokyo Dawn Labs!

Post

Wolfen666 wrote:I only got crappy open source transient shaper implementations...
Which ones are you referring to?
Wolfen666 wrote:I'm not looking for some ready-to-copy-and-paste code, but I'm trying to understand how that works, as a solid basis for further improvements.
http://spl.info/fileadmin/user_upload/p ... manual.pdf (which I assume you've already seen) explains how SPL's TD works ... envelope followers with different fall and rise rates than the gain is calculated from their difference ... I don't have more to say about that.

Then it comes down to implementing it correctly which boils down to using the correct envelope followers which in the end basically means using the correct rise and fall times.
Now when it comes to the correct rise and fall times this is where the black art comes into play as different signals need different times, e.g. a quick snappy snare needs faster rise and fall times than a boomy bass drum. A guitar needs much smoother envelopes all together.

I successfully implemented several (acclaimed) transient shapers, which all use nothing more but simple RC-filters for their envelope followers. But those filters where tuned over the course of several month with a range of different signals. I think this tuning is the "black art" which really is nothing more but trial and error.

Post

FabienTDR wrote: The above is the multiplication you asked for. Multiplying two signals will extend the bandwidth and alias if not oversampled (or bandwidth limited before multiplication).
Note that the envelope followers do also alias (probably a lot more than the "VCA" stage itself). This will be an issue when working with very fast envelopes.

Post

hugoderwolf wrote:
FabienTDR wrote: The above is the multiplication you asked for. Multiplying two signals will extend the bandwidth and alias if not oversampled (or bandwidth limited before multiplication).
Note that the envelope followers do also alias (probably a lot more than the "VCA" stage itself). This will be an issue when working with very fast envelopes.
Naive enveloper follower will alias, yes. It is however somewhat of an over-generalization to assume that all of them do. An RMS type follower for example is quite trivial to implement in a way that results in no aliasing whatsoever.

Post

FabienTDR wrote: In practice, it's much more accurate to do all the job in the dB "domain".
Yep. In schematic above U1A and stuff around it (and that's input of detector chain) is log amp + U1B and U2A which do full wave rectification. OTOH, 2181B_THAT is VCA with exponential gain/CV law. However, attack and release detectors/exctractors are quite complex, especially release part.

mystran wrote: An RMS type follower for example is quite trivial to implement in a way that results in no aliasing whatsoever.
Ok, I get it for trivial case of square -> 1pLP/moving average filter. But I dont think there is any trivial solution for dBx type detector excpet oversampling. If you know some trick please tell.

Post

There are no "tricks" in this case. Only what you need to do the job. :roll: noobs

The gain envelope itself is what does the dirty work. You can get similar results in the digital domain with other methods.

Post

urosh wrote:
mystran wrote: An RMS type follower for example is quite trivial to implement in a way that results in no aliasing whatsoever.
Ok, I get it for trivial case of square -> 1pLP/moving average filter. But I dont think there is any trivial solution for dBx type detector excpet oversampling. If you know some trick please tell.
You can do a bit better than square and 1pLP, but it's true that in theory there will be aliasing by the time you log-convert it and/or add asymmetric time-constants. In practice though, you don't really need all the high frequency detail in the envelope.

In fact removing the high-frequency detail is exactly the point of an envelope follower: you want the envelope and you're stuck with the time-frequency resolution problem anyway. So you're probably looking at content below 100Hz or so.. and you can make it so that you don't create any significant aliasing before you've got rid of the high-frequency detail. You'll then obvious create some theoretical aliasing with further shaping, but that'll be quite negligible.

I'm not going to claim that's the best way to do things, but it's certainly possible.

I have no idea what DBX detectors do, though :shrug:

Post

mystran wrote: In fact removing the high-frequency detail is exactly the point of an envelope follower
Well, it catches some very specific HF detail. It should catch transients or at least be capable to catch them.
dBx detector (which is pretty much the RMS detector in world of analog dynamics) is something like log(x^2) -> very non linear envelope detector (attack time constant is dynamic, determined by conductance of diode at detector input). And in general, in analog domain you log -> do everything you need -> antilog (in case that expo VCA is used), so you have problem right at the start because you perform log of wideband signal. And even then, IMveryHO envelope detector is source of aliasing - it is highly non linear filter one way or another - and especialy crude with "naive" DSP implementations. Only workaround I know of is square -> filter (this will be attack) -> env.detect for release with very short attack but this will narrow choices to one verz specific detector class with significant constraints.

My question was actually something like this: is there any way to perform bandlimiting of nonlinear filter with out going down the oversampling road?

Post

Thank you very much for your comments, I have now a lot of things to try :wink:

Post Reply

Return to “DSP and Plugin Development”