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

Re: Phase offset for OscillatorNodes?

From: redman <redman@redman.demon.nl>
Date: Sun, 25 Nov 2012 14:52:53 +0100
Message-ID: <50B222B5.3060904@redman.demon.nl>
To: public-audio@w3.org
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.

Received on Sunday, 25 November 2012 13:53:28 UTC

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