Re: channel layouts and up/down mixing

On Sat, Jan 12, 2013 at 9:25 AM, Chris Rogers <crogers@google.com> wrote:

> 3. Ad-hoc speaker arrays.  Some sound installations and research centers
> (CCRMA, etc.) have non-standard/custom speaker arrays.  For these types of
> applications, we would simply like to output N channels which are connected
> in somewhat arbitrary ways to speaker arrays.  The web application itself
> would be written specifically to output the channels in such a way that
> make sense for the particular application.
>

As a rule we don't need to worry too much about situations where a
particular app is used by a single person or organization. They can mandate
use of a specific software configuration --- possibly even customizing the
browser in various ways --- so interop isn't really an issue.

But the other situations you described are very good reasons for
standardizing at least the mixing of arbitrary numbers of channels.

So we have a variety of situations when we're dealing with multiple
> channels, many of which not relating to "speaker layouts".  But your
> question is a good one about how to deal with up-mixing and down-mixing.  I
> think that the current spec describes the common cases, but for other cases
> we have to do something, and in the absence of any additional specific
> "speaker layout" information we should up-mix and down-mix as follows:
> * up-mixing N -> M channels should simply copy/pass-through the N
> channels, and zero out the remaining (M - N) unused channels
> * down-mixing N->M channels can copy the first M channels from the input
> and discard the remaining (N - M) channels
>

Hmm. What about 6.1 and 7.1 surround? I would have thought we should
support them somehow. What you propose here would not work when upmixing
mono to 7.1, for example. Maybe we could defer 7.1 support until we have
some extra API for customizing channel layouts, but then authors would
always have to explicitly opt in to get correct handling of 7.1.

How about this alternative:
-- Explicitly define layouts for 3 and 5 channels, and how they mix with 1,
2, 4 and 6 channels, so all combinations up to 6 channels are fully
defined. (One way to simplify that, if we don't care much about those
layouts, would be define up-mixing from 3/5 to 6, and down-mixing from 6 to
3/5, and get all the other combinations by going through 6.)
-- For upmixing N -> M where M > 6, if N >= 6 then copy the N channels and
zero the M - N channels. Otherwise up-mix N to 6 channels following the
spec, then copy those 6 channels and zero the M - 6 channels.
-- For downmixing N -> M where N > 6, if M >= 6 then copy the first M
channels and drop the remaining N - M channels. Otherwise down-mix the
first 6 channels and drop the remaining N - 6 channels.

In the Web Audio API, most of the operations are up-mixing operations.  For
> example when multiple connections to an input occur, all the connections
> are up-mixed to the highest number of channels.
>

Hmm yes. Interesting.

Thanks,
Rob
-- 
Jesus called them together and said, “You know that the rulers of the
Gentiles lord it over them, and their high officials exercise authority
over them. Not so with you. Instead, whoever wants to become great among
you must be your servant, and whoever wants to be first must be your
slave — just
as the Son of Man did not come to be served, but to serve, and to give his
life as a ransom for many.” [Matthew 20:25-28]

Received on Friday, 11 January 2013 21:45:05 UTC