The never ending effort to recreate a game from 1993 continues. There's now nine developers in the project and none of us do much. Every now and then I get bored and fix something.. go to check it in and discover that, shock, someone else has checked something in too! Then I have to update and resolve conflicts. Take the good with the bad I guess.
Anyway, in release 0.2 you will be happy to discover that we have done some work to get sound faithfully reproduced. For a while, we were focusing on music and trying to get the SDL midi synthesiser to play back this ancient XMIDI format. Believe it or not, this was actually acheived. Slight problem though, Syndicate used custom instruments. This was not uncommon at the time. The result was that the music just didn't sound good.. but it was good enough to ignore for a while.
Having declared that I wasn't going to touch sound.. I got bored one day and changed my mind. I told myself that I really ment I wasn't going to touch music so fiddling with the sound effects was fine. Turns out the sound effects were stored in the data files in much the same way as the sprites are, so it wasn't difficult to get it going. Pretty soon I had the whooshy menu sounds going.. so then I moved onto the weapons and other in-game sounds.
After completing that I figured, what the hell, might as well look at music. Turns out that SDL_Mixer uses a library called timidity to convert MIDI to wav output.. I actually thought it used whatever real MIDI hardware you had.. but apparently not. Anyway, SDL_Mixer will read a file called timidity.cfg in the current directory, in which you can specify custom instruments. You can download packs of these instruments, along with a suitable config file, from various places on the web. At first I figured this was the solution to the custom instrument problem.
Unfortunately, Syndicate predates all this stuff. Sure, MIDI was around when Syndicate came out. Sure, XMIDI is a MIDI format. But your average home PC that Syndicate ran on didn't have MIDI hardware.. it had an adlib card, or a sound blaster.. so that's what Bullfrog made their music for. Some people owned Amigas, and I'm sure Syndicate for the Amiga used the Amiga MIDI hardware to play beautiful sound.. but on a PC of the day, the best you could hope for was that the user had a Gravis Ultra Sound card.. and that's was so rare that Bullfrog never bothered to release GUS support for Syndicate.
Which is a shame, cause it turns out that the instrument format used by timidity is none other than the GUS instrument patch format. So, if Bullfrog had supported the GUS when they released Syndicate, we'd have faithful XMIDI playback right now. But they didn't.
Of course, if anyone out there knows how to make GUS patches from a sample.opl file, please, send me an email.
Instead, what I did was take some advice that someone gave me a while ago: just press CTRL-F6 in dosbox and save a WAV of the original game music. I then edited the wav in Audacity, exported it as an mp3, dumped it in the FreeSynd directory and told SDL_Mixer to play it. I did this for the intro and the great mood music for actual gameplay.
Of course, that gave me the problem that the intro music (and sound effects) were not synchronized with the FLI playback. So I tried fiddling with the frames-per-second of the FLI.. that gave me about half a solution.. but the real problem was that there are actual pauses in the intro.. there's a big table of them. They mainly correspond with those captions you see down the bottom of the screen (eg "CITY NAME: NEW HESSEN EUROPE") which I also wasn't doing. Once I started displaying the captions and doing the pauses, the mp3 started to line up.
So there ya go.. another release of FreeSynd. Right on track to being feature complete by 2013.