[comp.dsp] Digital Output and VU meters

malcolm@Apple.COM (Malcolm Slaney) (03/08/91)

OK, now for something different....I won't mention the words Ny**ist or
ov**samp****....  This isn't all digital but wreck.audio seems hopeless.

I have a bunch of digital sounds (both 8 and 16 bit) and I often copy
them onto video tape.  I was recently copying a tape and it was preceeded
by color bars with a 0dB tone.  That made it real easy to set the input 
level on the other deck....just match the 0dB.

So, now I want to do the equivalent thing with the digital audio that I'm
dubbing onto video tape.  The question is....what digital levels would
best correspond to 0dB?  Should I put in a full-scale sine wave at some
frequency and assume that my real signals will be ok?  Most of my digital 
samples are full-scale speech.  (i.e. they are scaled just enough so they 
don't clip.)   I don't understand VU meters and tape saturation well enough
to know where to start.

Perhaps it makes sense to find the peak power in my full-scale digital
speech signals, and then generate a sine wave with the same power and call
that 0dB.  What do people think?

								Malcolm

mcmahan@netcom.COM (Dave Mc Mahan) (03/09/91)

 In a previous article, malcolm@Apple.COM (Malcolm Slaney) writes:
>I have a bunch of digital sounds (both 8 and 16 bit) and I often copy
>them onto video tape.  I was recently copying a tape and it was preceeded
>by color bars with a 0dB tone.  That made it real easy to set the input 
>level on the other deck....just match the 0dB.
>
>So, now I want to do the equivalent thing with the digital audio that I'm
>dubbing onto video tape.  The question is....what digital levels would
>best correspond to 0dB?  Should I put in a full-scale sine wave at some
>frequency and assume that my real signals will be ok?

It all depends on the gain of your amplifiers and stuff.  The easiest way
to do that with the equipment you have is to just record a digital tone
with a known amplitude and then play it back to see what kind of power shows
up on the VU meter.  Then, adjust your amplitude to get 0 dB.  You just have
to make sure any level adjustments are always the same when you repeat the
technique in the future.

>								Malcolm

   -dave


-- 
Dave McMahan                            mcmahan@netcom.com
					{apple,amdahl,claris}!netcom!mcmahan

malcolm@Apple.COM (Malcolm Slaney) (03/13/91)

In article <27517@netcom.COM> mcmahan@netcom.COM (Dave Mc Mahan) writes:
>It all depends on the gain of your amplifiers and stuff.  The easiest way
>to do that with the equipment you have is to just record a digital tone
>with a known amplitude and then play it back to see what kind of power shows
>up on the VU meter.  Then, adjust your amplitude to get 0 dB.  

I guess I didn't ask my question very well.

What does 0VU really mean?  I assume it is power related but I'm not sure of
all the nuances.....and I suspect that there is a temporal dimension to it.
Otherwise why would Nackamichi make such a big deal about their peak VU
meters?  Are VU's constant across frequencies?

So, what is 0 VU really mean?  I want to know so that I can consistently 
normalize my speech signals.  The energy in a digital impulse train is very
different from a full-scale sine wave.  Speech is somewhere in between.  Just
how high can I crank the analog gain before I saturate the tape with random
speech data?

Thanks.

								Malcolm

stephen@corp.telecom.co.nz (Richard Stephen) (03/13/91)

References: <50010@apple.Apple.COM> <27517@netcom.COM>
            <50146@apple.Apple.COM>
In article <50146@apple.Apple.COM> malcolm@Apple.COM (Malcolm Slaney)
writes:

<In article <27517@netcom.COM> mcmahan@netcom.COM (Dave Mc Mahan) writes:
<>It all depends on the gain of your amplifiers and stuff.  The easiest way
     ...etc...
<
<What does 0VU really mean?  I assume it is power related but I'm not sure of
<all the nuances.....and I suspect that there is a temporal dimension to it.
<Otherwise why would Nackamichi make such a big deal about their peak VU
<meters?  Are VU's constant across frequencies?
<
<So, what is 0 VU really mean?  I want to know so that I can consistently 
<
   ...etc...

I think there are 3 interlocked issues here that have got in a tangle:

1. the nature of speech
2. what is VU
3. recording DIGITAL 8,16 bit speech on tape (tape recording parameters)

In my opinion, Dave McMahan's reply was a valid approach.  Here I'm
assuming you are going through a D/A to get DIGITAL speech (samples)
through an analog video recorder onto tape.

The binary (2's complement ?) code that represents your speech (be it
8 or 16 bit is referred to the maximum analog voltage swing your original
A/D was designed to handle - ie the peak-peak dynamic range. Lets use
5V as the example. Your D/A will also be referred to some voltage
reference (usually the supply voltage). Obviously, you can't apply a +,-5V
signal to the input of a video (audio) recorder without overloading the
circuits. So you have to scale the output from your D/A. 

Another approach  to Dave's might be to scale the maximum digital code
based on a 1KHz sinewave so that with your recorder gain control flat-out,
you insert sufficient external attenuation so that it gives you 0VU on
your meter. This will guarantee that you never saturate the tape, but
it *won't* necessarily give the best use of the available dynamic range
(of the tape).  Alternatively, you could scale to +3 or +6 VU. This
will take the signal to the upper limit of the tape flux-density and
give better use of the available dynamic range. What's important here
is not so much the absolute value/level chosen, but consistency. Do the
same thing every time.

The basis for what I've said above (and explain VU) follows.

For the present, sticking to just "analog" speech:

To answer 2, we have to explain a bit in 1. Fundamentally, the speech
signal can be described as a "quasi-stationary" signal. Over very short
time intervals (20 ms typical), a given "snapshot" of speech has a
well-defined amplitude and phase structure that you can shove through an
FFT and get an (approximation) of the spectral energy. However, every
other 20ms segment is observably different. If you "time average" the
spectral energies of many 20 ms segments you get the well known (long
term) formant structure of speech.

The non-stationary nature of speech thus causes problems when attempting
to define and measure signal power. rms and peak measures cannot be
applied in a meaningful way. To try and get around this problem the
"volume unit" (VU) was invented. This unit of measurement is related to the
LOUDNESS of the signal and relies on *both* an electrical reference level
relative to an rms value of a sinewave and the dynamic characteristics of
the (analog meter) instrument and the time constants (ballistics) of the
meter movement. Read:

CHINN HA, GANNETT DK, MORRIS RM : A New Standard Volume Indicator and
Reference Level, Bell System Tech. Journal, Vol 19 No 1, 1940,
pp 94-137 (January).

Life was fine until LED's and fast opamps came along which can provide
real-time peak responding meters.  Practical implementations and circuits
have time constants built into them  so that they represent the signal
power in some manner, but are capable of responding much faster than an
analog meter movement, so they can display "instantaneous peaks" more
accurately. However, for *speech*, instantaneous peaks are irrelevant
because they occur infrequently. This is related to the signal amplitude
probability distribution. In 1962 a researcher at British Telecom in
discussing a choice of PCM companding law indicated that a total dynamic
range of 62 dB was theoretically required (for telephone speech), but that
a dynamic range of 38 dB was ok for 99.95% of all conversations!

[ PURTON RF: A survey of Telephone Speech-Signal Statistics and their
  Significance in the choice of a PCM Companding Law., Proc. IEE, Vol
  109B 1962 pp 60-66 (the English IEE, *not* the IEEE)  ]

All of the above comments go out the window when we talk about (pure)
*music* signals because they are totaly different. However, audio and
video recorders find their main application in recording mixed-mode
signals.

It has been my experience (with analog audio recorders) that
the (VU) calibrations are based on an electrical rms sinewave reference
level that causes a recorded magnetic flux density of 250 nWb/m2
(nano-Webers per square-meter). In fact there are EIA (US) and DIN
(Europe) standards that define such things. In practice, I have found
for better quality tape decks, calibration methods specify 0dB sinewave
at 1KHz (or 800 Hz) = 0VU (and corresponds to the  250 nWb/m2) with the
front panel recording level control set flat out. The same sort of
approach must apply to your video recorder, otherwise as you observe, you
run straight into tape saturation problems.

The next trick is to define "0 dB". This I have found can be one of two
things: a) it represents an input rms sinewave (1KHz) analog level that
gives a prescribed test VOLTAGE level at some point in the recording/playback
chain, or b) it represents 0 dBm analog input. ( 0 dBm = 1 mw across 600
ohms).

============================ Richard Stephen ===============================
|   Technology Strategy             |      email: stephen@corp.telecom.co.nz
|   Telecom Corporation of NZ Ltd   |      voice: +64-4-823 180
|   P O Box 570, Wellington         |        FAX: +64-4-801 5417
|   New Zealand                     |

mc@flutter.tv.tek.com (Mike Coleman) (03/14/91)

In article <50146@apple.Apple.COM> malcolm@Apple.COM (Malcolm Slaney) writes:

   What does 0VU really mean?  I assume it is power related but I'm not sure of
   all the nuances.....and I suspect that there is a temporal dimension to it.
   Otherwise why would Nackamichi make such a big deal about their peak VU
   meters?  Are VU's constant across frequencies?

   So, what is 0 VU really mean?  I want to know so that I can consistently 
   normalize my speech signals.  The energy in a digital impulse train is very
   different from a full-scale sine wave.  Speech is somewhere in between.  Just
   how high can I crank the analog gain before I saturate the tape with random
   speech data?


If you want to know what a VU meter is, there is an ANSI/IEEE standard
(152-1953) describing it.  There IS a 'temporal aspect' to it, described by
the indicator's response to tone bursts:

-  A VU meter must respond to 99% of its final value within 300
   milliseconds +/- 10%.

- It must overshoot at least 1% but not more than 1.5%.

- The indicator must fall to a rest position from 0 VU in 300 milliseconds
  +/- 10% after removal of a signal.

This can be achieved with a damped two-pole response, with a frequency of
2.1 Hz and a Q of 0.62 according to one of our analogue designers.

As far as a description of the actual steady-state electrical level
necessary to deflect the meter to 0 VU, this differs among users.  It is
customary to make 0 VU correspond to the level of a sinewave that is 8 dB
below the "peak program level" on an audio line.  0 VU should be at least 8
dB below clipping, for example.

Modern broadcast studio practice seems to put 0 VU at about 4 or 8 dBu.  A
dBu is a voltage measurement, relative to 0.775 volts RMS.

There is no standard I am aware of that relates a digital audio level to a
desired VU level.  If I were making a digital '0 VU' tone, I would make it
a sinewave at 8 dB below the largest sinewave you can represent with your
digital code.

Note that there are other, better metering standards than VU for most
purposes.  If you have questions, send email to me.

Mike Coleman  (mc@flutter.tv.tek.com)
Tektronix

jensenq@iconsys.icon.com (Quinn Jensen) (03/14/91)

> What does 0VU really mean?  I assume it is power related but I'm not sure of
> all the nuances.....and I suspect that there is a temporal dimension to it.

If I recall correctly, 0 VU equals 1 milliwatt sinusoidal RMS
into 600 Ohms (probably 1 kc is the standard tone).  So if you have
a 600 Ohm output with a 600 Ohm load, 0 VU is somewhere around .77 V RMS,
which is about 1V peak or 2V peak-to-peak.  So if you know what code
on your DAC would produce that voltage, then you'd have a standard 0 VU.
But that may not be as important as just providing a dancing bar graph
with an arbitrary 0 VU.

jensenq@iconsys.icon.com (Quinn Jensen) (03/14/91)

From article <50146@apple.Apple.COM>, by malcolm@Apple.COM (Malcolm Slaney):
> What does 0VU really mean?  I assume it is power related but I'm not sure of


Here is a short article a friend of mine wrote about VU and audio calibration
in rather lay terms but I think it answers the question.  Please direct 
comments to the author.


------------------------------ cut here -------------------------------


	Recording Standards - Background Information & Terminology
	----------------------------------------------------------

	by Brian Minert (hellgate.utah.edu!uplherc!wicat!meph!minert)


Most of our present-day audio standards work was done over 50 years ago,
and we owe much of the work to the telephone and movie/recording industries.

dB Measurement
--------------
For example, while Harvey Fletcher was working for old Bell Telephone,
he developed technology for carrying phone conversations to long distances
by using repeaters at specific intervals along the way.  The length of the
interval was determined by the audio level, and when the audio power was no
longer high enough, it had dropped "1 Bell" and had to be boosted by a repeater!
It was soon found that dividing the unit into 10ths became easier to work with,
hence the deciBell (dB) was born.  

As a unit of measurent, the dB is RELATIVE, NOT ABSOLUTE.  For example, a 3 dB
increase indicates doubling the power, while a 3 dB decrease represents reducing
the power by half.

Test Milliwatt
--------------
In order to test and calibrate various instruments, a standard known as the
"Test Milliwatt" was adopted in 1939.  It is essentially a 1000 Hz tone across
a 600 Ohm resistor such that 1 milliwatt is dissipated by the resistor (That
calculates to a voltage of about .7746 Volts RMS).  Again, this was a telephone
company standard that grew to wider application.  The great value in the Test
Milliwatt reference is that it defines an absolute power level.

dBm Measurement
---------------
Now we have the relative measure of power, the dB, and an absolute power
reference level, the Test Milliwatt.  Industry chose to measure power levels
in dB, using the Test Milliwatt as the reference.  Enter dBm!  When measuring
a Test Milliwatt, the result is 0 dBm, or 0 dB referenced to the Milliwatt
(Test Milliwatt).  Thus measurements in dBm represent absolute levels, and
therefore are of the proper form to be used as calibration and recording
standards.

Power Level Calibration
-----------------------
The history of audio calibration involves the term "100% modulation", or
"how much power can I get out of this thing?".  High-end power is therefore
used, while still avoiding major distortion.  Please be aware that a CALIBRATION
standard is NOT the same as a RECORDING standard.  Calibration is performed on
the recording equipment, after which the recording takes place at the level
APPROPRIATE TO A SPECIFIC MEDIA/TECHNOLOGY.  For example, reel-to-reel mag
tapes are often recorded at +4 dBm, while digital CVSD might be recorded at
-10 dBm.

						Recording Standards - Page 2

Distortion
----------
I just used the term Distortion without defining it.  Here goes!  When the
original analog waveform shape is altered from its' true form, it is called
distortion.  Some examples include:

	Clipping Distortion - the waveform is amplified so high that the
			signal peaks attempt to go beyond the amplifier
			voltage range.  The result is a plateu (flat top)
			effect on a sign wave.

	Phase Distortion - electronic components such as capacitors and
			inductors respond differently at different frequencies.
			When such effects are prominent, the audio signal
			is slightly delayed in a frequency-dependent manner.
			Proper design and proper connections between
			equipment avoid phase distortion.


Noise Floor and Distortion Threshold
------------------------------------
How is the appropriate record level decided?  Each technology has a level of
silence.  Examples include a blank tape, uLaw PCM FF pattern, etc.  When
"silence" is played, there is always "hiss" that can be heard and measured at 
some low level.  That level is known as the Noise Floor.  Floor noise is 
caused by imperfections in the power supply, amplifiers, etc.  For good audio 
equipment, the noise floor will be far below -70 dBm. 

In reversal, there is some maximum input level that can be tolerated, above
which clipping (sine wave peaks are flattened on the top) or other types
of distortion become significant.  This is called the Distortion Threshold.
For example, telephone levels must be limited to +6 dBm, and even that is
unpleasant.

Signal-to-Noise Ratio
---------------------
We are now left with some number of dB between the Noise Floor and the
Distortion Threshold.  It is between these two levels that usefull recording
takes place.  This number of dB between the two levels is called Signal-to-
Noise Ratio.  For most technologies, this full range cannot be used.

Dynamic Range
-------------
For most technologies, there is a "lowest record level".  In PCM, that is heard
by alternating between FF/7F (silence) and FE/7E (almost silence).  The highest
level is heard by using values of 00/80.  The difference between these two levels
is the dynamic range, meaning the range over which there can be level change.
Dynamic range is almost always less than the Signal-to-Noise Ratio, because
recording levels need to keep well away from the Noise Floor and Distortion
Threshold.

						Recording Standards - Page 3

dBm Recording Level and Headroom
--------------------------------
Recording Level (in dBm) represents the average power level seen during an
audio sample (typically of 10 seconds length).  A Record level is chosen
for a particular media by choosing a level far enough above the lowest record
level (which is already well above the noise floor) to record quiet sounds,
yet leaving much of the available dynamic range above it to safely record the
peaks naturally associated with human speech.  The area between the Record
Level and Distortion Threshold is called Headroom.  The actual value chosen
for recording a particular media or technology is then based on experience
and best judgement.

VU Meter
--------
One of the most popular instruments ever used while recording audio is the
VU meter.  It was in use as early as the 1920's, and the movie industry was
using it by the 1930's.  It is a mechanical device meant to respond in a manner
similer to the human ear, and displays an indication somewhere between peak
and average for complex (speech/music) waveforms.  VU is dimensionless, where
units of VU refer only to the VU itself.  It is a relative measure only, and
is used in the following manner:

	In a recording studio, the calibration engineer will adjust calibration
	(calibration = "hidden and not to be touched") levels FOR THE
	PARTICULAR MEDIA TO BE RECORDED ON, such that the proper dBm level is
	being recorded on the particular media when the VU meter is "bumping"
	on 0.  The calibration engineer then locks the cabinet.

	The studio recording technician now uses the studio for recording audio.
	He adjusts mixer inputs such that 0 VU is his goal, based on judgement
	and experience.

Again, VU meters themselves display only relative measurements, not absolute
levels.  When properly calibrated to a particular media, it will indicate the
safe recording zone for studio work.  As you can see, it is totally impossible
to discuss level standards in terms of VU, because any standard can be met at
0 VU by proper studio calibration!

malcolm@Apple.COM (Malcolm Slaney) (03/15/91)

In article <1991Mar13.103618.15519@corp.telecom.co.nz> stephen@corp.telecom.co.nz (Richard Stephen) writes:
>CHINN HA, GANNETT DK, MORRIS RM : A New Standard Volume Indicator and
>Reference Level, Bell System Tech. Journal, Vol 19 No 1, 1940,
>pp 94-137 (January).

Oooh, good article.  It was fun to read about how this idea (VU) which is
taken so casually now has a very well thought out rationale.

Turns out they spent most of their time comparing RMS meters to peak reading.
They decided that peak meters are more accurate (give you an extra dB of level
before distortion becomes noticeable) but the peaks could be badly messed up
in a transmission network (due to different phase delays).  In the end they
concluded
	The tests of aural distortion due to overload showed a slight 
	disadvantage for the r-m-s instrument and the experiments on peak
	checking showes such a marked advantage for this type (rms) as
	compared to the peak instrument, that it was decided to develop
	the r-m-s type of instrument.
They continue to say (!!!!)
	Another consideration was that, with the advances in copper-oxide
	types of instruments, it has become possible to make r-m-s 
	instruments of sufficient sensitivity for most purposes without
	the use of vacuum tubes and their attendent need of power supply....

They also talk about the normal difference in levels between a peak meter
and an RMS meter.  This is relavent for digital systems since signals are
normalized to be full scale in the word
	Male Speech			10dB
	Female Speech			8dB
	Piano				7dB
	Brass Band			7dB
	Dance Orchestra			4dB
	Violin				5dB

Somebody suggested calibrating my system with a sine wave that was 8dB down
from the digital (full-scale) peak.  That sounds like a pretty good rule
of thumb.

Many thanks for the help!

								Malcolm

jh@moon.nbn.com (John Harkin) (03/16/91)

mc@flutter.tv.tek.com (Mike Coleman) writes:
>There is no standard I am aware of that relates a digital audio level to a
>desired VU level.  If I were making a digital '0 VU' tone, I would make it
>a sinewave at 8 dB below the largest sinewave you can represent with your
>digital code.

You're right, there is no standard, although there are common practices.
In music recording, it depends on the the type of music.  Classical 
folks often set their digital recorders with 0VU 20 dB below clipping.
Rock and roll is usually 14 dB below clipping.  Laser discs have their
digital sound tracks at 15 dB below clipping.

I've always gone on the assumption that the peak to average ratio in 
music is 10 dB, so 0 VU should be at least that far below the limits
of the medium.

John
-- 
John Harkin    +1 415 472-2452    uunet!moon!jh    jh@nbn.com
North Bay Network - News and mail for Marin county and vicinity