Re: [LAD] Calculate R M S

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-dev@...>
Date: Wednesday, February 16, 2011 - 8:33 pm

Le Wed, 16 Feb 2011 19:51:09 +0200,
Alfs Kurmis a écrit :


Loudness is an adaptive filtering that depend on the position of the
volume knob. At full volume, no filtering is done, at low volume, the
low and high frequencies are more amplified than the medium ones.

> RMS or +(average) or something else ?

In Audio, that is a mean to express or measure the sound volume.

It is different ways to measure the sound level. For low end home
equipment, the sinus power is used. Such a sound doesn't correspond
well to a real life situation, that is when your are listening to some
music. It can also be very stressful for an amplifier.

A much better way to express the power of a sound equipment, is to use
some kind of white or pink noise instead of a sinus. That is how the
rms power is measured. In such, it doesn't tell anything because you
have to know the condition of the measure (usually the characteristics
of the white or pink noise, and a given rate of distortion) in order to
be able to interpret it.

In practice, the rms power is usually a little bit lower than the sinus
power measured at the same rate of distortion.

> Is somewhere available examples how to calculate RMS ?

RMS is used in audio to express the power. By analogy, some
manufacturers are using it to express the output or input voltage
of their equipments. But it doesn't change anything, the math is always
the same with the db, When you are talking about power, you have
10 * log (P1/P2). When talking about voltage or current, it become
20 * log (U1/U2) = 20 * log (I1/I2)

The 0 db of an audio equipment is the maximum level it can handle at a
given rate of distortion, and with a given and constant waveform or

With the analog electronic, your equipment will be able to handle
higher values of the input signal during a short period of time (in
some cases even much higher values). This is what we call the headroom.
It can be expressed by the measure of the musical power, it is the
same issue than with the measure of the rms or sinus power, you have to
know the exact condition of the measure in order to be able to
interpret it.

In other words, the specifications must tell you enough in order to be
able to reproduce exactly the same measurements and all the described
measurements. If it is not the case, they are just bullshit.

Another issue is that it is no normalised way to measure and express
the specifications of an audio equipment. Each manufacturer is using its
own measure protocol. So, it can be difficult to compare them on the
paper. And many specification sheets are just bullshit because they
doesn't tell enough about the conditions of the measurements.

With a digital signal, you will get no headroom at all. The maximum is
when all the bits are to 1. If you add something, the bit number
doesn't change and you will get a wrong result.

It is one point on which jack with its floating point approach is
better. You can do calculations inside jack that will be outside the
scope of the sound card but valid inside jack. With a floating point
approach, you can define the 0 db to be somewhere on the middle, and do
calculations with a good approximation, calculations that would be
impossible in practice with an integer based system (because of the
added complexity to take the errors in account). Of course, you
will still have to insure that the d/a converters of the sound card will
handle the result of your calculation. Such converters know only about
integers, if the digital sound level inside jack is too high, it will
be clipped by the sound card.

Inside jack, all you will have to do is to be sure that the result
of your calculation will be inside the limits of jack. When outputing
to the sound card, a mixer and a vu-meter are good things to have.


"We have the heroes we deserve."
Linux-audio-dev mailing list

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Calculate R M S, Alfs Kurmis, (Wed Feb 16, 5:51 pm)
Re: [LAD] Calculate R M S, Jens M Andreasen, (Fri Feb 18, 1:16 am)
Re: [LAD] Calculate R M S, Georg Holzmann, (Thu Feb 17, 7:09 pm)
Re: [LAD] Calculate R M S, Dominique Michel, (Wed Feb 16, 8:33 pm)
Re: [LAD] Calculate R M S, Fons Adriaensen, (Wed Feb 16, 6:45 pm)
Re: [LAD] Calculate R M S, Mark Knecht, (Fri Feb 18, 7:30 pm)
Re: [LAD] Calculate R M S, Fons Adriaensen, (Fri Feb 18, 9:20 pm)
Re: [LAD] Calculate R M S, Mark Knecht, (Fri Feb 18, 10:38 pm)
Re: [LAD] Calculate R M S, Folderol, (Fri Feb 18, 9:24 pm)
Re: [LAD] Calculate R M S, Fons Adriaensen, (Fri Feb 18, 9:30 pm)
Re: [LAD] Calculate R M S, Alfs Kurmis, (Fri Feb 18, 5:53 pm)
Re: [LAD] Calculate R M S, Fons Adriaensen, (Fri Feb 18, 7:02 pm)
Re: [LAD] Calculate R M S - correction, Fons Adriaensen, (Fri Feb 18, 7:06 pm)