• 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: LPCM Downmix Algorithm problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LPCM Downmix Algorithm problem


  • Subject: Re: LPCM Downmix Algorithm problem
  • From: Brian Willoughby <email@hidden>
  • Date: Sun, 15 Aug 2010 12:18:45 -0700


On Aug 14, 2010, at 19:48, Bob Ingraham wrote:
To mix two 16-bit-signed samples:

MixedSample = Sample1 + Sample2 - (Sample1 * Sample2);
That's it? I don't have to apply and clamping or range checking or envelope manipulation or FFT conversion to the frequency domain or something like that?


I read two single-channel LPCM sources, and for each sample from each source perform the above equation and I should expect to hear a crystal-clear, non-static combo of both sounds?

That algorithm will not be clear at all. Any time you multiply two sources, you end up with a "mix" that includes the sums and differences of all the source frequencies. The result is very inharmonic. Even though you're subtracting the product, it's the same as adding a polarity-inverted signal. Basically, what you have is heterodyning, or FM. It's the furthest thing from a crystal-clear mix.


I think that the remainder of this thread has answered your questions. It also seems that you're working on iOS, where the DSP requires more advanced understanding of the format of the samples. Fixed-point DSP is not trivial, whether on CoreAudio or elsewhere.

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


  • Follow-Ups:
    • RE: LPCM Downmix Algorithm problem
      • From: "Edwards, Waverly" <email@hidden>
References: 
 >LPCM Downmix Algorithm problem (From: Bob Ingraham <email@hidden>)
 >Re: LPCM Downmix Algorithm problem (From: uɐıʇəqɐz pnoqɥɒɯ <email@hidden>)
 >Re: LPCM Downmix Algorithm problem (From: Bob Ingraham <email@hidden>)
 >Re: LPCM Downmix Algorithm problem (From: Paul Davis <email@hidden>)
 >Re: LPCM Downmix Algorithm problem (From: Bob Ingraham <email@hidden>)

  • Prev by Date: Re: LPCM Downmix Algorithm problem
  • Next by Date: MP3 decoder bug on iPod touch 2G
  • Previous by thread: Re: LPCM Downmix Algorithm problem
  • Next by thread: RE: LPCM Downmix Algorithm problem
  • Index(es):
    • Date
    • Thread