W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

Re: Phase offset for OscillatorNodes?

From: Chris Rogers <crogers@google.com>
Date: Sun, 25 Nov 2012 20:36:48 -0800
Message-ID: <CA+EzO0kP8stuWx7E4sg9aHxiqZ7NOh3Qe5S7dUyB_3L6PAA+Vw@mail.gmail.com>
To: redman <redman@redman.demon.nl>
Cc: public-audio@w3.org
On Sun, Nov 25, 2012 at 5:52 AM, redman <redman@redman.demon.nl> wrote:

> On 25-Nov-12 9:41, Ray Bellis wrote:
>
>> On 24/11/2012 15:01, Patrick Borgeat wrote:
>>
>>> A phase offset could be passed as an optional double offset=0 parameter
>>> to the start method of OscillatorNodes. A modulateable phase parameter
>>> could be interesting as well off course, but might be overkill for the Web
>>> Audio API.
>>>
>> Being able to change the phase on the fly would though allow support for
>> oscillator sync, which is a feature I've seen requested here before.
>>
>> Ray
>>
>>
>>
>>
> Not very likely.
> For osc sync you would also need to monitor the 'carrier' waveform and
> implement a sample-accurate trigger and then hope the second syncing
> oscillator will react fast enough to the phase reset so that you get the
> desired effect.
> A better way would be to make a dual oscillator native module that allows
> for sync.
> At the very least you need some information about when the first osc is
> cycling around so that you can reset the second one but this information is
> not provided. Detecting it may be too slow as the triggering needs to be
> sample accurate.
>

I think it would be possible to get osc sync if OscillatorNode had an
attribute called something like .sync (not a great name) which could be
optionally set to another OscillatorNode.  If they were linked in such a
way then it could be implemented to be sample-accurate.



>
> red
>
>
Received on Monday, 26 November 2012 04:37:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:14 UTC