The Sound Node
The Sound node is the built-in sound functionality in Ygdrasil. It can play sample files in WAV or AIFF format, can loop samples, and provides basic 2 or 4 channel localization. The Sound node is placed in the scene like any other node, and can be positioned, moved, and animated just like any other node.Node Syntax:
sound (file("sample file"),
volume(sound volume),
amplitude(float),
falloff(float),
loop(bool),
play)
| Message | Parameters | Description |
| file | string | loads a sample file |
| volume | sphere x y z radius cylinder x1 y1 z1 x2 y2 z2 radius box x1 y1 z1 x2 y2 z1 | NOT the loudness, but the spatial volume in which the sound is audible at full amplitude (as set by the amplitude message). |
| amplitude | float | loudness, on a scale from 0 to 1.0. You can set the amplitude to values greater than 1.0, but this will usually cause unpleasant distortion. |
| falloff | float | The distance that the sound carries. Beyond this distance, measured from the outside of the volume, the sound is silent. |
| loop | bool | turns looping on and off |
| play | starts the sound | |
| stop | stops the sound |
(c) Ben Chang