Log in

View Full Version : [TEC] How to add new music files or change the music cfg


kakemann
05-16-07, 03:55 AM
Here a little walkthrough on how to add music tracks, or changing them in the game.
I have also decribed the whole music.cfg file and the different states:

The first thing you have to do is to convert the files from mp3 or wav to ogg. There are a lot of different programs out there. There is also another thing you might have to change, and that is to adjust the volume for the songs you would like to add. The volume for the stock music files are pretty high. But try without changing it first, maybe you don't have to.

To convert or change the volume level I have used this free program:

Open the: http://www.softpedia.com/get/Multime...o-Editor.shtml (http://www.softpedia.com/get/Multimedia/Audio/Audio-Editors-Recorders/ALO-Audio-Editor.shtml))

It can both convert and adjust volume without upgrading it to the full version.


__________________________________________________ _
As I said I used this program so I'll tell you have to use this:
* Open the program ALO Audio Editor

* Click on "FILE", "OPEN" and browse for the mp3's or wav's you would like to add to the game.

* The file will open and you will get a graphical view of the volume level for that song.

* After you have opened it, just click "FILE", and "SAVE AS".

* Browse to your Silenthunter 4 installation, and find the: DATA/SOUND/MUSIC directory.

* Choose a easy filename, and make sure you change the "FILE TYPE" to *.ogg.

* Wait until the blue bar on the bottom of the program window has filled up. This indicates the convertion prosess.

* Repeat the steps above for all the files you would like to add to the game.

* Close the program

OK! The file is changed to the right format and placed in the right folder.
Now is the time to add the track to the game.

* Open the directory DATA/SOUND/MUSIC and open the file music.cfg

This is the file which tells Silenthunter 4 which tracks to play.
There are 8 STATES which the game reads and plays the music which is placed under the right state in this file. The following text will explain what the different states mean. The music files under each state will be played randomly. Here is an explaination for the different states:

* The state which the game is in when starting a new mission. The game will always start with one of the tracks located in this state.

* [NORMAL] This state is the normal state in the game. After the BEGIN state track has ended, the game will enter [NORMAL] state. It will continue in this state as long as you don't meet any enemy etc.

* [BATTLE] When spotting enemy units and reaching a certain distance from the enemy, the game will enter this state and play the music which is added here.

* [TENSION] This is the state the game will enter if you close the enemy undetected and the enemy suddenly detects you and starts searching for you.

* [HIGH TENSION] This state is not used by the Silent hunter 4 game, so you will never hear these tracks unless you move them to the any of the other states (They fit best under the [TENSION] part). See this thread to see how to fix this.)http://www.subsim.com/radioroom/showthread.php?t=113470

* [VICTORY] This state is not used by the silent hunter 4 game, so you will never hear these tracks unless you move them to any of the other states. (They fit best under the [NORMAL] part). See this thread to see how to fix this.)http://www.subsim.com/radioroom/showthread.php?t=113470

* [DEFEAT] This state is not used by the silent hunter 4 game, so you will never hear these tracks unless you move them to any of the other states. (They fit best under the [BEGIN] part). See this thread to see how to fix this.)http://www.subsim.com/radioroom/showthread.php?t=113470

*[B] [JOY] This state is not used by the silent hunter 4 game, so you will never hear these tracks unless you move them to any of the other states. (They fit best under the [NORMAL] part). See this thread to see how to fix this.)http://www.subsim.com/radioroom/showthread.php?t=113470

OK! Just place your song underneath the other tracks in the track list. FOREXAMPLE: If you made a file called dasboot1.ogg and wants it to be played in the [TENSION] state. Add it to the track list like this:

[TENSION]
Tracks=7
Track1=Tension_1.ogg
Track2=Tension_2.ogg
Track3=Tension_3.ogg
Track4=Tension_4.ogg
Track5=Tension_5.ogg
Track6=Tension_5.ogg
Track7=dasboot1.ogg

I've higlighted the two very important lines here. When adding a file to a list you have to change the first line, so the number of tracks in the list matches this number. So because I've added dasboot1.ogg I have to change the TRACKS=6 to TRACKS=7. Makes sense?

This is it! You have now managed to add one song to your Silent Hunter 4 game.

NOTE: If the volume of the song is too high or too low, you have to use the program ALO music editor (or similar) to change the volume level.

If using the ALO music editor you just have to open the file as described above, highlight the whole track area by clicking and dragging. When you have higlighted the whole track just click "OPERATION" and "AMPLIFY +" or "AMPLIFY -" depending on raising or lowering the volume. When you have reached a nice volume level click on "FILE" and "SAVE".

Remember to back up before altering the music.cfg file or changing the volume level on any file just in case!

Hope this helps someone.

I'm planning to release a music mod fixing the missing songs. I'll probably fix it in a day or so. Will post a link here later when it is finished! :yep:

CaptainCox
05-16-07, 04:15 AM
Great TUT!, you should add it to the sticky!:yep:

kakemann
05-16-07, 04:18 AM
Thanks Cox!

I'm not able to do that. Need a moderator to fix it, I guess!

CaptainCox
05-16-07, 05:25 AM
I think just post in that thread and some one would move it up to the list in the 1st post...

kakemann
05-16-07, 06:05 AM
Thanks for directing me Captain!
Made a post about it!

:up:

ATR-42
05-16-07, 08:28 AM
great work Jon,
I think im going to add the score from Crimson Tide! :)

Jmack
05-16-07, 08:43 AM
thanks allot ...

ATR-42
05-16-07, 10:03 AM
Jon,
using your sound editor, what did you find was the best way of getting the volumes even on the files?
did you just use your ear? or did you look at the scale on the right of the stock referance files and match the imports to that? (example 'peaking about 17000 units') in the ALO Audio Editor...

Kevin

kakemann
05-16-07, 11:01 AM
I plugged in my headphones and did both.

First I opened a couple of the original SH4 music files and checked the peak level.

After that I opened the file to be edited and made a approximate peak level match, forexample 20 0000. I tried to listen closely on my headphones to hear if it sounded like a similar volume level. Then I saved the file.

After I have changed volume for a couple of the new songs I went to the music directory and compared the ones I changed in the music editor program with the original files in SH4 music directory (DATA/SOUND/MUSIC).

If it sounded OK, I would start the game to check in the game itself.
If you have good ears you will be finished with the volume adjustment. If one of the songs for instance still is a bit high or low, you just have to exit the game, find the file and change it so it's perfect!

Sorry if there are some grammar errors. I'm trying to write as good english is I can. Being a member of this forum surely gives me some training! :yep:

You're following?

kakemann
05-16-07, 11:03 AM
great work Jon,
I think im going to add the score from Crimson Tide! :)

Hmm.. Crimson Tide, eh?

Good soundtrack? Never heard that one!

Maybe I'll try that as well! :up:

ATR-42
05-16-07, 03:50 PM
Jon, why do you think they included music that is NOT used by the program???


[HIGH TENSION]

[VICTORY]

[DEFEAT]

[JOY]

doesnt make any sense why they would have the files ready, and the CFG set up for it but yet they are not used???

kakemann
05-16-07, 04:32 PM
Some of these ones were actually used in SH3.

[VICTORY] Tracks were used when you had finished a patrol successfully. The screen were you get the patrol statistics used this music.

[DEFEAT] This one was used when your U-boat was sunk at sea at the statistics screen.

[JOY] These tracks were played if you sunk a enemy ship. Joyful short tunes, I must say.

[HIGH TENSION] These was not used in SH3, nor in SH4.

It is strange that they add tracks which are not used in the game. I think it was good that they removed the JOY music when sinking a enemy ship in SH4. That was kind of annoying I think.

Either they have rushed the game out forgetting to add the [JOY], [DEFEAT], and[VICTORY] music to the game. This makes sense when seeing all the other bugs.

The [HIGH TENSION] files are a harder question to answer... They weren't even in the SH3 game. Weird. Well our mod adds the best of these unused tracks, so we are able to enjoy them if we want.

Jace11
05-20-07, 01:26 PM
Something someone may like to try...

I have the limited edition with the CD soundtrack, the music quality is better than the the game. Rip it, convert it to OGG (highest vorbis bitrate etc) and put it back into game. Sounds MUCH nicer than the compressed Casio Keyboard music..

kakemann
05-23-07, 10:35 AM
Thanks! Nice suggestion. I have the soundtrack as well. Will try it out! Thanks a lot :up:

Roger Dodger
07-25-07, 06:42 PM
Jon, why do you think they included music that is NOT used by the program???


[HIGH TENSION]

[VICTORY]

[DEFEAT]

[JOY]

doesnt make any sense why they would have the files ready, and the CFG set up for it but yet they are not used???

Since the access folders are there, but the game just doesn't make use of them, can music in the folders be called when performing certain actions?

Example:
Click on 'FLANK' speed on the telegraph
Music = [HIGH TENSION]
Plays music from DAS BOOT when they are charging through the Gibralter Straits.

KOOL, eh? :D

Which part of the program calls for the music file?

LtCdr. Roger Dodger USCG(R)

kakemann
03-04-08, 02:50 AM
See i forgot the link to the music FIX:

http://www.subsim.com/radioroom/showthread.php?t=114728

Dignan
03-29-08, 03:24 PM
I've altered the music file to play all the songs I want. For some reason though, it will play a song or even just half of a song and then stop laying music for what seems like hours. Anyone know how to make music play continuously throughout the game whether it's during NORMAL or TENSION or BATTLE phases?

skwasjer
03-29-08, 06:49 PM
Add them to the data\music\gramophone folder and turn on your gramophone in game ;)

The original scope of this thread was how to add music to the different tension states, not so much general music you like to listen to... The problem with this is that the game can change the state at any time depending on your situation turning off one track and starting another one. There's even sometimes no music. By using the gramophone you override this.

TG626
02-11-14, 02:36 PM
Interestingly I just attempted to remove some music.

My idea was to have the music on the menu screen but no music when at sea, except when killed.

So first I took all sections besides [defeat] and [intro] and set Tracks=0

No joy, still got the music and when I loaded a save from within a loaded save, it crashed.

So, I made an ogg file that was 1 minute long and silent. Changed all the sections to Tracks=1 and Track1=silence.ogg

Again, it acted like I didn't change a thing when loading a save game.

At this point I noticed that the radio being on shuts off the music so I stopped trying. :D

ReallyDedPoet
03-11-14, 09:00 PM
By putting a semicolon before the section ( semicolon at the first of each line ) you prevent that music from playing. For example I did this for all of the the Intro Music. The music.cfg file is what I edited.

gayfrog69696969
05-18-20, 05:04 AM
If anyone is interested i put the silent hunter 4 music in the SH5 music files. all you need do is just copy the song files from the SH4 folder to the sh5 folder. and then copy and past the following into the music.cfg text file inside the Music folder. i did make some compromises since the sh5 music has the annoying navigation music so i just put those as the tension songs.


[GENERAL]
CertainityTime=1
MinDuration=20
FadeTime=2

[STATES]
States=11
State1=BEGIN
State2=NORMAL
State3=BATTLE
State4=TENSION
State5=HIGH TENSION
State6=VICTORY
State7=DEFEAT
State8=JOY
State9=NAVIGATION MAP
State10=IN BASE
State11=UNDER DEPTH CHARGES

[BEGIN]
Tracks=5
Track1=Intro_1.ogg
Track2=Intro_2.ogg
Track3=Intro_3.ogg
Track4=Intro_4.ogg
Track5=Intro_5.ogg

[NORMAL]
Tracks=6
Track1=Stalker_1.ogg
Track2=Stalker_2.ogg
Track3=Stalker_3.ogg
Track4=Stalker_4.ogg
Track5=Stalker_5.ogg
Track6=Stalker_6.ogg

[BATTLE]
Tracks=6
Track1=Battle_1.ogg
Track2=Battle_2.ogg
Track3=Battle_3.ogg
Track4=Battle_4.ogg
Track5=Battle_5.ogg
Track6=Battle_6.ogg

[TENSION]
Tracks=5
Track1=Tension_1.ogg
Track2=Tension_2.ogg
Track3=Tension_3.ogg
Track4=Tension_4.ogg
Track5=Tension_5.ogg

[HIGH TENSION]
Tracks=5
Track1=High_Tension_1.ogg
Track2=High_Tension_2.ogg
Track3=High_Tension_3.ogg
Track4=High_Tension_4.ogg
Track5=High_Tension_5.ogg

[VICTORY]
Tracks=3
Track1=Victory_1.ogg
Track2=Victory_2.ogg
Track3=Victory_3.ogg

[DEFEAT]
Tracks=3
Track1=Defeat_1.ogg
Track2=Defeat_2.ogg
Track3=Defeat_3.ogg

[JOY]
Tracks=5
Track1=Joy_1.ogg
Track2=Joy_2.ogg
Track3=Joy_3.ogg
Track4=Joy_4.ogg
Track5=Joy_5.ogg

[NAVIGATION MAP]
Tracks=6
Track1=Tension_1.ogg
Track2=Tension_2.ogg
Track3=Tension_3.ogg
Track4=Tension_4.ogg
Track5=Tension_5.ogg
Track6=High_Tension_5.ogg

[IN BASE]
Tracks=2
Track1=Appell.ogg
Track2=Muss I Denn.ogg

[UNDER DEPTH CHARGES]
Tracks=4
Track1=High_Tension_1.ogg
Track2=High_Tension_2.ogg
Track3=High_Tension_3.ogg
Track4=High_Tension_4.ogg

Aktungbby
05-18-20, 09:54 AM
gayfrog69696969!:Kaleun_Salute: