This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20681 - spatial coords should just be in metres
Summary: spatial coords should just be in metres
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: TBD
Assignee: Chris Rogers
QA Contact: public-audio
Depends on:
Reported: 2013-01-16 01:41 UTC by Ralph Giles
Modified: 2014-10-28 17:16 UTC (History)
2 users (show)

See Also:


Description Ralph Giles 2013-01-16 01:41:27 UTC Says,

"The units used in the coordinate system are not defined, and do not need to be because the effects calculated with these coordinates are independent/invariant of any particular units such as meters or feet."

This is true as far as the subsequent example goes, but is in conflict with the doppler algorithm, which compares velocities against AudioListener.speedOfSound, which is explicitly in metres per second.

I suggest the quoted sentence about unit independence just be removed, and that the spacial fields be clarified to always use metres for length.
Comment 1 Chris Rogers 2013-04-08 21:59:35 UTC
This is based on OpenAL where the units are not defined.  I've updated the spec to remove mention of meters/second.

Comment 2 Olivier Thereaux 2013-04-25 15:42:21 UTC
I have to say I'm finding it really strange to have a parameter define a speed and yet have no mention of the unit, either in the value (fine) or anywhere specifying the unit used by the parameter. Granted, m/s is a fairly standard unit of speed, but then so is mph. 

Our usual process says "no objection in > 2 weeks, close", but I'd like to invite more scrutiny and feedback here from the group.
Comment 3 Marcus Geelnard (Opera) 2013-04-26 07:01:21 UTC
I think that what we're missing is a consistent use/definition of "unit". For instance, the comment for speedOfSound could read:

"in units / second (default 343.3)"

But then we should define the term "units" somewhere in the spec.

In Open Dynamic Engine (ODE), for instance, the units are undefined: "Technically, ODE doesn't use specific units. You can use anything you wish, as long as you stay consistent with yourself." (the manual also recommends that you use SI units since that typically implies that you're "consistent with yourself"). In the ODE manual, you can find language such as "If a sphere of size 1 has to roll over a polygon a 1000 units long...".

Perhaps a good solution to the problem would be to introduce a short section in the spec about units, and then refer to things such as speed in terms of "units" (i.e. units / second).

Side note: Technically, "seconds" could also be "units of time", but on the other hand we already use seconds in many places in the spec, so I think it's safe to always use/mandate seconds for time.
Comment 4 Marcus Geelnard (Opera) 2013-04-26 07:11:03 UTC
...also just found that the PannerNode and AudioListener specifies the velocity in meters / second, which would have to change.
Comment 5 Olivier Thereaux 2013-08-02 08:52:37 UTC
Reopening per discussion at the Audio WG teleconference on 1st August 2013.
Comment 6 Olivier Thereaux 2014-10-28 17:14:03 UTC
Web Audio API issues have been migrated to Github. 
Comment 7 Olivier Thereaux 2014-10-28 17:16:56 UTC
Closing. See for up to date list of issues for the Web Audio API.