Elvas Tower: Steam Locomotive Sound vs Driver Rotation - Elvas Tower

Jump to content

  • 12 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Steam Locomotive Sound vs Driver Rotation Rate Topic: -----

#31 User is offline   RTP 

  • Conductor
  • Group: Status: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 05 March 2014 - 05:13 AM

Anyway, in a two cilinder engine there are four chuffs per turn.
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 User is offline   copperpen 

  • Executive Vice President
  • Group: Status: Elite Member
  • Posts: 3,144
  • Joined: 08-August 05
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 05 March 2014 - 08:42 AM

 gpz, on 05 March 2014 - 04:14 AM, said:

I don't believe it is true either. One could test it by assigning the same .eng with same .sms file to a different .s shape with different number of wheel animation frames. If the sound changes in MSTS, then there is a relation. But I don't think so, it wouldn't be logical.


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 User is offline   rdamurphy 

  • Open Rails Developer
  • Group: Private - Open Rails Developer
  • Posts: 1,199
  • Joined: 04-May 06
  • Gender:Male
  • Location:Thornton, CO
  • Simulator:MSTS - OR
  • Country:

Posted 05 March 2014 - 08:52 AM

Variable1 isn't the problem. So, it isn't the solution. I spent the morning studying the Scotsman fscoteng.sms, and the chuff isn't synchronized to the driver rotation in MSTS. From what I can tell, Variable1 was never intended to be used that way... And with the number of kludges used to get MSTS files to make sense, it isn't that simple.

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 User is offline   rdamurphy 

  • Open Rails Developer
  • Group: Private - Open Rails Developer
  • Posts: 1,199
  • Joined: 04-May 06
  • Gender:Male
  • Location:Thornton, CO
  • Simulator:MSTS - OR
  • Country:

Posted 05 March 2014 - 08:58 AM

 RTP, on 05 March 2014 - 05:13 AM, said:

Anyway, in a two cilinder engine there are four chuffs per turn.
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 User is offline   rdamurphy 

  • Open Rails Developer
  • Group: Private - Open Rails Developer
  • Posts: 1,199
  • Joined: 04-May 06
  • Gender:Male
  • Location:Thornton, CO
  • Simulator:MSTS - OR
  • Country:

Posted 05 March 2014 - 09:12 AM

After giving it some thought, I believe I know why the Variable1 won't work. There's three different radii involved in the calculation: Driver radius, axle radius, and the radius of where the wristpin is located on the locomotive's drivers. It varies among locomotives, depending on a lot of factors.

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 User is offline   copperpen 

  • Executive Vice President
  • Group: Status: Elite Member
  • Posts: 3,144
  • Joined: 08-August 05
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 05 March 2014 - 10:22 AM

Having just done a couple of back to back test runs with the default Scotsman using different animation speeds, the sound itself remains the same, controlled by vehicle speed. The actual animation speed can be changed to get a closer match, but that does mean editing the S file.

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 User is offline   rdamurphy 

  • Open Rails Developer
  • Group: Private - Open Rails Developer
  • Posts: 1,199
  • Joined: 04-May 06
  • Gender:Male
  • Location:Thornton, CO
  • Simulator:MSTS - OR
  • Country:

Posted 05 March 2014 - 10:35 AM

That seems to be the case, which makes no sense whatsoever... It does synchronize better, perhaps there's another parameter that also needs to be adjusted to work on the crossfading?

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 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,492
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 05 March 2014 - 02:41 PM

 rdamurphy, on 05 March 2014 - 08:52 AM, said:

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.


Please can you use the correct conversion routines (e.g. MpS.ToKpH) and not hard-code random constants into the code, thanks. :p

#39 User is offline   ATSF3751 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,085
  • Joined: 15-July 08
  • Gender:Male
  • Location:Wayzata, MN
  • Simulator:Open Rails
  • Country:

Posted 05 March 2014 - 06:38 PM

Here is how I have my locomotive sounds done up! Taken from UP 844 SMS file

Hope this can help some!

Brandon!

Attached thumbnail(s)

  • Attached Image: UP 844 Chuff.jpg


#40 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 05 March 2014 - 11:07 PM

 rdamurphy, on 05 March 2014 - 08:52 AM, said:

Variable1 isn't the problem. So, it isn't the solution. I spent the morning studying the Scotsman fscoteng.sms, and the chuff isn't synchronized to the driver rotation in MSTS. From what I can tell, Variable1 was never intended to be used that way...

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?

  • 12 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • 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