Hello, I've been pretty successful the last few weeks with XML gauges. I just can't seem to wrap my head around a certain concept:
I'm making a gauge that creates a sound when N2 is increased, only between 53% N2 to 60% N2. The gauge works great so far, one thing: I'd like the sound not to play if N2 hasn't increased in say.. 1 second. For now, if thrust is increased and abruptly pauses, the sound stays. Any ideas? All the weird math I have is me being an amateur and using throttle position as an N2 comparison, but of course this won't always work with different weather conditions, etc. The N2 value is of course changing constantly so I'm looking for a better way to do this.
Thanks in advance
<!-- Howl start sound -->
(A:TURB ENG CORRECTED N2:2,percent) 60 >
if{ 1 (>L:HOWL_VAR2,number) }
(A:TURB ENG CORRECTED N2:2,percent) 54 <
if{ 0 (>L:HOWL_VAR2,number) }
(A:GENERAL ENG COMBUSTION:2,bool)
(L:HOWL_VAR2,number) 0 == and
(L:ENG2_HOWL_STATE,number) 0 == and
(A:TURB ENG CORRECTED N2:2,percent) 53 > and
(A:GENERAL ENG THROTTLE LEVER POSITION:2,percent over 100) 45 * 52 + (A:TURB ENG CORRECTED N2:2,percent) > and
(A:GENERAL ENG THROTTLE LEVER POSITION:2,percent over 100) 0.04 >= and
if{ 1 (>L:EXT_ENG2_HOWL_START,number) 1 (>L:ENG2_HOWL_STATE,number) 1 (>L:HOWL2 Timer Running,number) }
This timer is just to help the transition between "START" and "RUN"
.....................
(L:HOWL2 Timer Running,number) 0 ==
if{ (P:ABSOLUTE TIME,seconds) (>L:HOWL2 Start Time,seconds) }
(L:HOWL2 Timer Running,number) 1 ==
if{ (P:ABSOLUTE TIME,seconds) (L:HOWL2 Start Time,number) - (>L:HOWL2 Elapsed Time,number)
(L:HOWL2 Elapsed Time,number) 1.08 44100 (L:EXT_ENG2_HOWL_RUN_FREQ,number) / * >=
if{ 0 (>L:HOWL2 Timer Running,number) 2 (>L:ENG2_HOWL_STATE,number) }
}
.....................
<!-- Play the loop sound -->
(L:ENG2_HOWL_STATE,number) 2 ==
if{ 2 (>L:EXT_ENG2_HOWL_RUN,number) }
<!-- play STOP -->
(A:TURB ENG CORRECTED N2:2,percent) 60 >
(A:TURB ENG CORRECTED N2:2,percent) 54 < or
(A:GENERAL ENG THROTTLE LEVER POSITION:2,percent over 100) 45 * 52 + (A:TURB ENG CORRECTED N2:2,percent) <= or
(A:GENERAL ENG THROTTLE LEVER POSITION:2,percent over 100) 0.04 < or
(L:ENG2_HOWL_STATE,number) 2 == and
if{ 1 (>L:EXT_ENG2_HOWL_STOP,number) 0 (>L:EXT_ENG2_HOWL_RUN,number) 0 (>L:ENG2_HOWL_STATE,number) }
I'm making a gauge that creates a sound when N2 is increased, only between 53% N2 to 60% N2. The gauge works great so far, one thing: I'd like the sound not to play if N2 hasn't increased in say.. 1 second. For now, if thrust is increased and abruptly pauses, the sound stays. Any ideas? All the weird math I have is me being an amateur and using throttle position as an N2 comparison, but of course this won't always work with different weather conditions, etc. The N2 value is of course changing constantly so I'm looking for a better way to do this.
Thanks in advance
<!-- Howl start sound -->
(A:TURB ENG CORRECTED N2:2,percent) 60 >
if{ 1 (>L:HOWL_VAR2,number) }
(A:TURB ENG CORRECTED N2:2,percent) 54 <
if{ 0 (>L:HOWL_VAR2,number) }
(A:GENERAL ENG COMBUSTION:2,bool)
(L:HOWL_VAR2,number) 0 == and
(L:ENG2_HOWL_STATE,number) 0 == and
(A:TURB ENG CORRECTED N2:2,percent) 53 > and
(A:GENERAL ENG THROTTLE LEVER POSITION:2,percent over 100) 45 * 52 + (A:TURB ENG CORRECTED N2:2,percent) > and
(A:GENERAL ENG THROTTLE LEVER POSITION:2,percent over 100) 0.04 >= and
if{ 1 (>L:EXT_ENG2_HOWL_START,number) 1 (>L:ENG2_HOWL_STATE,number) 1 (>L:HOWL2 Timer Running,number) }
This timer is just to help the transition between "START" and "RUN"
.....................
(L:HOWL2 Timer Running,number) 0 ==
if{ (P:ABSOLUTE TIME,seconds) (>L:HOWL2 Start Time,seconds) }
(L:HOWL2 Timer Running,number) 1 ==
if{ (P:ABSOLUTE TIME,seconds) (L:HOWL2 Start Time,number) - (>L:HOWL2 Elapsed Time,number)
(L:HOWL2 Elapsed Time,number) 1.08 44100 (L:EXT_ENG2_HOWL_RUN_FREQ,number) / * >=
if{ 0 (>L:HOWL2 Timer Running,number) 2 (>L:ENG2_HOWL_STATE,number) }
}
.....................
<!-- Play the loop sound -->
(L:ENG2_HOWL_STATE,number) 2 ==
if{ 2 (>L:EXT_ENG2_HOWL_RUN,number) }
<!-- play STOP -->
(A:TURB ENG CORRECTED N2:2,percent) 60 >
(A:TURB ENG CORRECTED N2:2,percent) 54 < or
(A:GENERAL ENG THROTTLE LEVER POSITION:2,percent over 100) 45 * 52 + (A:TURB ENG CORRECTED N2:2,percent) <= or
(A:GENERAL ENG THROTTLE LEVER POSITION:2,percent over 100) 0.04 < or
(L:ENG2_HOWL_STATE,number) 2 == and
if{ 1 (>L:EXT_ENG2_HOWL_STOP,number) 0 (>L:EXT_ENG2_HOWL_RUN,number) 0 (>L:ENG2_HOWL_STATE,number) }
Last edited: