Loading...
  OR  Zero-K Name:    Password:   

How do I add more music?

10 posts, 293 views
Post comment
Filter:    Player:  
sort


USrankOflameo
2 months ago
I want to add more music to my local copy of the game. I want to add more chiptunes because it keeps me breathing in a good rhythm. I believe I asked this question Discord and tried the solution but somehow I screwed up the simple instruction. Maybe I will understand the instruction this time. If something weird happens I can respond to this thread.
+0 / -0


RUrankAdminikinz
2 months ago
Is there a reason not to run your favorite music player alongside zk?
+0 / -0


USrankAdminSprung
2 months ago
(edited 2 months ago)

Keep in mind music currently has to be in .ogg format. Go to your Spring folder (if you don't know where it is, you can access it through lobby, the path is something like help -> reports -> open data folder or somesuch).

Basic way:

  • Go to `sounds` folder (create if does not yet exist; applies below too).
  • Inside that folder there can be up to 5 folders for various ingame situations: "war", "peace", "victory", "defeat", "briefing". Add the music files to the categories you want the music to play in (if you want a song to play anytime you would need to create a copy in each).
  • You might want to deselect `Settings/Audio/Use included tracks` ingame setting if you dont want the builtin music.

Advanced way (if you want a song to play in multiple situations but dont want extra copies in each folder):

  • place the music anywhere in the Spring folder.
  • create `sounds/music/playlist.lua` which has the following format:
return {
    peace = {
      "path/to/your/file/relative/to/spring.ogg",
      "some/other/file.ogg"
    },
    war = {
      -- etc
    },
    -- etc
}

  • this overrides everything else so you'd need to place builtin tracks in that config manually if you want them. See here for their names (there are currently no "briefing" tracks; there is a "loading" category which is never used at the moment).

+4 / -0

PLranksomot
2 months ago
Can the music also be in the lossless FLAC format? It's open-source, too, and you don't lose any quality, unlike the lossy OGG. The only downside is that the file sizes are larger.
+0 / -0




AUrankAdminGoogleFrog
2 months ago
Nope.
+0 / -0


EErankAdminAnarchid
2 months ago
(edited 2 months ago)

Being pedantic, ogg is a container format that can use different encoders for the audio layer, which include vorbis, flac, and pcm among others.

Spring, however, only supports Ogg Vorbis.
+0 / -0



CArankTheMooseIsLoose
2 months ago
(edited 2 months ago)

There is actually a prepackaged alternate soundtrack already done by Forboding Angel here: https://springfiles.com/spring/games/ota-music

It's in the format Sprung describes, Just put the war and peace folders in ZeroK/sounds/music/

Edit: There is also https://springfiles.com/spring/lua-scripts/techno-music-player but I haven't tried it
+0 / -0



CArankTheMooseIsLoose
52 days ago
(edited 52 days ago)

Bump. Is it possible to use this method to replace the main menu music in chobby?

Also, loading music. I remember it existed briefly, now it doesn't seem to be anywhere in music widget. Is the code for that just turned off or completely ripped out now?

I'm currently using the knowledge from this thread to compile a replacement soundtrack for ZK. I have all my legal ducks in a row now with participating artists and it's nearly complete, just waiting for some technical fixes coming out next zk stable.


+0 / -0




AUrankAdminGoogleFrog
52 days ago
I could add the same functionality for main menu music.
+0 / -0



CArankTheMooseIsLoose
50 days ago
It would be a nice bonus but I don't consider it important. I'd bet most people turn off the main menu music anyways.
+1 / -0