Custom Levelmusic
Custom Levelmusic
Just a quick summing up how to add custom levelmusic,
played through the worldproperies like the other gamemusic.
Using serveral segment like in the game is optional,
the purpose of those is to change music when facing AI's and stuff like that.
you can also use a whole song as a 1 segment.
I'm doing all of this with free/shareware software and that complicates things a bit
1. Splitting the wave into several files
This can be done by a mp3/wave splitter
For instance Cool mp3 splitter which is a shareware.
Load the mp3 file you want to split into smaller pieces
and choose method 2, (by time about 10 seconds) or 3 (by size about 300kb)
Set a output directory/name and process it. Just make sure that it keeps
the '%track%' in the name and no spaces or capital letters.
I'll refer to this folder as 'TEMP' from now on
You should now have a folder that looks similar to this one..
2. Make them the right fileformat.
the codec used in the game is a MPEG Layer-3 audio codec
licensed from Fraunhofer IIS and Thomson multimedia.
The only problem is that I didn't figure out which codec to use
Windows XP has a builtin codec for this but it can only make them
Mpeg Layer3 56 kBit/s, 44,100 Hz, and that's terrible
The fileformat is Wave with extention .wav but with a mp3 codec, meaning it
will have a mp3's size. Renaming a mp3 doesn't work either even if you can play
it in Windows Mediaplayer afterwards.
My solution to this problem was the LameACM codec
There is also a tutorial on this site about how to install the codec.
Complete step 1 to 3..
I'll use 'Windows soundrecorder (sndrec32.exe)' to give the files the right codec,
unfortunatly.. winamp mistakes the LameACM codec for beeing a normal
mp3 codec and won't save it as .wav.
But in order to do so we have to convert the mp3 into normal PCM wave files.
(since sndrec32.exe isn't that fond of mp3 files)
You can easily do this part with winamp.. Tutorial here
But choose a high resolution PCM format instead of the IMA ADPCM
You should now have a brand new set of PCM wave files that sndrec32.exe can use
and of course there is a new setback, you can only convert one file at the time:(
Click 'start-->programs-->accessories-->entertainment-->sound recorder' in
order to start sndrec32.exe
'open' a wav file from the folder,
and choose 'save as' and 'Change' then select the right format.
And repeat this nice job until all waves are converted
3. Create the SGT files
There's a .sgt file for each .wav file and they are created with
Microsoft's Direct Music Producer which is a free downloadable
direct X tool thingy
Get it here
Now click 'open' and create a new project
And give it a name, I'll name mine 'Nolf2'
Import all the files from the wavfiles from the 'TEMP' folder, you can select
all the files at the same time (finally)
after this is done.. click 'file' and select 'Runtime save all files:Project Nolf2'
You'll figure out that the files ends up in a folder in
'my documents' called 'DMUSProducer'.
There should be a folder called 'Nolf2' there and a folder called 'RuntimeFiles'
inside it.. that's where the finished segment are stored.
Select all the SGT files and copy them into the 'TEMP' folder
(don't copy the wav files from the 'runtimefiles' folder, they are ruined)
4. Import the music into the game
Open the Nolf2/CJ projectfolder (GAME), then go to the folder called 'Music'
create a new folder there and give it a name.. I'll name mine 'SPAWN'
Now copy all the .sgt & .wav files from the 'TEMP' folder into the 'SPAWN' folder
you should also copy a file called SILENCE.SGT from one of the other
gamemusic folders and paste it into the 'SPAWN' folder.
5. Make a music Controlfile
You can go really advanced here with transitions,
how the song changes from one mood to another mood
(when meeting a enemy for instance)
I'll just stick to the 'runtime' mood, the one that is normally playing
Open 'ISLAND.TXT' from the 'ISLAND' folder and use that one as a template
Note the text that is marked with purple, blue & orange..
NUMINTENSITIES 15 (since there are 15 of them.. 14 wavs & 1 silence)
INITIALINTENSITY 2 (the level runtime music will start on this one)
VOLUMEOFFSET -1250 (tune this until you're happy with the musicvolume)
Now you need to insert the segments into the file as 'INTENSITIES'.
This works kindof like a playlist of what to play, it will just work its way
down the list..
Scroll down until you find something that is similar to the text below.
Silence.sgt will run when the gamemusic is turned off (as I understand it)
The value in the red cell tells the engine how many times it should be played
before moving on to the next Intensity '-1' means repeat.
The value in the green cell tells the engine what to play next.
After editing this file. save it in the 'SPAWN' folder and give it a nice name
for instance.. 'level1music.txt'
6. To get this bugger to play in the game
Now you need to go into the 'ATTRIBUTES' and edit 'MUSIC.TXT'
Just copy from one of the other levels and paste it at the bottom
then edit the name and intensities..
The red values are 'intensities' from the music controlfile..
None0 = 1 (the silence.sgt)
Routine0 = 2 (this is the normal walk around and explore music)
Investigate0 = 55 (when a AI hear that you're nearby it will change to this one)
Aggressive0 = 66 (This one will be played when the AI attacks you)
The values 55 % 66 doesn't exist.. and the music won't change if any AIs appear
but you can add segments for that as well..
Example:
None0 = 1
Routine0 = 2
Investigate0 = 31
Aggressive0 = 51
To mount the music to a level, simply select the 'level1music.txt'
in the worldproperties..
Hope I spared Jiao and at least 1 other a lot of thinking,
the docs doesn't even mention this stuff
played through the worldproperies like the other gamemusic.
Using serveral segment like in the game is optional,
the purpose of those is to change music when facing AI's and stuff like that.
you can also use a whole song as a 1 segment.
I'm doing all of this with free/shareware software and that complicates things a bit
1. Splitting the wave into several files
This can be done by a mp3/wave splitter
For instance Cool mp3 splitter which is a shareware.
Load the mp3 file you want to split into smaller pieces
and choose method 2, (by time about 10 seconds) or 3 (by size about 300kb)
Set a output directory/name and process it. Just make sure that it keeps
the '%track%' in the name and no spaces or capital letters.
I'll refer to this folder as 'TEMP' from now on
You should now have a folder that looks similar to this one..
2. Make them the right fileformat.
the codec used in the game is a MPEG Layer-3 audio codec
licensed from Fraunhofer IIS and Thomson multimedia.
The only problem is that I didn't figure out which codec to use
Windows XP has a builtin codec for this but it can only make them
Mpeg Layer3 56 kBit/s, 44,100 Hz, and that's terrible
The fileformat is Wave with extention .wav but with a mp3 codec, meaning it
will have a mp3's size. Renaming a mp3 doesn't work either even if you can play
it in Windows Mediaplayer afterwards.
My solution to this problem was the LameACM codec
There is also a tutorial on this site about how to install the codec.
Complete step 1 to 3..
I'll use 'Windows soundrecorder (sndrec32.exe)' to give the files the right codec,
unfortunatly.. winamp mistakes the LameACM codec for beeing a normal
mp3 codec and won't save it as .wav.
But in order to do so we have to convert the mp3 into normal PCM wave files.
(since sndrec32.exe isn't that fond of mp3 files)
You can easily do this part with winamp.. Tutorial here
But choose a high resolution PCM format instead of the IMA ADPCM
You should now have a brand new set of PCM wave files that sndrec32.exe can use
and of course there is a new setback, you can only convert one file at the time:(
Click 'start-->programs-->accessories-->entertainment-->sound recorder' in
order to start sndrec32.exe
'open' a wav file from the folder,
and choose 'save as' and 'Change' then select the right format.
And repeat this nice job until all waves are converted
3. Create the SGT files
There's a .sgt file for each .wav file and they are created with
Microsoft's Direct Music Producer which is a free downloadable
direct X tool thingy
Get it here
Now click 'open' and create a new project
And give it a name, I'll name mine 'Nolf2'
Import all the files from the wavfiles from the 'TEMP' folder, you can select
all the files at the same time (finally)
after this is done.. click 'file' and select 'Runtime save all files:Project Nolf2'
You'll figure out that the files ends up in a folder in
'my documents' called 'DMUSProducer'.
There should be a folder called 'Nolf2' there and a folder called 'RuntimeFiles'
inside it.. that's where the finished segment are stored.
Select all the SGT files and copy them into the 'TEMP' folder
(don't copy the wav files from the 'runtimefiles' folder, they are ruined)
4. Import the music into the game
Open the Nolf2/CJ projectfolder (GAME), then go to the folder called 'Music'
create a new folder there and give it a name.. I'll name mine 'SPAWN'
Now copy all the .sgt & .wav files from the 'TEMP' folder into the 'SPAWN' folder
you should also copy a file called SILENCE.SGT from one of the other
gamemusic folders and paste it into the 'SPAWN' folder.
5. Make a music Controlfile
You can go really advanced here with transitions,
how the song changes from one mood to another mood
(when meeting a enemy for instance)
I'll just stick to the 'runtime' mood, the one that is normally playing
Open 'ISLAND.TXT' from the 'ISLAND' folder and use that one as a template
Note the text that is marked with purple, blue & orange..
NUMINTENSITIES 15 (since there are 15 of them.. 14 wavs & 1 silence)
INITIALINTENSITY 2 (the level runtime music will start on this one)
VOLUMEOFFSET -1250 (tune this until you're happy with the musicvolume)
Now you need to insert the segments into the file as 'INTENSITIES'.
This works kindof like a playlist of what to play, it will just work its way
down the list..
Scroll down until you find something that is similar to the text below.
Silence.sgt will run when the gamemusic is turned off (as I understand it)
The value in the red cell tells the engine how many times it should be played
before moving on to the next Intensity '-1' means repeat.
The value in the green cell tells the engine what to play next.
After editing this file. save it in the 'SPAWN' folder and give it a nice name
for instance.. 'level1music.txt'
6. To get this bugger to play in the game
Now you need to go into the 'ATTRIBUTES' and edit 'MUSIC.TXT'
Just copy from one of the other levels and paste it at the bottom
then edit the name and intensities..
The red values are 'intensities' from the music controlfile..
None0 = 1 (the silence.sgt)
Routine0 = 2 (this is the normal walk around and explore music)
Investigate0 = 55 (when a AI hear that you're nearby it will change to this one)
Aggressive0 = 66 (This one will be played when the AI attacks you)
The values 55 % 66 doesn't exist.. and the music won't change if any AIs appear
but you can add segments for that as well..
Example:
None0 = 1
Routine0 = 2
Investigate0 = 31
Aggressive0 = 51
To mount the music to a level, simply select the 'level1music.txt'
in the worldproperties..
Hope I spared Jiao and at least 1 other a lot of thinking,
the docs doesn't even mention this stuff
K, couldn't put more images in that post
Yes Jiao.. It might be of some use then! lol
6. To get this bugger to play in the game
Now you need to go into the 'ATTRIBUTES' and edit 'MUSIC.TXT'
Just copy from one of the other levels and paste it at the bottom
then edit the name and intensities..
The red values are 'intensities' from the music controlfile..
None0 = 1 (the silence.sgt)
Routine0 = 2 (this is the normal walk around and explore music)
Investigate0 = 55 (when a AI hear that you're nearby it will change to this one)
Aggressive0 = 66 (This one will be played when the AI attacks you)
The values 55 % 66 doesn't exist.. and the music won't change if any AIs appear
but you can add segments for that as well..
Example:
None0 = 1
Routine0 = 2
Investigate0 = 31
Aggressive0 = 51
To mount the music to a level, simply select the 'level1music.txt'
in the worldproperties..
and 'msg music i <intensity>' from triggers or similar to change music for special events
Hope I spared Jiao and at least 1 other a lot of thinking,
the docs doesn't even mention this stuff
Yes Jiao.. It might be of some use then! lol
6. To get this bugger to play in the game
Now you need to go into the 'ATTRIBUTES' and edit 'MUSIC.TXT'
Just copy from one of the other levels and paste it at the bottom
then edit the name and intensities..
The red values are 'intensities' from the music controlfile..
None0 = 1 (the silence.sgt)
Routine0 = 2 (this is the normal walk around and explore music)
Investigate0 = 55 (when a AI hear that you're nearby it will change to this one)
Aggressive0 = 66 (This one will be played when the AI attacks you)
The values 55 % 66 doesn't exist.. and the music won't change if any AIs appear
but you can add segments for that as well..
Example:
None0 = 1
Routine0 = 2
Investigate0 = 31
Aggressive0 = 51
To mount the music to a level, simply select the 'level1music.txt'
in the worldproperties..
and 'msg music i <intensity>' from triggers or similar to change music for special events
Hope I spared Jiao and at least 1 other a lot of thinking,
the docs doesn't even mention this stuff
- Dark_Dominion
- Senior Member
- Posts: 227
- Joined: Mon Jan 09, 2006 5:49 pm
- Location: Norway
jedwabna poszewka 50x60