A Python script for playing music for KSP that's a step above muting the game's music and playing your own, but a step below a proper mod. Controls VLC based on events that occur in-game using KRPC.
- As an external program, no impact on game memory usage
- Can play anything that VLC can play, such as Youtube URLs
- Can play dramatic music during docking or rendezvous a la Interstellar
- Play custom music while editing, above the atmosphere, at the space center, or at the tracking station, eg play the Normandy galaxy map theme at the tracking center
- Configurable via
music.yaml
- Can play music at main menu
- Comes with stock music
- Python 2.7 or later
- LibVLC for Python (
pip install python-vlc
) - currently only supports 32 bit python - KRPC (
pip install krpc
) - PyYAML (
pip install PyYAML
)
- Edit
music.yaml
- Individual files or directories with music inside are allowed
- To disable music for a label, just delete all the bullets underneath it
- Backslashes must be doubled for Windows style paths
- KSP's music should be muted
- Start music program and KSP, in any order
- Run the program with (
python music_hack.py
or./music_hack.py
)
- Run the program with (
- Start KRPC server (or set to autostart)
- Accept connection from KSP (or set KRPC server to auto-accept)
- Crashes of the music player only require a restart of the music player
- Can only distinguish the tracking center. The rest of the space center scenes all play music from the space center label.
- Doesn't come with stock tracking station music or main menu music (licensing issues)
- Youtube playback depends on whether LibVLC has up-to-date Youtube capabilities.
- Space music continues after switch to space center till next scene change.
Music tracks by Kevin MacLeod Licensed under Creative Commons: By Attribution 3.0 License
Original birdsong ambience by dobroide Licensed under Creative Commons: By Attribution 3.0 License
The rest of this is under GPL v3.