• 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: Mixers and clipping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixers and clipping


  • Subject: Re: Mixers and clipping
  • From: Chris Rogers <email@hidden>
  • Date: Wed, 14 Sep 2005 12:24:02 -0700

Jens,

None of Apple's AudioUnits (except the output units) will clip the output to keep it within the ±1.0 range. This range is only the nominal range
for the signal and is only really important when delivering the audio to an output device through the CoreAudio HAL,
or output AudioUnit, or when writing to an audio file. When processing audio through a graph of AudioUnits, the individual
levels within each AudioUnit may exceed this range without any ill effects as long as the final result going to hardware
(or a file) *is* within the range.


There a few different ways to try to keep a signal within the nominal range. The AUPeakLimiter (or a 3rd party limiter) is one way.
A compressor can also help (such as AUDynamicsProcessor) although the signal will not be guaranteed to be within the range.
Another way is to use a waveshaper, such as a scaled arctangent function which will saturate the signal and enforce the ±1.0 range.
Of course, this will add harmonic distortion, quite audible if pushed too hard. Sometimes this "warming" effect can be desirable,
but is best performed at a higher sampling rate....


Chris Rogers
Core Audio
Apple Computer


On Sep 14, 2005, at 9:43 AM, Jens Alfke wrote:

How does the standard stereo-mixer audio unit handle clipping when the sum of the inputs exceeds ±1.0? I'm assuming that it probably just pegs the output level, although in the little bit of testing I've done, the results don't seem to sound as harshly distorted as I'd expect from that. Maybe I just didn't push it hard enough :)

If I did want to set up some kind of nicer "soft clipping", what would be the best way to do it? My first guess would be: Lower the volume on all the mixer inputs by, say, 2db, then run the mixer output through a PeakLimiter unit with a 2db pre-gain. Is that reasonable? I really don't know anything about the PeakLimiter (I haven't found any documentation on the standard audio units and their behavior, other than brief notes in AudioUnitParameters.h.)

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


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
References: 
 >Mixers and clipping (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Mixers and clipping
  • Next by Date: Re: AudioFileComponents
  • Previous by thread: Re: Mixers and clipping
  • Next by thread: Re: Quicktime support for Core Audio AudioFileFormat components.
  • Index(es):
    • Date
    • Thread