PDA

View Full Version : Adding sound to a static, animated object.


Hawk
09-30-2006, 04:17 PM
Hey folks,
Larry Mullett built a fine Civil War cannon and I've added animation to it. He sent me a sound file for it too.
Is there any way to add this sound to a static, animated object? It's a 3 second wav file and he sent an sms file with it.

Also, is there any way to add a puff of smoke to it when it fires?

DCRR1
09-30-2006, 04:48 PM
Hey Hawk:

I'm a little hazy on this. When you add the object to the route, you should also define a Sound Region of about 75m-100m for a cannon. Then add the .sms and .wav to the route Sound folder.

Hope this helps, can't help with smoke, unless the cannon was made by Alco.

John

"BNSFLADY"
CYNDI RICHARDS
You will always
be here with us.

Hawk
09-30-2006, 05:05 PM
Thanks John.
I guess now I need to figure out how to make a sound region. I saw how to place it in RE. Apparently it needs to be on a track section as it told me it was too far from a track or road.
I can bury a piece of track though, so that's not a problem.

I don't think Alco was around in 1862. :-)

inflammable
09-30-2006, 05:51 PM
I'm not sure how you've animated it, but you should be able to put in some polys, that hide underground, then pop up when it fires, disperse a little, then hide back underground. Using the normal smoke ACE, from either the diesels or the steamers, and it should work out easily enough.

James

Hawk
09-30-2006, 05:55 PM
Right now it's just a static object, not an engine. I suppose I could convert it to an engine.
Never made an engine though. :-)

Turbo Bill
10-01-2006, 12:10 AM
I've seen this type of animation, well sort of, on Robert Reedy's redone ADFR for the Cascade and Northweestern Virtual Railroad. The route is available here. He has an object of a tree being cut down. The tree falls then another takes it's place. You may be able to look at how he got that animation or whoever created it and do something similar with the smoke effect. I also built the sound file from scratch for the helicopters on this route and Robert Added them to the objects. These helicopters had no sound in their original configuration. So, if the sound file you have now is properly converted, it can be added to a route object with not much difficulty. Again I would look at how the helicopter is set up in the above mentioned route as well and look at some of it's concepts. You may have to investigate a little but you should be able to acheive your desired goals.

PS: I was able to compress the sound wave file for the helicopters as well as other items in the route including the detectors to less then half their original size, yet they play at normal speed in the sim when you encounter them.

charlie
10-01-2006, 09:44 AM
Ed,

There's a difference between sound "region" and sound "source". A "source" can be placed anywhere away fron the track.

In Seaview4 (I know you have it :) ), jump to -81.87523/31.39540 to see how sound is added to the animated helicopter.

Open the *.sms files in the SV4 Sound folder to see how they are contructed with respect to Activation/Deactivation distances and the triggering system.

An example from calliope.sms:

SIMISA@@@@@@@@@@JINX0x1t______



Tr_SMS (

ScalabiltyGroup( 3
Activation (
ExternalCam ()
PassengerCam ()
Distance (300)
)
Deactivation (
CabCam ()
Distance (300)
)
Volume ( 1.0)
Streams ( 1
Stream (
Priority ( 2 )
Triggers ( 2
Variable_Trigger ( Distance_Dec_Past 280
StartLoop ( 1
File ( "calliope.wav" -1 )
SelectionMethod ( RandomSelection )
)
)
Variable_Trigger ( Distance_Inc_Past 290
ReleaseLoopRelease ( )
)
)
VolumeCurve(
DistanceControlled
CurvePoints ( 3
0.0 1.0
100.0 1.0
290.0 0.0
)
Granularity (0.01)
)
)
)
)
)

regards,
charlie

Hawk
10-01-2006, 09:51 AM
OK! I understand the basics of what you're saying Charlie.
Now, maybe you can help me with this. I have a 3 second wav file but the canon only fires every 35 seconds, at present.
Would I have to edit the wav file to last longer, with 32 seconds of silence, or can that be done in the sound source file?
Here's the sms file that was sent to me along with the wav file.

SIMISA@@@@@@@@@@JINX0x1t______



Tr_SMS (

Skip (mono loop & spot )

ScalabiltyGroup( 3
Activation (
ExternalCam ()
PassengerCam ()
Distance (75)
)
Deactivation (

CabCam ()
Distance (75)
)
Volume ( 2.0)
Stereo ()
Streams ( 1
Stream (
Priority ( 2 )
Triggers ( 1
Random_Trigger ( Delay_Min_Max ( 1 2 ) Volume_Min_Max ( 0.95 1.0 )
PlayOneShot ( 2
File ( "Track109.WAV" -1 )
SelectionMethod ( RandomSelection )
)
)
)
)
)
)
)

charlie
10-01-2006, 10:16 AM
Ed,

Coincidentally I was about to edit my post above to say that you might want to add some "dead air time" at the beginning of your wav file.

Something to get your new autoloading repeater under control. :)

It may be possible in the sms, but it doesn't readily occur to me "by inspection". The Tech Docs don't appear to give any help in this area.

Another way might be as in SV4 "crossing.sms", where multiple wav files are triggered sequentially, but this seems to be unnecessarily complicated. With this method, you could have other sounds on either side of the cannon firing.

regards,
charlie

EDIT: Interesting... It should be obvious by now that I haven't a clue as to what "Random_Trigger ( Delay_Min_Max ( 1 2 )" means and how you intelligently change it. :)

Hawk
10-01-2006, 12:06 PM
Actually, I believe the dead air time needs to be added at the end since the canon fires as soon as you place it, but either way, I think you're right that editing the wav file might be the easiest way.
Thanks! :-)

Swissie
10-05-2006, 12:55 PM
I think there is a 'time trigger' for sounds, but I will need to investigate it again. But I've seen something to that sort in the .sms for some of the Italian locomotives for MSTS (e.g. the compressor starts to play after a certain amount of time has passed, which is defined via a minimum and maximum amount of seconds for the intervall). Don't know if it works with a static sound source as well, but I guess it should.

Lukas a.k.a Swissie

Hawk
10-05-2006, 08:11 PM
Well, I've managed to edit the wav file to 35 seconds with about 32 seconds of silence. Problem is it's gone from 129kb to 1.47mb.
I now can't get it to play at all too. More work is needed but other things have come up so I've put it on the back burner for a couple of days.
If you happen to come up with any ideas though, I'm all ears. I still have the original 3 second wav.

Swissie
10-05-2006, 09:01 PM
Hi again,

the trigger I have seen in some .sms files for engines uses e.g.:

Delay_Min_Max ( 1.0 1.0 )

however it is a discrete_trigger (i.e. triggered by the player moving some control in the cab). Not sure if and how it could be turned into a variable_trigger.

Let's hope for one of the sound experts to shed some light...

Lukas a.k.a Swissie