Elvas Tower: Sound keeps looping - Elvas Tower

Jump to content

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

Sound keeps looping Sound keeps looping Rate Topic: -----

#1 User is offline   xterms 

  • Hostler
  • Group: Posts: Active Member
  • Posts: 57
  • Joined: 23-April 24
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 03 May 2024 - 11:20 AM

Hey colleagues,

there is this sound where a moving train brakes and the wagons become louder because of the friction between the brakes and the axles.

I wanted to simulate this sound.

I took the discrete trigger of brake pipe pressure decrease and the sound should be heard until the brakes are released / the train almost stops.

Here is the .sms section I made:

Skip ( 1. vonatfek )
			Stream (
            			Priority ( 6 )
                 		  Volume ( 0.5 )
            			Triggers ( 2
				Discrete_Trigger ( 142	
						StartLoopRelease ( 1 
							File ( "brake.wav" -1 ) 
SelectionMethod ( SequentialSelection ) ) )

				Discrete_Trigger ( 141	
						ReleaseLoopReleaseWithJump ( ) 
					)
			) 
VolumeCurve(
					SpeedControlled
					CurvePoints ( 4
					         0.0	0.0
							2.5 0.0
					         2.77	0.5
						 	5.5	1.0	
					)
					Granularity ( 0.05 )
 
				)
			)


Of course I inserted some cue points into the wav file too, ID 00000 - 00005.

The problem is, the sound just keeps looping infinitely after applying the brakes the first time. There are no Log entries so it shouldn't come from a missing ')' or so.

Any ideas how to make my original idea come to life?

Thanks and cheers

#2 User is offline   ErickC 

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

Posted 03 May 2024 - 01:19 PM

Wouldn't it make more sense to activate the stream with brake cylinder force and have cylinder force control the volume?

Here is the code I use for composition shoes:

			Stream (
				Skip ( Brake squeal )
				Priority ( 6 )
				Triggers ( 2
					Variable_Trigger ( BrakeCyl_Inc_Past 0.5	
						StartLoop ( 9
							File ( "NAVS_freight/brakes/x_brake_comp-1.wav" -1 )
							File ( "NAVS_freight/brakes/x_brake_comp-2.wav" -1 )
							File ( "NAVS_freight/brakes/x_brake_comp-3.wav" -1 )
							File ( "NAVS_freight/brakes/x_brake_comp-4.wav" -1 )
							File ( "NAVS_freight/brakes/x_brake_comp-5.wav" -1 )
							File ( "NAVS_freight/brakes/x_brake_comp-6.wav" -1 )
							File ( "NAVS_freight/brakes/x_brake_comp-7.wav" -1 )
							File ( "NAVS_freight/brakes/x_brake_comp-8.wav" -1 )
							File ( "NAVS_freight/brakes/x_brake_comp-9.wav" -1 )
							SelectionMethod ( RandomSelection )	)	)
					Variable_Trigger ( BrakeCyl_Dec_Past 0.5	ReleaseLoopRelease ()	)
				)
				FrequencyCurve(
					SpeedControlled
					CurvePoints ( 5
						-30		43800
						 -1		44100
						  0		45000
						  1		44100
						 30		43800
						)
					Granularity ( 0.001 )
				)
				VolumeCurve(
					BrakeCylControlled
					CurvePoints ( 2
						 0		0.0
						60		1.0
					)
					Granularity ( 0.01 )
				)
				VolumeCurve(
					SpeedControlled
					CurvePoints ( 5
						-.4		1.0
						-.1		0.05
						  0		0.0
						 .1		0.05
						 .4		1.0
						)
					Granularity ( 0.001 )
				)
				VolumeCurve(
					DistanceControlled
					CurvePoints ( 3
						10		1.0000
						40		0.2500
						200		0.0000
					)
					Granularity ( .001 )
				)
			)


Alternatively (to toot my own horn), you can just grab the NAVS freight car sounds off trainsim.com and not worry about it. ;)

#3 User is offline   xterms 

  • Hostler
  • Group: Posts: Active Member
  • Posts: 57
  • Joined: 23-April 24
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 03 May 2024 - 10:40 PM

Yes I found the option to variabletrigger the brake cylinders in a manual in the depths of the internet before I read your post and managed to get it right (lost all my hairs though).

It was still worth asking because I didn`t know one could couple the volume with the cylinder pressure.

I'll chew myself through your template and see where I can improve mine.

Thank you very much!

#4 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 7,565
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 03 May 2024 - 10:53 PM

Hello.
Release LoopReleaseWithJump have being told, is very resource-consuming process, so it was recommended to use it as rare, as possible, and for utterly-critical applications only (such as instant horn sound's release); so, I can guess, processing it for quite long train, having this instruction for every car's brake shoes, can cause lag.

I'd add, brake pipe's pressure is not being tied with brake shoes friction directly, so Erick is definitely right, that the right trigger for Your case will be brake cylinder pressure. Also, Phillip's addition to brake functionality will make that even more real0like, when BC pressure won't rise, before shoes will in contact with rims - simulating brake gear's mechanical "luft")

In case, Your sound clip has no beginning (fade-in) and enging (fade-out) portions, You can use StartLoop / ReleaseLoopRelease pair.

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