Adding Sounds I
Sounds are extremely powerful media, and can be used to easily change and enhance the mood and setting of an Age. Adding sounds with Blender and PyPRP can seem daunting, but is relatively easy with good examples.
Contents
Setting up Blender
Open your Age's .blend file in Blender and position the cursor at the location from which you would like your sound to originate. If you are using non-3D sounds, the location is not important, but be sure to position it accurately for 3D sounds. Add an Empty object via the Add menu. Give the object a name and a page_num property. This is your emitter object.
AlcScript
AlcScript enables you to configure a number of parameters with regards to your sound object. See the AlcScript sound properties reference for a full listing, but all sounds will share a basic structure in AlcScript.
<name of emitter object>: type: soundemit sound: flags: - <flags> file: <name of file> volume: <sound volume between 0.0 and 1.0> type: <sound type>
Copy that into your AlcScript text file.
Loading the Sound in Blender
In Blender, go to the Scene Properties [F10] and click the sound button. From the menu, select an existing sound or open a new file. The filetype must be .wav (although Uru requires .ogg as a filetype for sounds). If you have your sound file in a .ogg format, a .wav file can easily be generated using free tools. After opening a file, you can play it using the "Play" button, or by splitting an Audio Window and selecting the sound. In the Audio Window you should be presented with a waveform of your sound file. [ALT+A] will play your sound in the Audio Window. This is your sound object.
You can rename the sound object in the Scene Properties or the Audio Window. Keep note of what name you assign to your sound object.
Blender may occasionally "forget" about your sound between save/reload cycles. If the sound is missing when you try to export, you will get an error. Simply re-open the sound file to fix the problem. After an export, all of the sound files are saved to the .blend file so that they will not vanish between sessions. To take advantage of this feature, make sure that you save the .blend file after an export.
Changing Variables
Flags
Plasma supports 3D sounds, which are played as if they originated from a define emission point; and non-3D sounds, which can be heard equally in all locations. Plasma also allows you to configure whether the sound should begin playing automatically upon linking in, and if the sound should be heard by everyone in the Age or just the local avatar.
Flags are specified in AlcScript. For a general background sound, the flags localonly and autostart should be set as follows:
flags: - localonly - autostart
Type
Plasma supports different volumes for different types of sounds. The user is able to configure volumes for background music, sound effects, and character speeches separately. It is important to set the proper type for your sound object, otherwise it might not be heard.
For ambient sounds, the "ambient" value can be specified; whereas background music can set the "backgroundmusic" value.
type: backgroundmusic
Volume
Volume is a fairly simple concept. In Plasma, it is a floating point value between 0.0 and 1.0
volume: 0.5
File
This is the name of your sound object. It is a simple string containing the name that you assigned earlier.
file: MySoundObject
Exporting
If everything is added correctly, save you .blend file and export using the PyPRP plugin. When the export finishes, save your .blend file again to keep all of your sound objects intact.
Sounds in Uru
After copying the Age files to your /dat/ folder, there is one more step before sounds can be heard in Uru. Copy the .ogg version of your sound file into Uru's /sfx/ folder.
(added by Kierra)Please note that you will have to download a .wav to .ogg converter if you do not already have one. Just google .wav to .ogg, or try the one I use, Micosoft's Acez all audio converter. It is very easy to use. After you convert your .wav sound file to .ogg, just cut or copy the file and place in Uru's sfx folder.
Changing Sounds
If you need to change your sound(s) from one file to another, be sure to delete your age's .sav file from it's directory, otherwise you won't hear the sound. It won't matter for other people, but it will keep your from properly testing your own age. .sav files are found in the Uru installation directory (usually Program Files\Ubisoft\Cyan Worlds\Myst Uru Complete Chronicles) under this path:
<Uru Directory\sav\<random numbers>\current\<age name><more random numbers>.sav
Advanced Properties
Please see the Adding Sounds II tutorial.