written by
Ziga Rezar

Wiggle wiggle wiggle - The Story of a VU meter

Tech 6 min read

This is a story about a simple VU meter. We recently did something entirely new in our online product. The task at hand was a true hybrid of different fields of knowledge, at the same time seemingly trivial and yet extremely important for the user's experience. So, what is it about this time?

vu meter on gyraf g24
The VU meter

The VU meter is a seemingly simple electro-mechanical device... that happens to be attached to a very complicated box, the Gyraf G24 Passive/Aggressive Compressor we wrote about before. This complexity means it's easy to get lost and keeping your eyes on the meters becomes an important aspect of work with the G24.

We all know very well we should listen first and look at the meters second. But apart from the practical aspect... they look soo pretty it's hard to resist! There's a certain magic about looking at the moving needle while working with sound that's hard to put in words.

And we're not settling for corner-cutting simplicity when it comes to this important aspect of the user experience. Observe how the VU meter actually behaves in this slow-motion video:

Recording of the VU meter in slow motion

Okay, something funky is going on...

How do we draw VU meter in mix:analog?

To understand all this fuss about a VU meter, let's first take a look at how we go about metering in general at mix:analog. If you don't know what mix:analog is, it's an online service for streaming analog gear rental. It enables you to process your audio in real-time over the internet with real analog gear from the cloud.

To control the custom automation circuitry that we put into every piece of gear to be offered online, we use custom electronics together with a microcontroller. This little guy communicates with the main control server, sends out commands to the automation, toggles switches and so on. If the device it controls is a dynamics processor, it has another important job. It samples the gain reduction control signal with it's built-in analog to digital converter (ADC).

This is how we connect the microcontroller to the compressor gain reduction meter

Those voltage measurements are then sent back to your computer browser tab along with the audio, to be used for drawing the VU meters on the GUI in sync with the arriving audio stream.

Job done! Or is it...?

It's not quite that simple.

That method certainly works, and in some cases, it works surprisingly well! Some dynamics processors, especially limiters, use a string of LEDs to indicate gain reduction that flash quickly in time with the actual compression. Small VU meters, especially SSL-type are fast and precise, so the method works there as well.

But the story of bigger, mechanical meters is completely different. These have a life of their own and rarely show the exact voltage - that's by design.

Wait, what? VU size matters?

In this case, certainly. It all boils down to the physics of moving objects. As the voltage is applied over the larger meter's coil and needle, the momentum they develop while moving is hard to get going and hard to stop once it is moving.

This phenomenon causes all kinds of lively behavioral traits like lagging and overshooting, which in the end make it look like a real, live thing compared to just drawing the voltage sampled by the microcontroller.

The solution

At mix:analog we're all about pure analog sound, so "analog modeling software" is the kind of feature we don't want to touch with a 10-foot pole for the audio we deliver. Any attempts to simulate analog sound with digital code is not something we do, even if we do have a DSP expert as a part of our core team.

On the other hand, DSP fits perfectly in simulating the more simple "swinging needle" problem in the video above and it does not influence the final output you bounce and download.

If you just want to see the result, feel free to skip to the end where there is a video of the solution - if you're interested in the technical details, however, read on...

VU behaves like a filter!

Overshooting, lagging, moving even when the stimulus has stopped... doesn't that sound familiar?! Resonant low-pass filters in vintage synths anyone?

Let's see what that looks like. The diagram may look intimidating, but let me explain.

Second order LPF filter system response diagram
Borrowed this diagram from HERE, as it describes the same thing but in much, much more detail and in fancy words and math equations.

Suppose the control voltage of a compressor jumps to a certain value from zero in an instant when a signal above the threshold hits the compressor. This is close to what the turquoise "1.0" line looks like - the GR needle will start to deflect and arrive at the correct value in a short amount of time.

In contrast, the larger VU meter initially overshoots, then swings back towards the actual GR value but undershoots just a little and finally settles on the actual value. That looks a lot like the green "0.5" line!

Interpreting the graph low-pass graph

What all that means is that the meter's needle mechanics naturally behave much like a resonant low-pass filter with a damping factor of around 0.5! Now, all we have to do is measure the corner frequency and construct such a filter!

To refresh our memory, here is a cut from the test slow-motion video + a stopwatch next to a meter reacting to a test signal and we have all the needed data to imitate that response from the voltages we sampled.

Filter design

Luckily, there are online tools available for fast filter design and prototyping, so you don't have to wade through pages of math to get somewhere. A little tweaking, trial and error, and here we go! This is what it looks like:

The only thing left to do was to transfer those equations to computer code that handles the meters (more math, not interesting enough to include here...) and the lifeless measurements from within the compressor were transformed into lively meter response, true to the actual thing. Finally!

This is the end result:


It might seem a bit over the top to go through all that trouble for a peripheral thing like a VU meter, but the smiles it brought to our (and beta testers) faces by going from "weird" to "right" were totally worth it! And the best thing is all of you, our users, get to experience the same charm too!

I'm going to go out on a limb here, but still - we tend to do our best work when we are excited and inspired by the process and the tools we use. So even a small and seemingly unimportant detail like the meter wiggling in just the right way might contribute another 5% to that excitement, make you enjoy the process and the tool more and consequently do a better job!

Thank you for reading :)

Want to know more about mix:analog?