Jump to content

[1.0.x (partial)] Atmospheric Sound Enhancement v2.2 (2015-05-05)


pizzaoverhead

Recommended Posts

Adds the effects of the density, temperature and relative speed of the atmosphere to craft sounds. When breaking the sound barrier, muffled sounds (or optionally no sounds) will be heard from the craft when the camera is outside of the shock cone. When passing through the cone, you can hear the shockwave. When leaving the atmosphere, the sound gradually fades to muffled (or optionally nothing) in vacuum. Internally, sounds can always be heard but are muffled. Non-craft sounds such as music are unaffected.

Downloads

CurseForge | MediaFire

Source included, project also available on GitHub, licenced under GPL v2.

If you've enjoyed this, consider donating a cup of coffee to help with late night coding:

btn_donate_LG.gif

Credits

Thanks to velusip and szdarkhack for their major contributions to this mod. The plugin also makes reference to Deadly Reentry for compatibility with its particle effects.

Change log

v2.2 (2015-05-05)

  • Rebuilt for KSP 1.0.

v2.1.1

  • Rebuild for KSP 0.23 (no changes).

v2.1 (2013-11-27)

  • Fixed incorrect or missing sound effects in some situations.
  • Fixed some sounds being missed before first staging.
  • Slight performance improvements.

v2.0 (2013-11-21)

  • Added a configuration file.
  • Added the ability to choose between silence or muffled sound when supersonic or in a vacuum (muffled by default).
  • Customised condensation and re-entry effects.
  • Fixed issues with the Mach sounds not always being played at the correct angles.

v1.1 (2013-11-03)

  • Fixed sounds still playing while paused.
  • Fixed slowdown when going supersonic.

v1.0 (2013-11-02)

  • Initial release.

Configuration options

The effects can be customised by modifying settings.cfg in the GameData/AtmosphericSoundEnhancement directory:

  • interiorMaxFreq - How muffled the sounds heard inside the craft are. Sounds above this frequency aren't heard. It can be anywhere between 10 (a deep rumble that can only be heard with high-quality speakers) and 22000 Hz (not muffled at all). 0 disables internal sounds.
  • maxVacuumFreq - How muffled the sounds are in external views when in a vacuum, similar to interiorMaxFreq. 0 disables sounds, 22000 gives normal, unmuffled sounds.
  • maxSupersonicFreq - How muffled the sounds are when the camera is ahead of the supersonic shock wave when in an extarnal view, similar to interiorMaxFreq. 0 disables all sounds, 22000 gives normal, unmuffled sounds.
  • interiorVolumeScale - A multiplier for the volume inside the craft. 1 is 100%, 0.5 is 50%, 2 is 200%, 0 for silence.
  • maxDistortion - How distorted and crunchy the sound of the shock wave is. 0 is off (normal) and 1 is on fully (may cause crackling).
  • lowerMachThreshold - The Mach number at which the sonic boom starts to kick in.
  • upperMachThreshold - The Mach number at which the sonic boom finishes fading away.
  • negativeSlopeWidthDeg - The angle (in degrees) behind the shock cone that the shock wave fades away over.

Current state

Anything using EFFECTS nodes such as multi mode engines like the R.A.P.I.E.R., as well as the NASA engines, jet engines and Hot Rockets mod, currently aren't affected by this mod due to the way they work. I'm working on changes to deal with this, and hopefully improve performance in general.

Edited by pizzaoverhead
Link to comment
Share on other sites

Uh, that looks, err... sounds interesting, testing as we speak.

Edit: This is just... wow. The mach effects... never heard a thing like this... especially with ferram it feels just like you were flying a real supersonic jet.

Edited by MarrusQ
added first impressions
Link to comment
Share on other sites

One question:

it seems like the mach cone is not after the rocket sometimes... when the rocket is flying forward with a speed above Mach 1 (probably also above Mach 2, i rememer that the speed is around 1000m/s at that moment.), the position that i can hear the sound will be somewhere in front of the rocket sometimes, or sometimes somewhere under the back of the rocket for around 15 degrees, instead of just right behind it. and my rocket is flying with almost zero AOA at around 30000m ASL so that can rule out some possibilities i guess.

Link to comment
Share on other sites

I like this. However in its current form it kills my performance due to the endless stream of debug logging. I built a version without it and it works great though :)

Now, I'm interested to contribute to this. First off, with this mod the engine sounds continue playing in the pause menu. I'll try to figure out how to stop that from happening.

Secondly, I'm (later on) going to see if I can make this talk to FAR in some way, to get the density and speed of sound from there (way more accurate). I'll post updates if I manage any of these :P

Link to comment
Share on other sites

Thanks for the bug reports. Version 1.1 is out now with fixes for the sounds when paused and (hopefully) the slowdown.

I'm (later on) going to see if I can make this talk to FAR in some way, to get the density and speed of sound from there (way more accurate). I'll post updates if I manage any of these :P

I haven't used FAR myself in a long time, but getting accurate data from it would give a slight speed bonus rather than calculating values twice, as well as having the effects line up with it. I'll have a look at it. Feel free to have a look at the code yourself too. :)

Edited by pizzaoverhead
Link to comment
Share on other sites

Thanks for the bug reports. Version 1.1 is out now with fixes for the sounds when paused and (hopefully) the slowdown.

I'm making steady progress. I've cleaned up the code (lots of redundant checks in there) and removed some unused stuff. Here's my current source: AtmosphericSoundEnhancement.cs

It works the same way as the original as far as I can tell, except I changed the shock width to 15 degrees (feel free to change it back) and used the ideal gas formula for the speed of sound. I'm going to try to get a less distorted pressure wave going before Mach 1, it kicks in too suddenly for my liking. Feel free to use (or not use) the code :P

Link to comment
Share on other sites

Tested it, encountered a few glitches (or maybe this is due to FAR):

- on my hypersonic jet, the sound was muffled from the rear, and full on from the front (over mach 1.7)

- in space sounds disappear alright during ascent, but once i switch view to another ship or if i use time warp, sounds come back.

Link to comment
Share on other sites

We should have some kind of visual indicator of the shockwave.. Like a sudden flash of intense white raycasting, like they already have,

I remember that old versions of FAR have some particle effects when rockets are passing Mach 1. Unfortunately ferram removed this effect after the stock game introduced the aerodynamic FX which hardly appears at Mach 1. I really hope that ferram can add that effect back, thus creating deep immersion when used with this sound plugin together.

Link to comment
Share on other sites

This mod is really cool but I've only got it to work 1 time for some reason, the rest of the times I've launched KSP it isn't working.

edit: Nevermind, apparently I had a left over FAR dll.

Edited by nater
Link to comment
Share on other sites

I'm making steady progress. I've cleaned up the code (lots of redundant checks in there) and removed some unused stuff. Here's my current source: AtmosphericSoundEnhancement.cs

It works the same way as the original as far as I can tell, except I changed the shock width to 15 degrees (feel free to change it back) and used the ideal gas formula for the speed of sound. I'm going to try to get a less distorted pressure wave going before Mach 1, it kicks in too suddenly for my liking. Feel free to use (or not use) the code :P

Thanks SZDarkhack, I'll take a look at it. I intend on having the distortion effect fade in (independent of observer position) between Mach 0.8 and Mach 1, similar to

video. The shock width should narrow as the shock cone tightens, but that isn't implemented yet.
Tested it, encountered a few glitches (or maybe this is due to FAR):

- on my hypersonic jet, the sound was muffled from the rear, and full on from the front (over mach 1.7)

- in space sounds disappear alright during ascent, but once i switch view to another ship or if i use time warp, sounds come back.

Thanks for the bug report! I'll check it out.

I remember that old versions of FAR have some particle effects when rockets are passing Mach 1. Unfortunately ferram removed this effect after the stock game introduced the aerodynamic FX which hardly appears at Mach 1. I really hope that ferram can add that effect back, thus creating deep immersion when used with this sound plugin together.

Particle and shader effects aren't something I've worked with before, but I'll see what I can do.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...