Board index FlightGear Development New features

Audio: Nearby aircraft sounds

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Audio: Nearby aircraft sounds

Postby muadib25 » Tue Nov 08, 2011 5:49 pm

Hello!

We have been having this discussion on this forum thread that this feature would not be that difficult to implement, since each aircraft comes with its own sounds.

I am not a programmer but I think it may be possible using also a node(sound emiting source) in each object to produce omnidirectional 3D sound for each aircraft passing by...

How does that sound? 8)
"In a decaying society, Art, if it is truthful, must also reflect decay. And unless it wants to break faith with its social function, art must show the world as changeable. And help to change it." -Ernst Fischer

Callsign:SE-MUA
User avatar
muadib25
 
Posts: 46
Joined: Wed Sep 22, 2010 2:21 am
Location: Sweden
Callsign: muadib
OS: Gentoo Linux

Re: Audio: Nearby aircraft sounds

Postby Avionyx » Tue Nov 08, 2011 7:03 pm

Sounds excellent and as a Ex-professional flight sim sound developer myself it's something I'm very interested in seeing progress in FG.

I have been looking into adding sounds to the environment of FG, rain when engine, avionics etc are off in light aircraft, general airport sounds etc, the idea of each object being able to emit it's own 3D cone of sound, hearable by other's, be it AI or MP traffic you're hearing, or the sound of the ground tug from external views, APU carts etc.

I've got several TB of sounds recorded at airports over the years, by myself, all professional quality, most from the ramps. If a way could be found to implement them then I'd be more than happy to share what's required and help stick it in FG.

Alex
Avionyx
 
Posts: 435
Joined: Mon Jan 11, 2010 3:07 pm
Location: EGKA
Callsign: G-AVYX
Version: GIT
OS: Arch

Re: Audio: Nearby aircraft sounds

Postby Hooray » Wed Nov 09, 2011 12:13 am

A while ago we talked about something related in the context of AI traffic, Erik mentioned it shouldn't be too difficult actually: viewtopic.php?f=23&t=8936

You can file a feature request here: http://code.google.com/p/flightgear-bugs/
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11354
Joined: Tue Mar 25, 2008 8:40 am

Re: Audio: Nearby aircraft sounds

Postby muadib25 » Fri Nov 11, 2011 4:28 pm

Hooray wrote in Wed Nov 09, 2011 12:13 am:You can file a feature request here: http://code.google.com/p/flightgear-bugs/


Are you sure this is the right place for features? It says 'flightgear-bugs/' !! :roll:
"In a decaying society, Art, if it is truthful, must also reflect decay. And unless it wants to break faith with its social function, art must show the world as changeable. And help to change it." -Ernst Fischer

Callsign:SE-MUA
User avatar
muadib25
 
Posts: 46
Joined: Wed Sep 22, 2010 2:21 am
Location: Sweden
Callsign: muadib
OS: Gentoo Linux

Re: Audio: Nearby aircraft sounds

Postby Gijs » Fri Nov 11, 2011 4:48 pm

Yes, it is. Often bugs appear to be features, or features appear to be bugs. So it's convenient to track them in one place.
http://code.google.com/p/flightgear-bugs/issues/entry?template=Feature%20request gives you a nice template ;)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9380
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Audio: Nearby aircraft sounds

Postby ot-666 » Fri Nov 11, 2011 9:43 pm

I once tried to give a scenery model a sound, but i failed.
Anyone tried this before and got it to work?
Callsign: ot-666
Working on LOWI and other stuff - Custom Scenery Overlay Repo: http://gitorious.org/fgfs-custom-scenery/custom-scenery-overlay/
VMX22 - Osprey... sometimes in 2014
ot-666
 
Posts: 746
Joined: Sun Nov 08, 2009 5:14 pm
Location: Germany, Konstanz
Callsign: ot-666
IRC name: ot666
Version: GIT
OS: win7 64bit

Re: Audio: Nearby aircraft sounds

Postby muadib25 » Sat Nov 19, 2011 3:32 am

Gijs wrote in Fri Nov 11, 2011 4:48 pm: ...gives you a nice template ;)


Oh great! Thanks for this, just posted it, Issue 491!

Cheers!

Thanks Hooray for advising me to fix the link! :)
Last edited by muadib25 on Sat Nov 19, 2011 6:20 pm, edited 1 time in total.
"In a decaying society, Art, if it is truthful, must also reflect decay. And unless it wants to break faith with its social function, art must show the world as changeable. And help to change it." -Ernst Fischer

Callsign:SE-MUA
User avatar
muadib25
 
Posts: 46
Joined: Wed Sep 22, 2010 2:21 am
Location: Sweden
Callsign: muadib
OS: Gentoo Linux

Re: Audio: Nearby aircraft sounds

Postby Hooray » Sat Nov 19, 2011 6:15 pm

muadib25 wrote in Tue Nov 08, 2011 5:49 pm:We have been having this discussion on this forum thread that this feature would not be that difficult to implement, since each aircraft comes with its own sounds.


While this is basically true, it's important to keep in mind that the AI traffic system is making quite a number of assumptions and simplifications, i.e. the aircraft you can fly in fgfs are completely separate from the ones that the AI traffic system uses - thus, certain features supported by the "main aircraft" do not work for AI traffic at all, this also applies to sound support, but also a number of other features, such as support for FDMs.

Still, this is certainly one of the more popular feature requests, doing a quick mailing list search, yielded the following discussions, many of which contain good pointers on implementing this:

http://www.mail-archive.com/flightgear- ... 17481.html
http://www.mail-archive.com/flightgear- ... 18544.html
http://www.mail-archive.com/flightgear- ... 22196.html
http://www.mail-archive.com/flightgear- ... 23652.html
http://www.mail-archive.com/flightgear- ... 29927.html

Bottom line being, if you are also interested in this feature, it's certainly a good idea to cast a vote in the issue tracker, and possibly even link back to the discussions we've had here before.

Especially, because some people already made some good suggestions on how to go about implementing this, for example see: http://www.mail-archive.com/flightgear- ... 17493.html

So, it would be a pity to disregard the ideas brought up by others already 3-5 years ago...
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11354
Joined: Tue Mar 25, 2008 8:40 am

Re: Audio: Nearby aircraft sounds

Postby muadib25 » Sat Nov 19, 2011 6:23 pm

Hooray wrote in Sat Nov 19, 2011 6:15 pm:So, it would be a pity to disregard the ideas brought up by others already 3-5 years ago...


True, doing it as we speak...
"In a decaying society, Art, if it is truthful, must also reflect decay. And unless it wants to break faith with its social function, art must show the world as changeable. And help to change it." -Ernst Fischer

Callsign:SE-MUA
User avatar
muadib25
 
Posts: 46
Joined: Wed Sep 22, 2010 2:21 am
Location: Sweden
Callsign: muadib
OS: Gentoo Linux

Re: Audio: Nearby aircraft sounds

Postby Hooray » Sat Nov 19, 2011 9:28 pm

Erik mentioned already 3.5 years ago, that it shouldn't be too difficult after restructuring the sound code into a dedicated FGFX class, so that's probably also what's needed for AI/MP traffic:

http://www.mail-archive.com/flightgear- ... 17513.html
erik wrote:the move of the code from the main loop to the FGFX class makes it rather easy to add support for multiple sound sources, just create a new FGFX class for every aircraft (and update the code to get the models position, which should be a one liner) and it should work properly.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11354
Joined: Tue Mar 25, 2008 8:40 am

Re: Audio: Nearby aircraft sounds

Postby erik » Sun Nov 20, 2011 2:45 pm

Here's a heads up;
The first step is now implemented and if everything goes well you would not notice any differences yet. The next step would be to actually read in the audio configuration files and let the new code do its work (and see if and where could be any problems or bottlenecks).
Stay tuned.

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Re: Audio: Nearby aircraft sounds

Postby Hooray » Sun Nov 20, 2011 6:03 pm

Thanks for the update!

The neat thing is, that even weapon systems using the AI system (such as xiii's fox2 implementation for the f-14b) could also use this to implement sound effects for their missiles. Are there any plans to also support sound for sub models, too?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11354
Joined: Tue Mar 25, 2008 8:40 am

Re: Audio: Nearby aircraft sounds

Postby erik » Mon Nov 21, 2011 8:58 am

In theory it should be possible but it might prove to be just a little too much for most systems.
But I could always create a switch to turn it off I guess.

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Re: Audio: Nearby aircraft sounds

Postby Hooray » Mon Nov 21, 2011 5:57 pm

That's probably right, and a good idea to make such things optional/configurable, so that people can customize them as required.

Actually, I was really only thinking in terms of flug's bombable addon, which could obviously benefit from sound effects for AI traffic and sub models.

So keeping this in mind might be a good idea. I don't think there are many other areas where sound effects would be really missing then once this is working.

On the other hand, a while ago some people mentioned not succeeding while trying to attach sound effects to scenery models (i.e. hangars, factories, wind power), I am not sure if that's currently even supposed to work or not, though?

Overall, it would actually be cool if sound effects could be triggered by writing to the property tree, i.e. by invoking registered listeners.

This would then also make it possible for people to eventually offload sound creation to dedicated threads or even dedicated hardware, so that sound effects wouldn't necessarily have a noticeable effect on the main loop anymore.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11354
Joined: Tue Mar 25, 2008 8:40 am

Re: Audio: Nearby aircraft sounds

Postby erik » Tue Nov 22, 2011 9:11 am

It is still not yet possible to attach sounds to anything other than the main aircraft. I'm working on adding sounds to moving objects (AI Models first, possibly sub-models later). If anything goes beyond expectations I might also look at static objects.

With regards to multiple threads, that is exactly what I've been working on for a few years with my own company;
I've developed a super fast (5 to 7 times faster than OpenAL-Soft and OpenAL-Sample) 3d audio rendering engine that supports multiple rendering threads (and has an OpenAL support layer).
See http://www.adalin.com/

The commercial version of the software (sub $10,- price, but at least until mid January less than $2,-) implements audio-frames that are based on what I've called a SoundGroup in the simgear sound-manager. Every audio-frame (SoundGroup) renders audio in it's own thread which means that basically every AI model will render in it's own thread. Preliminary code to support the AeonWave audio library is already on my pc.

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest