RE: LPCM Downmix Algorithm problem
RE: LPCM Downmix Algorithm problem
- Subject: RE: LPCM Downmix Algorithm problem
- From: "Edwards, Waverly" <email@hidden>
- Date: Mon, 16 Aug 2010 08:22:40 -0500
- Acceptlanguage: en-US
- Thread-topic: LPCM Downmix Algorithm problem
While I responded to what I **thought** may work and providing normalization
"mixedSample = SampleA + SampleB - SampleA * SampleB / 32768"
I reconsidered after reading your post. I realize that result is not going to be a mix
but heterodyning as you suggested.
W.
-----Original Message-----
From: coreaudio-api-bounces+waverly.edwards=email@hidden [mailto:coreaudio-api-bounces+waverly.edwards=email@hidden] On Behalf Of Brian Willoughby
Sent: Sunday, August 15, 2010 3:19 PM
To: email@hidden
Cc: coreaudio-api API
Subject: Re: LPCM Downmix Algorithm problem
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
_______________________________________________
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