Adding Sounds

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Adding Sounds

Postby Kato » Sun Jan 20, 2008 10:18 am

Andy said he was having problems with sounds, so I figured I'd post this simple guide.

Sounds require three things. An emitter, an actual sound file, and AlcScript. Let's start with the first thing, an emitter.

In Blender's 3D window, SPACE > Add > Empty. This will be your emitter. Name it to something quick and meaningful (I'll use "Emitter01").

Now, your sound file. You will need the file in WAV and OGG format. The free program Audacity supports exporting of these files. I've made a very, very simple white noise file with it, which I'll use. I'll name it "WhiteNoise01" for now. This will do nicely. I'll export it in WAV and OGG format. I'll put the WAV in my Age's BLEND file's folder. I will also need to copy it to my URU directory (usually C:\Program Files\URU - Complete Chronicles\ or something similar)\sfx\streamingCache, and I will need to copy the OGG file to my URU directory\sfx. This being done, we can now start setting it up.

Open a Video Sequence Editor window in Blender. Use Add > Audio (RAM) to place the file somewhere you'll remember it in this editor. Now save your BLEND, because you've come a long way already.

Open up a Text Editor window (we're done with the Video Sequence Editor, so you can use that) and load up your AlcScript file. Write the following (pay attention to what's in parentheses, they need to be replaced with something else):
Code: Select all
(your emitter's name, mine's Emitter01):
   type: soundemit
   sound:
      flags: loop | start
      file: (your sound file's name, mine's WhiteNoise01)
      volume: 0.05
      type: SoundFX
Save your BLEND again and export. There you have it--sound! :D

BackgroundMusic, Ambience, and a few other things work instead of SoundFX--but I can't see the difference between them yet. Does anyone know?

-Kato
Image
(explorer card designed and created by me)
User avatar
Kato
 
Posts: 315
Joined: Fri Sep 28, 2007 8:02 pm
Location: South USA

Re: Adding Sounds

Postby D'Lanor » Sun Jan 20, 2008 10:36 am

Kato wrote:BackgroundMusic, Ambience, and a few other things work instead of SoundFX--but I can't see the difference between them yet. Does anyone know?

All I know is that it is important to separate them since in game they use different volume sliders. I also wonder what the "few other things" are because AFAIK there are 3 volume sliders.

Edit: And a question... do sounds fade in and out automatically like they sometimes do in Uru (even if the source sound does not)? Or does that require additional properties in the script?
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Adding Sounds

Postby Kato » Sun Jan 20, 2008 10:50 am

That requires additional properties which I am currently looking into.

You can also use SoftVolumes with sounds, but my understanding of SoftVolumes is VERY limited :P

-Kato
Image
(explorer card designed and created by me)
User avatar
Kato
 
Posts: 315
Joined: Fri Sep 28, 2007 8:02 pm
Location: South USA

Re: Adding Sounds

Postby andylegate » Sun Jan 20, 2008 10:55 am

YES! Finally! A hint on how to do these!

Now I must do the dance of joy!!!!
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Adding Sounds

Postby Kato » Sun Jan 20, 2008 12:00 pm

:) Glad to help Andy...let us know how it turns out!

The other possible types are GUISound and NPCVoices.

-Kato

EDIT: Nad and I (well, Nad now, since I gave up :P) are looking into 3D sounds at the moment and he I'll refer him to this thread if he gets anything working. -K
Image
(explorer card designed and created by me)
User avatar
Kato
 
Posts: 315
Joined: Fri Sep 28, 2007 8:02 pm
Location: South USA

Re: Adding Sounds

Postby andylegate » Sun Jan 20, 2008 12:09 pm

Working on it now........

I know I'm going to have questions later.......'course I've got question now. Like the background music. You might not want it to loop. Instead, have it trigger at some point, play once, then stop. So I imagine the flag for it is something other than Loop? :D Er'cana does this. They have the sound trigger in different places, like the Train ladder when you first find the train, then again where you first leave the hopper car and enter the facility.......

Then there are one shot sounds. Like pulling a lever. You'd want that nice mechanical sound, but it only happens when you move the lever.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Adding Sounds

Postby Trylon » Sun Jan 20, 2008 12:11 pm

That's done with sound messages - IIRC those aren't scriptable yet.

*Trylon suddenly notices all those people who stare at him waiting for him to finally start documenting that bloody logic scripting system.
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Adding Sounds

Postby andylegate » Sun Jan 20, 2008 12:25 pm

Ooops.....got an error trying to export.....

Says it doesn't know where the sound file is..... I put it in the same folder as my blend file for my Age as Kato said....

Hmmmm, guess I'll try moving it around.

EDIT: duh, der, duh........Typo! Just love it when I do that. It was fine, I just can't type! :D
Last edited by andylegate on Sun Jan 20, 2008 12:35 pm, edited 1 time in total.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Adding Sounds

Postby Kato » Sun Jan 20, 2008 12:33 pm

3D sounds are WAY easy, as Paradox informed us :)

All you have to do is add " | 3d" after "| start". This makes it 3D automatically, but it also sets the min and max falloff to 0 unfortunately, which means you'd be unable to hear it by just exporting. So what you do in this case is open up the sound in PRPExplorer (it's a Win32StreamingSound) and change the "Max Falloff" and "Min Falloff" to your liking. Min Falloff is the distance before it starts fading, and Max is when it stops completely.

Andy: You did open up the sound in the Video Sequence Editor, right?

-Kato
Image
(explorer card designed and created by me)
User avatar
Kato
 
Posts: 315
Joined: Fri Sep 28, 2007 8:02 pm
Location: South USA

Re: Adding Sounds

Postby andylegate » Sun Jan 20, 2008 12:41 pm

THAT'S JUST TOO FREAKIN AWESOME!!!!!!!!!!!!!!!!!!!!!

It's just.....too.....#%^&^&%^$% cool!

YES! Now THAT's what I'm talking about!!!!!!

Uhm, hey, do have another question though. Let's say I have an area that my avie goes too. Now outside, he'd hear crickets. But inside the crickets would not be heard anymore. Is there a way to null the sound?
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 4 guests