• There seems to be an uptick in Political comments in recent months. Those of us who are long time members of the site know that Political and Religious content has been banned for years. Nothing has changed. Please leave all political and religious comments out of the forums.

    If you recently joined the forums you were not presented with this restriction in the terms of service. This was due to a conversion error when we went from vBulletin to Xenforo. We have updated our terms of service to reflect these corrections.

    Please note any post refering to a politician will be considered political even if it is intended to be humor. Our experience is these topics have a way of dividing the forums and causing deep resentment among members. It is a poison to the community. We appreciate compliance with the rules.

    The Staff of SOH

  • Server side Maintenance is done. We still have an update to the forum software to run but that one will have to wait for a better time.

Running external sounds

Pat Pattle

SOH-CM-2025
Something I've been toyng with is a little proggy called Autohotkey. Amongst other things it does is that with it you can assign keys to play sounds. I was put onto this by Hazzie over at the BoB2 forums.

6 or so posts up from the bottom of this page:

http://www.shockwaveproductions.com...id=9b435857663090abbab3f59853447e0f&start=420

Hazzie's linked to the programme and his sound sets.


What I've done is to use his Spit flyby sound, the cfs3 one is abysmal so now I have f9 set up as the flyby and then press ctrl f9 straight after and get a much better sound effect. It's a bit clunky doing it this way but it is a more satisfying sound. Also he's included some random radio chatter, If you have this running whilst engaged in a dogfight it really is much better!

The downside is that you can only use keys that aren't mapped in the sim, so it's a bit restrictive in that way but just as a method of adding a little more immersion it's very good.
 
Sounds very interesting! Is this under development at all? Would be great if they got it to work using keys that had already been mapped in cfs3. Saitek and Logitech users may be able to get around this using the key programming software though.
 
Thinking of some ideas for ways to use this while I wait to get home to try it.

1. Master switch sound- sound of switch being flipped, gyros spinning up and headset turned on (light static) triggered any time the master is toggled on and another sound of the switch, gyro spool down and headset off when the master is toggled off. Not certain I can get it to loop the whole time the switch is on.

2. Increase volume when canopy is opened and decreased when it is closed. It will effect all sounds, but still ought to give a nice effect.

Any others?
 
Hey Clive, I was unable to download the commands and sounds file that was posted there for you. Do you think you could pass it on to me?
 
Doing a bit of testing now, I've found that AutoHotKey will accept programmed keystroke input from my logitech stick but not from my saitek controllers. This allows me to have my logitech stick buttons do double duty by programming the button to simulate keystrokes for the hotkey I've made to play a sound as well as other keystrokes that are programmed to an action in CFS3. So when I press the button I get the sound and the action with a single button press.
 
Doing a bit of testing now, I've found that AutoHotKey will accept programmed keystroke input from my logitech stick but not from my saitek controllers. This allows me to have my logitech stick buttons do double duty by programming the button to simulate keystrokes for the hotkey I've made to play a sound as well as other keystrokes that are programmed to an action in CFS3. So when I press the button I get the sound and the action with a single button press.

That sounds interesting, being able to double-up on the key assignments makes this a lot more user firendly. I have a Saitek AV8OR stick but haven't tried programming so far. Will give it a go.

You have mail btw!

This softwares been around for a long while I guess but it's very ingenious of Neil (Hazzie) to set this up for his simming. It does offer up all sorts of possibilities.
 
I've just gotten my first one working. It's an effect for opening and closing the canopy. There is no new sound, but it increases the sound volume whenever the canopy is opened and reduces it whenever it is closed. To use it, just drop the five .exe files into your main CFS3 folder. You will need to program a button on your controller to first simulate the key you use to open and close the canopy, and then to simulate Ctrl+C. If your controller programming software allows, use timings between each simulated key event to make sure the programs don't mix up the two separate commands. When you run up CFS3, use the cfs3starter.exe to start the game instead of whatever you normally use (you can add shortcuts and icons to it the same as you would the regular cfs3.exe).

Known issues:
1. This program adjusts the system master volume, so all sounds are affected, not just the engine sounds etc. It also effects volume when in external view.
2. If you end a mission with your canopy open, you must press your canopy button once between missions or the effect will be reversed. If you exit CFS3 before flying another mission this will not be a problem.

How it works:
1. cfs3starter.exe runs canopy_initializer.exe which sets master system volume to 100%, then reduces it to 56% and launches canopy_open.exe before closing.
2. cfs3starter.exe launches cfs3.
3. When you press your canopy open button and open the canopy, canopy_open.exe sets master system volume to 100% as the canopy opens and launches canopy_close.exe before closing.
4. When you press your canopy button again to close the canopy, canopy_close.exe sets master system volume to 56% as the canopy closes and launches canopy_open.exe before closing. You may open and close the canopy as many times as you like and master system volume will alternate between 100% and 56%.
5. When you exit CFS3, cfs3starter.exe closes either canopy_close.exe or canopy_open.exe (whichever is open at the time) and launches canopy_cleanup.exe which sets master system volume back to 100% before closing.
6. cfs3starter.exe closes.

All of this runs completely automatically in the background and you never see it. It is only active while CFS3 is running. I have included my source files so anyone can play with it as they like.

Enjoy.

Daniel
 
That sounds interesting, being able to double-up on the key assignments makes this a lot more user firendly. I have a Saitek AV8OR stick but haven't tried programming so far. Will give it a go.

You have mail btw!

This softwares been around for a long while I guess but it's very ingenious of Neil (Hazzie) to set this up for his simming. It does offer up all sorts of possibilities.

Got it! Thanks!
 
Fiendish Daniel, I can see how it works but I can't programme my stick unfortunately. :(
Will have another go tonight though.
 
The Saitek programming software is pretty buggy. Are you having trouble getting it to do anything at all or just getting it to work with auto hot key? If it's the former I can't help you. I couldn't get it to work for the longest time and then one day it just started working, no idea why. Keep trying.

If you're having trouble getting it working with auto hot key, I was able to change a few things to make the ahk scripts play better with saitek. The saitek software is a bit pickier than Logitech's software, but it will work. I'll post it when I get home.

The downside to all this is that for the most part each person needs to customize the scripts to work with their own controller setup. Still very cool though, opens up a lot of new possibilities that weren't possible before. It's been great fun for me. I'm currently working to write scripts for all the cockpit controls so that everything you do will have an associated sound effect that plays automatically. I've nearly got the master switch effects working satisfactorily, next up: bailout effects.
 
Here's version 2.0, took me longer than expected to be able to post it. (Has anyone gotten it to work on their system?)

This one should be a little more flexible than the older one. Pressing "C" will now open and close the canopy with the accompanying volume change, however, your CFS3 key profile must use "K" for the canopy command and "C" must be unassigned. Otherwise everything is the same as above. If you want to map the command to your joystick, have the desired button simulate the "C" key. It will work perfectly fine without mapping the command to a joystick as well.

This Auto Hotkey program is pretty good. I've been looking through the tutorial and commands list on their site and I think we may be able to add more than sounds. It's looking like it may be possible to add random system failures and more complex engine management. This could include complete system failures, like electrical or hydraulic, or individual component failures like stuck flaps. Gun jams would be possible too. Engine management would include things like time limits for running at full power or not having your cowl flaps open at lower throttle settings or on the ground, with consequences like reduction in engine power, erratic RPM or complete engine failure. It will probably take me a while to figure out exactly how to do it, but the software seems to have the capability. If anyone already knows their way around AHK and could give me some pointers I'd be most appreciative!

Edit: I've removed the old version to avoid confusion, but the directions in post #8 are still valid for this version.
 
This Auto Hotkey program is pretty good. I've been looking through the tutorial and commands list on their site and I think we may be able to add more than sounds. It's looking like it may be possible to add random system failures and more complex engine management. This could include complete system failures, like electrical or hydraulic, or individual component failures like stuck flaps. Gun jams would be possible too. Engine management would include things like time limits for running at full power or not having your cowl flaps open at lower throttle settings or on the ground, with consequences like reduction in engine power, erratic RPM or complete engine failure. It will probably take me a while to figure out exactly how to do it, but the software seems to have the capability

:icon_eek: Wow do you think that's really possible? I've always wanted system failures like they have in the fs series, adds another dimension to it all.
Will give your new work a try when I get a mo'. :)
 
I think so, AHK is able to take input of one key, and send it out as any number of others, can use variables and timers etc and can temporarily disable a key. This means for a given input it can send a whole series of inputs to CFS3 and control any system CFS3 allows us to control, or disable the keys that allow us to control them. For example you could set it up so that a timer is started whenever you give full throttle input. If that timer reaches a certain number before a different throttle input is recieved, it sends CFS3 the signal to bring the the mixture back to idle cutoff, shutting off the engine, and then disables all the mixture controls so you can't restart the engine. It will take some pretty complex logic to get all the systems working together and interrelated as they should be, but in theory it is possible. It's a bit crude, but it's better than what we've got otherwise.
 
Doing some more reading, there is a much simpler way to get one key stroke to execute a hot key function and perform an action in cfs3. Just add "~" to the start of your hot key and whatever key you are pressing will not be blocked by auto hot key and can still be used by the sim. See this link: http://www.autohotkey.com/docs/Hotkeys.htm#Intro
 
Excellent find Daniel!! I've applied that to my flyby sound and added a delay to coincide with the animation. So much better with just the one keystroke. :)
~f9::
Sleep, 1500
SoundPlay,C:\flbysraf.wav

What I can't see is how to get it to loop/repeat as the animation does. Will look further.



Have tried the canopy test 2 and it does indeed turn the volume up and down - you clever s*d. :) I can't get the canopy to open on the same key even though I added ~ to canopy_open.ahk and canopy_close.ahk ...are they the right files to add it too?


I can now see that this could open up a realm of possibilities!
 
I'm trying to solve the loop sound issue as well, have asked over at the AHK forum, we'll see what turns up.

Those are the correct files. If you're using ~ make sure your CFS3 key assignments match the hotkey and delete the send line. As it was written the CFS3 key assignment needed to be K, while C was the actual key you needed to press. With ~ the CFS3 key assignment can be set to C, making the send K line unnecessary.

If you've changed the hotkey used in the script, make sure it is a single key, not some combination, as this seems to be unreliable with CFS3.
 
Back
Top