Board index FlightGear Development New features

Thunder for the lightning?

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

Thunder for the lightning?

Postby MIG29pilot » Fri Oct 30, 2015 11:18 pm

Some posts were split of from the topic Cessna 172P detailed (was "Cockpit textures for the c172.

I know this sounds crazy, but suppose until ambient sound is implemented (which I hope it will) could a non--ballistic submodel be sent from the site of the lightening strike to the user's aircraft, which would trigger the Thunder sound upon impact?
Last edited by Johan G on Sat Oct 31, 2015 6:19 pm, edited 1 time in total.
Reason: Some posts were split of from the topic Cessna 172P detailed (was "Cockpit textures for the c172.
User avatar
MIG29pilot
 
Posts: 1456
Joined: Tue May 19, 2015 4:03 pm
Location: 6 feet under Snow
Callsign: MIG29pilot
Version: 3.7nightly
OS: Windows 10

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Fri Oct 30, 2015 11:21 pm

I don't know if that makes sense at all, MIG. We already have distance and position of the lightning, as well as the delay time (distance / speed of sound) so that's not the problem at all (it's all simple trigonometry), the problem is that we can't have more than one simultaneous thunder sound, so when a new strike happens while the previous sound is still playing, the previous one is cut dead.
User avatar
gsagostinho
 
Posts: 1799
Joined: Thu Jan 15, 2015 6:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby clrCoda » Fri Oct 30, 2015 11:44 pm

Do we need some form of reverb? I suppose the new call to the thunder cuts off the old. A reverb could be a thing that continues a sound even tho a new call to the same sound has been executed. Don't ask me how to do this in software, tho I know such things are done. I can do it in an electronic amplifier.
Ray St. Marie
clrCoda
 
Posts: 1228
Joined: Wed Apr 07, 2010 11:04 am

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Fri Oct 30, 2015 11:48 pm

@clrCoda Thanks for the idea, but even if we had a way of applying some reverb, an abrupt cut of the sound is still noticeable (albeit much better than the current solution). But that would be a hack solution: why would we go through the trouble of implementing a reverb effect to minimize (and not solve) the cutting issue when we need something as basic as being able to play two simultaneous sounds from a same function?
User avatar
gsagostinho
 
Posts: 1799
Joined: Thu Jan 15, 2015 6:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby clrCoda » Fri Oct 30, 2015 11:57 pm

You know more about it than I, oh wise one. Sorry for trying to be helpful to you. I suppose your question is rhetorical and you can answer it for yourself. Best of luck to you.
Ray St. Marie
clrCoda
 
Posts: 1228
Joined: Wed Apr 07, 2010 11:04 am

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby chris_blues » Fri Oct 30, 2015 11:58 pm

How come, we could only play one sound at a time? Sounds to me, like good ole MSDOS-times, when you had to set every game to available soundchannels on your soundblaster! Max 8 channels I believe. And we can't play 2 sounds? Strange!

A Reverb would not be the same, as a thunder, working it's way through the atmosphere... And I guess, it would still occupy our only channel.

I would bet that Thorsten would have some interesting ideas on that as well, maybe how to realisitically synthesize a thundersound? With all the work already put into atmospheric conditions and some physics about the dynamics of this, this might be not that far away... And that way, we might be able to play as many thunders as we wanted with one channel...

In the end, a thunder is only some form of shockwave...
Last edited by chris_blues on Sat Oct 31, 2015 12:02 am, edited 2 times in total.
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1526
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Fri Oct 30, 2015 11:59 pm

@clrCoda I don't see the necessity for sarcasm, but all right. Cheers.
User avatar
gsagostinho
 
Posts: 1799
Joined: Thu Jan 15, 2015 6:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Sat Oct 31, 2015 12:02 am

@chris_blues It's not like we can't have any two sounds at the same time, it's that these sounds are called by a single function. This function doesn't have a way of finding out if a sound it still active and if so activating a different one, it simply stops the previous sound. The core devs have been informed about it by onox and this may be implemented in the future.
User avatar
gsagostinho
 
Posts: 1799
Joined: Thu Jan 15, 2015 6:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby clrCoda » Sat Oct 31, 2015 12:03 am

@gsagostinho, merely a response in kind.
Ray St. Marie
clrCoda
 
Posts: 1228
Joined: Wed Apr 07, 2010 11:04 am

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby chris_blues » Sat Oct 31, 2015 12:04 am

Oh, then this would seem an easy fix, to make this function multitasking...
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1526
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Sat Oct 31, 2015 12:04 am

@clrCoda Can you please point to me where have I been sarcastic to you?
User avatar
gsagostinho
 
Posts: 1799
Joined: Thu Jan 15, 2015 6:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby clrCoda » Sat Oct 31, 2015 12:10 am

"But that would be a hack solution:"

Basically you just called me a hack, with a hack solution when you and I both know that a reverb is not a hack solution but a real solution used in real world situations that are similar to what we require.

I suppose you might not quite recognize how you come off in text. We've had this situation before I believe.
I can try to be less sensitive to such, I hope you can be more respectful.

best to you, love your work,
Ray
Ray St. Marie
clrCoda
 
Posts: 1228
Joined: Wed Apr 07, 2010 11:04 am

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Sat Oct 31, 2015 12:20 am

Applying reverb to solve a sudden cut is a hack solution, when a proper solution is to be able to handle multiple instances of a same function (thus allowing multiple instances of a same sound to playback). It's not an offence to you, not even to your idea, it's simply a statement that what you propose is non-optimal and inelegant compared to a proper solution, even if it would get the job done (except that we would need to implement reverb as we don't currently have it on FG, which would mean more trouble than the proper solution). On top of it all, it was not sarcastic at all. But be my guest and continue with your animosity towards me, I really couldn't care less.
User avatar
gsagostinho
 
Posts: 1799
Joined: Thu Jan 15, 2015 6:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby clrCoda » Sat Oct 31, 2015 12:30 am

Please note that the sounds in the atmosphere reverberate. Off of mountains, clouds, buildings, road surfaces.

I've not heard the current sound that has been created for this as of yet. I assume the sound includes some form of reverberated echo.

IMHO the sound should be like a real crack of thunder, the one crack, and that distance from that original instantaneous crack should reverberate. Like in the real world.

Anything else might could be called a hack.
Ray St. Marie
clrCoda
 
Posts: 1228
Joined: Wed Apr 07, 2010 11:04 am

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby clrCoda » Sat Oct 31, 2015 1:03 am

I don't have any animosity towards you. Heck, I don't even know you. So I couldn't have such feelings about you. I merely reacted to what you said.

It seems you are trying to work with a sub optimal sound, in a sub optimal sound system. From what I glean from the conversation so far you are using a sound that lasts longer than the original crack of thunder. This can not be optimal. It really should be a simple thing to add a software reverb.

You are getting some kind of sound cut out because you are not using the correct kind of sound but some extended sound that I assume includes the reverb already. If you were using a crack of thunder sound file that doesn't include the reverb then fed that into a reverb you'd never get a sound cut out. Instead you'd get additional sounds fed into the reverb.

Just because flightgear doesn't have reverb yet to handle this doesn't mean it can't. This _can_ be done correctly by someone that knows how, and I hope to inspire that work by describing it.

There was even a time when flightgear didn't have what we would call today aircraft, but that didn't stop anyone.
Ray St. Marie
clrCoda
 
Posts: 1228
Joined: Wed Apr 07, 2010 11:04 am

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 2 guests