Difference between revisions of "Adding Sounds I"

 
(2 intermediate revisions by 2 users not shown)
Line 39: Line 39:
  
 
=== Type ===
 
=== 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.
+
Plasma supports different volumes for different types of sounds. The user is able to configure volumes for ambient sounds, 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.
+
For ambient sounds, the "ambience" value can be specified;
 +
        type: ambience
 +
 
 +
For background music;
 
         type: backgroundmusic
 
         type: backgroundmusic
 +
 +
For sound effects;
 +
        type: soundfx
 +
 +
For character speeches;
 +
        type: npcvoices
 +
 +
The main purpose of this setting is to differentiate between different types of sounds for the volume adjustment panel in URU under settings. There is no hard set of rules as to which sound goes where, but a simple guideline could be this: For every sound in your age always ask yourself which slider the player would logically use to control it.
  
 
=== Volume ===
 
=== Volume ===
Line 82: Line 93:
 
== Advanced Properties ==
 
== Advanced Properties ==
 
Please see the [[Adding Sounds II]] tutorial.
 
Please see the [[Adding Sounds II]] tutorial.
 +
 +
[[Category:AlcScript]]

Latest revision as of 08:58, 18 April 2011

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.

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

NOTE: This section is now obsolete. You no longer need to load the sound itself into Blender. Just make sure the .WAV or .OGG file is in the same directory as your Blender file.

Example Showing audio and alcscript

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 ambient sounds, 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 "ambience" value can be specified;

        type: ambience

For background music;

        type: backgroundmusic

For sound effects;

        type: soundfx

For character speeches;

        type: npcvoices

The main purpose of this setting is to differentiate between different types of sounds for the volume adjustment panel in URU under settings. There is no hard set of rules as to which sound goes where, but a simple guideline could be this: For every sound in your age always ask yourself which slider the player would logically use to control it.

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 file - minus the extension. For example, if your file is MySoundFile.ogg, enter the folowing:

        file: MySoundFile

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.

Using Built-In URU Sounds

Cyan has given the fan community permission to use the library of sounds in URU with fan-created ages. To make use of these sounds without having to copy the OGG files into your Blender file's directory, you'll need to set up the sound paths in Blender.

Create a new scene in Blender. Then pull down the menu bar until you can see the User Preferences panel. See the image below.

SoundPathGUI.jpg

Click on the "File Paths" button. In the "Sounds:" input field, enter the path to your URU installation's 'sfx' folder and hit Enter.

Note: These settings are not saved per file - they are global settings. You'll need to set this as the default; otherwise, each time you export your age, you will need to reset this path. To make this the default, choose File->"Save Default Settings"


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.