Jump to content

Kerbal Sound Overhaul Project


pizzaoverhead

Recommended Posts

Kerbal Sound Overhaul Project

Aside from rocket engines and explosions, Kerbal Space Program is currently a very quiet game. This project is an attempt to fix that. The emphasis is on realism, but is not restricted to that. Anyone is free to contribute to this project: The aim is to improve the soundscape of KSP as much as possible. Squad do intend on adding more sounds in the future, but that is no reason to stay in silence until then.

Goals

  • Identify areas where sound effects and music can be added or improved
  • A resource for sound producers and plugin developers (sound sources, code examples, tutorials etc.)
  • Identifying (and where possible fixing) bugs in stock KSP
  • Discussion, suggestions, ideas and brainstorming for sound mods for KSP in general

Downloads

Each completed piece of the project is released for download when stable. You can get them here:

Existing mods

This is a list of all current mods which add or modify sound effects. If your mod or a mod you know is not on this list, please PM me.

Tools

If you're a sound creator looking for a way to add custom sounds to engines, landing gear or for IVA ambiance, check out the KSP Custom Sounds plugin. It can simplify the process by allowing custom file names and paths. For wheels, the Rover wheel sounds mod allows adding sounds to any wheels using the stock ModuleWheels released in 0.19. It doesn't work with older wheels using cart.dll however.

Sound Sources

There are many copyright-free or attribution-only licenced sounds available online. Beware of sourcing sounds from youtube videos, as the Standard Youtube License forbids this.

  • NASA Jet Propulsion Laboratory videos are mostly licenced as free for any use.
  • freesound.org has many samples of everyday sounds which are copyright-free. Registration is required however.
  • soundbible.com has many sounds licenced as public domain or attribution.
  • Most of the music in KSP was created by Kevin MacLeod. He offers several thousand of his tracks for free (with attribution) on incompetech.com. Music from here often sits well alongside the existing music due to it being from the same composer.

Potential Sounds

This is a (not-yet comprehensive) list of every potential action we could add sounds to. Not all of them make sense in all contexts, but should be food for thought. Feel free to add anything else you can think of.

Key:

Completed / Mod currently available

Prototype, work in progress

Work started

In discussion / Planning

Parts

All parts:

Pods:

  • Airlock enter
  • Airlock exit
  • Crew report

Probes:

  • Computer running sound
  • Communication sound [Chatterer]
  • Select (right-click) sound

Engines:

Fuel tanks:

  • Resource transfer
  • Drained
  • Fuel slosh

Reaction wheels:

  • Wheel motor active

Decoupler:

  • More pronounced explosive bolt sound (particularly internally) [
    ][
    ]

Landing gear/legs:

Parachutes:

  • Deploy
  • Fully deploy
  • Inflate
  • Descending
  • Deflate
  • Cut
  • Repack

Ladders:

  • Extend
  • Retract

Solar panels:

  • Extend
  • Retract
  • Sun tracking motor
  • Break

Battery:

  • Low battery warning
  • Transfer charge

Lights:

  • Enable
  • Disable
  • Low power flicker

Docking ports:

Wheels:

  • Powered acceleration [Rover wheel sounds]
  • Powered rolling [Rover wheel sounds]
  • Idle rolling (surface dependent?)
  • Steering motors
  • Braking
  • Idle deceleration
  • Skidding
  • Damage
  • Dragging damaged wheel
  • Repair

Antennae/Dishes

  • Extend
  • Retract
  • Transmit
  • Low power

Sensors/experiments

  • Enable
  • Disable
  • Running

Kerbals (EVA)

  • Voices
  • Footstep
  • Run
  • Jump
  • Fall [Collision FX]
  • Grab
  • Climb
  • Repair
  • Collect sample
  • Breathe [Chatterer]
  • Jetpack activate
  • Jetpack deactivate
  • Jetpack fire

Environments

Space Center

Surface

  • Ambiance: Wind, storms, thunder, coast breaking waves, ocean roar, birds, owls, crickets, rain
  • Movement sounds: Gravel, concrete, grass, sand, dust, rock, rubble, snow, ice cracking, rock
  • Liquids: Idle floating, drifting, swimming and cruising [Water Sounds]

Vacuum

Supersonic

Internal spaces

  • CO2 fans
  • Computers running
  • Instruments [B9 Aerospace]
  • Button press [B9 Aerospace]
  • Throttle lever move
  • Creaking, rattling and groaning during engine firing

Interface

Alarms

Music

  • Custom background music and ambient effects [Muziker]
  • Music player
  • Planet-specific music
  • Biome-specific music
  • Silence the music on pausing
  • Allow adding to or replacing the current playlist with external files [Soundtrack Editor]

Edited by pizzaoverhead
Listed tg626's Docking Sounds mod.
Link to comment
Share on other sites

Code Example

A simple example plugin for playing a sound. This code is free for anyone to use.

C# plugin:


using System;
using System.Collections.Generic;
using UnityEngine;

public class MySoundMod : PartModule
{
[KSPField]
public string mySoundFile = "MySoundMod/Sounds/MyWavFile";
public FXGroup SoundGroup = null;

public override void OnStart(StartState state)
{
if (state == StartState.Editor || state == StartState.None) return;

if (!GameDatabase.Instance.ExistsAudioClip(mySoundFile))
{
Debug.LogError("MySoundMod: Audio file not found: " + mySoundFile);
return;
}

SoundGroup.audio = gameObject.AddComponent<AudioSource>();
SoundGroup.audio.clip = GameDatabase.Instance.GetAudioClip(mySoundFile);
SoundGroup.audio.Stop();
SoundGroup.audio.loop = true;

// Add events to stop the sound when paused.
// Make sure to remove these if the part is destroyed to prevent a memory leak.
GameEvents.onGamePause.Add(new EventVoid.OnEvent(this.OnPause));
GameEvents.onGameUnpause.Add(new EventVoid.OnEvent(this.OnUnPause));

base.OnStart(state);
}

void OnPause()
{
SoundGroup.audio.Stop();
}

void OnUnPause()
{
SoundGroup.audio.Play();
}

void OnDestroy()
{
// Remove the events when the part is destroyed to prevent a memory leak.
GameEvents.onGamePause.Remove(new EventVoid.OnEvent(OnPause));
GameEvents.onGameUnpause.Remove(new EventVoid.OnEvent(OnUnPause));
}

public override void OnUpdate()
{
base.OnUpdate();

if (!SoundGroup.audio.isPlaying)
SoundGroup.audio.Play();
}
}

Add this sound to a part by editing the part's part.cfg by adding this before it's final '}' character:


MODULE
{
name = MySoundMod
mySoundFile = MySoundMod/Sounds/MyWavFile
}

Edited by pizzaoverhead
Link to comment
Share on other sites

Changing a Part's Sound

This doesn't require a plugin. It allows you to add custom sounds to stock and modded engines.

In the part.cfg, set the engage, running, disengage and flameout sounds to the name of your new sound files. Sound files must start with "sound_", without the path, extension (.wav, .ogg etc.) or quotation marks.


sound_mysound1 = engage
sound_mysound2 = running
sound_mysound3 = disengage
sound_mysound4 = flameout

Make a new folder next to the part.cfg called "part". Add another folder inside part called "Sounds". Put your sound files inside the Sounds folder. Sounds placed elsewhere won't be found. When done, the path to your sound file should look something like this:


KerbalSpaceProgram\GameData\MyMod\MyPart\part\Sounds\sound_mysound1.wav

If the CFG file has a name other than "part", the folder containing the "Sounds" folder should be called that instead (thanks Supernovy).

Example: testFile.cfg


KerbalSpaceProgram\GameData\MyMod\MyPart\testFile\Sounds\sound_mysound1.wav

Thanks to Faark for the clear explanation of this.

0.23

0.23 makes adding sounds and particle effects to parts much easier.

See this video for details.

Edited by pizzaoverhead
Added extra information.
Link to comment
Share on other sites

Saw this and was inspired to try and contribute. Of course, I have to learn C# as I go for this, as I like doing things the hard way. :)

Was trying to see if it was possible to do the "Changing a Part's Sound" idea without having to drop a bunch of audio files all over your GameData folder. So, create a module that allows you to choose different engine sounds in the .cfg file. Sounds simple in theory, but I have a feeling it's not as simple as I'd like. Since you've offered the code above, I'm using that to start with. Hopefully, I'll figure something out that works!

Link to comment
Share on other sites

I only noticed today that one stock part has a "sounds" subdirectory and went searching for more info and found this thread.


GameData/Squad/Parts/Utility/LandingLeg/sounds

The part.cfg file does not contain anything referencing the audio file and I haven't tested the landing legs to listen for sounds. Are sounds somehow linked to part animations in stock already?

Link to comment
Share on other sites

I only noticed today that one stock part has a "sounds" subdirectory and went searching for more info and found this thread.


GameData/Squad/Parts/Utility/LandingLeg/sounds

The part.cfg file does not contain anything referencing the audio file and I haven't tested the landing legs to listen for sounds. Are sounds somehow linked to part animations in stock already?

If I'm reading the above posts and referenced threads correctly, KSP's sounds are now all hardcoded in the game. None of those audio files in the GameData/Squad/ folder do anything but take up space. The game still looks at certain spots for additional sounds though, which is why this mod works. If you figure out if you can get sounds linked to animations via .cfg edits and/or files in the right spot, let everyone know. :)

Link to comment
Share on other sites

I changed the sound fx wiki entry, so there should be no confusions about how sounds currently work.

http://wiki.kerbalspaceprogram.com/wiki/CFG_File_Documentation#Sound_FX_definition

And yes, the internal sound library is "hardcoded", the Sound folder in the Squad folder is just there I think to give an example, or is there cause they forgot to erase it. But it doesn't do anything, you can freely remove it and the sounds will work.

Link to comment
Share on other sites

Here's a quick demo video of the sonic boom effect. When going supersonic, if the camera is outside the shockwave, you hear very little sound. As the shockwave is always retrograde, you can move out of it during sharp manoeuvres. It's still being adjusted, but I think it sounds pretty cool:

Link to comment
Share on other sites

Here's a quick demo video of the sonic boom effect. When going supersonic, if the camera is outside the shockwave, you hear very little sound. As the shockwave is always retrograde, you can move out of it during sharp manoeuvres. It's still being adjusted, but I think it sounds pretty cool:

That's pretty cool, but would you really hear those sounds from such a perspective?

Link to comment
Share on other sites

That's pretty cool, but would you really hear those sounds from such a perspective?

From what I can tell, yes.

Dopplereffectsourcemovingrightatmach1.4.gif

Ahead of the shock, no sound is heard as it hasn't reached that area yet. Inside the shock cone, the sound is normal but Doppler shifted. At the boundary, you get many shockwaves arriving at the same time, so the sound has a large amplitude, fading as you go further into the cone.

Link to comment
Share on other sites

I've got a plugin working that can replace the stock engine sounds in-game with an arbitrary filepath. It's simply a new part module that you can define custom sound clips with. You can replace stock/mod sounds via this plugin and a cfg edit/ModuleManager edit, or you can use this on any new mod in place of the stock engine sounds. I'm still testing it a bit, and I'd want to expand on this.

Firespitter can do most of this, but it's sound module is aimed at prop aircraft. Not to mention I had a long look at Snjo's code to see how I could manipulate the sounds. So, lots of inspiration goes that way. This is more aimed at rocket engines, at the moment, though it could be adapted for jets and props.

Unfortunately I have no video of this. Don't have a video capture program at the moment. I'll put together a test release with some instructions and put it up soon.

Link to comment
Share on other sites

I've got a plugin working that can replace the stock engine sounds in-game with an arbitrary filepath. It's simply a new part module that you can define custom sound clips with. You can replace stock/mod sounds via this plugin and a cfg edit/ModuleManager edit, or you can use this on any new mod in place of the stock engine sounds. I'm still testing it a bit, and I'd want to expand on this.

Firespitter can do most of this, but it's sound module is aimed at prop aircraft. Not to mention I had a long look at Snjo's code to see how I could manipulate the sounds. So, lots of inspiration goes that way. This is more aimed at rocket engines, at the moment, though it could be adapted for jets and props.

Unfortunately I have no video of this. Don't have a video capture program at the moment. I'll put together a test release with some instructions and put it up soon.

This plugin sounds like something bullettMAGNETT can use. He has great sounds made from scratch, but he said he doesn't have the coding experience to make a plugin.

Link to comment
Share on other sites

This is something that's been greatly overlooked too by the developers. . . I really hope that they get to put more sound into the game. It really does bring an all-new level of "WOW" into it. I mean I've been using rovers all my time in KSP even before the science integration. . . and I swear to jeb I had the same smile he has when I heard those wheels turning on that vid. :D BUMP FOR THIS!

Link to comment
Share on other sites

hey Pizzaoverhead, i'm working on a sound mod check out my thread, its basically a complete replacement for all the engines and some mechanical sounds that can be replaced, i was planning on adding sounds to parts that don't have it too but haven got any support on that matter.

http://forum.kerbalspaceprogram.com/threads/53800-Little-help-%29-Sound-MOD

here is a preliminary test , enjoy ;D and support if u like :D

Link to comment
Share on other sites

hey Pizzaoverhead, i'm working on a sound mod check out my thread, its basically a complete replacement for all the engines and some mechanical sounds that can be replaced, i was planning on adding sounds to parts that don't have it too but haven got any support on that matter.

http://forum.kerbalspaceprogram.com/threads/53800-Little-help-%29-Sound-MOD

here is a preliminary test , enjoy ;D and support if u like :D

Sounds good! I don't think the part.cfg supports adding sounds to part activations, but you can do it in a plugin. Check out the code on page 1 of this thread. It's great to hear other people working on the sound effects. I hope that between all of us we can cover most of the things on the list!

Link to comment
Share on other sites

Got a release put together for my engine sounds module. New thread here.

If anyone tries it, let me know how it works for you. I don't have any audio for it yet, so you'll need to find your own cool audio. And if bullettMAGNETT wants to "lend" some of those sounds, I'd be ok with that! :wink:

Thanks Raptor! I've added the link to the main post. Hopefully this will help get people started!

Link to comment
Share on other sites

Regarding the sonic boom video: There's no "whoosh" before getting supersonic, you just hear nothing than a boom (heavily compressed air by the soundwaves all arriving at once into your ears) :

Plus, the cone gets narrower and narrower as you get faster and faster. And in this cone, no sonic boom - ever.

An improvement suggestion would be to add proper Doppler effect and simulated speed of sound: the further away you are, the more time the sound will take to get to you. Plus, for the perfectness, a low frequency bypass that will cut high freqs the further you get from the audio source because of sound waves "loss", mainly the most "little" ones -> the high frequencies.

Link to comment
Share on other sites

Regarding the sonic boom video: There's no "whoosh" before getting supersonic, you just hear nothing than a boom (heavily compressed air by the soundwaves all arriving at once into your ears)

Plus, the cone gets narrower and narrower as you get faster and faster. And in this cone, no sonic boom - ever.

Both of these effects are modelled. The reason you're hearing a woosh is because in the video, the camera started out inside the cone as the plane went supersonic. The cone then narrowed as the plane sped up, moving the camera towards the edge and finally out of the cone. The camera moves in and out of the cone as the plane the camera is attached to manoeuvres and is no longer pointed prograde.

An improvement suggestion would be to add proper Doppler effect and simulated speed of sound: the further away you are, the more time the sound will take to get to you. Plus, for the perfectness, a low frequency bypass that will cut high freqs the further you get from the audio source because of sound waves "loss", mainly the most "little" ones -> the high frequencies.

The doppler effect is already simulated in Unity, albeit incorrectly. From what I can tell, the attenuation of high frequencies due to atmospheric interference happens at ranges well beyond what the camera is normally positioned at, so the processor overhead wouldn't be worth it.

Edited by pizzaoverhead
Link to comment
Share on other sites

Another question from the beginner :sigh:. Is there a way to attach a sound/FXGroup/whatever to a part without subclassing PartModule? I'm working on getting landing gear to make a sound when toggled, but I can't get past setting up the audio. I'm grabbing the active vessel, checking to see if it has landing gear, grabbing all gear, then trying to add an FXGroup to each gear. Sounds easy typing it out, but I've been beating my head against this all afternoon and my Code-Fu is failing at this point. It's probably simple and I'm just not familiar enough with KSP and/or C# to know any better.

If you've got any ideas, or a better way to do this, let me know. :)

Link to comment
Share on other sites

Another question from the beginner :sigh:. Is there a way to attach a sound/FXGroup/whatever to a part without subclassing PartModule? I'm working on getting landing gear to make a sound when toggled, but I can't get past setting up the audio. I'm grabbing the active vessel, checking to see if it has landing gear, grabbing all gear, then trying to add an FXGroup to each gear. Sounds easy typing it out, but I've been beating my head against this all afternoon and my Code-Fu is failing at this point. It's probably simple and I'm just not familiar enough with KSP and/or C# to know any better.

If you've got any ideas, or a better way to do this, let me know. :)

Is it adding the sound to the part that's the problem? Have you tried something like this?

MyFXGroup.audio = part.gameObject.AddComponent<AudioSource>();

Link to comment
Share on other sites

Hey Raptor, i tested your mod with my sounds, its working so far, it will certainly make my life easier the file size smaller and is just what i was looking for! if you read my thread you'll noticed that i posted several times for a plugin like yours! many thanks! ill be looking forward for updates!

Hey pizzaoverhead, ill keep working on the sounds i guess you guys are doing and amazing work with the plugin! ive already had some antenna sounds made for my mod, but i failed in my attempt to build a .dll :P

one thing i been wondering is there a way to limit the max sound pitch that ksp uses on engines? Because its a pain with some rocket sounds, ive end up rendering some test sounds with lover pitch to compensate lol

Edited by bullettMAGNETT
Link to comment
Share on other sites

Is it adding the sound to the part that's the problem? Have you tried something like this?

MyFXGroup.audio = part.gameObject.AddComponent<AudioSource>();

Turns out I hadn't instantiated my FXGroup correctly. Chalk that one up to the C# learning curve. So, it works now but I've found no good way to trigger the sound from outside the part. Will probably switch to a module-style plugin, as it offers better flexibility anyway.

Hey Raptor, i tested your mod with my sounds, its working so far, i will certainly make my life easier the file size smaller and is just what i was looking for! if you read my thread you'll noticed that i posted several times for a plugin like yours! many thanks! ill be looking forward for updates!

Hey pizzaoverhead, ill keep working on the sounds i guess you guys are doing and amazing work with the plugin! ive already had some antenna sounds made for my mod, but i failed in my attempt to build a .dll :P

one thing i been wondering is there a way to limit the max sound pitch that ksp uses on engines? Because its a pain with some rocket sounds, ive end up rendering some test sounds with lover pitch to compensate lol

bulletMAGNETT, yes you can control the pitch of the audio in KSP. I'm doing that already in the plugin behind the scenes. If my understanding of the pitch setting is correct, at max thrust the pitch should be the same as the source audio. Can't say for sure, but that's what it's supposed to be doing. :)

I might be able to code up something for antennas, as I was just thinking about that last night. I've got ideas for the gear (obviously) and IVA background sounds (fans, switches, beeps, etc.), so antennas might be another step to take. :)

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...