A funny thing happened while I was re-working "Whitefish Widowmaker" for Marias31. I stumbled upon a possible solution for a sound issue that has annoyed me for awhile, and perhaps others. Now its just possible someone has already aired this out and it may already
be old news; but just in case someone may find it usefull, I'll place it here for review.I've always been dismayed by the fact that AI trains often make little or no sound as they pass. Just as lame, is the fact that they wont idle when stopped. This last issue can be resolved by parking a static train, of course, but just try and get it to go somewhere
later. (chuckle)Well, I read Ralf Hagen's welcome piece of work on sms files. It still leaves a lot unanswered, but the fellow did a world of good by putting it out for us. After tinkering with some unrelated cab sound issues I learned a little more about how these loops function.
My understanding is still woefully inadequate, but I learned enough to figure out some of the reasons behind sound behavior, and modify some code. Here's a piece of code we all know and love:
Skip( **** ******************************************* **** )
Skip( **** Copy of Generic Diesel SMS Used for SL 0 **** )
Skip( **** ******************************************* **** ) ScalabiltyGroup( 0
Activation ( ExternalCam () Distance (500) )
Deactivation (CabCam () PassengerCam () Distance (500) )
Streams ( 1
Stream (
Priority ( 4 )
Triggers ( 6
Variable_Trigger ( Speed_Inc_Past 1.0 StartLoop
( 1 File ( "a_d_comp1.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
Variable_Trigger ( Speed_Inc_Past 50.0 StartLoop
( 1 File ( "a_d_comp2.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
Variable_Trigger ( Speed_Inc_Past 50.0
ReleaseLoopRelease () )
Variable_Trigger ( Speed_Dec_Past 49.0 StartLoop
( 1 File ( "a_d_comp1.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
Variable_Trigger ( Speed_Dec_Past 49.0
ReleaseLoopRelease () )
Variable_Trigger ( Speed_Dec_Past 1.0
ReleaseLoopRelease () )
)
VolumeCurve(
SpeedControlled
CurvePoints ( 3
0.0 0.0
10.0 1.0
100.0 1.0
)
Granularity ( 0.05 )
)
)
)
)
)
Its the final section of sound looping; right out of a typical engine sms file. As far as I know, Its only function is to provide a half-hearted chance noise out of an AI engine should it get close enough for you to hear it --and then, only if its moving beyond a certain speed. This speed threshold for the one and only cruising speed wave file (a_d_comp2.wav) occurs at about 45mph+. Now you know why you cant hear it half the time; the speed increment settings are way too high to be usefull. (notice the 50 figure) Notice too, the first "Variable_Trigger statement. This kicks in the "idling" wavefile. (a_d_comp1.wav) It evidently wont do a thing until the engine is at or beyond 1mph. Little help for a currently parked AI engine. The last variable trigger is the real irony. Presumably,
it drops the engine back down to an "idle" when 1mph is again reached. But you know what happens to an AI train when it reaches its destination. It goes *-- POOF --* and disappears. Little chance for it to stick around and make noise for your pleasure and enjoyment. If that isnt disappointing enough, the DB volume of a_d_comp1 & 2 is so low, that they will often get drowned out by the player engine anyway.So what can ya do? Well, there are some possibilities. Here is a modified piece of code I just successfully tested with "Widow." I used it on the AI freight one meets across the trestle just beyond mile marker 1137. Previously, you could only hear this AI when it
started up to move east again just after you passed it. Parked, it was silent as the tomb.The following is the only contents of an entire file I called "#AI_eng.sms" adapted from the program code in a typical eng file. This is all the file contains. It now lives in the SOUND file folder that the GP9 AI engine file in "Widow" points at to find its ???eng.sms sound file. Take a moment to study some subtle differences between it and the original ScalabilityGroup 0 arrangement above. SIMISA@@@@@@@@@@JINX0x1t______
Tr_SMS (
Skip( **** ******************************************* **** )
Skip( **** Copy of Generic Diesel SMS Used for SL 0 **** )
Skip( **** ******************************************* **** ) ScalabiltyGroup( 0
Activation ( ExternalCam () Distance (500) )
Deactivation (CabCam () PassengerCam () Distance (500) )
Streams ( 1
Stream (
Priority ( 4 )
Triggers ( 6
Initial_Trigger ( StartLoop ( 1 File ( "a_d_comp1.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
Variable_Trigger ( Speed_Inc_Past 10.0 StartLoop
( 1 File ( "a_d_comp2.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
Variable_Trigger ( Speed_Inc_Past 10.0
ReleaseLoopRelease () )
Variable_Trigger ( Speed_Dec_Past 9.0 StartLoop
( 1 File ( "a_d_comp1.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
Variable_Trigger ( Speed_Dec_Past 9.0
ReleaseLoopRelease () )
Variable_Trigger ( Speed_Dec_Past 1.0
ReleaseLoopRelease () )
)
VolumeCurve(
SpeedControlled
CurvePoints ( 3
0.0 1.0
10.0 2.0
100.0 2.0
)
Granularity ( 0.05 )
)
)
)
)
)
The first trigger has been changed from "variable" to "Initial." This means that a_d_comp1 will start looping as soon as the AI train is near enough to hear, regardless of speed. I removed the increment. It will now "idle" in position if it is not moving. If it is moving, the speed at which the cruising sound (a_d_comp2) will cut in or out is still determined by the speed increment variables --but I've changed them. This is where things become an inexact science, and experimentation was called for. It seems that those speed
increment numbers do not correllate directly to mph, but instead, some percentage of... total speed range? ...who knows? Anyway, I dropped from 50 and 49 respectively, to 10 and 9 for speed incrementing. This had the effect of kicking up to cruising sound from idle at about 23mph, and dropping back to idle at about 20mph. For AI engines, this is a much better behavior, I think. And theres more. It is now obvious that we can do a number of things. Notice the curvePoint settings in the right hand column. If I understand Hagen correctly, these are volume settings at which the wave files are played at points along the Volume curve. These can be increased, and I have done so. 1=100% percent of original file volume, and 2=double volume. You can experiment with this, but I wouldnt get too carried away. How about this? Choose two wave files of choice for comp1 and comp2. amplify them up as loud as you want (dont distort them) with a simple wave editor. Save the original a_d_comp1 and a_d_comp2 somewhere, and rename and substitute them with your new preferred files. They are located in the SOUNDS subfolder in the main game directory, and thats where the program expects to find them. The game engine doesnt care what they consist of. Personally, I chose x_cruising1 and x_cruising4 from the GP38 samples for this purpose, and the effect was pretty satisfactory. The AI train was at "idle" when I drew near, and presumably kicked up to cruise by 23mph, but it was in the distance by then. Maybe I'll set the increment speed lower. It is clear we can, to a degree, customize AI engine sounds, and get any AI engine to point at them using the same technique used for helper engines: the creation of a seperate #???eng file exclusively used for that engine consist. It can live inside the original engine folder without disturbing any other aspect of that engine's player behavior. What I havent had time to discover yet, is whether or not you can get ScalabiltyGroup 0 to point to a file other than comp1 or comp2 in the SOUNDS directory. The game code might have us trapped into that avenue, but if it is possible to go elsewhere, then that means we can uniquely customize a seperate sound sms file for each and any AI engine. Time will tell.If all this blather is old news... Then "never mind."Best Wishes,
Yardlimit
Printer-friendly page | Edit | Reply | Reply With Quote | Top