Re: The output of ConvolverNode in the absence of a convolution buffer

Den 2013-06- 01:58:58 skrev Chris Wilson <cwilso@google.com>:

> On Tue, Jun 11, 2013 at 4:44 PM, Ehsan Akhgari <ehsan.akhgari@gmail.com>  
> wrote:
>> On Tue, Jun 11, 2013 at 7:30 PM, Chris Wilson <cwilso@google.com> wrote:
>>> Why would passing through the input make more sense to you?
>>
>> Because that's what many of the other processing nodes (such as  
>> GainNode, DelayNode, etc) do by default, so it seems more consistent.
>
> Not exactly.  GainNode and DelayNode simply initialize their parameters  
> to a given value that happens to result in a pass-through.  Gain  
> obviously is set >to unity as a default; delay has zero as the initial  
> delayTime.  Convolver isn't initialized to a buffer that results in  
> pass-through - it's essentially still in an >uninitialized state.

Then might I suggest that we update the spec to actually define what the  
uninitialized state is? I would think that the most logical (and  
consistent) default state would be that of a unit impulse function (i.e. a  
buffer with length 1 and the value 1), effectively meaning zero delay and  
0 dB gain.

/Marcus

>
>>> [Constructor(AudioBuffer buffer)]
>> interface ConvolverNode : AudioNode {
>>  boolean normalize;
>> };
>>
>> And that would eliminate the question of what to do with a null  
>> AudioBuffer altogether.
>
> True, although it's handy to be able to change the buffer later.
>>> If I was using the convolver as an effects node in a mixer, passing  
>>> through the input until I set the buffer would "double up" the  
>>> original signal if the >>>effects mix were set to 50%.  That seems  
>>> like odd behavior.
>>
>> I'm not quite sure what that means...  Can you please clarify?
>
> If I'm using Convolver to get reverb on an effect send, I'd kind of  
> expect no original signal bleed-through until I initialize it.
>
>> Also, does this behavior for other node types surprise you in the same  
>> way?  Really what's more interesting to me is consitency, one way or  
>> another.
>
> I see what you're saying, but from using the nodes, I don't think it's  
> actually consistency in the way you'd expect.  BiquadFilter and  
> >DynamicsCompressor don't work this way, for example; however, I note  
> that Waveshaper does (explicitly just pass through), and it's the only  
> other >"through" node with a buffer, so perhaps that is the best  
> approach.
>
> Since Chris already agreed, go for it.  I think it's slightly odd from  
> the usage side, but not that big a deal.



-- 
Marcus Geelnard
Technical Lead, Mobile Infrastructure
Opera Software

Received on Wednesday, 12 June 2013 10:40:04 UTC