Steam Locomotive Sound vs Driver Rotation
#31
Posted 05 March 2014 - 05:13 AM
In a two cilinder compound two.
In a three cilinder, six
In a duplex T1, two plus two cylinders four plus four, no sync.
In a Mallet....
How to manage all that?
Regards.
RTP
#32
Posted 05 March 2014 - 08:42 AM
gpz, on 05 March 2014 - 04:14 AM, said:
It certainly fits the MSTS logic. Animation frames are controlled in the S file by a statement, animation ( 16 30 , with the second figure controlling animation speed. This number can be increased or decreased to match an sms , but for each speed range, the animation will only match the sound for a very short time. It is not the sound that changes, it is the animation speed.
The OR calculation for wheel rotation does not seem to bear any relationship with the animation speed in the S file so this would not work here, but the animation speed could be adjusted to change the visual rotation of the wheel. I will have to do some experimenting to see how that would affect other items like steam usage.
#33
Posted 05 March 2014 - 08:52 AM
Various steam chuff files are synchronized to the speed of the train.
Here is the applicable section from the Scotsman file:
Stream ( Priority ( 6 ) Triggers ( 14 Variable_Trigger ( Speed_Inc_Past 4 StartLoop ( 1 File ( "x_fs_power_cruise2.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Inc_Past 9 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Inc_Past 12 StartLoop ( 1 File ( "x_fs_power_cruise4.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Inc_Past 17 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Inc_Past 20 StartLoop ( 1 File ( "x_fs_power_cruise6.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Inc_Past 25 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Inc_Past 28 StartLoop ( 1 File ( "x_fs_power_cruise8.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Dec_Past 28 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Dec_Past 25 StartLoop ( 1 File ( "x_fs_power_cruise6.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Dec_Past 20 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Dec_Past 17 StartLoop ( 1 File ( "x_fs_power_cruise4.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Dec_Past 12 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Dec_Past 9 StartLoop ( 1 File ( "x_fs_power_cruise2.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Dec_Past 4 ReleaseLoopRelease () ) ) VolumeCurve ( SpeedControlled CurvePoints ( 41 0.0, 0.0 0.2, 0.2 0.4, 0.4 0.6, 0.6 0.8, 0.8 1.0, 1.0 4.2, 0.8 4.4, 0.6 4.6, 0.4 4.8, 0.2 5.0, 0.0 8.2, 0.2 8.4, 0.4 8.6, 0.6 8.8, 0.8 9.0, 1.0 12.2, 0.8 12.4, 0.6 12.6, 0.4 12.8, 0.2 13.0, 0.0 16.2, 0.2 16.4, 0.4 16.6, 0.6 16.8, 0.8 17.0, 1.0 20.2, 0.8 20.4, 0.6 20.6, 0.4 20.8, 0.2 21.0, 0.0 24.2, 0.2 24.4, 0.4 24.6, 0.6 24.8, 0.8 25.0, 1.0 28.2, 0.8 28.4, 0.6 28.6, 0.4 28.8, 0.2 29.0, 0.0 ) Granularity (0.01) ) ) Stream ( Priority ( 6 ) Triggers ( 14 Variable_Trigger ( Speed_Inc_Past 4 StartLoop ( 1 File ( "x_fs_power_cruise2.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Inc_Past 9 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Inc_Past 12 StartLoop ( 1 File ( "x_fs_power_cruise4.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Inc_Past 17 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Inc_Past 20 StartLoop ( 1 File ( "x_fs_power_cruise6.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Inc_Past 25 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Inc_Past 28 StartLoop ( 1 File ( "x_fs_power_cruise8.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Dec_Past 28 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Dec_Past 25 StartLoop ( 1 File ( "x_fs_power_cruise6.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Dec_Past 20 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Dec_Past 17 StartLoop ( 1 File ( "x_fs_power_cruise4.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Dec_Past 12 ReleaseLoopRelease () ) Variable_Trigger ( Speed_Dec_Past 9 StartLoop ( 1 File ( "x_fs_power_cruise2.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( Speed_Dec_Past 4 ReleaseLoopRelease () ) ) VolumeCurve ( SpeedControlled CurvePoints ( 35 4.2, 0.2 4.4, 0.4 4.6, 0.6 4.8, 0.8 5.0, 1.0 8.2, 0.8 8.4, 0.6 8.6, 0.4 8.8, 0.2 9.0, 0.0 12.2, 0.2 12.4, 0.4 12.6, 0.6 12.8, 0.8 13.0, 1.0 16.2, 0.8 16.4, 0.6 16.6, 0.4 16.8, 0.2 17.0, 0.0 20.2, 0.2 20.4, 0.4 20.6, 0.6 20.8, 0.8 21.0, 1.0 24.2, 0.8 24.4, 0.6 24.6, 0.4 24.8, 0.2 25.0, 0.0 28.2, 0.2 28.4, 0.4 28.6, 0.6 28.8, 0.8 29.0, 1.0 ) Granularity (0.01) ) )
If you listen to the applicable files, for instance x_fs_power_cruise1.wav, you'll hear a long looping chuffing sound, and then, as the locomotive increases speed, it switches to the next file to get the next speed range. So, once the speed passes 5kmh, it releases the loop, and then it kicks in x_fs_power_cruise2.wav up to 8kph, then releases that loop and loading a new one, continuing on up until the locomotive has no more sound files to load.
Driver rotation has nothing to do with it. Yes, I know what the .sms file says in the comments :) . It's all based on speed, and unfortunately, the code was reading the speeds out of the .sms file incorrectly, hence it was out of sync, because the sound effects didn't match the speed of the locomotive.
I spent a while running the Scotsman on high volume, (much to my wife's chagrin ;) ) and tried a fix, X2081.
If someone could be so kind as to try it out and let me know if their perception matches mine... :p
Robert
#34
Posted 05 March 2014 - 08:58 AM
RTP, on 05 March 2014 - 05:13 AM, said:
In a two cilinder compound two.
In a three cilinder, six
In a duplex T1, two plus two cylinders four plus four, no sync.
In a Mallet....
How to manage all that?
Regards.
RTP
For three cylinder locomotives, the sound should be managed in the .sms file for the locomotive for sound, see above. By adjusting the speed parameters until you get the appropriate six chuffs per driver rotation. This would also apply to your four cylinder duplex, or even a 3 cylinder Shay.
For an Articulated locomotive, MSTS/OR requires two .eng files, and each one should specify a different .sms file for each engine.
As for the exhaust/cylinders above 2, that will need to be added in an OR engine file so it can be read into the code and adjustments made. The parameters are currently hard coded in the steam exhaust code, but can be easily changed when the proper parameter can be read out of an OR engine file for the locomotive in the future.
I hope that helps!
Robert
#35
Posted 05 March 2014 - 09:12 AM
I believe the difficulty is in not knowing how MSTS actually used Variable1 and what it was used for besides the obvious. There's still a lot of mysteries that we can't know without access to the original source code.
Robert
#36
Posted 05 March 2014 - 10:22 AM
Robert,
your fix has had an unfortunate side effect on the Scotsman sounds. The cross fade is much longer, falling to near silent for a few seconds in some cases. Not using full volume here as it annoys the neighbours.
#37
Posted 05 March 2014 - 10:35 AM
Found it! VolumeCurve. Fixed, X2082. Scotsman sounds are back to normal and better synchronized.
Whew! Tired of blowing up the speakers and counting to four... :)
Robert
#38
Posted 05 March 2014 - 02:41 PM
rdamurphy, on 05 March 2014 - 08:52 AM, said:
I spent a while running the Scotsman on high volume, (much to my wife's chagrin ;) ) and tried a fix, X2081.
Please can you use the correct conversion routines (e.g. MpS.ToKpH) and not hard-code random constants into the code, thanks. :p
#39
Posted 05 March 2014 - 06:38 PM
#40
Posted 05 March 2014 - 11:07 PM
rdamurphy, on 05 March 2014 - 08:52 AM, said:
I haven't checked your modifications yet, but reading your description in this topic, it seems to be a good catch! With this mod you fixed the default steam locomotives, because they don't use Variable1 for sync. But Varible1 is intended for use to sync rotation to chuff, only it was not used by the default locos. But community addons do use it.
So the problem still remains, that MSTS Variable1 is about 2/3 "slower" than OpenRails' one. Probably it is 2/pi. If everyone agrees here, I commit a change today evening, adding a 2/pi multiplier to steam Variable1. And everyone can test then if it solves the issue. Is anyone against?