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

[web-audio-api] noteOn() and noteOff() methods should be renamed (#167)

From: Olivier Thereaux <notifications@github.com>
Date: Wed, 11 Sep 2013 07:28:46 -0700
To: WebAudio/web-audio-api <web-audio-api@noreply.github.com>
Message-ID: <WebAudio/web-audio-api/issues/167@github.com>
> Originally reported on W3C Bugzilla [ISSUE-18442](https://www.w3.org/Bugs/Public/show_bug.cgi?id=18442) Tue, 31 Jul 2012 00:21:32 GMT
> Reported by Joe Berkovitz / NF
> Assigned to 

The noteOn() and noteOff() methods of AudioBufferSourceNode are confusingly named in two respects.  

1. The noteOff() method's name suggests a strong similarity to the MIDI concept of "Note Off", but the two ideas differ in a way that is likely to be confusing. The MIDI terminology is already well established and familiar to musicians. A MIDI "Note Off" event typically triggers the start of the release phase of a virtual instrument's note, which can last for an arbitrary amount of time before audio output actually ceases (since most musical instruments do not immediately stop producing sound when the performer stops playing).  On the other hand, the noteOff() method causes audio to completely cease at the specified time.

2. The node may serve as a source for many kinds of audio other than musical notes, so the terminology is needlessly narrow.

Chris Rogers has suggested that start() and stop() may be clearer alternatives.

Reply to this email directly or view it on GitHub:
Received on Wednesday, 11 September 2013 14:31:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:24 UTC