Elvas Tower: Engine sounds below idle - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Engine sounds below idle A method I have successfully implemented on the 70-tonner. Rate Topic: -----

#1 User is offline   ErickC 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,044
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 29 January 2023 - 05:14 PM

One of the nice things about Open Rails is that the throttle RPM tab completely separates the specified speed at any given throttle setting from the minimum and maximum RPM values. We can exploit this in several interesting ways. My first experiment involved the as-yet-WIP 567D2/D3/D3A sounds. About halfway through the process, I realized that the quoted idle RPM for the 567D2 and 567D3 did not mesh with any real-world locomotives. Sources, including EMD manuals, quoted the same 275 RPM idle speed as the roots-blown 567 models (e.g., 567C). This is incorrect. Observing any real-world GP20 or GP30 in operation makes it plain that all turbocharged 567 engines idle at the same 315 RPM as the 567D3A. I quickly adjusted the throttle RPM tab to see what would happen, and, to my surprise, the engine came up to 315 RPM, with a corresponding rise in engine pitch to the correct RPM as the engine speed passed through 275 RPM to 315. This test gave me three new pieces of information:

1. The "zero percent" point used by any curves controlled by "variable2" in an SMS file is determined by the idle RPM set in the engine tables.
2. The actual in-sim idle RPM is determined by the diesel throttle tab.
3. Therefore, the SMS will respect the zero point and engine pitch will increase as it should to the actual specified idle RPM.

I suspected the same would hold true for maximum RPM. The original plan was to have three SMS files, one for the 567D2 (without inertial air intake or traction motor blower effects, pneumatic motor relay noises, 315-835 RPM range), one for the 567D3 (with inertial intake and traction blower effects, electronic motor relay noises, 315-835 RPM range), and 567D3A (same as 567D3, but with a maximum RPM of 900). I reasoned that I could set the maximum RPM in all locomotives to 900 RPM, but use the throttle RPM tab to restrict the maximum RPM to 835 on the 567D2 and 567D3. I tried this, and it worked as expected - the test GP20 and GP30 locomotives ran at 835 RPM in run 8, with the audio matching appropriately. From this, I drew more conclusions:

4. The "100 percent" point used by variable2-controlled curves is set by the maximum RPM defined in the engine tables.
5. The actual maximum RPM is determined by the diesel throttle tab.
6. Therefore, the SMS will respect the 100 percent point and engine pitch will be lower than the maximum defined in the SMS file as appropriate.

Using this reasoning, I came to a final conclusion:

7. So long as the frequency curves are set up to match the maximum and minimum RPM values defined in the engine tables, you can specify any RPM range between those two values using the throttle RPM tab, and the engine audio will behave exactly as it should for engines running in completely different RPM ranges!

I gleefully deleted the 567D3 SMS files and used a single set of SMS files for the 567D3 and D3A. I set the maximum RPM at 900 for all locomotives and used the throttle RPM tab to limit it to 835 RPM on the GP30 I was using to test the 567D3 parameters. Then I got distracted by other things and never finished what I was working on.

This brings me to the 70-Tonner I have been working on. Since I was building a new FWL-6T sound set from the ground up, I decided to try out a final hypothesis: I wondered if I could set idle RPM to 0, maximum RPM to the maximum RPM, and then use the throttle tab to set idle. This would hypothetically allow me to model the RPM range below idle. So I tested this hypothesis. I discovered that setting idle RPM to 0 created issues with the engine not wanting to come out of idle. Setting it to an arbitrary small number, however, worked fine. So I set it to 5 and based all of my frequency curve calculations on a minimum RPM of 5 and a maximum of 1000. And, sure enough, it worked!

A while back there was a proposal for an additional variable for engine sounds below idle. My testing has determined that this is not necessary. Simply set idle to a low RPM, around 5, and then set the maximum as normal. Then set the idle RPM with the throttle RPM tab. Here's the engine code from the 70-tonner:

	ORTSDieselEngines ( 1
		Diesel (
			IdleRPM ( 5 )
			MaxRPM ( 1000 )
			StartingRPM ( 75 )
			StartingConfirmRPM ( 200 )
			ChangeUpRPMpS ( 50 )
			ChangeDownRPMpS ( 80 )
			RateOfChangeUpRPMpSS ( 50 )
			RateOfChangeDownRPMpSS ( 10 )
			MaximalPower ( 660hp )
			IdleExhaust ( 0.05 )
			MaxExhaust ( 12.50 )
			ExhaustDynamics ( 3 )
			ExhaustDynamicsDown (1.2)
			ExhaustColor ( 33665D4A )
			ExhaustTransientColor( FF665D4A )
			Comment ( Estimates of FWL-6T gross HP based on EMD 645E-3 power curve. 700 HP gross estimated based on EMD 567B data of gross v. traction HP )
			DieselPowerTab (
				 000		  0.0hp 
				 450		 46.7hp
				 540		101.9hp
				 633		194.5hp
				 725		292.3hp
				 816		394.3hp
				 908		532.4hp
				1000		700.0hp
			)
			Comment ( This chart is gallons per hour x 3.79. Estimates scaled down from EMD 645E3 fuel consumption curve. )
			DieselConsumptionTab (
				 000 		000.000
				 450	 	006.544
				 540		024.143
				 633 		041.210
				 725 		060.223
				 816 		087.033
				 908 		123.299
				1000 		148.303
			)
			ThrottleRPMTab (
				000.0		 450.0
				014.3		 451.0
				028.6		 540.0
				042.9		 633.0
				057.1		 725.0
				071.4		 816.0
				085.7		 908.0
				100.0		1000.0
			)
			Comment ( I had no idea what I was doing here; thankfully, neither does anyone else )
			DieselTorqueTab (
				0 	0
				275 	2718
				835 	11007
			)
			MinOilPressure ( 20 )
			MaxOilPressure ( 75 )
			IdleTemperature ( 71 )
			OptTemperature ( 77 )
			MaxTemperature ( 89 )
			Cooling ( 3 )
			TempTimeConstant ( 720 )
		)
	)


Here's the idle stream:

			Stream (
				Skip( 450 RPM )
				Volume ( 1.0 )
				Priority ( 6 )
				Triggers ( 1
					Initial_Trigger  ( StartLoop   ( 4 
						File ( "../../NAVS_AUDIO/GE_FWL-6T/engine/x_GE_FWL-6T_450-1.wav" -1 )
						File ( "../../NAVS_AUDIO/GE_FWL-6T/engine/x_GE_FWL-6T_450-2.wav" -1 )
						File ( "../../NAVS_AUDIO/GE_FWL-6T/engine/x_GE_FWL-6T_450-3.wav" -1 )
						File ( "../../NAVS_AUDIO/GE_FWL-6T/engine/x_GE_FWL-6T_450-4.wav" -1 )
						SelectionMethod ( RandomSelection ) ) )
				)
				FrequencyCurve(
					Variable2Controlled
					CurvePoints ( 2
						0.00		  220.5
						1.00		44100.0
						)
					Granularity ( .001 )
				)
				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 4
						0.000		0.00
						0.100		0.40
						0.450		1.00
						1.000		0.10
					)
					Granularity ( 0.001 )
				)
				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 3
						0.450		0.11
						0.725		0.30
						1.000		0.53
					)
					Granularity ( 0.001 )
				)
				VolumeCurve(
					DistanceControlled
					CurvePoints ( 5
						010		1.00
						050		0.64
						100		0.33
						200		0.02
						300		0.00
					)
					Granularity ( .001 )
				)
			)


Note that maximum volume is at 45% - this is because the engine idles at 450 RPM, which is 45% of 1000 RPM. My idle clip is at unity pitch at 450 RPM, but I sped it up to 1000 RPM to avoid phasing issues with the 1000 RPM clip that I encountered in testing (the reason this was occurring was that the two files were slightly out-of-sync at initial load-in, so I reasoned that they would sync better if they were transposed to the same length and speed). It's a 44K clip, so the frequency curve points were calculated as follows:

Minimum RPM: (5/1000)*44100=220.5
Maximum RPM: (1000/1000)*44100=44100

In general, when you have a clip at a known RPM, the formula for finding frequency curve points is:

(Desired RPM/Clip RPM)*(Sample rate)

Anyway, I hope some of you find this useful.

#2 User is offline   roeter 

  • Vice President
  • Group: Posts: Elite Member
  • Posts: 2,429
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 30 January 2023 - 12:57 AM

A bit of pre-info : at the moment, I am working on a new development which will allow to switch off power (in timetable mode) for engines which are stabled, e.g. after $create before the train becomes active, in pools, and as static.
For this development, I have added a 'quick and dirty' solution to overcome the problem of variable2 defined sounds, by recalculating the frequency and volume values between rpm=0 and rpm=idle (which is variable2 = 0) through lineair scaling.

By the way, there is an error in dieselengines.cs, which causes incorrect restore for engines :

        public void Initialize()
        {
            if (!Simulator.Settings.NoDieselEngineStart && !Locomotive.gearSaved)
            {
                RealRPM = IdleRPM;
                State = DieselEngineState.Running;
            }
            else if (Locomotive.gearSaved)
            {
                State = (DieselEngineState)Locomotive.dieselEngineRestoreState;
            }



This method is called on start but also restore from save.
Because of this code, if setting NoDieselEngineStart is not selected (which I think it usually is not), and the engine has no gears, then on restore the engine RPM is always set to idle, regardless of what it was then the save was made.

In my view, the code should be this :

        public void Initialize()
        {
            // preset state if initializing
            if (Simulator.Initialize)
            {
                if (!Simulator.Settings.NoDieselEngineStart)
                {
                    RealRPM = IdleRPM;
                    State = DieselEngineState.Running;
                }
            }
            else
            // restore state otherwise
            {
                State = (DieselEngineState)Locomotive.dieselEngineRestoreState;
            }


Regards,
Rob Roeterdink

#3 User is offline   ErickC 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,044
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 30 January 2023 - 05:27 PM

View Postroeter, on 30 January 2023 - 12:57 AM, said:

A bit of pre-info : at the moment, I am working on a new development which will allow to switch off power (in timetable mode) for engines which are stabled, e.g. after $create before the train becomes active, in pools, and as static.
For this development, I have added a 'quick and dirty' solution to overcome the problem of variable2 defined sounds, by recalculating the frequency and volume values between rpm=0 and rpm=idle (which is variable2 = 0) through lineair scaling.

This would be very useful for older sounds that do not model the engine below idle - even a basic linear scaling of the idle clip adds a lot when the engine is in the startup and shutdown state. The only problem I can foresee is with packages that already have startup and shutdown sounds. But those aren't too common yet. I only have one of those so far (567B/C), and it'll be obsolete in the next year as I work on a new version and implement this new method.

#4 User is offline   railguy 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 703
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 31 January 2023 - 09:21 AM

Taking all of this one step farther, it would be nice for the sim to be able to replicate Automatic Engine Start Stop (AESS) such as is found in most all late generation U.S. diesel locomotives. Also, for the sim to replicate prime mover RPM changes independent of throttle position operation--for example, EMD current generation 710 prime movers that transition in and out of high idle mode when stationary, as engine operating parameters specify. I bring this topic up here because the sound files need to also replicate the various sounds of prime mover startup and shutdown in AESS, and the locomotive system-directed RPM changes, etc. in modern locomotives.

#5 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 7,670
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 31 January 2023 - 09:29 AM

Hello.
Do I understand it right,
1. Starting procedure in reality takes about 90 seconds (oil and fuel pumping), then actual start, then some swinging of speed until settle-down to idle speed?
2. Temporary decrease of rpm, when traction is just turned on?
3. On idle, half of cylinders are turned off, they are being engaged after transition to Run1

Yes, when dynamic braking, diesel is set to needed speeds automatically.

#6 User is offline   ErickC 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,044
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 31 January 2023 - 05:49 PM

View PostWeter, on 31 January 2023 - 09:17 AM, said:

So, this stream plays idle roar all the time, but:
-is being synchronized with current diesel's rotation speed, and
-is fading out, as speed increases above idle speed,
Right?


Correct - it fades out above idle as the higher-RPM clip is blended in.

Quote

May I know, why two Variable2controlled volume curves are used?


The first curve fades the idle clip out as the high RPM clip fades in. The second curve sets the overall volume level across the entire power spectrum. The high RPM clip has an identical second curve. This ensures a smooth increase in engine volume across the RPM range. It was much simpler than trying to calculate both in a single curve. The EMD 645E3 sounds used the same technique. Here is the 1000 RPM clip:

			Stream (
				Skip( 1000 RPM )
				Volume ( 1.0 )
				Priority ( 6 )
				Triggers ( 1
					Initial_Trigger  ( StartLoop   ( 4
						File ( "../../NAVS_AUDIO/GE_FWL-6T/engine/x_GE_FWL-6T_1000-1.wav" -1 )
						File ( "../../NAVS_AUDIO/GE_FWL-6T/engine/x_GE_FWL-6T_1000-2.wav" -1 )
						File ( "../../NAVS_AUDIO/GE_FWL-6T/engine/x_GE_FWL-6T_1000-3.wav" -1 )
						File ( "../../NAVS_AUDIO/GE_FWL-6T/engine/x_GE_FWL-6T_1000-4.wav" -1 )
						SelectionMethod ( RandomSelection ) ) )
				)
				FrequencyCurve(
					Variable2Controlled
					CurvePoints ( 2
						0.00		  220.5
						1.00		44100.0
						)
					Granularity ( .001 )
				)
				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 3
						0.425		0.00
						0.540		0.80
						1.000		1.00
					)
					Granularity ( 0.001 )
				)
				VolumeCurve(
					Variable2Controlled
					CurvePoints ( 3
						0.450		0.11
						0.725		0.30
						1.000		0.53
					)
					Granularity ( 0.001 )
				)
				VolumeCurve(
					DistanceControlled
					CurvePoints ( 5
						010		1.00
						050		0.64
						100		0.33
						200		0.02
						300		0.00
					)
					Granularity ( .001 )
				)
			)


The third volume curve in each stream fades the clip with distance as I use multiple distance levels. The close-in clips fade out with distance as the medium-range clips fade in, and the medium-range clips fade out as the distant clips fade in with increased distance. There is much more documentation in the SMS files themselves, so you might want to read them when I get the model finished and uploaded. :)

Quote

And, for implementation of below-idle sound, we need to set IdleSpeed parameter of the Engine () block to very low value, not prototypic "idle" speed, which takes place on locomotive?


Correct. The engine RPM tables will set the actual RPM value at 0% throttle in-sim.

#7 User is offline   ErickC 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,044
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 31 January 2023 - 05:52 PM

View Postrailguy, on 31 January 2023 - 09:21 AM, said:

Taking all of this one step farther, it would be nice for the sim to be able to replicate Automatic Engine Start Stop (AESS) such as is found in most all late generation U.S. diesel locomotives. Also, for the sim to replicate prime mover RPM changes independent of throttle position operation--for example, EMD current generation 710 prime movers that transition in and out of high idle mode when stationary, as engine operating parameters specify. I bring this topic up here because the sound files need to also replicate the various sounds of prime mover startup and shutdown in AESS, and the locomotive system-directed RPM changes, etc. in modern locomotives.

On a related note, real locomotives - EMD, GE, or otherwise - throttle up to around notch 4 or so in dynamic braking to provide traction motor cooling as the traction motor blower speed is slaved to engine RPM. We should be able to set the RPM value of this, and we should also be able to set what dynamic brake percent this occurs at. The reason is that one-speed dynamic brakes throttle up as soon as dynamic braking is selected, whole two-speed dynamic brakes throttle up at around 700 amps. I aped this on the 645E3 sounds by using an alternate idle clip with power up, cue points, and power down, but it's cumbersome to implement.

#8 User is offline   ErickC 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,044
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 31 January 2023 - 06:13 PM

View PostWeter, on 31 January 2023 - 06:06 PM, said:

Hm, so all rpm-specific streams in given *.SMS are playing their sound all time (no release loop command), and just change their volumes, forming mutual cross fades?

Correct. I had considered deactivating in certain RPM ranges, but this runs the risk of the clips losing sync, which generally results in phase issues (whooshing noises). I decided that the quality of the simulation was more important than deactivating a couple of streams.

#9 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 7,670
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 31 January 2023 - 06:26 PM

Are there only two engine sounds streams (minimal and maximal rpm-specific), or some intermediate too?

So, with the one and same minimal rpm-corresponding clip, we can have as many adequate sound variants for, let's say, locomotives with different idle-speed presets of the same diesel-generator unit, as we want?

And, along with rpm-dependent cross fade of streams, do You also use distance-dependent streams in locomotive external *.sms?

#10 User is offline   roeter 

  • Vice President
  • Group: Posts: Elite Member
  • Posts: 2,429
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 01 February 2023 - 02:17 AM

View PostErickC, on 30 January 2023 - 05:27 PM, said:

This would be very useful for older sounds that do not model the engine below idle - even a basic linear scaling of the idle clip adds a lot when the engine is in the startup and shutdown state. The only problem I can foresee is with packages that already have startup and shutdown sounds. But those aren't too common yet. I only have one of those so far (567B/C), and it'll be obsolete in the next year as I work on a new version and implement this new method.


Looking at your definitions, it should be possible to use the existance of the ThrottleTab in the engine definition as flag to switch between the two methods. Older engine definitions which do not use your new sound setup, in general will also not have a ThrottleTab defined.

Regards,
Rob Roeterdink

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users