More than a texture patch? (Part 5)


More than a texture patch? (Part 5)

ThielHater | 2 apr 2021

This part is not about a graphical, but an acoustic aspect of the Gothic Reloaded Mod. If I remember correctly, we were approached in our public board on the fact that there are some reinterpretations of the Gothic soundtrack on YouTube and whether we wanted to include one of them in our mod. After a quick listening, including Denis Kolesnikov and Artem Kucherov, I was hooked on the idea. But there was one problem: It wasn't that easy from a technical point of view.

The soundtrack of all games in the Gothic series was composed by Kai Rosenkranz, who should be a well-known name to many fans. For this purpose, he probably used DirectMusic Producer at that time, a software provided by Microsoft to create music tracks in DirectMusic format.

But before you can compose anything in it, you first need instruments. These have to be taken to the recording studio and all the notes that you will need later have to be recorded. This process is called sampling. The concept of instruments is not limited to violins, trumpets or pianos, but also includes voices. A vivid example of this is the male chanting that can be heard in Swamp Camp. Of course, these virtual instruments, so-called Soundbanks, can also be purchased or created with a synthesizer. There are many possibilities.

Once you have your orchestra together, you can specify in DirectMusic Producer which instruments should play which note when and for how long. After countless clicks of the composer, you finally have a piece from numerous short recordings, which can be played back in the game.

This basic principle has been preserved until today, but people have more freedom and do not need these preparation steps in the same way. Therefore, no one bothers to click together a piece of music in DirectMusic Producer but uses Logic, Ableton, Cubase, Fruity Loops and what they are all called. So what do we do to get our song into the DirectMusic format?

One solution would be to create an instrument that can only play one note, and play it for as long as the piece lasts. As a sample you would use the piece of music exported as WAV. The problem with this is, that you would have to use complex, antiquated software to do this, which may not run properly and whose technology has been classified as obsolete by Microsoft for more than a decade ago.

Happily, Gothic not only rely on DirectMusic but also the Miles Sound System, for example to play sounds and speech. This allows the playback of any WAV files, but they are relatively large. In Gothic 1 they make up about three quarters of the total data! Nowadays storage space is cheap, but why not use MP3? That would be a new thing in Gothic modding. After an intensive research in the change log of the Miles Sound System it was clear that the MP3 format was already supported at that time. So it would have been possible to save quite a bit of storage space, but presumably the processors of the time were overwhelmed with decoding multiple MP3 files in real time. Anyway, the trick was to embed the MP3 audio stream into a WAV file. Although this sounds questionable, it is quickly done with the right tool:

ffmpeg.exe -i "Input.mp3" -f wav -acodec copy "Output.wav"

As a test I replaced a WAV file, started Gothic and to my amazement it even worked right away! I took this as an opportunity to write another Union plugin, which intercepts the function to play background music via DirectMusic and plays the WAV file with the MP3 stream instead using Miles Sound System. In addition, I still had to make transitions between music tracks as smooth as possible and make the code multithreaded.

Then, however, it was time. For the most immersive experience, we recommend watching the following video with headphones and in full screen mode. Each scene was shot as a one-shot and not edited. This means you'll see and hear Gothic exactly as it will once may sound with the Gothic Reloaded Mod.

Update: As part of the 20th anniversary of Gothic, Don-Esteban from the World of Gothic conducted some interviews, including an interview with Kai Rosenkranz! If you want to know even more about the background of the Gothic soundtrack, you should definitely read on there.