Elvas Tower: steam exhaust strokes controlled twotimes in sms stream - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

steam exhaust strokes controlled twotimes in sms stream steam exhaust strokes controlled twotimes in sms stream Rate Topic: -----

#1 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 27 October 2015 - 03:33 PM

Hello,

In OR I always hear the exhaust strokes with rolling steam locos, although the REGULATOR is off. In MSTS I wrote a sms-file that mutes the sound of the exhaust strokes in that case.

The concerning stream in the sms-file has two controllings of the volume. One with the "Variable1_Inc/Dec_Past" to mute the sound, the other is a speedcontrolled "VolumeCurve" to fade the wav-files in or out.

			Stream ( Skip( Auspuffschlaege Layer 01 )
				Priority ( 6 )
				Triggers ( 36

					Skip( Volume Auspuffschlaege Layer 01 ein/aus durch Regler und Richtungswender  )
					Variable_Trigger ( Variable1_Inc_Past  	0.05	SetStreamVolume ( 1.0 ) )
					Variable_Trigger ( Variable1_Dec_Past  	0.05	SetStreamVolume ( 0.0 ) )
					Variable_Trigger ( Variable1_Inc_Past 	-0.05	SetStreamVolume ( 0.0 ) )
					Variable_Trigger ( Variable1_Dec_Past 	-0.05	SetStreamVolume ( 1.0 ) )

					Skip( Auspuffschlaege Geschwindigkeitsabhaengig )
					Variable_Trigger ( Speed_Inc_Past	0.05	StartLoop ( 1	File ( "Schlag_01_Jm.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
					Variable_Trigger ( Speed_Inc_Past	1.39	ReleaseLoopRelease () )	
					Variable_Trigger ( Speed_Inc_Past	2.69	StartLoop ( 1	File ( "Schlag_03_Jm.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
					Variable_Trigger ( Speed_Inc_Past	5.28	ReleaseLoopRelease () )	
					...
					Variable_Trigger ( Speed_Dec_Past	5.28	StartLoop ( 1	File ( "Schlag_03_Jm.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
					Variable_Trigger ( Speed_Dec_Past	2.69	ReleaseLoopRelease () )	
					Variable_Trigger ( Speed_Dec_Past	1.39	StartLoop ( 1	File ( "Schlag_01_Jm.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
					Variable_Trigger ( Speed_Dec_Past	0.05	ReleaseLoopRelease () )	
				)
				VolumeCurve (
					SpeedControlled
					CurvePoints ( 33
						0.00	0.00
						0.08	1.00
						0.20	1.00
						1.31	1.00
						1.39	0.00
	
						2.69	0.00
						2.78	1.00
						5.19	1.00
						5.28	0.00
	
						7.69	0.00
						7.78	1.00
						10.19	1.00
						10.28	0.00
	
						12.69	0.00
						12.78	1.00
						15.19	1.00
						15.28	0.00
	
						17.69	0.00
						17.78	1.00
						20.19	1.00
						20.28	0.00
	
						22.69	0.00
						22.78	1.00
						25.19	1.00
						25.28	0.00
	
						27.69	0.00
						27.78	1.00
						30.19	1.00
						30.28	0.00
	
						32.69	0.00
						32.78	1.00
						35.19	1.00
						35.28	0.00
					)
					Granularity (0.01)
				)
			)


Is it possible, that in OR the "SetStreamVolume"-commands of the "Variable1_Inc/Dec_Past" mixed with the VolumeCurve-command will be interpreted the same way as in MSTS?

Best regards
Jonas

#2 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,443
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 28 October 2015 - 01:06 AM

This part of the code was revised a couple of years ago with the aim of compatibilizing OR with MSTS. Consider however that for OR Variable1 in steam locomotives is proportional to angular speed, and not linked to REGULATOR position.
Digging a bit more in the trainsim repository I found this line (referred to MSTS), see http://www.trainsim....light=Variable1 :
"Variable1 is the speed of train (wheel revs?) switched on and off by the regulator being set to idle or not."
So maybe the problem is that OR does not switch off Variable1 when the regulator is idle.
However, before adding this simple condition in the code, I'd be happy to get confirmation by some steam expert that the above quoted sentence is correct.

#3 User is offline   mirekkr 

  • Hostler
  • Group: Posts: Active Member
  • Posts: 91
  • Joined: 18-January 15
  • Simulator:ORTS, MSTS
  • Country:

Posted 28 October 2015 - 11:29 AM

Hi Carlo and Jonas,
you can find use of Variable1 and Variable2 in steam SMS files in 3DTS locos (Consolidation, CabForward).
It works OK in Open Rails: if you pull the throttle to a position near zero, the puffing stream fades out.

Regards,
Mirek

#4 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 28 October 2015 - 01:45 PM

Hello mirekkr,

Can you please post a code part of the sms-file of a 3DTS loco?

#5 User is offline   mirekkr 

  • Hostler
  • Group: Posts: Active Member
  • Posts: 91
  • Joined: 18-January 15
  • Simulator:ORTS, MSTS
  • Country:

Posted 29 October 2015 - 12:46 PM

Jonas,
I'm not sure if posting the code is not against copyright rules. But the trick is that you play only one "cruise" sound:

Variable_Trigger ( Variable1_Inc_Past 0.2 StartLoop ( 1 File ( "cruise_sound.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )

and change its pitch and volume this way:

FrequencyCurve ( Variable1Controlled ...

VolumeCurve ( Variable2Controlled ...

I hope this helps,
Mirek

#6 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 29 October 2015 - 02:35 PM

Hello Mirek,

thanks for the suggestion with "Volume Curve (Variable2Controlled ...". I will to experiment a bit with it and see, what can be done with it.

But here it is about, that the SMS file of my first post work in MSTS, but not in OR. That's why I start it under "Maybe it's a bug", ie a question of compatibility MSTS <-> OR.

It should not be a question of finding other solutions in OR to mute exhaust strokes of steam locos. But I ask for changing the C# code in OR to catch the compatibility to MSTS. As Carlo wrote: "... this simple condition in the code ...".
I hope a little change in the code can fix it.

Please do not misunderstand me. I really appreciate your suggestion and will do some tests with it.

Best regards
Jonas

(By the way, I think, there is no copyright problem with posting code snippets of SMS files. They are not compiled files, so everyone can open it and read it to discuss about it. In MSTS it is intended to do so, I think. But for sure it is against copyright rules, if you use SMS files of other rightholders in a simulator, definitely in commercial use.)

#7 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,443
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 29 October 2015 - 11:53 PM

jonas, I agree with you.
Pls. try following modified files. Simply replace then within Open Rails release x.3287 and report if they work correctly.
Attached File  Runactivities.zip (1.45MB)
Number of downloads: 213

#8 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 30 October 2015 - 09:45 AM

Carlo, It seems to be perfect this way. Thank you!

With the downloaded files from you it works like in MSTS now.

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,443
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 30 October 2015 - 10:23 AM

That's good. Fixed in x.3288.

#10 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 15 April 2016 - 02:51 PM

Hello,

regrettably since the last few versions (X351?) the problem is present again. described in post #1:

View Postjonas, on 27 October 2015 - 03:33 PM, said:

... In OR I always hear the exhaust strokes with rolling steam locos, although the REGULATOR is off ...


Best regards
jonas

#11 User is offline   copperpen 

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

Posted 16 April 2016 - 12:58 AM

I have been testing with three different steam locomotives. Two of them stop chuffing when the throttle is closed, the third one does not. The two that work use Variable2 to control the volume the other one uses speed.

I have always felt that using speed to control the volume is wrong because you can have loud or quiet, hard or soft sounds at any point in the curve. Using speed does not give you any control of sounds linked to throttle or reverser, it is merely a linear increase/decrease.

#12 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 16 April 2016 - 04:31 AM

The SMS file shown in post #1 corresponds mainly to those of the two MSTS standard locomotives "Gölsdorf 380" and "Scotsman". There the chuff sounds are also selected with "Speed_Inc_Past / Speed_Dec_Past". The fade-in and -outs are realized with a speedcontroled "VolmeCurve" too.

The problem is about the 4 rows at the top of the showed SMS file where "Variable1_Inc_Past / Variable1_Dec_Past" is used to mute the chuff wav files (switch it on / off). These 4 lines work in MSTS properly, not only in my steam engines, but also in other freeware steam locomotives:

                                        Variable_Trigger ( Variable1_Inc_Past   0.05    SetStreamVolume ( 1.0 ) )
                                        Variable_Trigger ( Variable1_Dec_Past   0.05    SetStreamVolume ( 0.0 ) )
                                        Variable_Trigger ( Variable1_Inc_Past   -0.05   SetStreamVolume ( 0.0 ) )
                                        Variable_Trigger ( Variable1_Dec_Past   -0.05   SetStreamVolume ( 1.0 ) )

Since Carlo's code changes in October 2015 in Version X3288:
"Bug fix for https://bugs.launchp...or/+bug/1511816 Variable1 in steam locos is not zeroed at zero throttle."
the 4 lines have worked very well in OR too.

Now I guess that Carlo's bugfix is neutralized by some code changes since about april 10 in version X3504 (?). The 4 lines have once again no effect. The chuff sound is still heared at running locotives though the throttle is closed.

#13 User is offline   copperpen 

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

Posted 16 April 2016 - 05:30 AM

The speed controlled volume curve was done to enable crossfade between sound files, it never worked to provide an actual sound volume that was controllable in any way. Using Variable2 to control the volume removes the need for anything to mute the sound.

Stuart Williamson made a few soundsets back in 2002 that all use the Variable2 volume control method. These became the defacto standard for MSTS UK steam if you wanted something better than the KUJU default.

#14 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 16 April 2016 - 07:15 AM

I'm not sure if I understand this argumentation. Should the here mentioned bug be dismissed by pointing to Stuart Williamson, who allegedly created a "MSTS UK" standard? I thought so far that OR will be compatible to MSTS as possible and not with standards from else where.

I made a lot of soundtests by myself since 2003 (with Variable1 and Varable2). I decide to Variable1 doing it. And it works fine with MSTS. Does this mean that I have created a kind of MSTS DE standard? I don't think so. I only found one way how MSTS can handle it.

I'm not asking here for the diversity of methods how to mute sounds in a SMS file in OR. Rather, I try to mention a bug that occurs in OR, but not in MSTS.

There is no problem with the "speed controlled volume curve". It works fine in MSTS and OR!

So again, please let us be focused on the 4 rows of the SMS file where Variable1 is used:

                                        Variable_Trigger ( Variable1_Inc_Past   0.05    SetStreamVolume ( 1.0 ) )
                                        Variable_Trigger ( Variable1_Dec_Past   0.05    SetStreamVolume ( 0.0 ) )
                                        Variable_Trigger ( Variable1_Inc_Past   -0.05   SetStreamVolume ( 0.0 ) )
                                        Variable_Trigger ( Variable1_Dec_Past   -0.05   SetStreamVolume ( 1.0 ) )

Briefly: (Why) Is it a problem to mute the chuff sound in OR according to Variable1 too, how it has worked for 4 month?

#15 User is offline   copperpen 

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

Posted 16 April 2016 - 10:42 AM

forget the "discussion" about volume curves. There is nothing wrong with the OR code, no bug. I have dropped your four code lines into the default Golsdorf, one set for each stream and the chuff sound shuts off when the throttle is closed. Using X3617.

  • 2 Pages +
  • 1
  • 2
  • 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