Re: Phase offset for OscillatorNodes?

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.

red

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