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: Mon, 26 Nov 2012 12:27:58 -0800
Message-ID: <CA+EzO0nJcMvLDb2JaTBXU6uw269RA6E8OKnkZ2G1atbuoqdDEA@mail.gmail.com>
To: Jussi Kalliokoski <jussi.kalliokoski@gmail.com>
Cc: Patrick Borgeat <patrick.borgeat@gmail.com>, public-audio@w3.org
On Mon, Nov 26, 2012 at 2:43 AM, Jussi Kalliokoski <
jussi.kalliokoski@gmail.com> wrote:

>
>
> On Mon, Nov 26, 2012 at 6:32 AM, Chris Rogers <crogers@google.com> wrote:
>
>>
>>
>> On Sat, Nov 24, 2012 at 7:01 AM, Patrick Borgeat <
>> patrick.borgeat@gmail.com> wrote:
>>
>>> Hi there,
>>>
>>> I wonder if OscillatorNodes could have some kind of phase offset (or
>>> maybe I'm missing something and there is such thing?)
>>>
>>> Here's an example how the phase parameter in SuperCollider affects the
>>> signal:
>>>
>>>
>>> [image: Inline-Bild 3]
>>> [image: Inline-Bild 4]
>>>
>>> Phase offsets are pretty important for LFOs. I also use them for drum
>>> synthesis (to have a nice click at the beginning).
>>>
>>> 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.
>>>
>>>
>>> Looking forward reading your thoughts on that :-).
>>>
>>
>> Hi Patrick, in addition to an optional argument as you suggest, we might
>> consider a .phase attribute which is an AudioParam.  We can already get
>> many FM effects since the .frequency attribute is pretty flexible.  But
>> maybe .phase as an AudioParam would also be worthwhile.
>>
>
> Is that phase as in phase offset? Phase offset might be more useful, but
> admittedly you might be able to create pretty interesting stuff with phase
> modulation, although it sort of overlaps with the waveshaper node.
>

Yeah, .phaseOffset is really what it needs to be I think.  This would be
additive with the cummulative phase from .frequency (and .detune).  This
seems nice since if you set .frequency to 0, then there would be no
cummulative phase and you could control the phase directly with
.phaseOffset.  How does that sound?



>
> Cheers,
> Jussi
>
>
>> Chris
>>
>>
>>
>>>
>>> cheers,
>>> Patrick
>>>
>>>
>>>
>>
>


image.png
(image/png attachment: image.png)

image.png
(image/png attachment: 02-image.png)

Received on Monday, 26 November 2012 20:28:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:03 UTC