• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

controlling sound VOLUME from within a gauge or simconnect

  • Thread starter Thread starter B21
  • Start date Start date

B21

Messages
149
Country
unitedkingdom
I'm hoping this will be my last question on sound programming for my glider vario... thanks for the help so far.

Would I be right in assuming you *cannot* adjust the user sound playback volume (preferably cockpit sounds) from within a gauge via the XML, gauge C++ or simconnect API's ?

The requirement is to adjust the volume of the vparam/rparam vario sound but worst-case I could adjust the sim overall volume or better the in-cockpit sound.

I *really* don't want to go down the DirectSound route.

I have a backup cunning trick of building multiple volume levels into the vparam and offsetting the actual index variable (VARIOMETER RATE) according to the gauge volume variable, but I'd prefer a simple FSX volume variable to adjust...

B21
 
I've successfully tweaked the vparams to give me a 'zero volume' area off the end of the normal range, and I force the controlling variable into this area (VARIOMETER RATE) to give me the effect of turning the sound OFF (e.g. when the user has powered-off the instrument on teh panel. This is working ok.

I don't think there's a similar trick I can use to control the volume in more granularity.

thanks

B21
 
I don't think there's a similar trick I can use to control the volume in more granularity.

Surely if you set the vparam scale to be zero low down (say below 5%) and then ramp it up to 100% you can then set the volume to wherever you like within that range, giving you maximum granularity?

Si
 
weeellll, I've already thought carefully about that idea but the Rparam variable already controls the playback Rate as appropriate on a range (say) +/- 10 (m/s) so the frequency of the sound changes from low (-10) to high (+10). If I set the Vparam to scale from zero to max (100?) over the same range, if I understand your suggestion correctly I'd could have quiet low frequencies and loud high frequencies, but it's not clear how I'd be able to modulate the sound over the full frequency range at a fixed volume, but also shift to lower or higher volume but still the full frequency range. The trick I mentioned above to turn the sound OFF was to extend the vparam table far outside the normal range of the controlling variable (normally +/- 10), and I set an area of rparam = 0 from -99 to -40. To turn the sound OFF I set the controlling variable to -70.

The idea is the volume would be controlled by a volume knob implemented on the gauge, but I *still* have to be able to swing the frequency of playback as normal.

I *could* compress the normal range of the controlling variable by a factor of 10, and offset it into the vparam/rparam range. The vparam would look like a series of steps going from zero volume to max, and the rparam would look like a sawtooth with the rate control being effective for each of the steps in vparam. Technically to implement that I'd need to use a series of vparam/rparam blocks linked together. *But* this doesn't work because I can't control the controlling parameter accurately enough due to internal FSX updates. The basic sound adjustment works ok over the normal range though.

I know the audio vario in a glider sounds like a niche hobby, but the challenge is it's an instrument that beeps higher as lift increases, and lower as you fly through sink (it doesn't get louder/quieter during normal usage). The default FSX variometer does this using the exact same modulation parameters as are used for prop and engine sounds, as the frequency modulation technique is identical using playback rate of the WAV. But I need a volume control.

I can think of a made-up example for a power-plane that would require a similar solution: if the pilot had a switch on his panel that turned his headphone noise-cancellation on and off, you would need to adjust the engine volume between two values (I don't mean engines versus silence which has possible work-arounds). I don't think you could do that with a combustion sound definition for one set of engines.

I've wondered about having multiple vario sound definitions and somehow only enabling one at a time but can't think how to do that. Defining linked sections to cover different non-overlapping ranges of the controlling variable sounded promising (the 'sawtooth' profile as mentioned above), but the 'offsetting' technique of the controlling variable is problematic, as it would also be for engine speed.

Si thanks for your comments - this is an interesting problem to think about if there's a trick I can use in FSX, but I won't be offended if you're bored of it - you've been very helpful.

Thanks

B21
 
Last edited:
Ah, I forgot you were modulating frequency also. Your saw-tooth idea is the probably the only way you could manage both from the same sound.

Si
 
Back
Top