Re: Web Audio API spec: readonly & LFO

1) I worked on repro'ing this, and it turns out it's just iOS hasn't
implemented the 'detune' member of BiquadFilterNode yet... oops. Still, the
iOS JS engine gave me a "can't set readonly" error for some reason, and I
got confused by the terminology (I assumed it was like C++ where a const
member cannot be modified at all). Probably my bad to assume.

2) Thanks Chris, I see now - I missed the part in the spec where it says it
mixes the oscillator with the already set value. That does the trick!

So I guess there's no need to change the spec... just some feedback about
where a random coder got tripped up.

Ashley



On 28 February 2013 18:12, Chris Wilson <cwilso@google.com> wrote:

> Ah.  Then you set the delayTime parameter to 0.150 (center of your
> 100ms-200ms range), and scale an LFO by running it through a gain node that
> scales -1...1 to -0.050...+0.050 - by setting the gain.value to 0.050.
>
> var delayNode = context.createDelay();
> var lfo = context.createOscillator();
> var lfoGain = context.createGain();
>
> delayNode.delayTime = 0.150;
> lfo.connect( lfoGain );
> lfoGain.gain.value = 0.05;
> lfoGain.connect( delayNode.delayTime );
>
>
>
>
> On Thu, Feb 28, 2013 at 10:07 AM, Ashley Gullen <ashley@scirra.com> wrote:
>
>> But a gain node doesn't let you offset a value - a delay oscillating from
>> -100ms to +100ms isn't much use since delays can't go negative, what if you
>> need a delay oscillating from 100ms to 200ms?
>>
>>
>> On 28 February 2013 17:56, Matt Diamond <mdiamond@jhu.edu> wrote:
>>
>>> I can't speak to point #1, but I'll just say that in terms of creating
>>> an LFO, I assume the usual method is Oscillator --> GainNode -->
>>> AudioParam, which provides you with control over the amplitude of the LFO.
>>>
>>> Matt Diamond
>>>
>>
>>
>

Received on Thursday, 28 February 2013 18:40:29 UTC