VOGONS


First post, by WKjun

User metadata
Rank Newbie
Rank
Newbie

Hi!

I have a problem with the correct MIDI playback in Battle Isle 2, but only in certain circumstances.

I want to playback the music in the best possible quality. So I thought, I just load a large Soundfont instead of the small 2MB default Windows (7) Soundfont. The only difference is that I have to switch from the Windows MIDI Synthesizer to the Creative X-Fi one.

After loading the Soundfont with Creative's Soundfont Bank Manager, I modify the DosBox config from:

mpu401=intelligent
mididevice=default
midiconfig=

to

mpu401=intelligent
mididevice=default
midiconfig=1

So far it works and the music is dramatically better, if there was not an issue, even the developer, Blue Byte Software, could not overcome. Here is a excerpt from the original readme file:

"To initialize your General Midi Board correctly start the program BI2 GM.
This option offers you a sequence, that adapts the Pitch Bending to the sound-board."

If you don't do this, any MIDI playback sounds quiet weird in some stages, as notes are not played back as high or low as needed. It simply ruins any listening enjoyment.

Is there any explanation why BI2 cannot adjust the pitch when the X-Fi drivers manage the Soundfont instead of Windows' default one?
I've testet what happens if I load the Windows Soundfont into the X-Fi cache. It too cannot be adjusted properly. So the problem is not the size of a Soundfont.

I hope somebody can give me a solution for my need. I see no other way than using DosBox, to enjoy the superb MIDI music of this game with large Soundfonts.

A litte note: If one extracts MIDI files from the game, these are pitch-wise unadjusted too and are no good. I left a message regardig this several years ago on http://mirsoft.info, which made it into the collection archive's readme.

Thanks in advance!

Reply 1 of 10, by Reiver102

User metadata
Rank Newbie
Rank
Newbie

Hey WKjun, I think there's a solution here that may work. And hello everyone; I've been lurking for years but I've decided to create a profile and actually contribute for once 😉
I too have an X-Fi and have the same issue in Battle Isle 2 when running GM through Creative's soundfont manager. However, if you install Timidity++ ( http://sourceforge.jp/projects/twsynth ) and set up your soundfont in there, it should work correctly (it comes with a Windows MIDI driver so you can point to it in the DOSBox MIDI config). There's some great instructions for installing and configuring Timidity++ on the ScummVM forums; here's the URL to that post: http://forums.scummvm.org/viewtopic.php?t=5346
I hope this helps!

Reply 2 of 10, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The MIDI tracks in the game use the MT-32's one-octave pitch bend range, but GM synths use a one-note bender range by default. It's possible to instruct a GM synth to use a one-octave bender range, and that's exactly what INI-GM.XMI does, but not all synths handle it 100% correct.

In the case of the Creative Soundfont synth, the problem is that controller message 0x79 (All Controllers Off) is used at the start of each track, erroneously causing the bender range to revert back to the one-note default. The Creative synth has another bug with controller message 0x7C (Omni Off) where MIDI output is completely disabled; but I've so far only seen it being used in a game called Star Quest 1, and the Voyetra Sequencer Plus Gold.

I made a hack to midi.cpp in my own build of DOSBox to deal with these problems for the synth on my Audigy 2 ZS, which appears to work OK for the pitch bends in the Battle Isle 2 tracks; but it's hardware-specific and not suitable for official source.

In addition to Timidity you could also try BASSMIDI, but I can't say for sure if it will handle the bender range correctly. Another option is to use DOSBox with munt or a real MT-32.

Reply 4 of 10, by WKjun

User metadata
Rank Newbie
Rank
Newbie

Both solutions WORK!!! Many thanks to you all. 😁

The next challenge is to find a way to play back each song in the game, so I can record them. As I know the game, most music is selected quiet random and sometimes map and weather dependent. Do you just play the game and enjoy the music, or do you use any tricks to get it to play the song of your joice?

Reply 5 of 10, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If there's no "jukebox" feature in the game, ripping the tracks isn't too difficult. Most of the music is in the LIB\SNG00?.LIB files, and any ripping tool that understands XMI format should be able to extract it.

Once you have the individual XMI files you can play them with WinAmp's MIDI input plugin. I know of one DOS program that will play XMI files using DOSBox, but its interface is fairly minimal; a search for DMKIT150.ZIP should turn up some downloads. If you do end up trying some external playing method, remember to play INI-GM.XMI at least once to set the pitch bend range to one octave.

You can convert the XMI files to MID format, but not all conversion programs do a good job, and you will lose the looping. However, converting to MID is probably necessary if you want to load the music into an editor/sequencer.

Reply 6 of 10, by WKjun

User metadata
Rank Newbie
Rank
Newbie

Thanks again! 😀
I've ripped the XMI files and I remember trying this 10 years ago. Naturally, neither the XMI nor the converted MID files sounded right.
You've said that if I use an external playing method, I need to play the INI-GM.XMI to set the pitch bend range. I assume that Winamp, or any other software player, does not have that capability? It seems as if I have to stick with DosBox and the game itself.

Reply 7 of 10, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Any player, including WinAmp, that can play XMI files can play the INI-GM.XMI file to establish the pitch bend range on the synth; but keep in mind that the bug in the Creative Soundfont synth with controller 0x79 applies whether you're using an external method of playing or running the game in DOSBox; so you'll have to play through a different synth like Timidity or BASSMIDI.

Another thing to remember about using WinAmp is that its MIDI input plugin has an option to send a GM reset at the start of each song, and a reset will (and should) revert the pitch bend range established by INI-GM.XMI; so you should configure the plugin to not send a reset.

Reply 8 of 10, by WKjun

User metadata
Rank Newbie
Rank
Newbie

Interesting! Winamp's plugin is already configured to not use a reset comand after each track. It seems that Winamp or INI-GM.XMI is the problem, as Winamp does not start to play it back (1kb, 0:00 length).

Reply 9 of 10, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I think WinAmp can be fussy, and doesn't actually play files if they contain no note events. INI-GM.XMI contains only controller messages. Anyway, the menu and command-line players in DMKIT should work without problems. DMKIT is based on MIDPAK, which is what DOS game developers often used to play XMI files.