[X3D-Public] improved validation tests for sound nodes; add ability avoiding audio attenuation altogether
Don Brutzman
brutzman at nps.edu
Fri Dec 27 21:48:59 PST 2013
I've added some improved X3D Schematron tests for Sound nodes that are now deployed in X3D Validator. They will be included in upcoming release of X3D-Edit as well.
These tests include checks for trouble combinations of min/max front/back values. Getting sound ellipse values working so that sound is audible everywhere you want is tricky.
===== sidebar ====================
I've often thought we might benefit by having a way to just make a sound audible without having to worry about all this non-visible geometry (see attached slideset excerpt for some sense of how involved it can be).
Why don't we add an initializeOnly field that allows an author to disable all attenuation? This would seem to be essential for user-interface responses. Putting some set of 4 extremely large values in for min/max front/back is error prone and not very intuitive. How about the following backwards-compatible addition to Sound node:
SFBool [] attenuate TRUE
If author sets attenuate="false" then all of the computational sound features are disabled and the clip simply plays as recorded.
===================================
Anyway, the new validation test details follow. Quality assurance (QA) takes another tiptoe step forward!
===================================
http://www.web3d.org/x3d/content/examples/Basic/development/TestSchematronDiagnostics.x3d
<Sound DEF='NoChildren'/>
<AudioClip DEF='NoParentSoundNode' description='bad clip reference' url='"blah"'/>
<Sound class='must separate classes with;space characters' location='0 2 0'>
<AudioClip description='bad clip reference' url='"blah"'/>
</Sound>
<Sound DEF='SoundDefaults' location='0 2 0'>
<AudioClip DEF='ReusableAudioClip' description='reusable' url='"../Vrml97Specification/click.wav" "http://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/click.wav"'/>
</Sound>
<Sound DEF='SoundMinNegative' location='0 2 0' minBack='-1' minFront='-1'>
<AudioClip USE='ReusableAudioClip'/>
</Sound>
<Sound DEF='SoundMaxNegative' location='0 2 0' maxBack='-10' maxFront='-10'>
<AudioClip USE='ReusableAudioClip'/>
</Sound>
<Sound DEF='SoundMinGreaterThanMax' location='0 2 0' maxBack='11' maxFront='11' minBack='12' minFront='12'>
<AudioClip USE='ReusableAudioClip'/>
</Sound>
<Sound DEF='SoundMinGreaterThanDefaultMax' location='0 2 0' minBack='13' minFront='13'>
<AudioClip USE='ReusableAudioClip'/>
</Sound>
<Sound DEF='SoundMaxLessThanDefaultMin' location='0 2 0' maxBack='0.5' maxFront='0.5'>
<AudioClip USE='ReusableAudioClip'/>
</Sound>
https://savage.nps.edu/X3dValidator
<Sound DEF='NoChildren'/> has no child AudioClip or MovieTexture node [/X3D/Scene/Sound[1], warning]
<Sound DEF='NoChildren'/> location='0 0 0' has height of sound ellipse centered on ground plane, consider changing location y-value to 1.6 in order to match typical avatar height (in meters) [/X3D/Scene/Sound[1], warning]
<AudioClip DEF='NoParentSoundNode'/> url array address(es) missing online http/https references (url='"blah"') [/X3D/Scene/AudioClip, info]
<AudioClip DEF='NoParentSoundNode'/> has parent Scene node, must be contained by Sound or LoadSensor node (or else within field declaration or fieldValue initialization) [/X3D/Scene/AudioClip, error]
<AudioClip DEF='NoParentSoundNode'/> url array does not contains link to .wav or .midi sound files, browsers not required to support other formats (url='"blah"') [/X3D/Scene/AudioClip, warning]
<Sound DEF='' class='must separate classes with;space characters' cannot contain commas or semicolons, instead separate class names using space characters [/X3D/Scene/Sound[2], error]
<AudioClip DEF=''/> url array address(es) duplicate the url definition found in a preceding node, consider DEF/USE to reduce download delays and memory requirements for url content (url='"blah"') [/X3D/Scene/Sound[2]/AudioClip, warning]
<AudioClip DEF=''/> url array address(es) missing online http/https references (url='"blah"') [/X3D/Scene/Sound[2]/AudioClip, info]
<AudioClip DEF=''/> url array does not contains link to .wav or .midi sound files, browsers not required to support other formats (url='"blah"') [/X3D/Scene/Sound[2]/AudioClip, warning]
<Sound DEF='SoundMinNegative'/> minBack='-1' maxBack='10' has negative value for distance along back direction [/X3D/Scene/Sound[4], warning]
<Sound DEF='SoundMinNegative'/> minFront='-1' maxFront='10' has negative value for distance along front direction [/X3D/Scene/Sound[4], warning]
<Sound DEF='SoundMaxNegative'/> minBack='1' maxBack='-10' has negative value for distance along back direction [/X3D/Scene/Sound[5], warning]
<Sound DEF='SoundMaxNegative'/> minFront='1' maxFront='-10' has negative value for distance along front direction [/X3D/Scene/Sound[5], warning]
<Sound DEF='SoundMinGreaterThanMax'/> minBack='12' maxBack='11' has minBack value greater than maxBack value [/X3D/Scene/Sound[6], warning]
<Sound DEF='SoundMinGreaterThanMax'/> minFront='12' maxFront='11' has minFront value greater than maxFront value [/X3D/Scene/Sound[6], warning]
<Sound DEF='SoundMinGreaterThanDefaultMax'/> minBack='13' maxBack='10' has minBack value greater than maxBack value [/X3D/Scene/Sound[7], warning]
<Sound DEF='SoundMinGreaterThanDefaultMax'/> minFront='13' maxFront='10' has minFront value greater than maxFront value [/X3D/Scene/Sound[7], warning]
<Sound DEF='SoundMaxLessThanDefaultMin'/> minBack='1' maxBack='0.5' has minBack value greater than maxBack value [/X3D/Scene/Sound[8], warning]
<Sound DEF='SoundMaxLessThanDefaultMin'/> minFront='1' maxFront='0.5' has minFront value greater than maxFront value [/X3D/Scene/Sound[8], warning]
===================================
Incidentally these tests also work in cases where a violation occurs inadvertently when some of the fields are not defined and their default values are compared instead.
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 http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Chapter12-ExcerptSound.pdf
Type: application/pdf
Size: 1361205 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20131227/1e7d0500/attachment-0001.pdf>
More information about the X3D-Public
mailing list