• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mixer volumes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mixer volumes


  • Subject: Re: mixer volumes
  • From: email@hidden
  • Date: Thu, 10 Feb 2011 15:05:38 +0100

Thank you for your quick and informative reply, Brian!

I'll try asking the parameter.
Maybe I have to reduce the volume from the beginning so i can increase it when new sounds are added.
A limiter would be ok, too, but as I'm programming for iPad, I would have to write it myself. Hmm, maybe I could try that.


Thanks a lot,
Michael

Am 10.02.11 13:38, schrieb Brian Willoughby:

On Feb 10, 2011, at 02:50, email@hidden wrote:
i am using a multichannelmixer unit with multiple callback functions producing sound. to avoid noise i need to adjust the au input volumes ( kMultiChannelMixerParam_Volume ) when the number of used callback functions changes.
right now i'm just dividing the input maximum of 1.0 by the number of active callbacks, but that reduces the overall volume significiantly.
so the volume values do not seem to be linear.

Actually, what you are hearing does not indicate that the volume is not linear, but rather you have run into an inevitable aspect of mixing that has existed since before digital audio was invented. If you listen to a pure analog studio mix, such as Led Zeppelin's "Black Dog," you hear the solo guitar loud and prominent when it is the only instrument in the intro, but as each new instrument is added to the mix the volume of each individual channel drops significantly. The guitar is not nearly as loud later in the introduction, even though the style and mood would suggest that it should be, because the mixing engineer was forced to bring down the volume so that the overall mix would not overload. These are issues that studio engineers learn on the job, but they're no less necessary when writing audio software that implements a virtual mixer.


You will also see similar loss of volume if you investigate the Yamaha DX7 and similar FM operator synths. The more operators there are in the final stage of the selected algorithm, the quieter each individual operator will be. That's because there's no simple way to avoid the "noise" of clipping or other overflow.

The safest process is to take the reciprocal of the number of channels, as you're doing, even though that sounds excessive. With just two channels, each is reduced by 6 dB; with three, 9.5 dB; four, 12 dB; et cetera. There's no other way to be sure that the individual waveforms will not constructively combine and clip. The only other alternative is to use dynamic gain such as a limiter to protect against clipping. With the latter technique, you can get by with less volume reduction, but then you have to be willing to accept the effect of dynamic gain reduction and how that alters the sound.


does anyone know what the volume values (they range from 0.0 to 1.0) exactly represent? are they logarithmic?
how can i calculate them accurately according to the number of inputs?

Every AudioUnit reports a full description of every parameter. You should be able to query the kMultiChannelMixerParam_Volume and it will report whether it is logarithmic or linear. Keep in mind that it's your hearing that's logarithmic, so you can't necessarily judge what's happening by ear alone. Sometimes the correct processing sounds wrong or excessive to our ears, because our brains are concerned more with relative values than with absolutes.


P.S. You also cannot be certain that all inputs have a maximum of 1.0, unless you're reading them from a fixed point, lossless file. Both floating point formats (rare as those are) and lossy formats can go above 1.0, although the typical lossy file will only exceed 1.0 by a minor fraction of a decibel.

Brian Willoughby
Sound Consulting

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:


This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: mixer volumes
      • From: Brian Willoughby <email@hidden>
References: 
 >mixer volumes (From: email@hidden)
 >Re: mixer volumes (From: Brian Willoughby <email@hidden>)

  • Prev by Date: Re: mixer volumes
  • Next by Date: Re: mixer volumes
  • Previous by thread: Re: mixer volumes
  • Next by thread: Re: mixer volumes
  • Index(es):
    • Date
    • Thread