9. Music
Music in Keen 4-6 is stored in so called IMF files. In this part of the tutorial I'll show you how you can use a standard MIDI file to replace the map music of Keen 4.
However you must know that the IMF format is very limited. Most importantly it can only play 4 notes simultaneously. That means you need very careful compositions in order to get a decent sounding IMF song.
Also the IMF file size may be a maximum of 64kb. That means about 3 minutes of music at the max.
This section would not've been possible without the knowledge of keenmodding.org's member "Zero X. Diamond". Thank you for all your hard work!
1. Find or make yourself a nice midi file. For this tutorial I use this example file
I tried both type0 and type1 midi files and they both seem to work.
2. Copy the midi file into your "imfcreator" folder
3. Start IMFCreator
4. It is very important to set the correct settings here! The single most important setting is the IMF Format.
In the "Options" menu make sure that IMF Format -> Wolf3D is active.
I tried the "Duke Nukem 2" setting which worked for other people but it didn't work for me. So use the Wolf3D instead.
5. Other options can be changed but are not necessary
- Change IMF Tics/second to change the speed of the song. (lower values -> faster song)
- Activate "Add Chord Spacing" to make sure every note gets played
6. Load your midi file into IMFCreator
7. If you want to exclude an instrument track from the IMF file just deactivate its entry in the "midi track" list
8. You can preview your song with the blue "Play" button in the bottom right corner
9. When you're happy with your settings press "Convert to IMF" at the bottom of the window
10. Save the IMF file to your "wdc" -> "keen4_mod_files" folder and close IMFCreator
11. Open WDC and load your "keen4project"
12. In the menu click View -> Music
13. You see a list of songs that is available in the game. Highlight the entries to play a preview of the song
14. Find the song that plays on the world map in Keen 4 (in my version it's song 0) and highlight it in the list.
You can also right click on the list entry to change it's name to something more meaningful.
15. Now click on the [...] button in the bottom right corner of the screen to load a replacement file
16. Navigate to the "keen4_mod_files" folder and load the IMF you created just a minute ago
17. Now when you click on the blue "Play" butten with the little 'R' inscribed in it you will hear your replacement music play.
18. If you are happy with your arrangement click File -> Compile -> AudioT and when it's finished press "Done"
13. Now you can quit WDC and change to your "keen4_output" subfolder
14. Copy the following 3 files from "keen4_output" to your main "keen4mod" (you have to overwirte the original files)
- AUDIO.CK4
- AUDIOHED.CK4
- KEEN4E.EXE
15. Now start DosBox again, navigate to your main "keen4mod" folder and type go4
16. As soon as you enter the world map in the game you should hear your new custom music play in the background
If you get the error "Map too tall" then leave DosBox open, Alt+Tab to your main "keen4mod" folder and run instantcarma.exe again. After it's done switch back to DosBox and type go4 again. Now it should play without errors.
Back to Overview |