Elvas Tower: Diesel Loco Startup/Shutdown - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Diesel Loco Startup/Shutdown Rate Topic: -----

#1 Inactive_Tranzrail709_*

  • Group: Status: Passengers (Obsolete)

Posted 28 May 2014 - 03:43 AM

I've noticed in OR, on Diesel Loco's, key Y toggles the locomotive on/off and the RPM drops to 0 when the engine is switched off as it should. I'm just wondering is it possible to code into the .eng file an engine Start up/Shutdown sound when Y is pressed. And is it also possible to have the locomotive shutdown when you enter the sim?

#2 User is offline   thegrindre 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 8,349
  • Joined: 10-September 08
  • Gender:Male
  • Location:Now in central Arkansas
  • Simulator:MSTS & Trainz '04 & Open Rails
  • Country:

Posted 28 May 2014 - 04:40 AM

I believe that would be done in the Sounds folder.
Here's an example as to how it works. You'll have to install it to hear it though.
It's a simple start up sequence for a car/diesel.
http://www.elvastowe...inspection-car/

:)

#3 User is offline   Csantucci 

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

Posted 28 May 2014 - 05:32 AM

Specific sound triggers have been added in OR to manage diesel startup-shutdown sounds. They are described here
http://www.elvastowe...anagement-spec/
So, provided the related sound streams are added in the engine's .sms files, you will hear diesel startup and shutdown sound, both and separately for player engine and helper engines.

#4 Inactive_Tranzrail709_*

  • Group: Status: Passengers (Obsolete)

Posted 28 May 2014 - 03:44 PM

That's a nice startup sequence, works very well on one of my diesels.
Does anyone know what the discreet function number for key Y is?

#5 Inactive_Tranzrail709_*

  • Group: Status: Passengers (Obsolete)

Posted 28 May 2014 - 08:23 PM

Attached File  Sound_sms_files.zip (5.35K)
Number of downloads: 300

View PostCsantucci, on 28 May 2014 - 05:32 AM, said:

Specific sound triggers have been added in OR to manage diesel startup-shutdown sounds. They are described here
http://www.elvastowe...anagement-spec/
So, provided the related sound streams are added in the engine's .sms files, you will hear diesel startup and shutdown sound, both and separately for player engine and helper engines.

I've looked at that word doc you posted, I've added start up sounds and door sounds to one of my models, the sounds are present in the sounds folder, but it still doesn't seem to be working.
Is there any chance someone could take a look at my .sms files, I can't see where I've gone wrong.
Cheers

#6 User is offline   Csantucci 

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

Posted 29 May 2014 - 12:45 AM

You haven't put in your .sms files the calls to the Discrete Triggers 23, 24 (power on/power off) and 105/106 (door open/door close). For door open/door close you e.g. modify this stream in the ...eng.sms file from

			Stream (
				Priority ( 5 )
				Triggers ( 6
					Discrete_Trigger ( 58 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 59 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 60 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 61 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 62 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 63 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
				)
			)
		)
	)


to

			Stream (
				Priority ( 5 )
				Triggers ( 8
					Discrete_Trigger ( 58 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 59 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 60 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 61 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 62 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 63 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 105 PlayOneShot ( 1 	File ( "x_Door_open.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 106 PlayOneShot ( 1 	File ( "x_Door_close.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
				)
			)
		)
	)


For the startup and shutdown sequence it's more complicated and requires some knowledge of .sms file programming, because you not only have to play the related sounds, but have also to enable/disable the standby motor sound. Some time ago I developed a test .sms file for the standard gp38, however I inserted only the poweron file. Here is the file
Attached File  gp38eng.zip (2.51K)
Number of downloads: 401

#7 Inactive_Tranzrail709_*

  • Group: Status: Passengers (Obsolete)

Posted 29 May 2014 - 01:58 AM

View PostCsantucci, on 29 May 2014 - 12:45 AM, said:

You haven't put in your .sms files the calls to the Discrete Triggers 23, 24 (power on/power off) and 105/106 (door open/door close). For door open/door close you e.g. modify this stream in the ...eng.sms file from

			Stream (
				Priority ( 5 )
				Triggers ( 6
					Discrete_Trigger ( 58 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 59 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 60 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 61 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 62 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 63 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
				)
			)
		)
	)


to

			Stream (
				Priority ( 5 )
				Triggers ( 8
					Discrete_Trigger ( 58 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 59 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 60 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_couple_auto3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 61 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto1.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 62 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto2.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 63 PlayOneShot ( 1 	File ( "../../GP38/Sound/x_uncouple_auto3.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 105 PlayOneShot ( 1 	File ( "x_Door_open.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
					Discrete_Trigger ( 106 PlayOneShot ( 1 	File ( "x_Door_close.wav" -1 ) SelectionMethod (SequentialSelection) ) ) 
				)
			)
		)
	)


For the startup and shutdown sequence it's more complicated and requires some knowledge of .sms file programming, because you not only have to play the related sounds, but have also to enable/disable the standby motor sound. Some time ago I developed a test .sms file for the standard gp38, however I inserted only the poweron file. Here is the file
Attachment gp38eng.zip


Cheers for that .eng file.
I have taken another look at the door sound section and added in all the bits that were missing, it looks identical to what you posted earlier, but it still wont play the sounds when Q or Shift Q is pressed. Could it be a volume issue?

#8 User is offline   Csantucci 

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

Posted 29 May 2014 - 06:07 AM

Maybe. Pls. post your modified .sms file here, as well as the door .wav file, if it is possible to you.

#9 Inactive_Tranzrail709_*

  • Group: Status: Passengers (Obsolete)

Posted 29 May 2014 - 01:05 PM

View PostCsantucci, on 29 May 2014 - 06:07 AM, said:

Maybe. Pls. post your modified .sms file here, as well as the door .wav file, if it is possible to you.

Ok, I've uploaded the sms file with the door wav files included.Attached File  Sound.zip (622K)
Number of downloads: 270

#10 User is offline   Csantucci 

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

Posted 30 May 2014 - 12:40 AM

You did some errors.
First of all you when you add Trigger lines in one sound stream, you have to correspondingly increase the number of triggers in the Triggers () line of such stream. So in your case you have to increase such number by two.
Second point, you must take into consideration that you always have to check if in the .sms file there are more than one ScalabiltyGroup() sections. In the ...cab.sms file you sent me there are many, and you added the two lines in the last stream, that is within the ScalabiltyGroup ( 0 ) section, that is related to AI trains in MSTS (OR does not use it). You have to add the two lines in a stream of the first ScalabiltyGroup, that is ScalabiltyGroup ( 5 ), which is the one played when you have selected the highest sound detail. So e.g. you could add them in the Train Brake & Independant Brakes , as I have done in the example I attach to you here. To run it you have only to change the path of the two door files to the one suitable to you, because I put them in the Sound folder of the GP38.

Pls. also note that, independently from the fact that door sound files don't work in MSTS, your .wav files, if applied to a trigger MSTS recognizes, would not have sounded correctly, because your files are mono, while MSTS considers them as stereo if the Stereo () statement is present in the sms file (as it is usual in ...cab.sms files), and because MSTS uses files sampled at 11025 Hz (tricks apart), while your file is a 44100 Hz file. OR is more flexible in that, in the sense that it plays correctly any files (mono or stereo) of any sampling rate.

Attached File  gp38cab.zip (2.9K)
Number of downloads: 328

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