I'm very new here, though I have found a lot of very useful content on this forum. Here's a situation I haven't found any information about, though.
I'm trying to develop a sound gauge using the dsd_fsx_xml_sound gauge that selects sounds using a macro within the XML file.
The macro looks like this:
<Macro>Name="CallSpeed">(>L:Call@1Kt,enum)</Macro>
I have a sound gauge ini file set up with the sound files as necessary, along with the LVar assignments to match.
LVar00=Call80Kt
LVar01=Call81Kt
. . .
When I send a literal value to the macro, like
<Update>
. . . . @CallSpeed(80)
</Update>
everything works fine, but if I try:
<Update>
. . . . @CallSpeed((A:Airspeed Indicated,knots) flr)
</Update>
I get no sound.
I have tried various forms of the Airspeed variable to get this to work, all for naught, so I have had to write an intermediate macro to translate the variable to a literal, resulting in a long macro that seems wasteful and hard to maintain:
<Macro Name="SelectAirspeed">
(A:Airspeed Indicated,knots) flr 80 == if{ @CallSpeed(80) }
(A:Airspeed Indicated,knots) flr 81 == if{ @CallSpeed(81) }
. . . etc.
</Macro>
And then:
<Update>
. . .
@SelectAirspeed
</Update>
This works fine, but the list of airspeeds, from 80 to 125 knots is large, and I intend to use the same concept for altitude callouts. . .
My question: How, if it is possible, can I use airspeed variable directly?
Thank You
Paul
I'm trying to develop a sound gauge using the dsd_fsx_xml_sound gauge that selects sounds using a macro within the XML file.
The macro looks like this:
<Macro>Name="CallSpeed">(>L:Call@1Kt,enum)</Macro>
I have a sound gauge ini file set up with the sound files as necessary, along with the LVar assignments to match.
LVar00=Call80Kt
LVar01=Call81Kt
. . .
When I send a literal value to the macro, like
<Update>
. . . . @CallSpeed(80)
</Update>
everything works fine, but if I try:
<Update>
. . . . @CallSpeed((A:Airspeed Indicated,knots) flr)
</Update>
I get no sound.
I have tried various forms of the Airspeed variable to get this to work, all for naught, so I have had to write an intermediate macro to translate the variable to a literal, resulting in a long macro that seems wasteful and hard to maintain:
<Macro Name="SelectAirspeed">
(A:Airspeed Indicated,knots) flr 80 == if{ @CallSpeed(80) }
(A:Airspeed Indicated,knots) flr 81 == if{ @CallSpeed(81) }
. . . etc.
</Macro>
And then:
<Update>
. . .
@SelectAirspeed
</Update>
This works fine, but the list of airspeeds, from 80 to 125 knots is large, and I intend to use the same concept for altitude callouts. . .
My question: How, if it is possible, can I use airspeed variable directly?
Thank You
Paul



