VOS Object Type Definition

sound

OTD #018; Revision 3.

Group: sound.

This object type contains sound data and information regarding playback of the sound effect or stream, and sends and receives messages to control playback of the associated sounds. It may be combined with other object types to place the sound in a particular context, for example, in a 3D space using object3d. The behavior of remote and local objects is different: remote objects recieve update messages from the local object, and should perform the acctual sound control. When it sends an update message to the remote object, the local sound may or may not also perform the associated action locally.

Authors

Reed Hedges, Interreality (http://www.interreality.org) (reed@zerohour.net) (http://zerohour.net/~reed)

Child Objects

 

sound:sound [property:property] (required.)

The sound data. Recommended types to support are the various MOD formats (sound/x-mod, sound/x-s3m, sound/x-xm, sound/x-it), raw wave samples (sound/wav, sound/aiff), Ogg Vorbis (sound/x-ogg), and MP3 (sound/mp3), and URL to Ogg or MP3 ("Shoutcast") stream (sound/x-mp3-stream? sound/x-ogg-stream?).

 

sound:loop [property:property] (optional.)

This property may contain one of two plain text values: "yes" and "no". If this property contains the text "yes", then playback of the sound should loop; that is, when the end of the sound is reached, it should begin again. If omitted, a value of "no" may be assumed.

 

sound:immediate [property:property] (optional.)

This property may contain one of two plain text values: "yes" and "no". If this property contains "yes", then the sound should be played as soon as the "sound" property changes, or is first recieved (that is, when a "property-update" message is recieved for "sound").

 

sound:state [property:property] (required.)

This property contains the current state of this sound. It must be one of the following plain text values: "play" for playing, "pause" for temporarily paused, or "stop", for not playing at all. When this property changes, actual sound playback by the remote object should reflect the new state.

Messages

this type defines no new messages.

History of this document

Revision 0 (Wed Mar 6 12:54:57 EST 2002):
Created by Reed. TODO: volume information, fields on "play" message for "filters" such as speed, pitch, etc.
Revision 1 (Wed May 1 13:44:45 EDT 2002):
Changed methods to just "update". (maybe should be "accepts,apdate", technically?). Added notes about remote vs. local objects recieving messages.
Revision 2 (Tue Aug 27 01:35:57 EDT 2002):
Added state property, and changed group to "sound". [rh].
Revision 3 (Thu Dec 26 18:22:13 EST 2002):
Added group prefixes, changed "property" to "property:property". Changed "sound:state".