Board index FlightGear Development AI Traffic

Sounds for AI aircraft

Intelligent, computer controlled vehicles that drive/fly over the planet!

Re: Sounds for AI aircraft

Postby wlbragg » Tue Aug 23, 2022 6:44 am

Not me, I have many other projects in the works. This one is for someone else. I think the one who wants it most!
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Sounds for AI aircraft

Postby merspieler » Thu Aug 25, 2022 12:41 pm

I love flying wrote in Tue Aug 23, 2022 4:21 am:Just do what you want, I'll put everything in to you, you can work on this idea. :|


Um... this is not how an open source project works and exactly what I've meant in my previous post. You now expect them to do unpayed labor for you.
If someone wants to do this, they can pick that project for them selfs but you can not tell them to do this... this is just pretty respectless.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2295
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Sounds for AI aircraft

Postby Hooray » Thu Aug 25, 2022 5:39 pm

Note, as has been said, before: all of this is do-able in XML-space - in other words, if you can come up with something like a "generic-AI-sound-config.xml", it would be fairly easy to add this to all existing AI models in an automated fashion (there is XML-scripting tools like starlet XML).

This could be done in XML space using the existing include directive, which can also be overridden separately.

That way, all AI models could use the same shared sound config, until someone comes up with a better/more specific config for certain aircraft types.

And as also been said before, you don't need to do any coding here, all of this is perfectly possible in XML space - which happens to be fairly similar to HTML.
In other words, with some copy/paste, you could go a long a way here - especially in conjunction with reading some of the docs in $FG_ROOT/Docs

I suppose, there's also a wiki article - if not, we could certainly bootstrap one, based on the docs we have already, and based on your experience adding sound to some AI aircraft.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Sounds for AI aircraft

Postby wkitty42 » Thu Aug 25, 2022 7:35 pm

Hooray wrote in Thu Aug 25, 2022 5:39 pm:Note, as has been said, before: all of this is do-able in XML-space - in other words, if you can come up with something like a "generic-AI-sound-config.xml", it would be fairly easy to add this to all existing AI models in an automated fashion [...]

FWIW: this... kinda pretty much in exactly the same way that some AI craft now have blinking lights on them...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9161
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Sounds for AI aircraft

Postby I love flying » Fri Aug 26, 2022 2:31 am

Ok, well I'll just see some area of improvement in this sector. :o
Flying is so magical, just hearing the hum of the engines as I plow through the blue yonder...
I love flying
 
Posts: 109
Joined: Wed Nov 17, 2021 12:15 am
Pronouns: He/him/them
Callsign: TN-BRT
Version: 2020.3.19
OS: Windows 10

Re: Sounds for AI aircraft

Postby I love flying » Fri Aug 26, 2022 2:32 am

merspieler wrote in Thu Aug 25, 2022 12:41 pm:
I love flying wrote in Tue Aug 23, 2022 4:21 am:Just do what you want, I'll put everything in to you, you can work on this idea. :|


Um... this is not how an open source project works and exactly what I've meant in my previous post. You now expect them to do unpayed labor for you.
If someone wants to do this, they can pick that project for them selfs but you can not tell them to do this... this is just pretty respectless.


Sorry, well I just dont have the needed conding experience.
Flying is so magical, just hearing the hum of the engines as I plow through the blue yonder...
I love flying
 
Posts: 109
Joined: Wed Nov 17, 2021 12:15 am
Pronouns: He/him/them
Callsign: TN-BRT
Version: 2020.3.19
OS: Windows 10

Re: Sounds for AI aircraft

Postby TheEagle » Fri Aug 26, 2022 9:30 am

Just try it, you'll see, especially since you are already familiar with HTML (which is just an extension of XML), it's really easy ! :) No C++ or suchlike coding is needed - just copy some sound file into AI sounds, adjust some values and properties, add <sound><path>AI/Sounds/[aircraft]-sound.xml</path></sound> to the AI aircraft's -main.xml or -set.xml and you're done ! :)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3433
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Sounds for AI aircraft

Postby portreekid » Fri Aug 26, 2022 10:42 am

I love flying wrote in Fri Aug 26, 2022 2:32 am:Sorry, well I just dont have the needed conding experience.


Try it. Have confidence in yourself. Lots of people here started like that. It's very rewarding. Imagine pointing to noisy AI aircraft and saying "That was me."
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10

Re: Sounds for AI aircraft

Postby merspieler » Fri Aug 26, 2022 11:25 am

I love flying wrote in Fri Aug 26, 2022 2:32 am:
merspieler wrote in Thu Aug 25, 2022 12:41 pm:
Um... this is not how an open source project works and exactly what I've meant in my previous post. You now expect them to do unpayed labor for you.
If someone wants to do this, they can pick that project for them selfs but you can not tell them to do this... this is just pretty respectless.


Sorry, well I just dont have the needed conding experience.


Having experience or not doesn't change my point.

As to experience... I bet almost no one had ever used nasal before working on flightgear. We all had to learn things.
We all started somewhere and if you are willing to learn then there are people happy to help you when you get stuck or need advice (just look at the help you've already got in this thread).
And again... you've already got some experience: HTML. This is very similar to XML, just the tag names are different.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2295
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Sounds for AI aircraft

Postby Hooray » Fri Aug 26, 2022 2:00 pm

yeah, give it a try, and we're here to get and keep you going, you can post your questions here - and once you have something working, you can share a few screen shots, and we could turn the whole experience into a tutorial for forum/wiki respectively.

None of this involves any "coding", you're really just looking up a few tags, tag names and file names/paths and update things as needed.
Using a modern XML editor, the whole thing should be fairly straightforward, even if you have never dabbled with XML/HTML before.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Sounds for AI aircraft

Postby rchiicz » Wed Jun 21, 2023 10:57 am

OK, so I came across this thread, and thought... hmmm.. what a great idea.
So I put together an xml file in AI/Sounds, and modified most of the jet airliners in AI/Aircraft to use it.

It sounds pretty good to my ear, but of course I found several problems along the way... :roll:

Anyone can try it:
  • download my git patch file here
  • cd fgdata ; git apply /path/to/ai-airliner-sounds.patch
  • Note: this will modify files in: fgdata/AI/Aircraft, so back up that directory if you want to revert. (or just rename "fgdata/AI/Sounds/generic-airliner-exhaust.xml" to disable it).
  • Start FlightGear, ensure AI Traffic is enabled. Try KSFO or PHNL. "morning" time has a lot of departures and arrivals. Use the C172p, or the UFO. Try "Tower View Look From". Enjoy.
The generic-airliner-exhaust.xml file has a lot of comments on how I control the sounds (currently have to use airspeed as a proxy for thrust, as there is no direct thrust property in AI aircraft), and how I could sometimes get "zombie" sounds after an aircraft parked at the gate. I won't repeat that all here.

I would love some feedback on this if anyone tries it out.

And, as I'm new to the FlightGear community, you can read more about me on my FG Wiki page here.
Warm regards,
Ron
rchiicz
 
Posts: 9
Joined: Mon Jul 19, 2021 1:21 am
Version: 2020.3.18
OS: Windows 10/MX Linux

Re: Sounds for AI aircraft

Postby merspieler » Wed Jun 21, 2023 11:21 am

Hey, welcome.

just one small hint:
this will modify files in: fgdata/AI/Aircraft, so back up that directory if you want to revert. (or just rename "fgdata/AI/Sounds/generic-airliner-exhaust.xml" to disable it).

Since you're in a git repo, you can just use git restore <file> to revert the changes.
No need to "backup" things... git does that for you
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2295
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Sounds for AI aircraft

Postby rchiicz » Wed Jun 21, 2023 6:18 pm

Ah, yes, thank you. "git restore" can undo the patch for anyone using git to access FlightGear (compiling it or wanting latest code or data).
My thought when suggesting a backup of the fgdata/AI/Aircraft directory was in case someone applied the patch to an "installed" copy, not managed by git.
FlightGear Wiki Profile
Flying: C172P, B-52H
rchiicz
 
Posts: 9
Joined: Mon Jul 19, 2021 1:21 am
Version: 2020.3.18
OS: Windows 10/MX Linux

Previous

Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 3 guests