{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.3",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.3.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"SoundVisualization.x3d"
          },
          {
            "@name":"description",
            "@content":"An example of the Sound node for testing X3D-Edit author-assist visualization"
          },
          {
            "@name":"created",
            "@content":"15 November 2009"
          },
          {
            "@name":"modified",
            "@content":"2 March 2026"
          },
          {
            "@name":"Image",
            "@content":"SoundVisualization.png"
          },
          {
            "@name":"reference",
            "@content":"https://X3dGraphics.com"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dResources.html"
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"rights",
            "@content":"Copyright 2009, Daly Realism and Don Brutzman"
          },
          {
            "@name":"subject",
            "@content":"X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/SoundVisualization.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"17 April 2026"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"reference",
            "@content":"X3D JSON encoding: https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          {
            "#comment":"Note that navigation mode shifts to WALK when ViewInside is bound, otherwise default is EXAMINE"
          },
          { "WorldInfo":
            {
              "@title":"SoundVisualization.x3d"
            }
          },
          { "Viewpoint":
            {
              "@DEF":"ViewOutside",
              "@description":"outside",
              "@position":[0,8,40]
            }
          },
          { "NavigationInfo":
            {
              "@DEF":"NavOutside"
            }
          },
          { "ROUTE":
            {
              "@fromField":"isBound",
              "@fromNode":"ViewOutside",
              "@toField":"set_bind",
              "@toNode":"NavOutside"
            }
          },
          { "Viewpoint":
            {
              "@DEF":"ViewInside",
              "@description":"inside",
              "@position":[0,1.6,6]
            }
          },
          { "NavigationInfo":
            {
              "@DEF":"NavInside",
              "@type":["WALK","ANY"]
            }
          },
          { "ROUTE":
            {
              "@fromField":"isBound",
              "@fromNode":"ViewInside",
              "@toField":"set_bind",
              "@toNode":"NavInside"
            }
          },
          { "Viewpoint":
            {
              "@DEF":"ViewAbove",
              "@description":"above",
              "@orientation":[1,0,0,-1.57079],
              "@position":[0,40,0]
            }
          },
          { "Inline":
            {
              "@DEF":"GridXZ_20x20Fixed",
              "@url":["../../Savage/Tools/Authoring/GridXZ_20x20Fixed.x3d","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXZ_20x20Fixed.x3d","../../Savage/Tools/Authoring/GridXZ_20x20Fixed.wrl","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/GridXZ_20x20Fixed.wrl"]
            }
          },
          { "ROUTE":
            {
              "@fromField":"isBound",
              "@fromNode":"ViewAbove",
              "@toField":"set_bind",
              "@toNode":"NavOutside"
            }
          },
          {
            "#comment":"Sound node example"
          },
          { "Sound":
            {
              "@direction":[1,0,1],
              "@location":[-3,1.6,-3],
              "@maxBack":6,
              "@minBack":5,
              "-source":
                { "AudioClip":
                  {
                    "@DEF":"WaterSounds",
                    "@description":"Running Water",
                    "@url":["aqua.wav","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/aqua.wav"]
                  }
                }
            }
          },
          {
            "#comment":"=================="
          },
          {
            "#comment":"Sound outlines, patterned after https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/SoundAudioClip.x3d"
          },
          {
            "#comment":"Approximate ellipsoidal footprints and envelope using Cylinders and Spheres, respectively"
          },
          {
            "#comment":"Sound direction is x axis, so minimum-attenuation minLength = (minBack + minFront) and minRadius = minLength/2 along x axis"
          },
          {
            "#comment":"and so width, height dimensions ~= maximum-attenuation halfwidth = maxWidth ~= 45 along y, z axes"
          },
          {
            "#comment":"Ellipsoid focus is (0 0 0) but geometric center offset for spheroidal approximation is (-minBack + minRadius)"
          },
          { "Transform":
            {
              "@rotation":[0,1,0,-2.356194490192345],
              "@translation":[-3,1.6,-3],
              "-children":[
                { "Transform":
                  {
                    "@rotation":[1,0,0,0.0],
                    "-children":[
                      {
                        "#comment":"here is local center of sound ellipse, with local X axis pointed along direction vector"
                      },
                      { "Inline":
                        {
                          "@DEF":"CoordinateAxes",
                          "@url":["../Chapter03Grouping/CoordinateAxes.x3d","../../Savage/Tools/Authoring/CoordinateAxes.x3d","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d","../Chapter03Grouping/CoordinateAxes.wrl","../../Savage/Tools/Authoring/CoordinateAxes.wrl","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl"]
                        }
                      },
                      { "Transform":
                        {
                          "@scale":[6.0,2.23606797749979,2.23606797749979],
                          "@translation":[-2,0,0],
                          "-children":[
                            { "Collision":
                              {
                                "@enabled":false,
                                "-children":[
                                  { "Shape":
                                    {
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":0.04,
                                            "@radius":0.5,
                                            "@side":false
                                          }
                                        },
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "-material":
                                              { "Material":
                                                {
                                                  "@diffuseColor":[0.8,0.6,0.4],
                                                  "@emissiveColor":[0.8,0.6,0.4],
                                                  "@transparency":0.7
                                                }
                                              }
                                          }
                                        }
                                    }
                                  },
                                  { "Shape":
                                    {
                                      "-geometry":
                                        { "Sphere":
                                          {
                                            "@radius":0.5
                                          }
                                        },
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "-material":
                                              { "Material":
                                                {
                                                  "@diffuseColor":[0.8,0.6,0.4],
                                                  "@emissiveColor":[0.8,0.6,0.4],
                                                  "@transparency":0.7
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      { "Transform":
                        {
                          "@scale":[16.0,7.745966692414834,7.745966692414834],
                          "@translation":[2,0,0],
                          "-children":[
                            { "Collision":
                              {
                                "@enabled":false,
                                "-children":[
                                  { "Shape":
                                    {
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":0.02,
                                            "@radius":0.5,
                                            "@side":false
                                          }
                                        },
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "-material":
                                              { "Material":
                                                {
                                                  "@diffuseColor":[0.4,0.3,0.2],
                                                  "@emissiveColor":[0.4,0.3,0.2],
                                                  "@transparency":0.85
                                                }
                                              }
                                          }
                                        }
                                    }
                                  },
                                  { "Shape":
                                    {
                                      "-geometry":
                                        { "Sphere":
                                          {
                                            "@radius":0.5
                                          }
                                        },
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "-material":
                                              { "Material":
                                                {
                                                  "@diffuseColor":[0.4,0.3,0.2],
                                                  "@emissiveColor":[0.4,0.3,0.2],
                                                  "@transparency":0.85
                                                }
                                              }
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          {
            "#comment":"=================="
          }
        ]
    }
  }
}