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)

MessageParametersDescription
filestringloads 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).
amplitudefloatloudness, 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.
fallofffloatThe distance that the sound carries. Beyond this distance, measured from the outside of the volume, the sound is silent.
loopboolturns looping on and off
play starts the sound
stop stops the sound

(c) Ben Chang