Re: Reconciling ConvolverNode's output channel dependencies with the mixing rules in the spec

On Fri, May 17, 2013 at 11:20 AM, Frederick Umminger <
frederick.umminger@gmail.com> wrote:

>
> On Thu, May 16, 2013 at 4:05 PM, Ehsan Akhgari <ehsan.akhgari@gmail.com>
>  wrote:
>
>> On Thu, May 16, 2013 at 5:37 PM, Chris Rogers <crogers@google.com> wrote:
>>
>>>
>>>
>>> Actually, the way I'd describe it (and the way WebKit/Blink implements
>>> it) is that the output is hard-coded to 2-channels (stereo) very much in
>>> the same way that PannerNode is.  We should add the text:
>>>
>>> "The output of this node is hard-coded to stereo (2 channels) and
>>> currently cannot be configured"
>>>
>>> That means that the "Mono" case in the diagram currently never happens
>>> and that "Mono to copied Stereo" is used when N=1,K=1
>>>
>>
> This does not make sense to me. Why would we be hard-coding an assumption
> of stereo here?
> Convolution can be used for any number of inputs and outputs.
> And it will be used with multiple outputs for surround reverb support. We
> are supporting surround, right?
> It will also probably be used to implement unexpected effects other than
> reverbs.
>

Yes, we can support surround.  Please note the sentence "Without loss of
generality, developers desiring more complex and arbitrary matrixing can
use multiple ConvolverNode objects in conjunction with an
ChannelMergerNode." in this section:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Convolution-reverb-effect


>
> If a channel assumption had to be hardcoded for output, the assumption
> should be a mono output since mono channels can be combined to get the
> general case.
>

Most applications for convolution are for reverb which is most commonly
stereo.  That's why this node "comes out of the box" as stereo.  We can
certainly handle the general cases too.


>
> The way this should work is that a ConvolverNode converts N inputs to M
> outputs and there must be K=N*M impulses.
>

This is a bit limiting and inefficient in the common case of N=2, M=2 where
we wish K=2.  The cases "Normal Stereo" and "True Stereo" are both valid.


> K should not be independently settable, because no other value makes sense
> for what is essentially a matrix multiplication.
> Any value other than K=N*M is an error, or reflects some particular
> non-general assumption.
> If M does not match the number of inputs to the next node, then down- or
> up- mixing happens after the convolution effect.
>
> Sincerely,
>     Frederick
>

Received on Friday, 17 May 2013 19:02:27 UTC