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: Peter van der Noord <peterdunord@gmail.com>
Date: Wed, 18 Jul 2012 01:54:09 +0200
Message-Id: <13B8B813-C738-45C7-B1B8-F8AA3396EB3E@gmail.com>
Cc: Raymond Toy <rtoy@google.com>, "public-audio@w3.org" <public-audio@w3.org>
To: Chris Wilson <cwilso@google.com>
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?

Unrelated: thinking of it, a great (and very simple) option to add to the oscillator would be a sync method. Syncing an oscillator resets the waveform that's being played to the startposition, and it's amazing to hear the complex harmonic richness you can get by just being able to sync a waveform.

Which leads to me something i mentioned before: i wouldnt want a method to do oscillator-syncing, but an a-rate param reacting to a signal that goes from negative to positive (which is how analog modular synthesizers do syncing). If there was another type of parameter, let's say LogicParam, an oscillator could have one of those with the name "sync", and the description "resets the oscillator to the beginning of its waveform on GATE_ON". You could connect another oscillator (or whatever you'd like) to it and create very rich (and/or annoying) sounds.

Peter


Op 17 jul. 2012 om 22:25 heeft Chris Wilson <cwilso@google.com> het volgende geschreven:

> It was in 21.  (Both of my I/O demo apps used Oscillators.  :)
> 
> On Tue, Jul 17, 2012 at 1:21 PM, Raymond Toy <rtoy@google.com> wrote:
> Yes, I meant no sound at all.  But as you say, if there's no noteOn() call, then the oscillator doesn't generate sound.  This was a very recent change, and probably only available in Chrome 21 or maybe 22.
> 
> Ray
> 
> On Tue, Jul 17, 2012 at 12:49 PM, Chris Wilson <cwilso@google.com> wrote:
> I think Ray meant "I don't hear any sound" - because I don't either.  You need to call noteOn().
> 
> 
> On Tue, Jul 17, 2012 at 12:46 PM, Peter van der Noord <peterdunord@gmail.com> wrote:
> I assume that by "I hear nothing using Chrome 22.x" you mean that you don't hear the artefact, but do hear sound?
> 
> And yes, that's all i have to do. It doesn't matter how long i wait after twiddling the slider (which directly sets the value on the audio-param) before connecting it to the destination, i always hear the frequency jump quickly to the final value (seems to be always in the same amount of time, less 0.25s).
> 
> But if you hear nothing with a newer version (i run 20.x) then there's no problem right? I should just update.
> 
> Peter
> 
> 
> 2012/7/17 Raymond Toy <rtoy@google.com>
> 
> 
> On Mon, Jul 16, 2012 at 11:21 AM, Peter van der Noord <peterdunord@gmail.com> wrote:
> I was actually referring to how the situation shuold be (in my opinion), not to a particular case, but having said that...these artefacts do seem to happen in my chrome (20.0.somewhat)
> 
> http://petervandernoord.nl/patchwork_js
> 
> - add an oscillator
> - add a destination
> - move the upper slider of the oscillator all the way up
> - connect osc to destination
> - you hear the tone go up
> 
> 
> And that's all you need to do?  If so, then I'm getting strange results because I hear nothing using Chrome 22.x.
> 
> Ray
>  
> 
> 
> 
> 
Received on Tuesday, 17 July 2012 23:54:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 17 July 2012 23:54:41 GMT