Announcement

Collapse
No announcement yet.

"Mapping" the V key to play a sound

Collapse
This topic is closed.
X
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "Mapping" the V key to play a sound

    Greetings all. I'm curious; can the "V" key bet set to play a sound? I know normally it controls the windshield wipers, but I was wondering if it's possible to make it play a sound? I'm working on an RS-3 that has two horn controls with a Leslie A-200 as the main horn but also has a Hancock 4700 air whistle on a separate valve. I was originally thinking of mapping it to the "B" key, but that would leave me without a bell. If it can be done, what control line(s) do I need to add in the sound .sms file? I vaguely remember Maple Leaf Track's VIA F40s that come with Niagara Corridor having a set up in which pressing the "V" key caused the HEP Generator to "wind down," so to speak, but I'm not sure if this is the same type of control I would need as the horn trigger.

    Thanks for any and all help,
    Last edited by CRQ5508; 07-02-2010, 18:45.
    Thom
    sigpic
    Norfolk Southern: It looks like Darth Vader on rails to me.

    #2
    I've got Niagara Corridor and all the VIA stock, but not aware of using 'V' to wind down the HEP. Though I've seen many complaints about them being so loud.

    Comment


      #3
      I have one of my newer diesel locos (a Dash9 i think) set up to play the manual horn button with the v key, and the horn sequencer sound on the normal space bar; the bell works too. I just put the 2 additional sound files (inside and outside horns) in the folder and used Goldwave to set up 2 cue points like normal, and added these triggers to the engine's .sms files

      for the outside sound (.sms file ending in "eng"):

      Code:
      Stream (
      				Priority ( 6 )
      				Triggers ( 2
      					Discrete_Trigger ( 6    StartLoopRelease ( 1    File ( "x_gevo_horn_regular.wav" -1 )   SelectionMethod( SequentialSelection )    )    )
      					Discrete_Trigger ( 7	ReleaseLoopReleaseWithJump ()	)
      				)
      			)



      for the cab (inside) sound (.sms file ending with "cab"):

      Code:
      Stream (
      				Priority ( 5 )
      				Triggers ( 2
      					Discrete_Trigger ( 6    StartLoopRelease ( 1	   File ( "gevo_horn_regular.wav" -1 )	SelectionMethod ( SequentialSelection
      )	)	)
      					Discrete_Trigger ( 7    ReleaseLoopReleaseWithJump ()	)
      				)
      			)
      Last edited by WILocoworks; 07-03-2010, 08:50.

      Comment


        #4
        It's relatively easy. Just add a stream (or add two triggers to an existing stream) in the SMS file. The basic format is:

        Code:
        Stream (
        	Priority ( 6 )
        	Volume ( 1 )
        	Triggers ( 2
        		Discrete_Trigger ( 6 StartLoopRelease ( 1 File ( "TARGET_SOUND.wav" -1 ) SelectionMethod  ( RandomSelection ) ) )
        		Discrete_Trigger ( 7 ReleaseLoopReleaseWithJump ( ) )
        	)
        )
        The only drawback is that unlike the HORN it requires two key presses to control the sound. The first key press starts the sound looping and the second stops it. To use an existing stream, simply add the two Discrete_Trigger lines to the stream and don't forget to increase the number of Triggers (or the number of streams) appropriately.
        ...rich

        Comment


          #5
          That would be good for CP engines bells then as well, as I noticed in real life they have 'rapid ring' and a regular 'clang clang' to them. Usually pull outs has the rapid, and regular for moderate alertings.

          Comment


            #6
            Here is a stream for the ventilation of the traction motors:
            inside
            Code:
            Stream(
                        Skip ( ** Ventilatie ** )
                        Priority ( 6 )
                        Triggers ( 6
                            Initial_Trigger ( DisableTrigger( 5 ) )
                            Discrete_Trigger ( 24 DisableTrigger ( 5 ) )
                            Discrete_Trigger ( 24 ReleaseLoopRelease() )
            
                            Discrete_Trigger ( 23 EnableTrigger ( 5 ) )
                            Discrete_Trigger ( 6 StartLoopRelease ( 1 File ( "Ventilatie.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
                            Discrete_Trigger ( 7 ReleaseLoopReleaseWithJump() )
                        )
                    )
            outside
            Code:
            Stream(
                        Skip ( ** Ventilatie ** )
                        Priority ( 5 )
                        Triggers ( 6
                            Initial_Trigger ( DisableTrigger( 5 ) )
                            Discrete_Trigger ( 24 DisableTrigger ( 5 ) )
                            Discrete_Trigger ( 24 ReleaseLoopRelease() )
            
                            Discrete_Trigger ( 23 EnableTrigger ( 5 ) )
                            Discrete_Trigger ( 6 StartLoopRelease ( 1 File ( "x_Ventilatie.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
                            Discrete_Trigger ( 7 ReleaseLoopReleaseWithJump() )
                        )
                    )
            http://www.train-sim.ro

            Comment

            Working...
            X