Elvas Tower: ORTS sound triggers, variables - Elvas Tower

Jump to content

  • 9 Pages +
  • « First
  • 4
  • 5
  • 6
  • 7
  • 8
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

ORTS sound triggers, variables and the future of OR sound management. Rate Topic: -----

#51 User is offline   railguy 

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

Posted 14 November 2015 - 07:22 AM

I like the fog and wind ideas for being sound triggers. A side note on wind--I hope that it is in the cards to make snow and rain react to the wind the way that smoke does now. Imagine running a train in a raging blizzard--snow and smoke moving the same direction with the wind, with wind sounds tied to the wind velocity.

As to the various triggers that I suggested, I'm sure that there are more that could be envisioned--I just put my list out as a starting point. I have no doubt the OR team will have lots of ideas for additional triggers and uses.

#52 User is offline   gpz 

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

Posted 14 November 2015 - 07:27 AM

View Postdisc, on 14 November 2015 - 05:41 AM, said:

The problem with the CurveForceN variable is the sudden changes. (...) Any suggestions?
Use the ORTS.Common.SmoothedData class.
Declare as e.g.:
public SmoothedData ExhaustParticles = new SmoothedData(1);

Update as e.g.:
ExhaustParticles.Update(elapsedClockSeconds, DieselEngines[0].ExhaustParticles);

Read back as ExhaustParticles.SmoothedValue

#53 User is offline   Csantucci 

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

Posted 14 November 2015 - 08:08 AM

View Postdisc, on 14 November 2015 - 05:41 AM, said:

I've just added a new .sms variable called CurveForce(for flange sounds), which works if the "Curve dependent resistance" is enabled at simulation tab. The problem with the CurveForceN variable is the sudden changes, for example at straight its 0 then at the start of the curve, it instantly rises, then drops to 0 at the end of the curve, and that isn't sounds good. This is because the tracks in MSTS routes don't have Transition curves, but that can't be changed.
So i tried some filtering, to make the the sound changes smoother. I've tried the already implemented MovingAverage filter, but that is FPS dependent, so it's not an option. The butterworth IIR filter works great, but looks too "heavy" for me, however it didn't change the update process CPU usage noticeably, but still a simpler FPS independent filter would be better. Any suggestions?

i don't think it's too bad. The fade in and fade out can be provided by the .wav sound itself, that would have a central part at constant volume between the two cue points. So in my opinion there is no need for filtering.

#54 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 14 November 2015 - 09:48 AM

View PostCsantucci, on 14 November 2015 - 08:08 AM, said:

i don't think it's too bad. The fade in and fade out can be provided by the .wav sound itself, that would have a central part at constant volume between the two cue points. So in my opinion there is no need for filtering.


The volume of the sound depends on curve resistance, so the volume curve silences it as the resistance drops to 0, so the fade out is inaudible.

View Postgpz, on 14 November 2015 - 07:27 AM, said:

Use the ORTS.Common.SmoothedData class.


This is perfect :)

#55 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 15 November 2015 - 05:14 AM

From rev 3314
New .sms variable trigger: CurveForce (CurveForceControlled, CurveForce_Inc_Past, CurveForce_Dec_Past). The number is interpreted as Newtons. Available for all wagons/cars IF Curve dependent resistance is enabled at simulation tab.

You can see the curve resistance ingame in shift-f5 "force information".

Example:

			Stream(
				Priority ( 5 )
				Triggers( 2
					Variable_Trigger ( 
						CurveForce_Inc_Past  105 StartLoopRelease ( 1 
							File ( "ORflange.wav" -1 ) 
							SelectionMethod ( SequentialSelection ) 
						) 	 
					)
					Variable_Trigger ( 
						CurveForce_Dec_Past  100 ReleaseLoopRelease() 
					)
				)
				VolumeCurve(
					CurveForceControlled
					CurvePoints ( 2
	            				100    0.0
	            				5000	1.0
                        		)
					Granularity ( 10 )
				)
			)	


#56 User is offline   Csantucci 

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

Posted 15 November 2015 - 08:18 AM

This is a good additional function.
Can this stream also be put in track sound files (the ones defined in ttype.dat)? Usually this would lead to less files needing modifications.

#57 User is offline   Hamza97 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 606
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 15 November 2015 - 08:22 AM

Can we have a fade-in fade-out for sounds as when they go out of camera range (500m AFAIK). The default is such that any sound starts abruptly and ends abruptly. Fading would make sound more realistic.... :)

#58 User is offline   Csantucci 

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

Posted 15 November 2015 - 08:40 AM

As far as I know, there is sound fading from 0 distance to the out of range distance.

#59 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 15 November 2015 - 08:51 AM

View PostCsantucci, on 15 November 2015 - 08:18 AM, said:

This is a good additional function.
Can this stream also be put in track sound files (the ones defined in ttype.dat)? Usually this would lead to less files needing modifications.


I've added this to make possible to avoid the ttype method. Also the wagons should be the sound source. If it would be added to the track sound files, where would be the source? I don't know if it's easily possible to pass the wagons's curveforce to the track sound sources.

#60 User is offline   railguy 

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

Posted 15 November 2015 - 09:13 AM

I apologize for being ignorant, but where can the ORflange.wav file be downloaded? Thanks.

  • 9 Pages +
  • « First
  • 4
  • 5
  • 6
  • 7
  • 8
  • 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