W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2012

Re: Thoughts and questions on the API from a modular synth point of view

From: Raymond Toy <rtoy@google.com>
Date: Wed, 18 Jul 2012 09:14:36 -0700
Message-ID: <CAE3TgXHzqAhynhw0SrLKEr0T0jK1z7BroeXVpB9iuHutoGoqhA@mail.gmail.com>
To: Peter van der Noord <peterdunord@gmail.com>
Cc: Chris Wilson <cwilso@google.com>, "public-audio@w3.org" <public-audio@w3.org>
On Tue, Jul 17, 2012 at 4:54 PM, Peter van der Noord
<peterdunord@gmail.com>wrote:

> Which demo apps are those?
>
> I will add a standard noteOn then to automatically start the oscillator,
> but may i add that i find it *very* strange for an oscillator to have that
> command?
>
> - An oscillator oscilates, that's what it was hired to do. To oscillate.
> Nothing more, nothing less. It doesnt stop, it just runs.
> - i could use an oscillator for very different purposes than to be a note.
> It could be an lfo controlling the filterfrequency, or i could drive it
> through a note-quantizer (that in its turn feeds frequencies to another
> oscillator) to make melodies out of it...yet i still have to say noteOn (a
> totally unrelated word in the context of these cases) before he does what i
> want.
> - If you do use an osc as a sound for notes, the oscillator has nothing to
> do with (or knows about) the note actually being started or stopped, that's
> what an envelope is for, or in this api probably a gainnode. That's the one
> you would want to tell to start or stop
> - if you still do want to use these commands to start or stop a note, the
> abruptness of starting/stopping an osc would result in very annoying
> clicks, so i'm wondering in what cases you would use these.
>
> With what reason were these methods added?
>

I'm not 100% sure, but I think noteOn() was added so you could control
precisely when the oscillator starts producing output.  Without it, would
start when the system got around to creating the osc and connecting to a
node.  I guess the same effect could be achieved, as you say, by connecting
the oscillator node to a gain node, and controlling the gain node
appropriately.  The gain node can also be used to smoothly start and stop
the oscillator output by using linearRampToValueAtTime, and friends.

Ray
Received on Wednesday, 18 July 2012 16:15:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 18 July 2012 16:15:07 GMT