Hello all :) I've been thinking about how .sms files are created and the use of triggers, and I've thought of something that might be useful, so thought I'd put it out there and see if there's any interest...
I'll illustrate my idea with the particular example I have in mind, though this could applied to a lot of other cases as well. What I wish I could do is initiate a looping sound based on Trigger 14 (TrainBrakePressureIncrease), and then have that the loop release once this Trigger is no longer active. In operation it would work like this... Let's say I'm making a brake reduction, and I want a particular sound to play for as long as the reduction is being made. Once the reduction is finished, the sound would stop with a loop release. For this particular trigger there isn't an equivalent "off" trigger that can be used for this, so the sound would continue to play until the Trigger 54 was used (TrainBrakePressureDecrease). The problem is that I don't want the sound to continue playing during the time between when the brake reduction is finished, held at that pressure, then released to decrease the pressure again. I'd like the sound to only play as long as the pressure is actually in the process of increasing - and then end once the pressure is no longer changing and is instead being maintained at the new value in a steady state.
So this got me thinking how handy it would be to have another option other than the two we have now... which are "start when this trigger happens" and then "stop when some other trigger happens". A third option that would be nice to have is something like "start and continue as long as X trigger is true". I can imagine the .sms entry for this looking like something similar to this:
Stream (
Skip ( **** Train Brake Application**** )
Priority ( 5 )
Volume ( 0.25 )
Triggers ( 2
Discrete_Trigger ( 14 StartLoopReleaseWhenTrue ( 1 File ( "BrakeApplicationSound.wav" -1 ) SelectionMethod ( RandomSelection ) ) )
Discrete_Trigger ( 14 ReleaseLoopReleaseWhenFalse () )
)
)
Of course an alternative would be to create a new trigger that would cancel 14 "TrainBrakePressureIncrease", perhaps something named "TrainBrakePressureNotIncrease" or something similar... But, if we had the option of "play sound X as long as condition (Trigger) Y is true", there wouldn't be a need to create additional triggers, at least for this particular situation.
Anyway, I just thought I'd put this out as a suggestion and I'm curious what the OR team and others may think :)
Page 1 of 1
Sound Triggers - an idea?
#3
Posted 19 May 2018 - 04:00 AM
#4
Posted 19 May 2018 - 04:33 AM
If it helps, here are the streams that I use for brake noises (on a locomotive):
Stream ( Skip ( Locomotive brake cylinder air ) Priority ( 5 ) Triggers ( 3 Skip ( Apply ) Discrete_Trigger ( 22 PlayOneShot ( 1 File ( "../../NAVS_COMMON/CORE/brake_apply.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Skip ( Independent release ) Discrete_Trigger ( 21 PlayOneShot ( 1 File ( "../../NAVS_COMMON/CORE/brake_apply.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Skip ( Release ) Variable_Trigger ( BrakeCyl_Dec_Past 0.1 PlayOneShot ( 1 File ( "../../NAVS_COMMON/CORE/brake_release.wav" -1 ) SelectionMethod ( RandomSelection ) ) ) ) ) Stream ( Skip ( Brake squeal ) Priority ( 6 ) Volume ( 0.75 ) Triggers ( 5 Variable_Trigger ( BrakeCyl_Inc_Past 0.5 StartLoop ( 1 File ( "../../NAVS_COMMON/CORE/brake_squeal.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Variable_Trigger ( BrakeCyl_Dec_Past 0.5 ReleaseLoopRelease () ) ) FrequencyCurve( SpeedControlled CurvePoints ( 5 -30 43800 -3 44100 0 46000 3 44100 30 43800 ) Granularity ( 0.001 ) ) VolumeCurve( BrakeCylControlled CurvePoints ( 2 0 0.0 60 1.0 ) Granularity ( 0.01 ) ) VolumeCurve( SpeedControlled CurvePoints ( 5 -8 1.0 -.3 0.05 0 0.0 .3 0.05 8 1.0 ) Granularity ( 0.001 ) ) ) Stream ( Skip ( Brake pipe air ) Priority ( 6 ) Volume ( 0.20 ) Triggers ( 6 Discrete_Trigger ( 141 StartLoopRelease ( 1 File ( "../../NAVS_COMMON/CORE/brake_pipe.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Discrete_Trigger ( 142 StartLoopRelease ( 1 File ( "../../NAVS_COMMON/CORE/brake_pipe.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Discrete_Trigger ( 143 ReleaseLoopRelease () ) ) ) Stream ( Skip ( Independent brake air ) Priority ( 6 ) Volume ( 0.20 ) Triggers ( 6 Discrete_Trigger ( 21 StartLoopRelease ( 1 File ( "../../NAVS_COMMON/CORE/ibrake_air.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Discrete_Trigger ( 22 StartLoopRelease ( 1 File ( "../../NAVS_COMMON/CORE/ibrake_air.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Discrete_Trigger ( 140 ReleaseLoopRelease () ) ) )
#5
Posted 19 May 2018 - 06:31 AM
I appreciate the feedback! Apparently I was referring to out of date information, and a version of the OR manual that didn't have the additional triggers listed. I'm up to date now, and can report that I've gotten the results I want with the additional OR specific braking triggers. I'm relieved http://www.elvastower.com/forums/public/style_emoticons/default/good.gif
Thanks!
Thanks!
Page 1 of 1