anthonyalfimov / Stable-Delay

AU, VST3. A WIP delay/chorus/flanger plugin
GNU General Public License v3.0
3 stars 1 forks source link

Improve metering #37

Closed anthonyalfimov closed 3 years ago

anthonyalfimov commented 3 years ago

Peak metering can be visualised as a lighter / more transparent bar behind the RMS meter. It could have a more prominent / opaque outline (maybe even a gradient, getting more opaque towards the top.


Input level can get over 0 dBFS with no negative effects, this will only drive the delay line. So, clipping indicators don't make sense on the input level. Showing "amount of saturation" above the Input meters can be misleading - because only the delay line is saturated, not the dry signal. It can also be saturated due to feedback. So it makes sense to indicate the delay line saturation in the FX panel #35.

This also means that Input level meter should probably go a couple dB over 0.

If #28 is not implemented or disabled, output clipping is possible. Clipping the output does not produce any negative effects inside the plugin, but can be a problem outside of the plugin. It makes sense to indicate output clipping. We could either add traditional "lights" above the meters (would break the symmetry with the Input), or use gradient red highlight of the top of the meter background. Another option is to colour the whole meter column (see below in meter colour discussion).

Clipping indicator should hold until clicked to dismiss.

NB! Make sure that the red clipping highlight is discernible with colourblindness!

When output soft clipping #28 is enabled, indicating clipping is pointless. We can disable it entirely, or use it with different colour and no hold to indicate "drive" into output soft clipper. However, using a different colour with no other changes might not be colourblind-friendly.

To further visualise output soft clipping vs going over 0 dBFS, the output level meter range should also go a couple dB over 0.


The whole meter column can be coloured (the usual green - yellow - orange [- red]), or it could remain grey and use colour in specific situations.

When the output meter is clipping, it can turn red: either the whole meter column, or just the top of it with gradient. When output saturation is enabled, this behaviour wouldn't make sense. The meter could turn orange instead to indicate the "drive" into the soft clipper.

The input meter shouldn't ever turn red, but it can turn orange when going over 0 dBFS. This could be misleading though, as the analogy with the output is not exact: input does not saturate the whole signal. Only delay line is saturated.

anthonyalfimov commented 3 years ago

Added proper RMS and peak metering. ~There's even "clipping indication" - you get an assert in debug build.~

Meters use no smoothing currently, with refresh rate of 15 Hz. This doesn't look any good. The RMS window is set to 100 ms currently. Instead of smoothing the RMS level, we can just tweak the window size (300 ms is a window size used for crude emulations of VU meters). Peak level should be smoothed, but only on release. Smoothing could look better with a higher refresh rate (20 - 25 Hz, definitely no more than 30 Hz).

Edit: 300 ms RMS window results in a very pleasant meter behaviour. However, when the input is cut, the meter disappears very abruptly. A little bit of smoothing could make this transition less sharp. However, perhaps a higher refresh rate would be enough.

anthonyalfimov commented 3 years ago

Clipping indication: If we just change the colour of meter bars, it will be difficult to make colourblind-friendly. Adding dedicated clipping indicators above meters will require either making the meters too short, or making the whole plugin taller.

One alternative is to make meter bars red with angled stripes, like a warning tape. Another option is to enabled a red outline around the meter if it clipped. The outline should be visible enough even without colour. In addition to that, we can still colour the meter bars red when the currently displayed level is above 0 dBFS.

anthonyalfimov commented 3 years ago

Peak hold: with the current meter visual style, adding another component (peak hold indicator) would make it too cluttered.

anthonyalfimov commented 3 years ago

Meter colours: The plugin doesn't use any colour in its UI, so any appearance of colour will attract a lot of attention. Therefore, a meter in normal operation should stay within the palette of the rest of the plugin.

Clipping is an "extraordinary" circumstance that should attract attention, so using colour is justified.

Indicating saturation should not grab as much attention as clipping, so if we use a colour for that, it shouldn't stand out as much. I want to blend from the regular meter colour to an orangish-yellow based on the amount of saturation, so the colour becomes really pronounced only at extreme levels of distortion.

anthonyalfimov commented 3 years ago

Current state of metering

Screenshot 2021-03-24 at 23 00 17

anthonyalfimov commented 3 years ago

Graphical exploration of meters:

Meter tests

Level marks and labels

Trying to fit these inside the meter itsefl always resulted in something too crowded and hard to read. Therefore, the only way I can imagine adding these is on the outside of the meters. For stereo, putting the labels between the meters seems like a logical choice.

Adding level marks between the meters will require pushing the meters apart more. Currently there's barely enough space for them, especially with the clipping indicators lit up.

Generally, a simple plugin like this doesn't really need level marks on the meters at all. If the range of the meters goes up to 0 dBFS, we can just drop this idea. But if the range goes above 0, we have to show the 0 position. Then, we should definitely add the marks.

Note: adding level marks will require to skew the meter range.


Using gradient for saturation, clipping

Gradient for saturation makes a lot of sense: there's no hard threshold where saturation starts, and the gradient can be tuned to accurately represent that. It also draws less attention than lighting up the whole meter.

Same approach can be applied to clipping. However, it's not as accurate: clipping does have a hard threshold. Also, clipping indication should draw more attention.

anthonyalfimov commented 3 years ago

Three options with labels

A: No labels, 0 dBFS at the top of the meter

NoLabels

B: Wider labels with meters splayed apart, a few dB above 0 at the top of the meter

LabelsA

C: Narrower labels, a few dB above 0 at the top of the meter

LabelsB

anthonyalfimov commented 3 years ago

Colours

Saturation: #E39105 Clipping: #DF4107

Colour Choices