PDA

View Full Version : Lua Plugin for sounds.



Kennair
03-10-2011, 08:54 AM
Just thought I'd share my latest find using FSUIPC's Lua Plugin facility (doesn't matter if this means nothing to you, just install it and enjoy). Let me clarify that I'm not a programmer nor have any interest or skills in this area (my brother is a programmer and while I love him dearly, he is a very strange creature indeed!).

I wanted to have a sound run when I deployed Speedbrakes but FSX doesn't have this as standard. Some addons like PMDG have it coded into their aircraft but I use the Posky 777 and there's no sound associated with the Speedbrake. So after looking around I found the Lua plugin associated with FSUIPC (which we all have, right?) and it can do just that and more. Now the Speedbrake makes an awesome rumble whenever its deployed. I took a standard sound file from FSX (cnroll3.wav) and gave it a 6db boost below 200hz and renamed it "spoiler.wav" and placed into the "FSX\Sounds" directory. The lua plugin is loaded upon FSX start and detects when the aircraft is going faster than 65knots with the Speedbrakes up and then fires off the sound file.

I've attached the files for others who may be interested. Just copy the lua file into the FSX\Modules folder and put the sound file into the FSX\Sounds folder. All will appear upon Speedbrake deploy.

Cheers,

Ken. :p

Melnato
03-11-2011, 12:36 AM
Nice one Ken... :)

Doesnt PMSounds (freeware) have the speedbrake sound in there?
Im sure it did...been a while since Ive played with sounds...

Nat

steveeverson
03-11-2011, 11:37 AM
Hi Ken,that's a great addition. Would your plugin also work.in fs9?
cheers
Steve

Kennair
03-11-2011, 04:57 PM
Nice one Ken... :)

Doesnt PMSounds (freeware) have the speedbrake sound in there?
Im sure it did...been a while since Ive played with sounds...

Nat

Hi Nat, yes PMSounds also includes a speedbrake sound along with many others however the Lua program was as much an investigation into this very interesting addition to FSUIPC. As it's built into the module there's really nothing else to load except for a taylored text file that tells the plugin what to do. Very nifty I think, and of course it can do almost anything your imagination (and programming skill) can come up with. Also PM advise that "pmSounds might not run with some sound cards when used on the same PC as FS", so Lua might be an alternative.


Hi Ken,that's a great addition. Would your plugin also work.in fs9?
cheers

Steve, yes Lua has been a part of FSUIPC for FS9 for some time. As usual make sure you have the latest update and all should works the same.

Cheers,

Ken.

Melnato
03-11-2011, 07:38 PM
Thanks Ken,
I totally understand the need to experiment!:)

I have been bashing my head against something....trying to get default aircraft sounds like engine and roll from a remote copy
of FSX (wideview client), so I can pump specific sounds to my bass kiker amp. Rather than splitting the sound from the wideview server FSX.
Hope that makes sense...i think i may be wishing too much though...

Nat

Kennair
03-11-2011, 08:06 PM
Hi Nat, I think I remember reading in the Wideview documentation that remote sounds isn't possible with this app. Views only.

Perfectly do-able with Lua however as it happily loads from the WideFS client on any remote computer, then put the sound in a directory on the same remote PC and point to it in the Lua file (or simply place it a directory called "\sounds" under the WideFS client directory). Other options are PMSounds or Sim-A Sounds (if you run Sim-A).

Ken.

Melnato
03-12-2011, 04:59 AM
Thanks Ken.

Ive already seperated my Sim-A sounds onto a networked computer,no problem,
but what I was hoping/dreaming, that I could use one of the FSX Wideview client computers
to run the "main FSX" sounds. Unfortunately all you get on the wideview client is the engines
at idle, as it cannot/will not respond to your TQ inputs from the Server FSX PC.( Confused? LOL).

Why this came about is that I HATE the FS spounds being muted every time I touch another application (like IS)
on the Wideview Server....hmmmmmmmmmmmm.

Nat

Kennair
03-12-2011, 06:22 AM
Yeah don't think you can do much about that Nat. Whenever you click on another app you take the focus away from FS thereby muting sounds. My recommendation is to have FS exclusively on the main server and all other apps on networked PC's. That way you never take the focus away cos there's nothing else to access. That assumes of course your network is setup to cope with this, but shouldn't be too much of an ask eg:

PC1 - FSX (Wideview Server & center view)
PC2 - FSX (Wideview Client & Left view)
PC3 - FSX (Wideview Client & Right view)
PC4 - Sim-A Avionics stack
PC5 - Sim-A Server & IS.

Of course you could combine PC4 & 5 if hardware or cash is an issue. Basically whatever you do, isolate the FSX PC.

Cheers,

Ken.

Melnato
03-13-2011, 01:14 AM
Ken thanks for your time on this mate.

What you described below was my first set-up...It was good but accessing FS menu was near impossible\
and drove me CRAZY as it was warped by Sol7. Now I have WideServer on a seperate PC (like this: http://www.flightdecksolutions.com/forum/viewtopic.php?t=4209&start=0 ) which Is really nice except
for the sound focus problem...sigh.
Running a total of 7 computers now, which made me reluctant to add another...maybe Ill use my work laptop as the IS when I feel the need? :)

Cheers,

Nat

Kennair
03-13-2011, 08:20 AM
Nat, another option (which you've probably investigated already) is Perpar3d. This has multichannel support like your doing built into it. No Wideview. Don't know how this would affect your sound issue but for the cost of 2 developer licenses ($20 per month) and a little time it might be worth investigating. I'm trialling it right now on our single PC system with a TH2GO and is looking very promising.

Ken.