Jump to content
The simFlight Network Forums

Triggering a sound by MSFS event - is it possible?


RomanDesign

Recommended Posts

Hi, a newbie question here: I want to trigger sound playback on specific events in MSFS, to play some "bump" sounds on my DIY vibration transducers. I thought that is might be possilbe via FSUIPC, which is already running on my PC and interacting with MobiFlight. But I've never worked with it, so I don't know how to approah it. LUA script maybe?

- Is it possible at all? I need to trigger sounds via Windows default or custom device on touchdown, flaps extention etc.

- Is there any sample or a guide on how to create LUA scripts that work with sounds?

Thanks!

Link to comment
Share on other sites

4 hours ago, RomanDesign said:

- Is it possible at all? I need to trigger sounds via Windows default or custom device on touchdown, flaps extention etc.

Yes, it should be possible. In fact, there are probably some freely available scripts somewhere that do this sort of thing. There was a support request recenly from an FSUIPC user who started hearing clapping on touch-down and thought it was something that FSUIPC was doing, when it was in fact an FSUIPC lua cript they had installed and forgotten about.

4 hours ago, RomanDesign said:

- Is there any sample or a guide on how to create LUA scripts that work with sounds?

There is plenty of general information on lua on the web, and lua documentation provided with FSUIPC, as well as some example lua plug-ins. Fot sound, check the Sound Library section in the FSUIPC Lua Library document - to play a sound (.wav file), you can use the sound.play function.

Link to comment
Share on other sites

13 minutes ago, RomanDesign said:

OK, thanks, I will do some research then...

This may be useful to start with:  

 

It is quite old now, written for an earlier version of FSUIPC, but still applicable.

Of course, that is just to trigger on joystick buttons. Once you have sounds working, you can then update to trigger on events.

 

Link to comment
Share on other sites

12 minutes ago, John Dowson said:

This may be useful to start with:  

 

It is quite old now, written for an earlier version of FSUIPC, but still applicable.

Of course, that is just to trigger on joystick buttons. Once you have sounds working, you can then update to trigger on events.

 

Thanks a lot for your help. I just found that LUA is the paid part of FSUIPC. Now I have to decide if nearly $40 CAD is worth the experiment that may not work on many levels - technical/hardware/my LUA skill (triggering shakes on events on DIY vibration transducers). That's obviously not your problem, so no complains...

Link to comment
Share on other sites

4 minutes ago, John Dowson said:

Ok. You could try a trial license first, usually available here: 

However, the latest one ran out yesterday. I'll post another there in a few days.

Good to know, thanks! I will try with that, once it's posted.

Link to comment
Share on other sites

Plese let me just provide a suggestion regarding the transducers/shakers and all that and the simulators.
You need to approach all that differently.
Actually the way it's done is by a dedicated sound blaster that we output the simulator sound trough, use certain audio filtering software to get only the frequencies we need, then forward that trough a virtual NDI interface such as VBAN (audio over IP).

With VBAN and similar NDI solutions you can actually virtualize anything so, in theory, you might do it on the same hardware audio interface that you use as your main for everything else - just notice that I wrote "in theory"...because of the amount of noise and all the filtering and routing it would require to properly work IF it is something substantially more powerful than a casual Realtek 1200 integrated chip and all its varieties.

Done properly on a dedicated sound blaster it is possible to get an extremely high fidelity vibrational simulation, the likes of the one that enables you to feel when your right wheel goes over a dogsh...a bump. 🙂 

Anyhow I wish you luck in you project !

Link to comment
Share on other sites

44 minutes ago, Milan Putnik said:

Plese let me just provide a suggestion regarding the transducers/shakers and all that and the simulators.
You need to approach all that differently.
Actually the way it's done is by a dedicated sound blaster that we output the simulator sound trough, use certain audio filtering software to get only the frequencies we need, then forward that trough a virtual NDI interface such as VBAN (audio over IP).

With VBAN and similar NDI solutions you can actually virtualize anything so, in theory, you might do it on the same hardware audio interface that you use as your main for everything else - just notice that I wrote "in theory"...because of the amount of noise and all the filtering and routing it would require to properly work IF it is something substantially more powerful than a casual Realtek 1200 integrated chip and all its varieties.

Done properly on a dedicated sound blaster it is possible to get an extremely high fidelity vibrational simulation, the likes of the one that enables you to feel when your right wheel goes over a dogsh...a bump. 🙂 

Anyhow I wish you luck in you project !

 

On 5/19/2021 at 9:29 AM, John Dowson said:

Just posted!

Thanks guys. I researched all my options and I eventually went with SimShaker for Aviators (free) + Sound Module plugin (paid). It's cheaper than buying FSUIPC license and it's targeted for exactly what I needed without a need for writing any code.  FSUIPC is great for the tasks it's meant to do. But this particular niche requirement, while possible, is done easier by a targeted software. For anyone interested in adding vibration to the sim here's what I've done: it's somewhat similar to what Milan suggested, but goes further.

- I routed all MSFS audio to Voicemeeter Banana app as a default audio device.

- Voicemeeter is configured like this: main output goes to Reverb G2 VR audio device, and it's also routed to a built-in motherboard audio that is purely used for vibration and is fed to an amp and my DIY Buttkickers. I used built-in EQ with a low-pass filter to filter out everything above 60Hz so only low frequencies are passed on. This gives me general feedback and feel of an engine rumble, grass roll, rapid control surface movements and other MSFS sounds that have enough low-end to be felt. Touchdown is not one of those, it could not be felt almost entirely, and ground roll was very faint (unless it's grass) - and that's why I asked my question initially. So that's just a first step. Incidentally, I also use Voicemeeter's virtual device to process the sound output from VoiceAttack software with special profile and plugin that let me interact by voice with most MSFS functions, and from ATC software, as both use Windows Text-to-Speech that feels unrealistically clear, so it's passed through a low-cut and high-cut EQ, leaving a narrow mid-band and emulating radio sound of internal comm and ATC radios. It's routed through a bus with EQ into the Voicemeeter virtual input device, which has "listen to this device" checked in the Windows stock mixer to mix it back to main audio, routed to the G2 HMD.

- I then used SimShaker + Sound Module to send event-based vibrations directly via motherboard's built-in audio to ButtKickers. So it's mixed in with the MSFS low-end sounds and adds what I was looking for and much more: I now feel a distinct touchdown "bumps" on all 3 wheels, ground roll "bumps" (asphalt cracks, concrete expansion seams) that get faster or slower depending on the rolling speed, ground roll rumble, flaps extension/retraction vibration, lowering/raising gear vibration, lowered gear drag, turbulence shake, canopy/door thump and engine rumble (which I toned down because there is enough of it from the mixed-in MSFS sound output). I adjusted the mixing of MSFS low-end sound with SimShaker sound boost until it felt right, and all event types are individually adjustable in SimShaker.

All these together gave me amazingly realistic sensations, very seamless and authentic, as much as possible. It greatly adds to VR immersion, much more than I anticipated. It helps to trick your brain that you are really there. And it provides much needed feedback - I can now feel the touchdown moment, and feel the turbulence happening and get positive confirmation on flaps being deployed when I speak to my "copilot" to deploy them (via VoiceAttack), for example, without diverting my attention to check flap indicators. Etc. So it's both enjoyable and practical.

 

  • Like 1
Link to comment
Share on other sites

7 hours ago, Milan Putnik said:

Excuse my curiosity, but are you THE Roman Design - the one who made all that Canadian/Toronto scenery I enjoy so much ?

Yes, the one and only! I have to say it feels nice to read something like that. Thank you.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.