Elvas Tower: Automatic switch track sound - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 5 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

Automatic switch track sound Rate Topic: -----

#21 User is offline   jdilworth 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 40
  • Joined: 14-April 14
  • Simulator:Open Rails
  • Country:

Posted 03 February 2017 - 08:14 PM

Hey guys,

I haven't been able to get this working as of yet. Does the SMS file variable to trigger the sound have to be based on Speed or Distance? Also, with the appropriate ORTS hooks, I presume this works without needing to place the markers at every switch in the RE or TSRE?

Thanks,
Jason

#22 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 04 February 2017 - 12:11 AM

You could use something like this:
Variable_Trigger ( Speed_Inc_Past  5.0	StartLoop ( 1	File ( "x_switch.wav" -1 )	SelectionMethod ( SequentialSelection )	)	)
					Variable_Trigger ( Speed_Inc_Past  20.0	ReleaseLoopRelease ()	)
Variable_Trigger ( Speed_Inc_Past  20.0	StartLoop ( 1	File ( "x_switchfast.wav" -1 )	SelectionMethod ( SequentialSelection )	)	)
					Variable_Trigger ( Speed_Inc_Past  35.0	ReleaseLoopRelease ()	)
Variable_Trigger ( Speed_Inc_Past  35.0	StartLoop ( 1	File ( "x_switchveryfast.wav" -1 )	SelectionMethod ( SequentialSelection )	)	)
					Variable_Trigger ( Speed_Dec_Past  35.0	ReleaseLoopRelease ()	)
Variable_Trigger ( Speed_Dec_Past  35.0	StartLoop ( 1	File ( "x_switchfast.wav" -1 )	SelectionMethod ( SequentialSelection )	)	)
					Variable_Trigger ( Speed_Dec_Past  20.0	ReleaseLoopRelease ()	)
Variable_Trigger ( Speed_Dec_Past  20.0	StartLoop ( 1	File ( "x_switch.wav" -1 )	SelectionMethod ( SequentialSelection )	)	)
					Variable_Trigger ( Speed_Dec_Past  5.0	ReleaseLoopRelease ()	)

with a frequency curve like this
FrequencyCurve(
					SpeedControlled
					CurvePoints ( 7
						-60.0	17000
						-5.001	11025
						-5.0	17000
						  0.0	11025
						5.0	17000
						5.001	11025
						60.0	17000
							 )
)


For speeds lower than 5 meters per second it's up to you to find an acceptable solution...
Using this feature you don't have nothing to do with the RE or TSRE5.
Pls. note that you should have only one .trk file in the route's folder, and the include file must be named the same. To simplify things, to start testing you can add line
ORTSSwitchSMSNumber ( 10 )

directly in the base .trk file.
Note too that the description of the feature is now present in the OR manual version available with the current OR testing version.

#23 User is offline   mirekkr 

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

Posted 19 February 2017 - 06:06 AM

Hi Carlo,
wonderful feature!! Wonderful!
I implemented it in one of my routes and it's pretty cool! Thanks!
One comment: When fine-tuning the sounds, I noticed that these automatic sounds are not present in the Sound Debug window: would it be possible to add them here?

Thanks again,
Mirek

#24 User is offline   mirekkr 

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

Posted 19 February 2017 - 06:10 AM

Addendum:
"Note too that the description of the feature is now present in the OR manual..."
Sorry but I'm possibly blind enough - cannot find the description in the latest Manual.pdf.

#25 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 19 February 2017 - 08:30 AM

Nice that you like the feature!
It's described in paragraph 13.3.
I wonder why track sound wasn't added to the Sound Debug Window, and I hope there isn't something against that. Maybe I'll have a try.

#26 User is offline   Stijn D.C. 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 515
  • Joined: 20-August 16
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 20 February 2017 - 09:17 AM

View Postmirekkr, on 19 February 2017 - 06:10 AM, said:

Addendum:
"Note too that the description of the feature is now present in the OR manual..."
Sorry but I'm possibly blind enough - cannot find the description in the latest Manual.pdf.


You need download the manual here: http://www.openrails...-and-tutorials/

Greetz,

#27 User is offline   mirekkr 

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

Posted 20 February 2017 - 01:22 PM

Thank you both for you answers!
As for the new feature: a few months ago, I spent a lot of time adding sound sources and sound regions to simulate squeel and switch sounds everywhere along my route... Now, another time is waiting for me: to remove them :-) But, thats the way life is... Anyway, Carlo's solution is muuuch better than anything else, so it's worth to do.
As for the manual: it didn't come to my mind that the Manual.pdf, which is distributed with experimental versions, is not the right one. Probably my fault :-) Thanks for the link to the right one (I'm bookmarking it immediatelly).

Many thanks guys!
Mirek

#28 User is offline   jonas 

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

Posted 13 July 2017 - 03:36 PM

Hallo Carlo,

when I single use

include ( "../BStE.trk" )

	ORTSSwitchSMSNumber ( 3 ) 


or tripple use
include ( "../BStE.trk" )

	ORTSSwitchSMSNumber ( 2 )
	ORTSCurveSMSNumber ( 3 )
	ORTSCurveSwitchSMSNumber ( 4 )  

everything works fine.

But if I only use switch and curve sound
include ( "../BStE.trk" )

	ORTSSwitchSMSNumber ( 2 )
	ORTSCurveSMSNumber ( 3 )

I get this box when the loco goes on a switch:
Attached Image: ErrorBox.jpg
Something I do wrong or just a little bug?
Greeting
jonas

#29 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 14 July 2017 - 12:06 PM

Fixed in x.3900.

#30 User is offline   jonas 

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

Posted 14 July 2017 - 06:42 PM

Thank you for fixing it!

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