• 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: Manually mixing audio on iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Manually mixing audio on iOS


  • Subject: Re: Manually mixing audio on iOS
  • From: Brian Willoughby <email@hidden>
  • Date: Tue, 03 May 2011 15:57:30 -0700


On May 3, 2011, at 08:28, Jan wrote:
Am 02.05.2011 um 21:29 schrieb Brian Willoughby:
Is there any knowledge or ideas about what Apple does internally in the multi channel mixer though? It has worked very well for me in the past.

Apple uses industry standard techniques. There is nothing special in there besides being thoroughly optimized for OSX and iOS hardware.

Would you have any more info on those industry standard techniques or where I can find out more about them?

Sorry for being obtuse, but I was trying too subtly to suggest that these are fairly basic principles of DSP. Once you get up to speed with audio DSP, it seems unlikely to me that you would even ask what Apple is doing. There really isn't more than one way to do this.



Mixing is addition. It couldn't be any simpler than that.

Gain is multiplication by a constant. Decibels are commonly used for the multiplication factors since we hear in relative volume changes rather than strict absolutes. But the translation from dB level to gain factor can be done once, and then you have a constant that can be used to scale every sample without calculating a transcendental every time. Note that if you change the multiplication factor, you can introduce frequency distortion if your gain changes have audible frequency components themselves, and thus many algorithms involve smoothing of gain changes.


... what I need is basically like the matrix mixer on Mac (which doesn’t exist on iOS), with 4 in/4 out channels and arbitrary routing between them.

Is that 4 in/4 out channels arranged as 2 stereo in/2 stereo out?

Regardless of whether you're dealing with 4 monophonic signals or 2 stereo, you should be able to recreate the matrix mixed with very simple addition and multiplication. The only challenge is that 8.24 fixed point math is generally faster on iOS, and that makes otherwise simple addition and multiplication a bit more of a challenge. But Apple's iOS audio examples show techniques for doing this.

Another challenge which is not necessarily part of the coding is how to avoid clipping. Generally, this is done by designing gain staging such that clipping isn't possible, or is minimal. The matrix mixed does not automatically solve clipping problems for you, which means that the matrix mixer is not doing anything magical.

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


References: 
 >Manually mixing audio on iOS (From: Jan <email@hidden>)
 >Re: Manually mixing audio on iOS (From: Kyle Sluder <email@hidden>)
 >Re: Manually mixing audio on iOS (From: Jan <email@hidden>)
 >Re: Manually mixing audio on iOS (From: Brian Willoughby <email@hidden>)
 >Re: Manually mixing audio on iOS (From: Jan <email@hidden>)

  • Prev by Date: Re: Manually mixing audio on iOS
  • Next by Date: Re: Has nobody used CoreAudio Clock?
  • Previous by thread: Re: Manually mixing audio on iOS
  • Next by thread: Re: Manually mixing audio on iOS
  • Index(es):
    • Date
    • Thread