3.16. Sound Play

<sound_play> ‐ Sound playing

3.16.1. Attributes

NameTypeDefaults
sound_playedBOOLEANtrue
sound_spatializationBOOLEANtrue
sound_playerSTRINGEmpty string

3.16.2. Description

This element defines the parameters for sound playing.

The boolean value of the sound_played attribute defines whether sounds are played or not.

The boolean value of the sound_spatialization attribute defines whether sound spatialization messages are emitted or not. If it is set to true, sound spatialization messages are sent to all the udp_remote_clients whose listen_sound_messages attribute is true.

The string value of the sound_player attribute defines the name of the sound playing device. If this string is not empty, a UDP message is sent or a shell command is executed each time a sound file is played. If the device string is Max or pd, a message harmony "sound_file" is be sent through UDP to the sound listening udp_remote_clients. For all the other sound device names, a shell command "sound_device" "sound_file" is launched.

3.16.3. Expected content

None.

3.16.4. Example

In the example below, scene sounds are played through pd that receives the harmony "sound_file" messages. Since sound_spatialization is set to false, the spatialization messages are not emitted.

<sound_play sound_spatialization="false" sound_player="pd" 
  sound_played="true"/>