Steam Locomotive Sound vs Driver Rotation
#1
Posted 01 February 2014 - 08:35 AM
In MSTS I've always used "Variable2" to synchronize the playback rate of chugging sounds to the driver rotation for steamers, and I wanted to ask how exactly this works in OR? What really got me wondering was that I noticed a change happened in one of the updates around a month or two ago. Initially "Variable2" for steamers was much different than what OR was doing, which caused "Variable2" linked sounds in the .sms to play very slowly compared to what they did in MSTS. This has gotten much better in the last month or so, but still doesn't exactly match whatever MSTS was doing to calculate this variable for steamers. As it stands today, an engine that has correctly synchronized chug sounds in MSTS plays the sounds back at about 2/3 the needed rate in OR.
So, this got me wondering... In OR, is "Variable2" equivalent to radians / second regarding driver rotation speed, or some other unit? Along with this question, are the units determining Variable2 now permanent for steamers in OR or is this still subject to further revision? I've been tempted to start recalculating the frequency curves in my .sms files for steamers to properly synchronize with the drivers, but didn't want to go through all that if there was a chance this would be getting revised again. http://www.elvastower.com/forums/public/style_emoticons/default/read.gif
Thanks! :pleasantry:
#2
Posted 01 February 2014 - 10:31 AM
#3
Posted 01 February 2014 - 01:41 PM
Variable1 = (Simulator.UseAdvancedAdhesion ? LocomotiveAxle.AxleSpeedMpS : SpeedMpS) / DriverWheelRadiusM; // Unit is [rad/s]. Value of 6.28 means 1 rotation/second. Variable2 = Math.Min(CylinderPressurePSI / MaxBoilerPressurePSI * 100f, 100f); Variable3 = FiringIsManual ? FiringRateController.CurrentValue * 100 : FuelRate.SmoothedValue * 100;
After much research I found out MSTS uses quite similar ones.
Variable2 is proportinal to tractive effort, so it is the best to use for determining the gain of sound, through a VolumeCurve().
What you need, as an answer to your question, is Variable1. I would recommend using this one for adjusting the chugging frequency. I think MSTS uses this same equation for calculating Variable1.
Variable3 should be used to control shovelling sound, as can be heard in original MSTS steam locomotives.
I think these are no longer subject to change.
#4
Posted 01 February 2014 - 02:33 PM
gpz, on 01 February 2014 - 01:41 PM, said:
Variable1 = (Simulator.UseAdvancedAdhesion ? LocomotiveAxle.AxleSpeedMpS : SpeedMpS) / DriverWheelRadiusM; // Unit is [rad/s]. Value of 6.28 means 1 rotation/second. Variable2 = Math.Min(CylinderPressurePSI / MaxBoilerPressurePSI * 100f, 100f); Variable3 = FiringIsManual ? FiringRateController.CurrentValue * 100 : FuelRate.SmoothedValue * 100;
After much research I found out MSTS uses quite similar ones.
Variable2 is proportinal to tractive effort, so it is the best to use for determining the gain of sound, through a VolumeCurve().
What you need, as an answer to your question, is Variable1. I would recommend using this one for adjusting the chugging frequency. I think MSTS uses this
Ah yes - you're right, my saying Variable2 in the first post was a typo on my part, as Variable1 is what I actually meant. That makes perfect sense to use radians / sec as the unit... There's obviously something that MSTS does that's a little different since they don't match the same between the two sims. Regardless, since you're feeling pretty comfortable that this won't be changing I think will start converting my old MSTS .sms files to new OR versions.
Thanks very much http://www.elvastower.com/forums/public/style_emoticons/default/sign_thank_you.gif
#5
Posted 08 February 2014 - 02:06 PM
This seems to suggest that Variable2 isn't ever reaching a value of "0" as it is being calculated by OR... If Variable2 is supposed to be equivalent to tractive effort, shouldn't it be equal to zero when the throttle is closed? Or are there other factors being taken into consideration within the OR steam physics model that prevent Variable2 from achieving a value of zero?
#6
Posted 08 February 2014 - 02:35 PM
#7
Posted 08 February 2014 - 05:13 PM
This still leaves me unsure of how to deal with what I'm seeing, or rather hearing, in trying to utilize Variable2 as a way to specify volume curves in the .sms file. I've been doing a fair amount of experimentation today attempting to adjust the volume curves for the "chugging" sound streams in the .sms and have not been able to achieve silence of these sounds when the throttle on a steam locomotive is fully closed.
The one thing I tried which came close to success was to set the volume curve to be a volume of zero for Variable2 values of about 5 or 6 and less. This caused some other strange things to happen though, in particular having the "chug" sounds remain silent when starting from the initial standstill up to about 10 mph or so when the related sound stream would suddenly start to play - and this was while the throttle was wide open and the reverser fully forward from the beginning.
If Variable2 is supposed to represent cylinder pressure, shouldn't it be equal to zero when the throttle is closed and no steam is being admitted to the cylinders? Or is Variable2 being used elsewhere in calculations to represent cylinder back pressure for near neutral reverser settings or when the locomotive is drifting?
#8
Posted 09 February 2014 - 04:47 AM
#9
Posted 01 March 2014 - 01:41 PM
Brandon
#10
Posted 02 March 2014 - 01:44 AM
ATSF3751, on 01 March 2014 - 01:41 PM, said:
Everything is coded into these three equations in OpenRails:
Variable1 = (Simulator.UseAdvancedAdhesion ? LocomotiveAxle.AxleSpeedMpS : SpeedMpS) / DriverWheelRadiusM; // Unit is [rad/s]. Value of 6.28 means 1 rotation/second. Variable2 = Math.Min(CylinderPressurePSI / MaxBoilerPressurePSI * 100f, 100f); Variable3 = FiringIsManual ? FiringRateController.CurrentValue * 100 : FuelRate.SmoothedValue * 100;
Could you please advise what the correct ones would be to match exactly MSTS?