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

Re: noteOn in milliseconds?

From: Joseph Berkovitz <joe@noteflight.com>
Date: Fri, 31 Aug 2012 08:22:58 -0400
Cc: public-audio@w3.org
Message-Id: <39A4F08C-E25E-473E-B4E8-5FD3688777E6@noteflight.com>
To: Stuart Memo <stuartmemo@gmail.com>
The use of seconds in Web Audio tracks the general use of seconds in current HTML5 media-related specifications (such as the <audio> and <video> DOM elements):

    http://www.w3.org/TR/html5/media-elements.html#offsets-into-the-media-resource

To lapse into personal opinion for a moment, I think seconds are far easier for audio developers to work with given the frequent need to convert between time offsets and other rate-based units that are usually given in seconds (frames per second, beats per minute, sample rates in Hertz, and so on).  It's milliseconds that are the outlier :)

... .  .    .       Joe

Joe Berkovitz
President

Noteflight LLC
Boston, Mass.
phone: +1 978 314 6271
www.noteflight.com


On Aug 31, 2012, at 6:47 AM, Stuart Memo <stuartmemo@gmail.com> wrote:

> Hi all,
> 
> Hopefully a quick question with a simple answer. I was just wondering why noteOn() takes a value in seconds and not milliseconds, which is usually used for JavaScript timings in setTimeout and whatnot?
> 
> Thanks!
> Stuart
Received on Friday, 31 August 2012 12:23:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 31 August 2012 12:23:35 GMT