Making whistles and/or horns

Discussion of rolling-stock creation & re-painting.

Making whistles and/or horns

Unread postby bpetit » Thu Mar 21, 2013 12:28 am

I have a sound editor and I made Start, Loop ,and End. But when I press the spacebar it sounds like Loop Start End what would be wrong with it?
"If you really needed a diesel locomotive right away, then go ahead and order a ALCO. But if you could wait for real quality, then go for an EMD or a GE".


My Youtube Channel (Railfanning and Train Simulator 2018)
http://www.youtube.com/user/3985gtasa
User avatar
bpetit
 
Posts: 1985
Joined: Sun Sep 19, 2010 9:44 pm
Location: New Orleans, Louisiana

Re: Making whistles and/or horns

Unread postby CSX2057 » Thu Mar 21, 2013 1:39 am

Did you add Loop in the bin file? I can't remember the name of it. Its between Start and End
Hi! I'm Daniel (37). A casual Train Simulator Streamer and Railfanner. 4+ hours of Fun and Adventure with Laughter, Reactions and SoundFX.
CSX2057 YOUTUBE CHANNEL
User avatar
CSX2057
 
Posts: 1383
Joined: Tue Jun 07, 2011 11:18 am
Location: Georgia

Re: Making whistles and/or horns

Unread postby bpetit » Thu Mar 21, 2013 6:21 am

Da. All three of them are there.
"If you really needed a diesel locomotive right away, then go ahead and order a ALCO. But if you could wait for real quality, then go for an EMD or a GE".


My Youtube Channel (Railfanning and Train Simulator 2018)
http://www.youtube.com/user/3985gtasa
User avatar
bpetit
 
Posts: 1985
Joined: Sun Sep 19, 2010 9:44 pm
Location: New Orleans, Louisiana

Re: Making whistles and/or horns

Unread postby BNSFdude » Fri Mar 22, 2013 10:15 am

You put them in the wrong place in the proxyxml.
Anthony Wood
Audio Engineer - Searchlight Simulations
User avatar
BNSFdude
 
Posts: 2721
Joined: Tue Nov 29, 2011 1:46 am

Re: Making whistles and/or horns

Unread postby bpetit » Fri Mar 22, 2013 1:05 pm

As far as I can tell they're in the right place.


Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<kLoud-cProxyControlLoader xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
   <ProxyControl>
      <cGenericAudioControl xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
         <ActivationDistance d:type="sFloat32">1000.000000</ActivationDistance>
         <Sound>
            <kLoud-cSingleSampleSound d:id="58196880">
               <Name d:type="cDeltaString">WhistleStart</Name>
               <IsLooped d:type="bool">0</IsLooped>
               <Priority d:type="sUInt32">50</Priority>
               <BaseVolume d:type="sFloat32">1.000000</BaseVolume>
               <VolumeVariation d:type="sFloat32">0.000000</VolumeVariation>
               <BasePitchShift d:type="sFloat32">1.000000</BasePitchShift>
               <PitchShiftVariation d:type="sFloat32">0.000000</PitchShiftVariation>
               <AttenuationStartDist d:type="sFloat32">100.000000</AttenuationStartDist>
               <NoFutherAttenuationDist d:type="sFloat32">1000.000000</NoFutherAttenuationDist>
               <InstanceGroup d:type="ref">0</InstanceGroup>
               <Sample>
                  <kLoud-cSampleID>
                     <Pathname d:type="cDeltaString">RSC\K4Pack01</Pathname>
                     <Filename d:type="cDeltaString">RSC\K4Pack01\Audio\RailVehicles\Steam\K4\Cab\K4_WhistleStart.wav</Filename>
                  </kLoud-cSampleID>
               </Sample>
            </kLoud-cSingleSampleSound>
            <kLoud-cSingleSampleSound d:id="58295568">
               <Name d:type="cDeltaString">WhistleLoop</Name>
               <IsLooped d:type="bool">1</IsLooped>
               <Priority d:type="sUInt32">50</Priority>
               <BaseVolume d:type="sFloat32">1.000000</BaseVolume>
               <VolumeVariation d:type="sFloat32">0.000000</VolumeVariation>
               <BasePitchShift d:type="sFloat32">1.000000</BasePitchShift>
               <PitchShiftVariation d:type="sFloat32">0.000000</PitchShiftVariation>
               <AttenuationStartDist d:type="sFloat32">100.000000</AttenuationStartDist>
               <NoFutherAttenuationDist d:type="sFloat32">1000.000000</NoFutherAttenuationDist>
               <InstanceGroup d:type="ref">0</InstanceGroup>
               <Sample>
                  <kLoud-cSampleID>
                     <Pathname d:type="cDeltaString">RSC\K4Pack01</Pathname>
                     <Filename d:type="cDeltaString">RSC\K4Pack01\Audio\RailVehicles\Steam\K4\Cab\K4_WhistleLoop.wav</Filename>
                  </kLoud-cSampleID>
               </Sample>
            </kLoud-cSingleSampleSound>
            <kLoud-cSingleSampleSound d:id="58246544">
               <Name d:type="cDeltaString">WhistleEnd</Name>
               <IsLooped d:type="bool">0</IsLooped>
               <Priority d:type="sUInt32">50</Priority>
               <BaseVolume d:type="sFloat32">1.000000</BaseVolume>
               <VolumeVariation d:type="sFloat32">0.000000</VolumeVariation>
               <BasePitchShift d:type="sFloat32">1.000000</BasePitchShift>
               <PitchShiftVariation d:type="sFloat32">0.000000</PitchShiftVariation>
               <AttenuationStartDist d:type="sFloat32">100.000000</AttenuationStartDist>
               <NoFutherAttenuationDist d:type="sFloat32">1000.000000</NoFutherAttenuationDist>
               <InstanceGroup d:type="ref">0</InstanceGroup>
               <Sample>
                  <kLoud-cSampleID>
                     <Pathname d:type="cDeltaString">RSC\K4Pack01</Pathname>
                     <Filename d:type="cDeltaString">RSC\K4Pack01\Audio\RailVehicles\Steam\K4\Cab\K4_WhistleEnd.wav</Filename>
                  </kLoud-cSampleID>
               </Sample>
            </kLoud-cSingleSampleSound>
         </Sound>
         <Curve>
            <kLoud-cCurve d:id="58187152">
               <Name d:type="cDeltaString">Horn</Name>
               <CurvePoint>
                  <kLoud-cRVector2 d:id="58233488">
                     <X d:type="sFloat32">0.000000</X>
                     <Y d:type="sFloat32">0.000000</Y>
                  </kLoud-cRVector2>
                  <kLoud-cRVector2 d:id="58261264">
                     <X d:type="sFloat32">0.100000</X>
                     <Y d:type="sFloat32">1.000000</Y>
                  </kLoud-cRVector2>
               </CurvePoint>
            </kLoud-cCurve>
         </Curve>
         <ModifierChain>
            <kLoud-cModifierChain d:id="58231440">
               <Name d:type="cDeltaString">Horn</Name>
               <Modifier>
                  <kLoud-cVolumeCurveModifier d:id="58232976">
                     <ControllerIsGlobal d:type="bool">0</ControllerIsGlobal>
                     <ControllerName d:type="cDeltaString">Horn</ControllerName>
                     <Curve d:type="ref">58187152</Curve>
                  </kLoud-cVolumeCurveModifier>
               </Modifier>
            </kLoud-cModifierChain>
         </ModifierChain>
         <InstanceGroup>
            <kLoud-cInstanceGroup d:id="58230416">
               <Name d:type="cDeltaString">WhistleEnd</Name>
               <MaximumNumberOfInstances d:type="sUInt32">1</MaximumNumberOfInstances>
               <InstanceExceededAction d:type="cDeltaString">RejectNew</InstanceExceededAction>
            </kLoud-cInstanceGroup>
         </InstanceGroup>
         <Loop>
            <kLoud-cControlledLoop d:id="58206608">
               <PlayState d:type="cDeltaString">BOTH</PlayState>
               <Name d:type="cDeltaString"></Name>
               <Sound d:type="ref">58295568</Sound>
               <ModifierChain d:type="ref">58231440</ModifierChain>
               <ControllerName d:type="cDeltaString">Horn</ControllerName>
               <LoopCondition d:type="cDeltaString">ValueInRange</LoopCondition>
               <ActiveRangeStartValue d:type="sFloat32">0.010000</ActiveRangeStartValue>
               <ActiveRangeEndValue d:type="sFloat32">1.000000</ActiveRangeEndValue>
               <ValueIsChangingGateTime d:type="sFloat32">0.600000</ValueIsChangingGateTime>
               <InstanceGroup d:type="ref">0</InstanceGroup>
            </kLoud-cControlledLoop>
         </Loop>
         <Oneshot>
            <kLoud-cTriggeredOneshot d:id="57822048">
               <PlayState d:type="cDeltaString">BOTH</PlayState>
               <Name d:type="cDeltaString"></Name>
               <Sound d:type="ref">58196880</Sound>
               <ModifierChain d:type="ref">0</ModifierChain>
               <ControllerName d:type="cDeltaString">Horn</ControllerName>
               <TriggerType d:type="cDeltaString">ValueIncreasePast</TriggerType>
               <TriggerValue d:type="sFloat32">0.010000</TriggerValue>
               <ValueIsChangingGateTime d:type="sFloat32">0.000000</ValueIsChangingGateTime>
               <InstanceGroup d:type="ref">0</InstanceGroup>
            </kLoud-cTriggeredOneshot>
            <kLoud-cTriggeredOneshot d:id="57792480">
               <PlayState d:type="cDeltaString">BOTH</PlayState>
               <Name d:type="cDeltaString"></Name>
               <Sound d:type="ref">58246544</Sound>
               <ModifierChain d:type="ref">0</ModifierChain>
               <ControllerName d:type="cDeltaString">Horn</ControllerName>
               <TriggerType d:type="cDeltaString">ValueDecreasePast</TriggerType>
               <TriggerValue d:type="sFloat32">0.200000</TriggerValue>
               <ValueIsChangingGateTime d:type="sFloat32">0.000000</ValueIsChangingGateTime>
               <InstanceGroup d:type="ref">58230416</InstanceGroup>
            </kLoud-cTriggeredOneshot>
         </Oneshot>
      </cGenericAudioControl>
   </ProxyControl>
</kLoud-cProxyControlLoader>
"If you really needed a diesel locomotive right away, then go ahead and order a ALCO. But if you could wait for real quality, then go for an EMD or a GE".


My Youtube Channel (Railfanning and Train Simulator 2018)
http://www.youtube.com/user/3985gtasa
User avatar
bpetit
 
Posts: 1985
Joined: Sun Sep 19, 2010 9:44 pm
Location: New Orleans, Louisiana

Re: Making whistles and/or horns

Unread postby mrennie » Fri Mar 22, 2013 1:36 pm

Try putting 58230416 into the instance group of your one-shot sounds too, that is, the same modifier as for the loop. Right now, you've got 0, so the game doesn't know how to control the volume of the start and end.

Also, I don't think the instance group for the whistle end is needed. The trigger is when it decreases past 0.2, which isn't going to happen more than once anyway, so second shot wouldn't be triggered while the first was still playing. Still, it's not doing any harm either.

Something else that doesn't look right is that the loop is active in the range 0.01 to 1.00, but the whistle end is triggered when it decreases past 0.2, so the whistle loop will be playing at the same time, and might even finish after the whistle end wav has finished, which will sound odd. It might be better to have the whistle end trigger when decreasing past a much smaller value, like 0.001. This is a matter of tuning, playing with the trigger value and the sound curve so that you can't hear when the loop stops and the whistle end begins.

You've also got the whistle start being triggered when the horn value increases past 0.01, which is at the same time as the loop starts, so again, there's going to be a conflict there. It's better to have the whistle start trigger at, say, 0.001, and tune the loop range so that the loop begins when the whistle start wav has almost finished, but tweaking it until there's a smooth transition.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 3 guests