Elvas Tower: Sound Triggers - an idea? - Elvas Tower

Jump to content

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

Sound Triggers - an idea? Rate Topic: -----

#1 User is offline   midneguy 

  • Foreman Of Engines
  • Group: Status: First Class
  • Posts: 931
  • Joined: 29-August 11
  • Gender:Male
  • Location:Nebraska
  • Simulator:MSTS
  • Country:

Posted 18 May 2018 - 07:27 PM

Hello all :) I've been thinking about how .sms files are created and the use of triggers, and I've thought of something that might be useful, so thought I'd put it out there and see if there's any interest...

I'll illustrate my idea with the particular example I have in mind, though this could applied to a lot of other cases as well. What I wish I could do is initiate a looping sound based on Trigger 14 (TrainBrakePressureIncrease), and then have that the loop release once this Trigger is no longer active. In operation it would work like this... Let's say I'm making a brake reduction, and I want a particular sound to play for as long as the reduction is being made. Once the reduction is finished, the sound would stop with a loop release. For this particular trigger there isn't an equivalent "off" trigger that can be used for this, so the sound would continue to play until the Trigger 54 was used (TrainBrakePressureDecrease). The problem is that I don't want the sound to continue playing during the time between when the brake reduction is finished, held at that pressure, then released to decrease the pressure again. I'd like the sound to only play as long as the pressure is actually in the process of increasing - and then end once the pressure is no longer changing and is instead being maintained at the new value in a steady state.

So this got me thinking how handy it would be to have another option other than the two we have now... which are "start when this trigger happens" and then "stop when some other trigger happens". A third option that would be nice to have is something like "start and continue as long as X trigger is true". I can imagine the .sms entry for this looking like something similar to this:


Stream (
Skip ( **** Train Brake Application**** )
Priority ( 5 )
Volume ( 0.25 )
Triggers ( 2
Discrete_Trigger ( 14 StartLoopReleaseWhenTrue ( 1 File ( "BrakeApplicationSound.wav" -1 ) SelectionMethod ( RandomSelection ) ) )
Discrete_Trigger ( 14 ReleaseLoopReleaseWhenFalse () )
)
)

Of course an alternative would be to create a new trigger that would cancel 14 "TrainBrakePressureIncrease", perhaps something named "TrainBrakePressureNotIncrease" or something similar... But, if we had the option of "play sound X as long as condition (Trigger) Y is true", there wouldn't be a need to create additional triggers, at least for this particular situation.

Anyway, I just thought I'd put this out as a suggestion and I'm curious what the OR team and others may think :)

#2 User is offline   hroch 

  • Fireman
  • Group: Status: Active Member
  • Posts: 198
  • Joined: 05-June 14
  • Gender:Male
  • Simulator:MSTS OR
  • Country:

Posted 19 May 2018 - 02:38 AM

Hello,

See page 164 in the manual. Is that it?

Attached thumbnail(s)

  • Attached Image: triggers.JPG


#3 User is offline   midneguy 

  • Foreman Of Engines
  • Group: Status: First Class
  • Posts: 931
  • Joined: 29-August 11
  • Gender:Male
  • Location:Nebraska
  • Simulator:MSTS
  • Country:

Posted 19 May 2018 - 04:00 AM

 hroch, on 19 May 2018 - 02:38 AM, said:

Hello,

See page 164 in the manual. Is that it?


Geez.... How in the world did I manage to miss that http://www.elvastower.com/forums/public/style_emoticons/default/ko2.gif? Thanks for the heads up and I'll give that a try :)

#4 User is offline   ErickC 

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

Posted 19 May 2018 - 04:33 AM

If it helps, here are the streams that I use for brake noises (on a locomotive):

			Stream (
				Skip ( Locomotive brake cylinder air )
				Priority ( 5 )
				Triggers ( 3
					Skip ( Apply )
					Discrete_Trigger (  22  	PlayOneShot ( 1 File ( "../../NAVS_COMMON/CORE/brake_apply.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )					
					Skip ( Independent release )
					Discrete_Trigger (  21  	PlayOneShot ( 1 File ( "../../NAVS_COMMON/CORE/brake_apply.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )										
					Skip ( Release )
					Variable_Trigger ( BrakeCyl_Dec_Past 0.1  	PlayOneShot ( 1 File ( "../../NAVS_COMMON/CORE/brake_release.wav" -1 ) SelectionMethod ( RandomSelection ) ) )
				)
			)
			Stream (
				Skip ( Brake squeal )
				Priority ( 6 )
				Volume ( 0.75 )
				Triggers ( 5
					Variable_Trigger ( BrakeCyl_Inc_Past 0.5	StartLoop ( 1	File ( "../../NAVS_COMMON/CORE/brake_squeal.wav" -1 )	SelectionMethod ( SequentialSelection )	)	)
					Variable_Trigger ( BrakeCyl_Dec_Past 0.5	ReleaseLoopRelease ()	)
				)
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 5
						-30		43800
						 -3		44100
						  0		46000
						  3		44100
						 30		43800
						)
					Granularity ( 0.001 )
				)
				VolumeCurve(
					BrakeCylControlled
					CurvePoints ( 2
						 0		0.0
						60		1.0
					)
					Granularity ( 0.01 )
				)
				VolumeCurve(
					SpeedControlled
					CurvePoints ( 5
						 -8		1.0
						-.3		0.05
						  0		0.0
						 .3		0.05
						  8		1.0
						)
					Granularity ( 0.001 )
				)				
			)
			Stream (
				Skip ( Brake pipe air )
				Priority ( 6 )
				Volume ( 0.20 )				
				Triggers ( 6
					Discrete_Trigger (  141	StartLoopRelease ( 1	File ( "../../NAVS_COMMON/CORE/brake_pipe.wav" -1 )	SelectionMethod ( SequentialSelection ) ) )
					Discrete_Trigger (  142	StartLoopRelease ( 1	File ( "../../NAVS_COMMON/CORE/brake_pipe.wav" -1 )	SelectionMethod ( SequentialSelection ) ) )
					Discrete_Trigger (  143	ReleaseLoopRelease () )
				)
			)
			Stream (
				Skip ( Independent brake air )
				Priority ( 6 )
				Volume ( 0.20 )				
				Triggers ( 6
					Discrete_Trigger (  21	StartLoopRelease ( 1	File ( "../../NAVS_COMMON/CORE/ibrake_air.wav" -1 )	SelectionMethod ( SequentialSelection ) ) )
					Discrete_Trigger (  22	StartLoopRelease ( 1	File ( "../../NAVS_COMMON/CORE/ibrake_air.wav" -1 )	SelectionMethod ( SequentialSelection ) ) )
					Discrete_Trigger (  140	ReleaseLoopRelease () )
				)
			)			


#5 User is offline   midneguy 

  • Foreman Of Engines
  • Group: Status: First Class
  • Posts: 931
  • Joined: 29-August 11
  • Gender:Male
  • Location:Nebraska
  • Simulator:MSTS
  • Country:

Posted 19 May 2018 - 06:31 AM

I appreciate the feedback! Apparently I was referring to out of date information, and a version of the OR manual that didn't have the additional triggers listed. I'm up to date now, and can report that I've gotten the results I want with the additional OR specific braking triggers. I'm relieved http://www.elvastower.com/forums/public/style_emoticons/default/good.gif

Thanks!

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