X3D Model Documentation: SoundFileFormats.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <X3D profile='Immersive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  4       <head>
  5            <meta name='titlecontent='SoundFileFormats.x3d'/>
  6            <meta name='descriptioncontent='Provide a test scene for sound files using various audio formats.'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='10 November 2013'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='Imagecontent='SoundFileFormats.png'/>
 11            <meta name='Soundcontent='audio/Testing123stereo.wav'/>
 12            <meta name='Soundcontent='audio/Testing123stereo.aiff'/>
 13            <meta name='Soundcontent='audio/Testing123stereo.mp3'/>
 14            <meta name='Soundcontent='audio/Testing123original.wav'/>
 15            <meta name='Soundcontent='Reunion by Marc Sabatella, distributed with MuseScore'/>
 16            <meta name='Soundcontent='audio/Reunion_Example.mid'/>
 17            <meta name='requirescontent='File type requirements, https://www.web3d.org/files/specifications/19775-1/V3.3/Part01/components/sound.html#AudioClip'/>
 18            <meta name='subjectcontent='X3D audio formats test'/>
 19            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/SoundFileFormats.x3d'/>
 20            <meta name='generatorcontent='ZOOM H2next Handy Recorder, http://www.zoom.co.jp/products/h2n'/>
 21            <meta name='generatorcontent='Audacity, http://audacity.sourceforge.net'/>
 22            <meta name='generatorcontent='MuseScore, http://musescore.org'/>
 23            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 24            <meta name='licensecontent='../license.html'/>
 25       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: AiffLaunch, AiffOptional, AiffPlay, AiffTextClickedSensor, AmberAppearance, GreenAppearance, HeaderBox, MessageFont, MidiLaunch, MidiPlay, MidiTextClickedSensor, Mp3Launch, Mp3Play, Mp3Recommended, Mp3TextClickedSensor, Testing123stereoAiffAudioClip, Testing123stereoMidiAudioClip, Testing123stereoMp3AudioClip, Testing123stereoWavAudioClip, TextClickSurface, TurquoiseAppearance, WavLaunch, WavPlay, WavRequired, WavTextClickedSensor
-->
 26       <Scene>
 27            <WorldInfo title='SoundFileFormats.x3d'/>
 28            <Background skyColor='0.2 0.2 0.2'/>
 29            <!-- ============================================================ -->
 30            <Transform DEF='WavPlayscale='0.4 0.4 0.4translation='-4 0.5 0'>
 31 
               <!-- ROUTE information for WavTextClickedSensor node:  [from touchTime to Testing123stereoWavAudioClip.startTime ] -->
               <TouchSensor DEF='WavTextClickedSensordescription='Play file via Sound/AudioClip: Testing123stereo.wav'/>
 32                 <Sound maxBack='100maxFront='100minBack='20minFront='20'>
 33                      <!-- Make sure the sound source AudioClip is audible at the user location -->
 34 
                    <!-- ROUTE information for Testing123stereoWavAudioClip node:  [from WavTextClickedSensor.touchTime to startTime ] -->
                    <AudioClip DEF='Testing123stereoWavAudioClipdescription='Playing Testing123stereo.wav'   url=' "audio/Testing123stereo.wav" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/audio/Testing123stereo.wav" '/>
 35                 </Sound>
 36                 < ROUTE  fromNode='WavTextClickedSensor' fromField='touchTime' toNode='Testing123stereoWavAudioClip' toField='startTime'/>
 37                 <Shape>
 38                      <Text string='"Testing123stereo.wav"'>
 39 
                         <!-- FontStyle MessageFont is a DEF node that has 10 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5, USE_6, USE_7, USE_8, USE_9, USE_10 -->
                         <FontStyle DEF='MessageFontfamily='"SANS"justify='"MIDDLE" "MIDDLE"style='BOLD'/>
 40                      </Text>
 41 
                    <!-- Appearance GreenAppearance is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                    <Appearance DEF='GreenAppearance'>
 42                           <Material diffuseColor='0 1 0'/>
 43                      </Appearance>
 44                 </Shape>
 45 
               <!-- Transform TextClickSurface is a DEF node that has 7 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5, USE_6, USE_7 -->
               <Transform DEF='TextClickSurfacescale='5 0.5 1translation='0 0.3 0'>
 46                      <Shape>
 47                           <IndexedFaceSet solid='falsecoordIndex='0 1 2 3 -1'>
 48                                <Coordinate point='1 1 0 1 -1 0 -1 -1 0 -1 1 0'/>
 49                           </IndexedFaceSet>
 50                           <Appearance>
 51                                <Material transparency='1'/>
 52                           </Appearance>
 53                      </Shape>
 54                 </Transform>
 55            </Transform>
 56            <Transform DEF='WavLaunchscale='0.4 0.4 0.4translation='-4 -0.1 0'>
 57                 <Anchor description='Launch audio file in Web browser: Testing123stereo.wavparameter='"target=_blank"'   url=' "audio/Testing123stereo.wav" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/audio/Testing123stereo.wav" '>
 58                      <Shape>
 59                           <Text string='"(launch)"'>
 60                                <FontStyle USE='MessageFont'/>
 61                           </Text>
 62                           <Appearance USE='GreenAppearance'/>
 63                      </Shape>
 64                      <Transform USE='TextClickSurface'/>
 65                 </Anchor>
 66            </Transform>
 67            <!-- ============================================================ -->
 68            <Transform DEF='Mp3Playscale='0.4 0.4 0.4translation='0 0.5 0'>
 69 
               <!-- ROUTE information for Mp3TextClickedSensor node:  [from touchTime to Testing123stereoMp3AudioClip.startTime ] -->
               <TouchSensor DEF='Mp3TextClickedSensordescription='Play file via Sound/AudioClip: Testing123stereo.mp3'/>
 70                 <Sound maxBack='100maxFront='100minBack='20minFront='20'>
 71 
                    <!-- ROUTE information for Testing123stereoMp3AudioClip node:  [from Mp3TextClickedSensor.touchTime to startTime ] -->
                    <AudioClip DEF='Testing123stereoMp3AudioClipdescription='Play file via Sound/AudioClip: Testing123stereo.mp3'   url=' "audio/Testing123stereo.mp3" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/audio/Testing123stereo.mp3" '/>
 72                 </Sound>
 73                 < ROUTE  fromNode='Mp3TextClickedSensor' fromField='touchTime' toNode='Testing123stereoMp3AudioClip' toField='startTime'/>
 74                 <Shape>
 75                      <Text string='"Testing123stereo.mp3"'>
 76                           <FontStyle USE='MessageFont'/>
 77                      </Text>
 78 
                    <!-- Appearance TurquoiseAppearance is a DEF node that has 4 USE nodes: USE_1, USE_2, USE_3, USE_4 -->
                    <Appearance DEF='TurquoiseAppearance'>
 79                           <Material diffuseColor='0.156863 0.878431 0.815686'/>
 80                      </Appearance>
 81                 </Shape>
 82                 <Transform USE='TextClickSurface'/>
 83            </Transform>
 84            <Transform DEF='Mp3Launchscale='0.4 0.4 0.4translation='0 -0.1 0'>
 85                 <Anchor description='Launch audio file in Web browser: Testing123stereo.mp3parameter='"target=_blank"'   url=' "audio/Testing123stereo.mp3" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/audio/Testing123stereo.mp3" '>
 86                      <Shape>
 87                           <Text string='"(launch)"'>
 88                                <FontStyle USE='MessageFont'/>
 89                           </Text>
 90                           <Appearance USE='TurquoiseAppearance'/>
 91                      </Shape>
 92                      <Transform USE='TextClickSurface'/>
 93                 </Anchor>
 94            </Transform>
 95            <!-- ============================================================ -->
 96            <Transform DEF='MidiPlayscale='0.4 0.4 0.4translation='0 -2 0'>
 97 
               <!-- ROUTE information for MidiTextClickedSensor node:  [from touchTime to Testing123stereoMidiAudioClip.startTime ] -->
               <TouchSensor DEF='MidiTextClickedSensordescription='Play file via Sound/AudioClip: Reunion_Example.mid'/>
 98                 <Sound maxBack='100maxFront='100minBack='20minFront='20'>
 99 
                    <!-- ROUTE information for Testing123stereoMidiAudioClip node:  [from MidiTextClickedSensor.touchTime to startTime ] -->
                    <AudioClip DEF='Testing123stereoMidiAudioClipdescription='Play file via Sound/AudioClip: Reunion_Example.mid'   url=' "audio/Reunion_Example.mid" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/audio/Reunion_Example.mid" '/>
100                 </Sound>
101                 < ROUTE  fromNode='MidiTextClickedSensor' fromField='touchTime' toNode='Testing123stereoMidiAudioClip' toField='startTime'/>
102                 <Shape>
103                      <Text string='"Reunion_Example.mid"'>
104                           <FontStyle USE='MessageFont'/>
105                      </Text>
106                      <Appearance USE='TurquoiseAppearance'/>
107                 </Shape>
108                 <Transform USE='TextClickSurface'/>
109            </Transform>
110            <Transform DEF='MidiLaunchscale='0.4 0.4 0.4translation='0 -2.6 0'>
111                 <Anchor description='Launch audio file in Web browser: Reunion_Example.midparameter='"target=_blank"'   url=' "audio/Reunion_Example.mid" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/audio/Reunion_Example.mid" '>
112                      <Shape>
113                           <Text string='"(launch)"'>
114                                <FontStyle USE='MessageFont'/>
115                           </Text>
116                           <Appearance USE='TurquoiseAppearance'/>
117                      </Shape>
118                      <Transform USE='TextClickSurface'/>
119                 </Anchor>
120            </Transform>
121            <!-- ============================================================ -->
122            <Transform DEF='AiffPlayscale='0.4 0.4 0.4translation='4 0.5 0'>
123 
               <!-- ROUTE information for AiffTextClickedSensor node:  [from touchTime to Testing123stereoAiffAudioClip.startTime ] -->
               <TouchSensor DEF='AiffTextClickedSensordescription='Play file via Sound/AudioClip: Testing123stereo.aiff'/>
124                 <Sound maxBack='100maxFront='100minBack='20minFront='20'>
125 
                    <!-- ROUTE information for Testing123stereoAiffAudioClip node:  [from AiffTextClickedSensor.touchTime to startTime ] -->
                    <AudioClip DEF='Testing123stereoAiffAudioClipdescription='Play file via Sound/AudioClip: Testing123stereo.aiff'   url=' "audio/Testing123stereo.aiff" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/audio/Testing123stereo.aiff" '/>
126                 </Sound>
127                 < ROUTE  fromNode='AiffTextClickedSensor' fromField='touchTime' toNode='Testing123stereoAiffAudioClip' toField='startTime'/>
128                 <Shape>
129                      <Text string='"Testing123stereo.aiff"'>
130                           <FontStyle USE='MessageFont'/>
131                      </Text>
132 
                    <!-- Appearance AmberAppearance is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                    <Appearance DEF='AmberAppearance'>
133                           <Material diffuseColor='1 0.760784 0'/>
134                      </Appearance>
135                 </Shape>
136                 <Transform USE='TextClickSurface'/>
137            </Transform>
138            <Transform DEF='AiffLaunchscale='0.4 0.4 0.4translation='4 -0.1 0'>
139                 <Anchor description='Launch audio file in Web browser: Testing123stereo.aiffparameter='"target=_blank"'   url=' "audio/Testing123stereo.aiff" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/audio/Testing123stereo.aiff" '>
140                      <Shape>
141                           <Text string='"(launch)"'>
142                                <FontStyle USE='MessageFont'/>
143                           </Text>
144                           <Appearance USE='AmberAppearance'/>
145                      </Shape>
146                      <Transform USE='TextClickSurface'/>
147                 </Anchor>
148            </Transform>
149            <!-- ============================================================ -->
150            <Transform DEF='HeaderBoxtranslation='0 2 -0.1'>
151                 <Shape>
152                      <Box size='12 1 0.1'/>
153                      <Appearance>
154                           <Material diffuseColor='1 1 1transparency='0.75'/>
155                      </Appearance>
156                 </Shape>
157            </Transform>
158            <Transform DEF='WavRequiredscale='0.4 0.4 0.4translation='-4 2 0'>
159                 <Shape>
160                      <Text string='"Required Support"'>
161                           <FontStyle USE='MessageFont'/>
162                      </Text>
163                      <Appearance USE='GreenAppearance'/>
164                 </Shape>
165            </Transform>
166            <Transform DEF='Mp3Recommendedscale='0.4 0.4 0.4translation='0 2 0'>
167                 <Shape>
168                      <Text string='"Recommended Support"'>
169                           <FontStyle USE='MessageFont'/>
170                      </Text>
171                      <Appearance USE='TurquoiseAppearance'/>
172                 </Shape>
173            </Transform>
174            <Transform DEF='AiffOptionalscale='0.4 0.4 0.4translation='4 2 0'>
175                 <Shape>
176                      <Text string='"Optional Support"'>
177                           <FontStyle USE='MessageFont'/>
178                      </Text>
179                      <Appearance USE='AmberAppearance'/>
180                 </Shape>
181            </Transform>
182       </Scene>
183  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: AiffLaunch, AiffOptional, AiffPlay, AiffTextClickedSensor, AmberAppearance, GreenAppearance, HeaderBox, MessageFont, MidiLaunch, MidiPlay, MidiTextClickedSensor, Mp3Launch, Mp3Play, Mp3Recommended, Mp3TextClickedSensor, Testing123stereoAiffAudioClip, Testing123stereoMidiAudioClip, Testing123stereoMp3AudioClip, Testing123stereoWavAudioClip, TextClickSurface, TurquoiseAppearance, WavLaunch, WavPlay, WavRequired, WavTextClickedSensor
-->
X3D Tooltips element index: Anchor, Appearance, AudioClip, Background, Box, Coordinate, FontStyle, head, IndexedFaceSet, Material, meta, ROUTE, Scene, Shape, Sound, Text, TouchSensor, Transform, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table entries with 4 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.

AiffTextClickedSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
Testing123stereoAiffAudioClip
AudioClip
startTime
SFTime

MidiTextClickedSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
Testing123stereoMidiAudioClip
AudioClip
startTime
SFTime

Mp3TextClickedSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
Testing123stereoMp3AudioClip
AudioClip
startTime
SFTime

WavTextClickedSensor
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
Testing123stereoWavAudioClip
AudioClip
startTime
SFTime


Anchor
description='Launch audio file in Web browser: Testing123stereo.wav' 
User-interaction hint for this node. 


Anchor
description='Launch audio file in Web browser: Testing123stereo.mp3' 
User-interaction hint for this node. 


Anchor
description='Launch audio file in Web browser: Reunion_Example.mid' 
User-interaction hint for this node. 


Anchor
description='Launch audio file in Web browser: Testing123stereo.aiff' 
User-interaction hint for this node. 
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/SoundFileFormatsIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/SoundFileFormats.x3d -->

<!-- Color legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->