c172p-team / c172p

A high detailed version of the Cessna 172P aircraft for FlightGear
GNU General Public License v2.0
77 stars 43 forks source link

Improve stall horn sound #85

Closed gilbertohasnofb closed 9 years ago

gilbertohasnofb commented 9 years ago

improve stall horn sound, use this as reference: https://www.youtube.com/watch?v=4tLWIvnVnCQ#t=42

gilbertohasnofb commented 9 years ago

Ok, done on my last commit. Now I just need some help to apply this sound to our plane (I couldn't make it work so far, sorry). The sound is located inside a subfolder named Sounds. I also had to create a Thanks file to comply with the CC license of the youtube video which was the source.

So could anyone please give me a hand with the xml file? Right now it seems to be redirecting all sounds from fgdata and I don't know how to make the path relative to our plane.

onox commented 9 years ago

The youtube video doesn't have a CC license?

onox commented 9 years ago

Ah, the Thanks file says https://www.youtube.com/watch?v=zTq8Jvoks2U

onox commented 9 years ago

I would just add this to the README.md file.

gilbertohasnofb commented 9 years ago

Don't you think it's better to have a separate Thanks file just like fgdata does? Actually, once this plane gets incorporated into fgdata, our Thanks can merge together.

onox commented 9 years ago

Ok. I can help with the xml. Do you want to hear it only internally? Does the speaker have a certain position/location?

gilbertohasnofb commented 9 years ago

Thanks, onox!

onox commented 9 years ago

I see the file is stereo. If you want to have it come from a certain position in the cockpit then you should make it mono.

gilbertohasnofb commented 9 years ago

Absolutely, my bad. Completely forgot about it. Give me a minute to fix this.

onox commented 9 years ago

Do you want to make it a looped sound? (like how an engine sound is looped for example)

onox commented 9 years ago

Then you can control pitch and volume and loop the stall sound continuously.

onox commented 9 years ago

Btw, you can leave the current sound as it is, so that it can be modified in the future (treat it as a blend/xcf file).

gilbertohasnofb commented 9 years ago

Ok, converted it to mono. Yes, please let it be looped. As for pitch and volume, I don't think they need to be changed, just loop this file and that should be enough.

Btw, you can leave the current sound as it is (treat it as a blend/xcf file).

What do you mean leave it as it is?

onox commented 9 years ago

That you leave the stereo file in the repository. Perhaps someone wants to use the stereo version for something else in the future. I'm quite astonished how you managed to extract this from that youtube video :astonished: :laughing:

gilbertohasnofb commented 9 years ago

Thanks for the compliment :) As for keeping it stereo, it may not be a good idea because sound files can become quite large. I probably can upload the stereo version to the livery repository though

onox commented 9 years ago

Btw, with looped I mean you take the part between 2.7 seconds and 6.2 seconds.

onox commented 9 years ago

Loop it in Audacity and make sure you don't hear any repeats.

gilbertohasnofb commented 9 years ago

I understand, but I think it would sound more realistic if the file simply loops itself. I checked several videos and normally the stall warning will not sound constantly for a long period of time, it always has little interruptions (even when holding the yoke back), so I guess the effect is more realistic.

onox commented 9 years ago

I think you should also add a finish/stop sound. So you have:

  1. A sound that can be looped continuously
  2. A very small sound that you can play once when you stop playing the looped sound.
onox commented 9 years ago

Otherwise, when you stop playing the looped sound, the stall horn stops abruptly, which sounds weird.

onox commented 9 years ago

I checked several videos and normally the stall warning will not sound constantly for a long period of time, it always has little interruptions (even when holding the yoke back), so I guess the effect is more realistic.

Ok.

onox commented 9 years ago

But then you will always hear the sound for the full duration.

onox commented 9 years ago

Can you create a screenshot and mark the position of the speaker?

gilbertohasnofb commented 9 years ago

Hmm, that's a bit tricky (creating an finish/stop sound): that would work well for a constant looped sound, but as I wrote a realistic stall horn will have some short breaks. Can't we simply play the file until the end? Even if the plane isn't stalling anymore, the file will just continue for a second or two and then naturally finish? Or maybe simply fade out in the sim? Trying to glue an end sound to it won't work IMO.

As for the placement, I don't know where it is. Does it come from the speaker overhead or do we listen to the horn directly from the left wing?

gilbertohasnofb commented 9 years ago

For now we can simply place the virtual sound coming from the speaker on the top panel and then we see with @Juanvvc or @tigert

onox commented 9 years ago

Trying to glue an end sound to it won't work IMO.

It will if the stop position in Audacity of the looped sound is the same as the start position of the finish/end sound :smile:

gilbertohasnofb commented 9 years ago

No, that is not what I mean. I know how to loop a sound. What I mean is that simply stopping sound a.wav at any position and then playing a sound b.wav and expecting that a and b fit together is not going to work (it very likely will be noticible).

onox commented 9 years ago

Ok, maybe the stall sound is not as monotonic as the sound of a gattling gun :wink: I have changed the path to the sound, but I still need to fix the position of the horn.

Do you mean with the "top panel" the position near the compass, or above the pilot's head?

gilbertohasnofb commented 9 years ago

Thanks onox! And I meant above the pilot's head. You will find a loudspeaker there :)

onox commented 9 years ago

Argh, never seen that before :stuck_out_tongue_closed_eyes: Is the speak that dark grey box?

onox commented 9 years ago

Or one of the 3 light grey circles?

gilbertohasnofb commented 9 years ago

The dark grey box

onox commented 9 years ago

:+1:

gilbertohasnofb commented 9 years ago

Thank you so much for the help!

onox commented 9 years ago

Do you know an .ac file that is very small?

gilbertohasnofb commented 9 years ago

I think we have tons of small .ac files in our project. I found 15 of them under 10 kb. What do you mean exactly?

onox commented 9 years ago

Or you could just give me the x,y,z coords of that dark grey box.

onox commented 9 years ago

That would be the most easiest :smile:

onox commented 9 years ago

x is fore/aft (positive aft) y is left/right (positive left) z is up/down (positive up)

gilbertohasnofb commented 9 years ago

Ah onox, I don't know how to use blender to find this information! I tried opening the model on it but that program is just too complex for me... if you can't find it by yourself let's then leave the sound at the origin (0,0,0) and wait for someone who knows his way on Blender to help us.

onox commented 9 years ago

Can you instead give me a very small .ac file? (I mean that the object is very small)

gilbertohasnofb commented 9 years ago

Onox, I never dealt with ac files before and I really don't know how to create them :cry: You are dealing with a complete 3D-ignorant person here.

onox commented 9 years ago

I have already a good position. Just need to damp the volume if not internal and doors are closed.

gilbertohasnofb commented 9 years ago

:+1:

onox commented 9 years ago

Fixed! If you can hear the sound well, try to open the door and switch to helicopter view, then you should be able to hear it very softly.

gilbertohasnofb commented 9 years ago

Thanks onox, I will give it a try now. And when you have a chance, could you please check https://github.com/Juanvvc/c172p-detailed/issues/117 and https://github.com/Juanvvc/c172p-detailed/issues/238 ? Both should be easy to fix given what you have been doing for this stall sound. Let me know if I can help with anything.

wkitty42 commented 9 years ago

wow! you guys have been busy on this issue :) I just wanted to say that there was recent work concerning stereo sound files in the core with fgaddon... basically it comes down to stereo can't be played by the sounds system... everything should be mono and if you want sound from two or more places, each has to be separate and positioned as needed... the 3D (IIRC) system will then take the mono sounds and blend them as needed for dispersion in the 3D space...

onox commented 9 years ago

Yes, that's why @gilbertohasnofb has converted it to mono.

wkitty42 commented 9 years ago

excellent... the core devs are or were working on fixing all the craft in fgaddon for the problem with stereo files... I learned about it from reading the dev list else I might have made the same mistake... I just wanted to pass on the info as i had learned it ;)

gilbertohasnofb commented 9 years ago

@onox @Juanvvc @dany93 @wkitty42 Let's continue that discussion about the stall sound here, as it's by far the most appropriate place. So in the end I believe we decide to go with the synthesized sound route, correct? In forum, Erik has posted several versions of his sounds and then I also posted a synthesized version of mine as well. My sound is based on spectrum analysis of our previous sound (I looked for the strongest nine or ten overtones of the sound and recreate them using oscillators), and so it sounds much closer to what we had in my opinion. You can hear it here: https://www.dropbox.com/s/ktk43ldgtzbdunl/stall.wav?dl=0

What do you think? In the forum I had some positive feedback about it (and I personally believe its closer to the real sound than Erik's), but I think most of you might have missed it given the amount of discussion going on there in the past 24 hours. Let me know what you want me to do, if I should exchange our older sound for this one on the master or if you prefer Erik's version. Either way is fine with me.