Bug 17344 - (NoteOnOffNaming): noteOn, noteGrainOn and noteOff naming
Summary: (NoteOnOffNaming): noteOn, noteGrainOn and noteOff naming
Status: CLOSED FIXED
Alias: None
Product: AudioWG - OBSOLETE - Moved to Github
Classification: Unclassified
Component: Web Audio API - OBSOLETE - See Github (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: TBD
Assignee: Chris Rogers
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
: 18442 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-05 11:36 UTC by Philip Jägenstedt
Modified: 2012-10-12 07:55 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Jägenstedt 2012-06-05 11:36:45 UTC
Audio-ISSUE-52 (NoteOnOffNaming): noteOn, noteGrainOn and noteOff naming [Web Audio API]

http://www.w3.org/2011/audio/track/issues/52

Raised by: Philip Jägenstedt
On product: Web Audio API

The naming convention is unfortunate as the connection to a note is not clear. For a game sound effects or UI sound effects, this terminology is fairly obscure.

The noteGrainOn grainDuration parameter does not seem to serve any purpose given that noteOff also exists.

Suggested simplification:

    void play(optional double when, optional double offset, optional double duration);
    void stop(optional double when);

Note that the special meaning of 0 in note* is not needed if the arguments are optional.
Comment 1 Olivier Thereaux 2012-06-07 16:01:26 UTC
Comment from Chris Rogers, 18 May 2012:

Agreed that the names are unfortunate, also because "note-on" and "note-off" have specific connotations in MIDI which are not the same as in this spec. So it will be a good idea to change the names.

We have already discussed in the tele-conferences (and in much earlier discussions in the mailing list) that start() and stop() would be good names.

I still believe the "duration" is useful, but we can discuss further.

I'm OK with making special meaning of 0 go away --- it used to be this way, but for some reason somebody changed it in WebKit
Comment 2 Joe Berkovitz / NF 2012-07-31 10:46:28 UTC
*** Bug 18442 has been marked as a duplicate of this bug. ***
Comment 3 Olivier Thereaux 2012-08-22 15:21:23 UTC
(In reply to comment #1)
> Comment from Chris Rogers, 18 May 2012:
> We have already discussed in the tele-conferences (and in much earlier
> discussions in the mailing list) that start() and stop() would be good names.

Teleconference discussion minuted here:
http://www.w3.org/2012/05/02-audio-minutes.html#item02
Comment 4 Olivier Thereaux 2012-08-23 09:42:55 UTC
We reached a proposed resolution on this during the teleconference on 22nd August 2012:
http://www.w3.org/2012/08/22-audio-minutes#item02

* noteOn/noteOff will be renamed to start/stop 
* The old name will be mentioned in an informational section in the web audio spec
* The Webkit implementation is likely to keep supporting the old names
* Other upcoming implementations are not encouraged to support the old names

I am switching the issue as ASSIGNED (to the editor), will close once changes have been made in the spec.
Comment 5 Chris Wilson 2012-08-23 17:36:26 UTC
I didn't notice any comment in the notes or this bug about renaming noteGrainOn as well.  I presume this should be renamed to startGrain()?
Comment 6 Olivier Thereaux 2012-09-10 10:32:12 UTC
(In reply to comment #5)
> I didn't notice any comment in the notes or this bug about renaming noteGrainOn
> as well.  I presume this should be renamed to startGrain()?

Don't recall us talking about noteGrainOn indeed, but startGrain() does sound consistent with the other changes. 

I might set aside a couple of minutes during our call this week to get a quick show of hands about it, then we can wrap up this re-naming issue.
Comment 7 Olivier Thereaux 2012-09-13 09:35:00 UTC
(In reply to comment #5)
> I didn't notice any comment in the notes or this bug about renaming noteGrainOn
> as well.  I presume this should be renamed to startGrain()?

As discussed on the 12th September teleconference, the suggestion is to not have a separate method for this, but instead to overload the start() method with extra parameters.
Comment 8 Olivier Thereaux 2012-09-28 09:35:15 UTC
Resolved per http://dvcs.w3.org/hg/audio/rev/aea45daa1200

Note that the old names have been added to an informational section.
Comment 9 Olivier Thereaux 2012-10-12 07:55:44 UTC
No objection after close to 2 weeks. Closing.