Volume Equilizer

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
that schematic would be just about right for what I was looking for, except I want to try and make an automatic way to normalize the audio signal to the same level. That way I can plug in just about any device and it will have the same audio level output.

My basic thought as of right now is to match the input signal to the smallest saved input signal. this can be done by making a peak detector circuit to find the peak audio level, which will then be compared with saved previous values. then a simple volume control device can be used bring down the current signal to the same level of the smallest saved signal level.

unless there is an easier way? or if my logic is flawed with the peak detector circuit? any other suggestions?

though all of the suggestions are nice to see, and if anyone has any other idea's, or schematics, please post them. Thanks to everyone who has helped so far!
 
Administrator
Joined 2007
Paid Member
I still think a simple circuit like mine or Wakis is the most straightforward...

Waki :) just check your diagram again... a couple of typos have crept in. Just if anyone built it "as is".

gkhnoisgtht,
An example... if you take a CD player with 2vrms max output and an old 70's cassette deck with DIN outputs and feed each into the same amp then one is going to sound much louder than the other.

The circuits above are the easiest way to "equalise" using no more than a single different resistor on each input.

If you are trying to "level out" the audio signal then that's not easy.
To do it in the analogue domain in "real time" works... it was often included in old cassette decks etc... and the secret to it was to have a long time constant on the AGC.

To use a peak detector to compare and store levels...
Modern sources (CD/DVD etc) have absolute limits on max signal levels anyway. So the peak is precisely that... how often anything approaching that comes along is impossible to say.
To store values... how ? in flash memory or a PIC is way beyond my skills with programming... but even so I can't see it achieving what you want.

If you want to make the quiet bits louder and the loud bits quieter then that's a dynamic real time process whether analogue or digital.
 
Peak levels won't tell you how 'loud' you perceive it to be. What you really need is a way to measure the average RMS power and adjust gain to achieve a target value. In Adobe Audition I shoot for levels between -15 to -17 dB average RMS to get consistent 'volume'. Already compressed audio sometimes shows peaks of only -6 dBfs while lightly compressed may get some mild clipping at -15 dB average RMS. This is not compressing the audio, just doing intelligent auto preset. It's not an easy fix in real time.

 
so an automatic way of adjusting how 'loud' the output is seems to be a much more complicated issues than I thought...

so then taking the circuit above, if I place digital pots to make adjustments, and a micro to control the pots. I could equalize the audio levels at the input. I would then check the output Vrms to ensure that they have the same volume and adjust the pot based upon the value given to me by the output Vrms. Am I on the right track if I want to have the same relative volume level as an output no matter the input device?
 
that's what I would do. in fact, I did it and it works very nicely ;)

I never wanted anything automatic but i did want to account for variations in input or output device sensitivities and having a 'fixup' factor was really all that I needed. my approach was to have fixed gain and vary the input attenuator based on the input (or even output) selected.

the next level of evolution is to involve (for me) the notion of *paths* and not just inputs or outputs. ie, you might have a few inputs that need to be level matched, but you might also be going to different outputs, perhaps a speaker amp for one session and later on, you switch that off and you want to listen to headphones. once I thought about it to this extent, it became clear to me that input levels or output levels (ie, gain settings associated with just single dimension selected channels) was not enough and the whole end-to-end path would really need to be considered.

unfortunately, I ran out of flash, ram and eeprom (damn!) in my arduino project and could not really go beyond simple input level last-used settings. but if I had more free program space, I definitely would involve the notion of paths instead of just inputs or outputs and adjust gain or atten a bit more intelligently.
 
To do it in the analogue domain in "real time" works... it was often included in old cassette decks etc... and the secret to it was to have a long time constant on the AGC.

time constants really annoy some users. if that was the only solution, it would be one thing; but its not, and so why would anyone have to put up with pump/breath effects when a static but adjustable gain system is all that's needed?

compressors of any kind are pretty destructive to the 'purity'. people on these forums argue forever about which resistor to use and which op-amps or discrete buffers to use, which power supplies and so on. yet you would consider a *harmful compressor* in the audio chain?

time constant or not, it wreaks hell with the audio. its a solution from 20 yrs ago, but today we can do a lot better and for cheap, too.
 
that schematic would be just about right for what I was looking for, except I want to try and make an automatic way to normalize the audio signal to the same level. That way I can plug in just about any device and it will have the same audio level output.

Sounds like the mythical Dolby Volume circuit. When you say any device, would that include consumer -10dB, professional +4dB, and MP3 headphone output?

:)ensen.
 
Hi gkhnoisgtht-

If I understand correctly what you're trying to accomplish here; some way of building an automatic loudness leveling system, it won't be easy.
Consider what a device designed to accomplish that would have to do. First, you need to define the desired average loudness level. Then the level of ALL of your source material, that is; the music files on audio CDs, individual tracks on LPs, audio from DVDs, etc. would have to be known before playback so the adjustments could be applied during playback. In other words, all of the the source material average levels would either have to be pre-determined in advance and the information stored somehow, or all of the desired material for every session would need to be played or pre-scanned immediatly before playback every time. In my opinion, it would require more engineering effort than it would be worth in the final analysis. The only other option for an automatic system as others here have already pointed out, would be to use a compressor, which would alter the signal by reducing the dynamic range, not a good choice at all.
For many of my own designs, I've used indvidual input attenuators right after each input jack. That way you can adjust the average loudness level to be more uniform from every source, and you can also correct any channel imbalance the some devices have at thier outputs.
But keep in mind, there is no set standard with regard to loudness levels in recorded material, so volume adjustments are almost inevitable.

Just my $.02 worth.
 
you don't want to consider the source *material* since that should be normalized via 'replay gain' as its often called. if you need to make one song sound a bit louder, you associate a replay gain factor with that file and your media player would, in theory, convey this info to the volume control system somehow. admittedly this link is not existent in many systems and additionally, most people never go thru this effort to have replay gain factors with their source material.

I don't think you want to mix the concepts of RPG with source/sink level matching. it seems those are better treated on their own.
 
Administrator
Joined 2007
Paid Member
so an automatic way of adjusting how 'loud' the output is seems to be a much more complicated issues than I thought...

The way you describe it seems to be... ;)

so then taking the circuit above,

Which won't work as it stands... but non the less, let's assume it does.

if I place digital pots to make adjustments, and a micro to control the pots. I could equalize the audio levels at the input.

OK... so each input can have its sensitivity adjusted under control of uP.

I would then check the output Vrms to ensure that they have the same volume and adjust the pot based upon the value given to me by the output Vrms. Am I on the right track if I want to have the same relative volume level as an output no matter the input device?

This is where to me it all falls down.

The output Vrms is dependant on the setting of the pot.
So what you are really saying is that the input Vrms has to first be determined, then this value is compared against some reference value and the gain set accordingly.
The input can vary though! as music etc tends too... so if the gain is continually altering that is going to be audible and the dynamics lost.

Am I on the right track if I want to have the same relative volume level as an output no matter the input device?

I don't think so... what you are describing is achieved with the simplest of circuits... one in which each input has adjustable sensitivity.
 
Administrator
Joined 2007
Paid Member
For many of my own designs, I've used indvidual input attenuators right after each input jack. That way you can adjust the average loudness level to be more uniform from every source, and you can also correct any channel imbalance the some devices have at thier outputs.
But keep in mind, there is no set standard with regard to loudness levels in recorded material, so volume adjustments are almost inevitable.

Just my $.02 worth.

Exactly :)
 
so the idea of having an automatic volume adjustment isn't really feasible it seems?

thank you everyone who has offered idea's and suggestions. This has really been an enlightening weekend. I will have to look over some of your projects and see if I can figure out any alternate way to accomplish my goal.
 
o before I forget:

if you have a signal going into a device, then switch to another device (that is significantly louder than the previous) is there a way to automatically attenuate the second signal so that your not blasted out of the water by the volume difference, or blow out speakers?

would that be an easier goal than my other idea?
 
o before I forget:

if you have a signal going into a device, then switch to another device (that is significantly louder than the previous) is there a way to automatically attenuate the second signal so that your not blasted out of the water by the volume difference, or blow out speakers?

would that be an easier goal than my other idea?

When I switch from cable box, I lower the volume before playing a DVD, then turn it back up. Same with playing something from my laptop, or even when switching from DVD to CD in the same changer carousel.

:)ensen.
 
Administrator
Joined 2007
Paid Member
o before I forget:

if you have a signal going into a device, then switch to another device (that is significantly louder than the previous) is there a way to automatically attenuate the second signal so that your not blasted out of the water by the volume difference, or blow out speakers?

would that be an easier goal than my other idea?

This is what we are trying to say :)

If this "device" is an amplifier then all you do is arrange for each input e.g. CD, DVD, TAPE, TUNER ETC ETC to have it's own resistor (just one for each channel and each input) that gives equal volume from each source.
 
o before I forget:

if you have a signal going into a device, then switch to another device (that is significantly louder than the previous) is there a way to automatically attenuate the second signal so that your not blasted out of the water by the volume difference, or blow out speakers?

would that be an easier goal than my other idea?

If you implement Mooly's idea of presetting the audio levels to a nominal value you really shouldn't have problems unless you have some really bizarre recordings. I have some early Deutsche Grammophon CDs that had a ridiculous amount of headroom meaning they were unusually low levels compared to the average but they were the exception.

You could build a microcontroller switching system that muted the audio and then ramped it back up after the switch selection but you'd still have do deal with the change though you'd have a few seconds to do it. The rest of us just know to back off the volume before switching sources. A lot cheaper that way.

 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.