[x3d-public] (upper/lower) Case of X3D Enum values for Web Audio API nodes in X3D Sound Component

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Mon Dec 12 09:33:53 PST 2022


Thanks for your excellent comment Holger.  Captured as follows:

 

*	Mantis 1411: enumeration values for Web Audio nodes do not follow CAPITALIZATION conventions
*	https://www.web3d.org/member-only/mantis/view.php?id=1411

 

Description

The updated X3D Sound Component includes support for W3C Web Audio capabilities.

* X3D4 Architecture, clause 16 Sound Component
*  <https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/components/sound.html> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/components/sound.html

* Web Audio API, World Wide Web Consortium (W3C) Candidate Recommendation, 11 June 2020.
*  <https://www.w3.org/TR/webaudio> https://www.w3.org/TR/webaudio

Examples include:

================

16.3.1 X3DSoundChannelNode
X3DSoundChannelNode : X3DSoundNode {
  SFString [in,out] channelCountMode "max" ["max", "clamped-max", "explicit"]
  SFString [in,out] channelInterpretation "speakers" ["speakers", "discrete"]
  MFNode [in,out] children NULL [X3DSoundChannelNode,X3DSoundProcessingNode,X3DSoundSourceNode]
[...]

================
16.3.2 X3DSoundDestinationNode
X3DSoundDestinationNode : X3DSoundNode {
[...]
  SFString [in,out] channelCountMode "max" ["max", "clamped-max", "explicit"]
  SFString [in,out] channelInterpretation "speakers" ["speakers", "discrete"]

================

16.4.4 BiquadFilter
BiquadFilter : X3DSoundProcessingNode {
  SFString [in,out] channelCountMode "max" ["max", "clamped-max", "explicit"]
  SFString [in,out] channelInterpretation "speakers" ["speakers", "discrete"]
[...]
  SFString [in,out] type "lowpass" ["lowpass", "highpass", "bandpass", "lowshelf",
                                                      "highshelf", "peaking", "notch", "allpass"]

================

Instead, the chosen enumerations exactly match spelling and capitalization of Web Audio API.
*  <https://www.w3.org/TR/webaudio/#enumdef-channelcountmode> https://www.w3.org/TR/webaudio/#enumdef-channelcountmode
*  <https://www.w3.org/TR/webaudio/#enumdef-channelinterpretation> https://www.w3.org/TR/webaudio/#enumdef-channelinterpretation

Question to be confirmed:
a. change capitalization to match X3D naming conventions for enumerations, or
b. maintain exact matches with Web Audio API to maximize interoperability and avoid errors

 

 

So there is the reason why.  I think that exact matching eliminates large classes of potential future errors by implementers and authors.

 

Thanos, Efi, Dick (co-designers) and everyone:  additional insight regarding change or confirmation welcome.

 

all the best, Don

-- 

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu

Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149

X3D graphics, virtual worlds, Navy robotics https:// faculty.nps.edu/brutzman

 

From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Holger Seelig
Sent: Saturday, December 10, 2022 12:30 PM
To: X3D <x3d-public at web3d.org>
Subject: [x3d-public] Case of X3D Enum values

 

The X3D standard defines several enum values in SFString or MFString format, all past enums are in uppercase format,. This should be standard for all future enums!

 

Deviating therefrom the field values of „ channelCountMode“, „ channelInterpretation“, and „ type“ in the Sound component are in lowercase, wondering why this is the case.

 

Best regards,

Holger Seelig

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20221212/57c23672/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5353 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20221212/57c23672/attachment-0001.p7s>


More information about the x3d-public mailing list