Elvas Tower: Switching engine sounds on/off for diesels - Elvas Tower

Jump to content

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

Switching engine sounds on/off for diesels Rate Topic: -----

#1 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,426
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 07 January 2015 - 12:33 PM

I'm trying to adapt a sound-file for a diesel engine such that the engine sounds stop if the engine is switched off, and restart again when switched on. According to the manual, sound triggers 23 and 24 should do the job.
But there does not seem to be any reaction for diesel-engines on these triggers. I tried various sounds and loops and things, but nothing happens. Probably doing something wrong somewhere, but don't know what.

Does anybody have an example of a sound file with these triggers set that actually works?

Regards,
Rob Roeterdink

#2 User is offline   copperpen 

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

Posted 07 January 2015 - 12:54 PM

I will have to do some digging in my archive, but there was at least one UK switcher that had that working. It had wav files for startup and shutdown.

#3 User is offline   Csantucci 

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

Posted 08 January 2015 - 09:58 AM

Rob,
it's not your problem. This feature has been damaged by some change. If you want to check if your .sms files work, you can try with the old release 1819.
I attach here a simply modified gp38eng.sms file for your reference.
Attached File  gp38eng.zip (2.51K)
Number of downloads: 224
I'll try to find out where the error has been introduced.

#4 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,426
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 08 January 2015 - 10:05 AM

Ah - that explains it - thanks.

Regards,
Rob Roeterdink

#5 User is offline   Csantucci 

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

Posted 08 January 2015 - 12:00 PM

The problem has arisen with release 1836. However it is not a problem related to these triggers, but to the overall management of initial triggers. A stream format as the one I attached in the previous post does not work well, because the initial sound is restarted even if it shouldn't.
I modified the above file adding two lines with an explicit disable of the Initial_Trigger. This way the things work.

Modified sample file attached
Attached File  gp38eng.zip (2.76K)
Number of downloads: 223
I attach also the sample poweron .wav file I used
Attached File  x_gp_poweron1.zip (59K)
Number of downloads: 213

To gpz: This simple stream

			Stream (
				Priority ( 6 )
				Triggers ( 3
					Skip( **** The engine/current related sounds - Stream 1 {Xfade}         **** )
					Initial_Trigger  ( 							            StartLoop   ( 1 File ( "x_gp_power_cruise1.wav" -1 )   SelectionMethod ( SequentialSelection ) ) )
					Discrete_Trigger ( 24 ReleaseLoopRelease () )
					Variable_Trigger ( Variable2_Inc_Past 0.050 ReleaseLoopRelease () )
)
)

does not seem to work correctly with release 1836 and up to now. When Y is pressed (motor is stopped) the Initial Trigger is stopped and restarted. If instead I don't insert the third trigger, things work correctly. However both triggers are necessary. The only way to avoid restarting the Initial Trigger is to insert DisableTrigger commands.

Unless the complete .sms file is disactivated (because out of distance) and then reactivated, an inital trigger must not be restarted.

#6 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,426
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 08 January 2015 - 12:44 PM

Hmm - I tried without the 'InitialTrigger' - that had the rather odd effect that inside the cab the engine sound never switched off, while outside it never switched on :oldstry: - regardless of how many times I pressed Y.
But I'll give it another try one of these days and will see what happens.

Regards,
Rob Roeterdink

#7 User is offline   ATW 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 641
  • Joined: 07-January 13
  • Gender:Male
  • Simulator:MSTS Open Rails
  • Country:

Posted 08 January 2015 - 10:01 PM

Speaking of engine off/On sounds would it be possible to shut engine completely off when a engine runs out of fuel instead of running out showing negative gallons an keep running? Ran into this while running an act with partial fuel which got burned out more faster than it was supposed to as mentioned before but no response.

#8 User is offline   gpz 

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

Posted 08 January 2015 - 11:39 PM

View PostCsantucci, on 08 January 2015 - 12:00 PM, said:

Unless the complete .sms file is disactivated (because out of distance) and then reactivated, an inital trigger must not be restarted.

I will take a look. :) But, without checking the code, how is it supposed to work? If the camera jumps to a long tran end and back, then the engine sound will be restarted? For me it looks like the DisableTrigger is needed anyway.

Changing this part of code is very dangerous, because the sound state is very unstable. If I change something, maybe something else gets broken, I might not even think of, or don't remember why something was set in a particular way. Not even speaking of the various hacks of MSTS trying to reproduce, and that I hate very much.

#9 User is offline   Csantucci 

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

Posted 09 January 2015 - 01:04 AM

View Postgpz, on 08 January 2015 - 11:39 PM, said:

I will take a look. :) But, without checking the code, how is it supposed to work? If the camera jumps to a long tran end and back, then the engine sound will be restarted? For me it looks like the DisableTrigger is needed anyway.

Good question. But for sure, if the .sms sound remains within activation distance, the initial trigger must be started only once. Now instead I see in the sound debug interface that the initial trigger sound restarts (with a "New" indication I believe) after its sound has been released.

View Postgpz, on 08 January 2015 - 11:39 PM, said:

Changing this part of code is very dangerous, because the sound state is very unstable. If I change something, maybe something else gets broken, I might not even think of, or don't remember why something was set in a particular way. Not even speaking of the various hacks of MSTS trying to reproduce, and that I hate very much.

I may agree on this. But this is not a question of MSTS' hacks, and a behavior like the actual one is not MSTS compliant, even if no one noticed it up to today :)

#10 User is offline   copperpen 

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

Posted 09 January 2015 - 03:24 AM

I have just unearthed a UK diesel that has startup and shutdown sequences in the sms files. This system uses the B key to activate the wav which are set to playoneshot. Once the startup sequence has completed, the sound moves onto Idle.wav and all sounds are then normal. The playing of the shutdown wav ends with a completely silent engine. This is partly working in Open Rails in that the sounds are working properly, but the RPM remains at idle and thus exhaust is still visible with zero sounds playing.

The B key is used here because it has no normal use in UK MSTS diesel engines.

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